I've done this both ways. When I worked for the DOT we considered all lateral forces (wind, temperature, braking, stream, ice, etc.) as being applied to the piles with fixed heads in the direction perpendicular to the beams (or slab spans) and with a free head in the direction of the spans...