import { loopPost, withTeamKey } from "../lib/loop-api.js";
export async function propertyRequest(params) {
    const { accountId, teamName, propertyId, department, action, ...body } = params;
    const result = await withTeamKey(accountId, teamName, "properties", "loop-property-request", async (apiKey) => {
        const path = `/property/residential/${department}/${propertyId}/${action}`;
        return loopPost(apiKey, path, body, "loop-property-request", teamName);
    });
    const actionLabel = action === "call-back" ? "callback" : action;
    return `${actionLabel} request submitted for property ${propertyId} (${department}) via team "${teamName}".`;
}
//# sourceMappingURL=property-request.js.map