For your primary it depends on your skill level. If you are able to get headshots, use the heatmaker because it's much quieter and therefore tougher to pinpoint the location of, and occasionally the boost is actually very helpful if you can remember to use it.
For the secondary I personally use cozy camper because it lets me regenerate health without having to go to an HP pack, and I never need to worry about having like 3 hp missing and that being enough to kill me. Remember to spy check every few seconds and you won't need the razorback, especially since if they see it they'll use their pistol. If pyros are really a problem I'd rather use jarate than the danger shield.
Personally I find the best melee to be the stock/reskins, bushwhacka forces you to use either sydney sleeper or jarate or else it's pure downgrade, and with the shahanshah it can't kill a spy in 2 hits unless you let them hurt you first, which is dangerous. Stock is consistent and reliable so I just use that.
My common loadout is this:
I use the cozy camper but that doesn't much help me anyway ;p you can still use it though, it can help you in the long run if you can last a while. Stock is always good but 1hp every second or so is always good.
Bazaar begarin when you're comfy headshotting everything on your way. High risks for highs rewards, like making you headshot anyone in 2-3 seconds. At your 3rd head, you'll get a huge boost for your charge. Careful of not getting too cocky and losing them. You can also lose them against a demo knight / soldier air strike ( they can take your heads for their head counters, making them alot powerful at once ! ). Body is out of the question !
Razorback is still number 1 fav, blocking a spy backstab when you are on your edges sniping someone really annoying to your team is important, so you can rely on it to give you the last second warning. While it will prevent a backstab, won't prevent an headshot from an ambassy, you still have to check but at least you don't get one shot by any spy.
Shahanshah is okayish if you're decent at melee, Shiv can help you check spy easily with bleed, but the base one is still the most reliable. I usually run pan or shiv, Shahan isn't for me
That's my set I use when I play casual from times to times.
Notable stuff. Ruler mentioned the Heatmaker, and it's actually a good one. The buff it gives you can bring you 3-4 chances to make a good headshot on that one target you missed without losing your sight on it. I highly suggest running a razor with that one, but it's my personal taste, just to not waste the boost if a spy is passing by and you didn't caught him.
The base one is a good one too, simple and efficient. If you die without headshot, it's better than the Bazaar without any doubt, but as you get good, it have its limits.
SMG... Well, if it hits, right. It's okay but Cleaner's can bring you a minicrit boost, which makes a perfect synergy with your bushwaka. Maybe building the boost then when you need it the most, you activate it and you go for it on melee. I haven't tested this one a bunch, though...
I won't say Machina is a bad one, but it gives your position... Sniper for me is based on a cycle ; aim, shoot, new position. As you change all the time your position to surprise your enemies, Machina will shoot tracer bullets... If you miss, they will know where you are. 25% damage+ is still a decent bonus against healbuffed classes, heavies, solly, demo... But it's situational. You don't always get them, unless you really see them all the time pushing a cart or protecting an objective.
All of these are from personal experiences. I'm no expert at sniper, but that's how I mainly play. Since I'm always stressed to lose heads with Bazaar, I play with base - razor - shiv/pan. It works the most for me.
I only play surf and these are my usual loadouts: Huntsman, SMG, Tribalman's Shiv (on small arena or short maps) Bazaar Bargain, Jarate, Bushwaka/stock (on maps with spawn/jail camp(Usually behind wall or above platform)) Stock/Reskin/Machina, Cozy Camper, Stock/reskin (when I try to shoot while being on a high speed, like a ninja and don't have to search for health every time)