import { Id, assertValid } from '../id.js';
/**
 * Deletes an entity from a space.
 *
 * @example
 * ```ts
 * const { ops } = await deleteEntity({ id: entityId });
 * ```
 *
 * @param params – {@link DeleteEntityParams}
 * @returns The operations to delete the entity.
 */
export const deleteEntity = ({ id }) => {
    assertValid(id, '`id` in `deleteEntity`');
    const op = {
        type: 'DELETE_ENTITY',
        id: Id(id),
    };
    return { id: Id(id), ops: [op] };
};
//# sourceMappingURL=delete-entity.js.map