import AEntityUpdateRequest from './AEntityUpdateRequest'; import { Entity, IdentifiableEntity, Mutation } from '../../api/types'; import { EntityFieldKeyDefinition, FieldReference } from '../fieldReferences'; /** * Sets value of an entity * * locally, uses sourceKey to update it * if updated by graphql, updateKey is prioritized, then sourceKey is used */ export default class EntitySetValueRequest extends AEntityUpdateRequest { sourceKey: FieldReference; updateKey: FieldReference; value: any; /** * @param {{sourceKey, updateKey?}} fieldDef * @param {Object|string|number|boolean} value */ constructor(fieldDef: EntityFieldKeyDefinition, value: any); /** * @param {Object} entity * @param {function} updateEntity * @returns {Promise|undefined} */ performLocalUpdate(entity: any, updateEntity: any): any; performGraphqlUpdate(entity: IdentifiableEntity, updateMutation: Mutation): any; }