code><span class="kd">func</span> <span class="nf">recordAction</span><span class="p">(</span><span class="n">_</span> <span class="nv">action</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">byUserID</span> <span class="nv">userID</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">onItemID</span> <span class="nv">itemID</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>