From 6bd6c143ddc4631f3fd0e769d6a2ce5e3d71365e Mon Sep 17 00:00:00 2001 From: brendanjbond Date: Thu, 9 May 2024 19:05:50 -0500 Subject: [PATCH] update most form params to optional --- src/types/Form.ts | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/types/Form.ts b/src/types/Form.ts index c92ec744..f821f6d9 100644 --- a/src/types/Form.ts +++ b/src/types/Form.ts @@ -3,35 +3,35 @@ import { Access, Component, ProjectId, SubmissionId } from 'types'; export type FormId = string; export interface Form { - _id: FormId; - _vid: number; + _id?: FormId; + _vid?: number; - title: string; - name: string; - path: string; - type: FormType; + title?: string; + name?: string; + path?: string; + type?: FormType; display?: FormDisplay; action?: string; tags?: string[]; - access: Access[]; - submissionAccess: Access[]; - fieldMatchAccess: any; - owner: SubmissionId; - machineName: string; + access?: Access[]; + submissionAccess?: Access[]; + fieldMatchAccess?: any; + owner?: SubmissionId; + machineName?: string; components: Component[]; settings?: FormSettings; - properties: Record; - project: ProjectId; - revisions: 'current' | 'original' | ''; - submissionRevisions: 'true' | ''; + properties?: Record; + project?: ProjectId; + revisions?: 'current' | 'original' | ''; + submissionRevisions?: 'true' | ''; controller?: string; builder?: boolean; page?: number; // Database timestamps - created: Date | string; - modified: Date | string; - deleted: Date | string; + created?: Date | string; + modified?: Date | string; + deleted?: Date | string; } export type FormType = 'form' | 'resource';