@segment/action-destinations 3.94.1-alpha.8 → 3.94.1-alpha.9

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.
@@ -13,9 +13,15 @@ function verifyParams(params) {
13
13
  if (!params) {
14
14
  return;
15
15
  }
16
- Object.values(params).forEach((value) => {
17
- if (typeof value == 'object' || value instanceof Array) {
18
- throw new actions_core_1.IntegrationError('GA4 does not accept null, array, or nested values for event parameters and item parameters. Please ensure you are using allowed data types.', 'Invalid value', 400);
16
+ Object.entries(params).forEach(([key, value]) => {
17
+ if (value instanceof Array) {
18
+ throw new actions_core_1.IntegrationError(`Param [${key}] has unsupported value of type [Array]. GA4 does not accept null, array, or object values for event parameters and item parameters.`, 'Invalid value', 400);
19
+ }
20
+ else if (value == null) {
21
+ throw new actions_core_1.IntegrationError(`Param [${key}] has unsupported value of type [NULL]. GA4 does not accept null, array, or object values for event parameters and item parameters.`, 'Invalid value', 400);
22
+ }
23
+ else if (typeof value == 'object') {
24
+ throw new actions_core_1.IntegrationError(`Param [${key}] has unsupported value of type [${typeof value}]. GA4 does not accept null, array, or object values for event parameters and item parameters.`, 'Invalid value', 400);
19
25
  }
20
26
  });
21
27
  }
@@ -24,9 +30,12 @@ function verifyUserProps(userProperties) {
24
30
  if (!userProperties) {
25
31
  return;
26
32
  }
27
- Object.values(userProperties).forEach((value) => {
28
- if ((value != null && typeof value == 'object') || value instanceof Array) {
29
- throw new actions_core_1.IntegrationError('GA4 does not accept array or nested values for user properties. Please ensure you are using allowed data types.', 'Invalid value', 400);
33
+ Object.entries(userProperties).forEach(([key, value]) => {
34
+ if (value instanceof Array) {
35
+ throw new actions_core_1.IntegrationError(`Param [${key}] has unsupported value of type [Array]. GA4 does not accept array or object values for user properties.`, 'Invalid value', 400);
36
+ }
37
+ else if (value != null && typeof value == 'object') {
38
+ throw new actions_core_1.IntegrationError(`Param [${key}] has unsupported value of type [${typeof value}]. GA4 does not accept array or object values for user properties.`, 'Invalid value', 400);
30
39
  }
31
40
  });
32
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ga4-functions.js","sourceRoot":"","sources":["../../../src/destinations/google-analytics-4/ga4-functions.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,2CAAgD;AAGhD,SAAgB,cAAc,CAAC,QAAgB;IAC7C,IAAI,CAAC,8BAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,EAAE;QACxD,MAAM,IAAI,+BAAgB,CAAC,GAAG,QAAQ,gCAAgC,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;KACvG;AACH,CAAC;AAJD,wCAIC;AAGD,SAAgB,YAAY,CAAC,MAA0B;IACrD,IAAI,CAAC,MAAM,EAAE;QACX,OAAM;KACP;IAED,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACtC,IAAI,OAAO,KAAK,IAAI,QAAQ,IAAI,KAAK,YAAY,KAAK,EAAE;YACtD,MAAM,IAAI,+BAAgB,CACxB,6IAA6I,EAC7I,eAAe,EACf,GAAG,CACJ,CAAA;SACF;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AAdD,oCAcC;AAED,SAAgB,eAAe,CAAC,cAAkC;IAChE,IAAI,CAAC,cAAc,EAAE;QACnB,OAAM;KACP;IAED,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QAE9C,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAY,KAAK,EAAE;YACzE,MAAM,IAAI,+BAAgB,CACxB,iHAAiH,EACjH,eAAe,EACf,GAAG,CACJ,CAAA;SACF;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AAfD,0CAeC;AAGD,SAAgB,gBAAgB,CAAC,SAA6B;IAC5D,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,SAAS,CAAA;KACjB;IAGD,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,EAAE;QACtB,OAAO,CAAC,SAAS,CAAA;KAClB;IAGD,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,CAAA;AACrC,CAAC;AAZD,4CAYC"}
1
+ {"version":3,"file":"ga4-functions.js","sourceRoot":"","sources":["../../../src/destinations/google-analytics-4/ga4-functions.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,2CAAgD;AAGhD,SAAgB,cAAc,CAAC,QAAgB;IAC7C,IAAI,CAAC,8BAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,EAAE;QACxD,MAAM,IAAI,+BAAgB,CAAC,GAAG,QAAQ,gCAAgC,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;KACvG;AACH,CAAC;AAJD,wCAIC;AAGD,SAAgB,YAAY,CAAC,MAA0B;IACrD,IAAI,CAAC,MAAM,EAAE;QACX,OAAM;KACP;IAED,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC9C,IAAI,KAAK,YAAY,KAAK,EAAE;YAC1B,MAAM,IAAI,+BAAgB,CACxB,UAAU,GAAG,sIAAsI,EACnJ,eAAe,EACf,GAAG,CACJ,CAAA;SACF;aAAM,IAAI,KAAK,IAAI,IAAI,EAAE;YACxB,MAAM,IAAI,+BAAgB,CACxB,UAAU,GAAG,qIAAqI,EAClJ,eAAe,EACf,GAAG,CACJ,CAAA;SACF;aAAM,IAAI,OAAO,KAAK,IAAI,QAAQ,EAAE;YACnC,MAAM,IAAI,+BAAgB,CACxB,UAAU,GAAG,oCAAoC,OAAO,KAAK,gGAAgG,EAC7J,eAAe,EACf,GAAG,CACJ,CAAA;SACF;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AA1BD,oCA0BC;AAED,SAAgB,eAAe,CAAC,cAAkC;IAChE,IAAI,CAAC,cAAc,EAAE;QACnB,OAAM;KACP;IAED,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACtD,IAAI,KAAK,YAAY,KAAK,EAAE;YAC1B,MAAM,IAAI,+BAAgB,CACxB,UAAU,GAAG,0GAA0G,EACvH,eAAe,EACf,GAAG,CACJ,CAAA;SACF;aAAM,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,IAAI,QAAQ,EAAE;YACpD,MAAM,IAAI,+BAAgB,CACxB,UAAU,GAAG,oCAAoC,OAAO,KAAK,oEAAoE,EACjI,eAAe,EACf,GAAG,CACJ,CAAA;SACF;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AApBD,0CAoBC;AAGD,SAAgB,gBAAgB,CAAC,SAA6B;IAC5D,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,SAAS,CAAA;KACjB;IAGD,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,EAAE;QACtB,OAAO,CAAC,SAAS,CAAA;KAClB;IAGD,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,CAAA;AACrC,CAAC;AAZD,4CAYC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@segment/action-destinations",
3
3
  "description": "Destination Actions engine and definitions.",
4
- "version": "3.94.1-alpha.8",
4
+ "version": "3.94.1-alpha.9",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/segmentio/action-destinations",
@@ -65,5 +65,5 @@
65
65
  "lcov"
66
66
  ]
67
67
  },
68
- "gitHead": "61b123009c11aef971a526674b1034888ac9a9be"
68
+ "gitHead": "0906f563b3eb40c71a19ad6b084ea13b1fa1e5c3"
69
69
  }