Methods

  • Creates a new field value.

    Parameters

    Returns Promise<FieldValue>

    The created field value object.

    const newFieldValue = await affinity.fieldValues.create({
    field_id: 1284,
    entity_id: 38706,
    value: "Architecture"
    })
    console.log(newFieldValue)
  • Deletes a specific field value.

    Parameters

    • __namedParameters: {
          field_value_id: number;
      }
      • field_value_id: number

    Returns Promise<boolean>

    boolean indicating whether the field value was successfully deleted.

    const success = await affinity.fieldValues.delete({
    field_value_id: 20406836
    })
    console.log(success ? 'Field value deleted': 'Field value not deleted')
  • Updates an existing field value.

    Parameters

    Returns Promise<FieldValue>

    The updated field value object.

    const updatedFieldValue = await affinity.fieldValues.update({
    field_value_id: 20406836,
    value: "Healthcare"
    })
    console.log(updatedFieldValue)