ga4-export-fixer 0.1.6-dev.6 → 0.1.6-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/helpers.js +8 -2
- package/package.json +1 -1
package/helpers.js
CHANGED
|
@@ -563,8 +563,14 @@ Aggregation
|
|
|
563
563
|
* // => SQL expression for the last user_id by event_timestamp.
|
|
564
564
|
*/
|
|
565
565
|
const aggregateValue = (column, aggregateType, timestampColumn) => {
|
|
566
|
-
if (typeof column === 'undefined'
|
|
567
|
-
throw new Error("aggregateValue: 'column'
|
|
566
|
+
if (typeof column === 'undefined') {
|
|
567
|
+
throw new Error("aggregateValue: 'column' is a required parameter and must be defined.");
|
|
568
|
+
}
|
|
569
|
+
if (typeof aggregateType === 'undefined') {
|
|
570
|
+
throw new Error("aggregateValue: 'aggregateType' is a required parameter and must be defined.");
|
|
571
|
+
}
|
|
572
|
+
if ((aggregateType === 'first' || aggregateType === 'last') && typeof timestampColumn === 'undefined') {
|
|
573
|
+
throw new Error(`aggregateValue: 'timestampColumn' is required when aggregateType is '${aggregateType}'.`);
|
|
568
574
|
}
|
|
569
575
|
|
|
570
576
|
if (aggregateType === 'max') {
|