Implements

Constructors

Properties

jsonParseReviver: undefined | (key: string, value: any) => any

Methods

    • Converts the field to newFieldType. The conversion can reset type-specific configuration (length, constraint, format), clear list items when leaving the List type, and clear a default value that cannot be reinterpreted in the new type. Entries already assigned the field may have their values dropped if the existing data cannot survive the new type's domain.
    • When the conversion would lose data, allowDataLoss = true is required; otherwise the request is rejected with 400. The server treats the conversion as lossy unless it is one of the explicit safe widenings (Date → DateTime, ShortInteger → LongInteger, ShortInteger → Number, LongInteger → Number) and clearing list items / resetting a constraint / dropping a default would not actually discard data. A field with assigned entries that is not undergoing one of the safe widenings is always treated as lossy.
    • Required OAuth scope: repository.Write

    Parameters

    Returns Promise<LfRepositoryClientV2.FieldDefinition>

    Successfully changed the field definition's type.

    • Deletes the specified field definition. Behavior when the field is referenced by templates or assigned to entries mirrors the underlying repository server response — if rejected by the server, the response surfaces the server error.
    • Required OAuth scope: repository.Write

    Parameters

    • args: { fieldId: number; repositoryId: string }
      • fieldId: number

        The ID of the field definition to delete.

      • repositoryId: string

        The requested repository ID.

    Returns Promise<void>

    Successfully deleted the field definition.

    • Useful for impact analysis before performing destructive operations such as type changes or deletion.
    • Required OAuth scope: repository.Read

    Parameters

    • args: { fieldId: number; repositoryId: string; select?: null | string }
      • fieldId: number

        The ID of the field definition.

      • repositoryId: string

        The requested repository ID.

      • Optionalselect?: null | string

        (optional) Limits the properties returned in the result.

    Returns Promise<LfRepositoryClientV2.AssignedEntryCountResponse>

    Successfully returned the count of entries assigned to the field definition.

    • Lists template definitions that include the specified field. Useful before performing destructive operations on the field.
    • Required OAuth scope: repository.Read

    Parameters

    • args: {
          count?: boolean;
          fieldId: number;
          orderby?: null | string;
          repositoryId: string;
          select?: null | string;
      }
      • Optionalcount?: boolean

        (optional) Indicates whether the total count of items within a collection are returned in the result.

      • fieldId: number

        The ID of the field definition.

      • Optionalorderby?: null | string

        (optional) Specifies the order in which items are returned. The maximum number of expressions is 5.

      • repositoryId: string

        The requested repository ID.

      • Optionalselect?: null | string

        (optional) Limits the properties returned in the result.

    Returns Promise<LfRepositoryClientV2.TemplateDefinition[]>

    Successfully returned the templates that contain the field definition.

    • Returns a single field definition associated with the specified ID.
    • Useful when a route provides a minimal amount of details and more information about the specific field definition is needed.
    • Allowed OData query options: Select
    • Required OAuth scope: repository.Read

    Parameters

    • args: {
          culture?: null | string;
          fieldId: number;
          repositoryId: string;
          select?: null | string;
      }
      • Optionalculture?: null | string

        (optional) An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag.

      • fieldId: number

        The requested field definition ID.

      • repositoryId: string

        The requested repository ID.

      • Optionalselect?: null | string

        (optional) Limits the properties returned in the result.

    Returns Promise<LfRepositoryClientV2.FieldDefinition>

    Successfully returned requested field definition.

    • Returns the field's configured list-item values in repository-configured order.
    • Applies only to list-backed fields; non-list fields return an empty array.
    • Required OAuth scope: repository.Read

    Parameters

    • args: { fieldId: number; repositoryId: string; select?: null | string }
      • fieldId: number

        The ID of the field definition.

      • repositoryId: string

        The requested repository ID.

      • Optionalselect?: null | string

        (optional) Limits the properties returned in the result.

    Returns Promise<LfRepositoryClientV2.ListValuesResponse>

    Successfully returned the list values for the field definition.

    • Returns the custom-properties bag persisted on the field definition. The bag is an opaque application-defined string → string map scoped to the definition itself (not to a user), useful for attaching integration metadata or application-specific configuration that belongs with the field — for example to encode list-field display preferences such as sort order, or to record an external system's identifier for the field.
    • Keys are application-defined; recommend a namespace prefix (e.g. com.acme.workflow.stage, myapp.kind) to avoid collisions across applications.
    • The response may include entries written by other applications or by system-managed tooling. Callers should leave unrecognized keys untouched on subsequent UpdateFieldProperties calls — round-tripping them in set preserves them, including them in remove deletes them.
    • Required OAuth scope: repository.Read

    Parameters

    • args: { fieldId: number; repositoryId: string; select?: null | string }
      • fieldId: number

        The ID of the field definition.

      • repositoryId: string

        The requested repository ID.

      • Optionalselect?: null | string

        (optional) Limits the properties returned in the result.

    Returns Promise<LfRepositoryClientV2.FieldPropertiesResponse>

    Successfully returned the extended properties for the field definition.

    • Returns a paged listing of field definitions available in the specified repository.
    • Useful when trying to find a list of all field definitions available, rather than only those assigned to a specific entry/template.
    • Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.
    • Required OAuth scope: repository.Read

    Parameters

    • args: {
          count?: boolean;
          culture?: null | string;
          orderby?: null | string;
          prefer?: null | string;
          repositoryId: string;
          select?: null | string;
          skip?: number;
          top?: number;
      }
      • Optionalcount?: boolean

        (optional) Indicates whether the total count of items within a collection are returned in the result.

      • Optionalculture?: null | string

        (optional) An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag.

      • Optionalorderby?: null | string

        (optional) Specifies the order in which items are returned. The maximum number of expressions is 5.

      • Optionalprefer?: null | string

        (optional) An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.

      • repositoryId: string

        The requested repository ID.

      • Optionalselect?: null | string

        (optional) Limits the properties returned in the result.

      • Optionalskip?: number

        (optional) Excludes the specified number of items of the queried collection from the result.

      • Optionaltop?: number

        (optional) Limits the number of items returned from a collection. The maximum value is 150.

    Returns Promise<LfRepositoryClientV2.FieldDefinitionCollectionResponse>

    Successfully returned field definitions.

  • It will continue to make the same call to get a list of field definitions of a fixed size (i.e. maxpagesize) until it reaches the last page (i.e. when next link is null/undefined) or whenever the callback function returns false.

    Parameters

    • args: {
          callback: (
              response: LfRepositoryClientV2.FieldDefinitionCollectionResponse,
          ) => Promise<boolean>;
          count?: boolean;
          culture?: string;
          maxPageSize?: number;
          orderby?: string;
          prefer?: string;
          repositoryId: string;
          select?: string;
          skip?: number;
          top?: number;
      }
      • callback: (
            response: LfRepositoryClientV2.FieldDefinitionCollectionResponse,
        ) => Promise<boolean>

        async callback function that will accept the current page results and return a boolean value to either continue or stop paging.

      • Optionalcount?: boolean

        (optional) Indicates whether the total count of items within a collection are returned in the result.

      • Optionalculture?: string

        (optional) An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag. The formatFieldValues query parameter must be set to true, otherwise culture will not be used for formatting.

      • OptionalmaxPageSize?: number

        (optional) the maximum page size or number of field definitions allowed per API response schema.

      • Optionalorderby?: string

        (optional) Specifies the order in which items are returned. The maximum number of expressions is 5.

      • Optionalprefer?: string

        (optional) An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.

      • repositoryId: string

        The requested repository ID.

      • Optionalselect?: string

        (optional) Limits the properties returned in the result.

      • Optionalskip?: number

        (optional) Excludes the specified number of items of the queried collection from the result.

      • Optionaltop?: number

        (optional) Limits the number of items returned from a collection.

    Returns Promise<void>

    • Combines the values of the source fields into a new field. onConflict controls per-entry value conflicts: Fail (default) aborts on conflict, MakeMultivalue keeps all values, UseFirstField keeps the first and discards the rest.
    • UseFirstField is lossy and requires allowDataLoss = true; otherwise the request is rejected with 400.
    • removeFromTemplates (default false) also removes the source fields from any templates that contain them. The source field definitions themselves are preserved regardless — the merge creates a new field, it does not delete the originals. Callers that want the sources gone must call DeleteFieldDefinition on each after the merge succeeds.
    • autoRename (default false) asks the repository to auto-select a non-conflicting name on collision; whether the repository honors this for merges is version-dependent, so callers should pre-validate newFieldName and treat an "already exists" error as a genuine collision.
    • At least two source fields are required.
    • Required OAuth scope: repository.Write

    Parameters

    Returns Promise<LfRepositoryClientV2.FieldDefinition>

    Successfully merged the source fields into the new field definition.

  • Parameters

    • response: Response

    Returns Promise<void>