"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createOrUpdatePersonById = createOrUpdatePersonById;
async function createOrUpdatePersonById(request, domain, personId, person) {
    if (personId) {
        return request(`https://${domain}.pipedrive.com/api/v1/persons/${personId}`, {
            method: 'put',
            json: person
        });
    }
    else {
        return request(`https://${domain}.pipedrive.com/api/v1/persons`, {
            method: 'post',
            json: person
        });
    }
}
//# sourceMappingURL=persons.js.map