refactor(form): model links as fields (#36129)
This commit is contained in:
parent
6a85f0d3db
commit
a6449cb45c
24 changed files with 2409 additions and 1430 deletions
|
|
@ -1408,7 +1408,7 @@ export type GlobalEvent = {
|
|||
id: string
|
||||
type: "form.created"
|
||||
properties: {
|
||||
form: FormFormInfo | FormUrlInfo
|
||||
form: FormInfo
|
||||
}
|
||||
}
|
||||
| {
|
||||
|
|
@ -3545,22 +3545,30 @@ export type FormMultiselectField = {
|
|||
default?: Array<string>
|
||||
}
|
||||
|
||||
export type FormFormInfo = {
|
||||
id: string
|
||||
sessionID: string
|
||||
title: string
|
||||
metadata?: FormMetadata
|
||||
mode: "form"
|
||||
fields: Array<FormStringField | FormNumberField | FormIntegerField | FormBooleanField | FormMultiselectField>
|
||||
export type FormExternalField = {
|
||||
key: string
|
||||
type: "external"
|
||||
url: string
|
||||
title?: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
export type FormUrlInfo = {
|
||||
export type FormField =
|
||||
| FormStringField
|
||||
| FormNumberField
|
||||
| FormIntegerField
|
||||
| FormBooleanField
|
||||
| FormMultiselectField
|
||||
| FormExternalField
|
||||
|
||||
export type FormFields = Array<FormField>
|
||||
|
||||
export type FormInfo = {
|
||||
id: string
|
||||
sessionID: string
|
||||
title: string
|
||||
metadata?: FormMetadata
|
||||
mode: "url"
|
||||
url: string
|
||||
fields: FormFields
|
||||
}
|
||||
|
||||
export type FormValue =
|
||||
|
|
@ -5835,9 +5843,7 @@ export type FormCreatePayload = {
|
|||
id?: string
|
||||
title: string
|
||||
metadata?: FormMetadata
|
||||
mode: "form" | "url"
|
||||
fields?: Array<FormStringField | FormNumberField | FormIntegerField | FormBooleanField | FormMultiselectField>
|
||||
url?: string
|
||||
fields: FormFields
|
||||
}
|
||||
|
||||
export type FormState =
|
||||
|
|
@ -6558,7 +6564,7 @@ export type FormCreated = {
|
|||
type: "form.created"
|
||||
location?: LocationRef
|
||||
data: {
|
||||
form: FormFormInfo | FormUrlInfo
|
||||
form: FormInfo
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -7830,7 +7836,7 @@ export type EventFormCreated = {
|
|||
id: string
|
||||
type: "form.created"
|
||||
properties: {
|
||||
form: FormFormInfo | FormUrlInfo
|
||||
form: FormInfo
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -9888,33 +9894,21 @@ export type FormMultiselectFieldV2 = {
|
|||
default?: Array<string>
|
||||
}
|
||||
|
||||
export type FormFormInfoV2 = {
|
||||
id: string
|
||||
sessionID: string
|
||||
title: string
|
||||
metadata?: FormMetadata
|
||||
mode: "form"
|
||||
fields: Array<FormStringFieldV2 | FormNumberField | FormIntegerField | FormBooleanField | FormMultiselectFieldV2>
|
||||
}
|
||||
export type FormFieldsV2 = [FormField, FormField]
|
||||
|
||||
export type FormUrlInfoV2 = {
|
||||
export type FormInfoV2 = {
|
||||
id: string
|
||||
sessionID: string
|
||||
title: string
|
||||
metadata?: FormMetadata
|
||||
mode: "url"
|
||||
url: string
|
||||
fields: FormFieldsV2
|
||||
}
|
||||
|
||||
export type FormCreatePayloadV2 = {
|
||||
id?: string | null
|
||||
title: string
|
||||
metadata?: FormMetadata
|
||||
mode: "form" | "url"
|
||||
fields?: Array<
|
||||
FormStringFieldV2 | FormNumberField | FormIntegerField | FormBooleanField | FormMultiselectFieldV2
|
||||
> | null
|
||||
url?: string | null
|
||||
fields: FormFieldsV2
|
||||
}
|
||||
|
||||
export type FormValueV2 =
|
||||
|
|
@ -10623,22 +10617,22 @@ export type FormMultiselectField1 = {
|
|||
default?: Array<string>
|
||||
}
|
||||
|
||||
export type FormFormInfo1 = {
|
||||
id: string
|
||||
sessionID: string
|
||||
title: string
|
||||
metadata?: FormMetadata1
|
||||
mode: "form"
|
||||
fields: Array<FormStringField1 | FormNumberField1 | FormIntegerField1 | FormBooleanField1 | FormMultiselectField1>
|
||||
}
|
||||
export type FormField1 =
|
||||
| FormStringField1
|
||||
| FormNumberField1
|
||||
| FormIntegerField1
|
||||
| FormBooleanField1
|
||||
| FormMultiselectField1
|
||||
| FormExternalField
|
||||
|
||||
export type FormUrlInfo1 = {
|
||||
export type FormFields1 = [FormField1, FormField1]
|
||||
|
||||
export type FormInfo1 = {
|
||||
id: string
|
||||
sessionID: string
|
||||
title: string
|
||||
metadata?: FormMetadata1
|
||||
mode: "url"
|
||||
url: string
|
||||
fields: FormFields1
|
||||
}
|
||||
|
||||
export type FormCreatedV2 = {
|
||||
|
|
@ -10650,7 +10644,7 @@ export type FormCreatedV2 = {
|
|||
type: "form.created"
|
||||
location?: LocationRefV2
|
||||
data: {
|
||||
form: FormFormInfo1 | FormUrlInfo1
|
||||
form: FormInfo1
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -17240,7 +17234,7 @@ export type V2FormRequestListResponses = {
|
|||
*/
|
||||
200: {
|
||||
location: LocationInfoV2
|
||||
data: Array<FormFormInfoV2 | FormUrlInfoV2>
|
||||
data: Array<FormInfoV2>
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -17277,7 +17271,7 @@ export type V2SessionFormListResponses = {
|
|||
* Success
|
||||
*/
|
||||
200: {
|
||||
data: Array<FormFormInfoV2 | FormUrlInfoV2>
|
||||
data: Array<FormInfoV2>
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -17318,7 +17312,7 @@ export type V2SessionFormCreateResponses = {
|
|||
* Success
|
||||
*/
|
||||
200: {
|
||||
data: FormFormInfoV2 | FormUrlInfoV2
|
||||
data: FormInfoV2
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -17356,7 +17350,7 @@ export type V2SessionFormGetResponses = {
|
|||
* Success
|
||||
*/
|
||||
200: {
|
||||
data: FormFormInfoV2 | FormUrlInfoV2
|
||||
data: FormInfoV2
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue