Request body for merging two or more field definitions into a new field definition.

Implements

Constructors

Properties

allowDataLoss?: boolean

Acknowledges that the requested merge will lose data and authorizes it to proceed. Required (must be true) only when the merge is lossy — i.e. onConflict = UseFirstField, which discards conflicting values. When the merge is lossless (Fail or MakeMultivalue) this flag is ignored. A lossy merge without this flag returns 400 (data_loss_expected).

autoRename?: boolean

When true, requests that the repository auto-select a non-conflicting name if newFieldName collides with an existing field. Defaults to false. Whether the repository actually rewrites the name on collision is repository-version-dependent; callers should not rely on it. The safe pattern is to ensure newFieldName is unique before calling, and to treat an "already exists" error response as a genuine collision.

newFieldName: string

The name of the new merged field definition. Required. Must be unique within the repository unless autoRename is set.

How to resolve per-entry value conflicts across the source fields. Defaults to Fail (abort on conflict — nothing is discarded). UseFirstField discards conflicting values and therefore requires allowDataLoss = true.

removeFromTemplates?: boolean

When true, removes the source fields from every template that contains them as part of the merge. Defaults to false. This is a destructive side effect on template definitions; opt in explicitly.

sourceFieldIds: number[]

The IDs of the field definitions to merge. At least two are required. Their values are combined into a new field; see onConflict for how per-entry value conflicts are resolved. The source field definitions are preserved by this operation — only their per-entry values are migrated to the new merged field. Use DeleteFieldDefinition on each source after the merge if the originals are no longer needed.

Methods