import { loopPost, withTeamKey } from "../lib/loop-api.js";
export async function marketingMatchRequest(params) {
    const { accountId, teamName, propertyId, department, action, ...body } = params;
    await withTeamKey(accountId, teamName, "marketing", "loop-marketing-match-request", async (apiKey) => {
        const prefix = department === "lettings" ? "/marketing/rentals" : "/marketing";
        const path = `${prefix}/matching/${propertyId}/${action}`;
        return loopPost(apiKey, path, body, "loop-marketing-match-request", teamName);
    });
    return `${action} request submitted for matching property ${propertyId} (${department}) via team "${teamName}".`;
}
//# sourceMappingURL=marketing-match-request.js.map