UNPKG

@jd-data-limited/easy-fm

Version:

easy-fm is a Node.js module that allows you to interact with a [FileMaker database stored](https://www.claris.com/filemaker/) on a [FileMaker server](https://www.claris.com/filemaker/server/). This module interacts with your server using the [FileMaker

31 lines (30 loc) 1.21 kB
import { EventEmitter } from 'events'; import { RecordTypes } from '../types.js'; import { type RecordFieldsMap } from '../layouts/recordFieldsMap.js'; import { type LayoutBase } from '../layouts/layoutBase.js'; import { type ApiFieldData } from '../models/apiResults.js'; import { Field, type FieldValue } from './field.js'; export declare abstract class RecordBase<T extends RecordFieldsMap> extends EventEmitter { readonly layout: LayoutBase; readonly type: RecordTypes; recordId: number; modId: number; /** * An object containing each field in this record. * * @template T - The type of the field. */ fields: T; protected portalData: any[]; protected constructor(layout: LayoutBase, recordId: number, modId: number | undefined, fieldData: ApiFieldData); get endpoint(): string; /** * A boolean indicating whether this record has been modified and should be committed * * @returns {boolean} A boolean value indicating whether any of the fields have been edited. */ get edited(): boolean; get fieldsArray(): Array<Field<FieldValue>>; protected processFieldData(fieldData: ApiFieldData): T; _onSave(): void; }