When you sign a lease agreement for your new apartment, it should clearly spell out the responsibilities and repairs that both you, as the tenant, and your landlord are responsible for making. If it doesn't, then you may benefit from asking for clarification on such matters.
As you may expect, it's virtually always the responsibility of the landlord to take care of any and all common areas in your building. This includes cleaning, adequate lighting in common areas and ensuring the proper maintenance of all elevators, the lobby, outdoor areas, stairwells and the laundry room. It's also the responsibility of the landlord to clearly designate and provide clear access to all emergency exits as well.
Speaking of fires, it's the responsibility of the landlord to also equip their building with enough carbon monoxide and smoke alarms to detect potentially dangerous situations. It's their responsibility to fix them if they stop working too. The responsibility falls on the shoulders of the tenant to replace batteries and to ensure proper functioning of these within their own units.
As for both repairs and pest control, it's the role of the landlord to do whatever is necessary to keep an apartment habitable. As for such requests, once notified of such a concern, the burden falls on the landlord to quickly remedy the situation.
Most jurisdiction's laws afford tenants the right to deduct money from their rent payment or to withhold it if essential repairs aren't made or pest control isn't performed. It may even be possible for a tenant to break his or her lease and sue for damages if an apartment is no longer habitable.
For a unit to be considered as habitable, it must have a functioning furnace and hot water heater at the bare minimum.
A tenant is generally only responsible for repairs paid for damage caused by themselves, their pets or their guests. If a landlord ultimately makes a repair for damage that you as the tenant have caused, then they can assess you fees for doing so.
If you're experiencing a problem in your apartment building that seems to have gone unresolved, then a New York attorney can advise you of legal options available to you in your case.
Source: Platinum Properties NYC, "Landlord vs. tenant: Who's responsible for what?," accessed March 16, 2018