/** * Pure helpers for SAFELY editing a GTM tag's parameters. * * GTM's `tags.update` is a FULL replace (PUT) — any field omitted from the request * body is cleared. So a naive "send only the new parameter" update WIPES a GA4 event * tag's eventName / measurementId / measurementIdOverride / eventSettingsTable. These * helpers do the read-modify-write merge that keeps the rest of the tag intact. * * No runtime googleapis import — types only (erased at build). */ import type { tagmanager_v2 } from 'googleapis'; type Param = tagmanager_v2.Schema$Parameter; type Tag = tagmanager_v2.Schema$Tag; /** Merge `provided` parameters onto `existing` BY KEY: a provided param with the same * key replaces the existing one; new keys are added; existing keys not provided are * kept. Keyless params (rare for tags) are concatenated. PURE. */ export declare function mergeParametersByKey(existing: Param[], provided: Param[]): Param[]; /** Add GA4 event parameters to a GA4 Event tag (type 'gaawe') by appending them to the * tag's `eventSettingsTable` (the GTM-correct place — NOT top-level params), creating * that table if absent. A param whose name already exists has its VALUE updated rather * than duplicated. Every other field of the tag is preserved. PURE — returns a NEW tag * resource (the caller PUTs it back). */ export declare function addEventParameters(tag: Tag, params: Array<{ name: string; value: string; }>): Tag; export {}; //# sourceMappingURL=tagParams.d.ts.map