"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.flattenPayload = flattenPayload;
exports.flattenPayloadBatch = flattenPayloadBatch;
function flattenPayload(payload) {
    const { app_properties, location_properties, page_properties, utm_properties, ...otherFields } = payload;
    return {
        ...otherFields,
        ...(app_properties || {}),
        ...(location_properties || {}),
        ...(page_properties || {}),
        ...(utm_properties || {})
    };
}
function flattenPayloadBatch(payloads) {
    return payloads.map(flattenPayload);
}
//# sourceMappingURL=payload-transformer.js.map