Skip to content

Commit ae4a6f8

Browse files
arnav777devjoe-ayoub-segmentCopilotitsarijitray
authored
[STRATCONN-6647]-HubSpot<->Segment is converting the empty strings to 0 in the event payload (#3755)
* Add validation for empty strings and whitespace handling * Remove debug logging * fix tests * attempting backwards compatible approach * adding more test coverage * fixing bad merge * address copilot review comment * adding another unit test to cover copilot review comment scenario * Update packages/destination-actions/src/destinations/hubspot/customEvent/functions/validation-functions.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * updating types and metadata --------- Co-authored-by: Joe Ayoub <joe.ayoub@segment.com> Co-authored-by: Joe Ayoub <45374896+joe-ayoub-segment@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Arijit Ray <35370469+itsarijitray@users.noreply.github.com>
1 parent b3e344f commit ae4a6f8

11 files changed

Lines changed: 570 additions & 89 deletions

File tree

packages/destination-actions/src/destinations/airship/customEvents/generated-types.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/destination-actions/src/destinations/airship/manageTags/generated-types.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/destination-actions/src/destinations/airship/metadata.json

Lines changed: 162 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@
6262
"fields": {
6363
"named_user_id": {
6464
"label": "Airship Named User ID",
65-
"description": "The identifier assigned in Airship as the Named User",
65+
"description": "The identifier assigned in Airship as the Named User. Provide either this or Channel ID.",
6666
"type": "string",
67-
"required": true,
67+
"required": false,
6868
"multiple": false,
6969
"allowNull": false,
7070
"dynamic": false,
@@ -86,6 +86,56 @@
8686
"format": null,
8787
"additionalProperties": false
8888
},
89+
"channel_id": {
90+
"label": "Channel ID",
91+
"description": "Airship Channel ID. Provide either this or Named User ID.",
92+
"type": "string",
93+
"required": false,
94+
"multiple": false,
95+
"allowNull": false,
96+
"dynamic": false,
97+
"default": null,
98+
"choices": null,
99+
"placeholder": null,
100+
"properties": null,
101+
"category": null,
102+
"depends_on": null,
103+
"readOnly": null,
104+
"hidden": null,
105+
"minimum": null,
106+
"maximum": null,
107+
"defaultObjectUI": null,
108+
"disabledInputMethods": null,
109+
"displayMode": null,
110+
"format": null,
111+
"additionalProperties": false
112+
},
113+
"channel_type": {
114+
"label": "Channel Type",
115+
"description": "The device type for the Channel ID (e.g. ios, android, amazon, web). Defaults to the device type from the event. If omitted or unrecognized, the generic channel key is used and Airship resolves the type, which may introduce a slight delay.",
116+
"type": "string",
117+
"required": false,
118+
"multiple": false,
119+
"allowNull": false,
120+
"dynamic": false,
121+
"default": {
122+
"@path": "$.context.device.type"
123+
},
124+
"choices": null,
125+
"placeholder": null,
126+
"properties": null,
127+
"category": null,
128+
"depends_on": null,
129+
"readOnly": null,
130+
"hidden": null,
131+
"minimum": null,
132+
"maximum": null,
133+
"defaultObjectUI": null,
134+
"disabledInputMethods": null,
135+
"displayMode": null,
136+
"format": null,
137+
"additionalProperties": false
138+
},
89139
"name": {
90140
"label": "Name",
91141
"description": "Event Name",
@@ -203,9 +253,9 @@
203253
"fields": {
204254
"named_user_id": {
205255
"label": "Airship Named User ID",
206-
"description": "The identifier assigned in Airship as the Named User",
256+
"description": "The identifier assigned in Airship as the Named User. Provide either this or Channel ID.",
207257
"type": "string",
208-
"required": true,
258+
"required": false,
209259
"multiple": false,
210260
"allowNull": false,
211261
"dynamic": false,
@@ -227,6 +277,56 @@
227277
"format": null,
228278
"additionalProperties": false
229279
},
280+
"channel_id": {
281+
"label": "Channel ID",
282+
"description": "Airship Channel ID. Provide either this or Named User ID.",
283+
"type": "string",
284+
"required": false,
285+
"multiple": false,
286+
"allowNull": false,
287+
"dynamic": false,
288+
"default": null,
289+
"choices": null,
290+
"placeholder": null,
291+
"properties": null,
292+
"category": null,
293+
"depends_on": null,
294+
"readOnly": null,
295+
"hidden": null,
296+
"minimum": null,
297+
"maximum": null,
298+
"defaultObjectUI": null,
299+
"disabledInputMethods": null,
300+
"displayMode": null,
301+
"format": null,
302+
"additionalProperties": false
303+
},
304+
"channel_type": {
305+
"label": "Channel Type",
306+
"description": "The device type for the Channel ID (e.g. ios, android, amazon, web). Defaults to the device type from the event. If omitted or unrecognized, the generic channel key is used and Airship resolves the type, which may introduce a slight delay.",
307+
"type": "string",
308+
"required": false,
309+
"multiple": false,
310+
"allowNull": false,
311+
"dynamic": false,
312+
"default": {
313+
"@path": "$.context.device.type"
314+
},
315+
"choices": null,
316+
"placeholder": null,
317+
"properties": null,
318+
"category": null,
319+
"depends_on": null,
320+
"readOnly": null,
321+
"hidden": null,
322+
"minimum": null,
323+
"maximum": null,
324+
"defaultObjectUI": null,
325+
"disabledInputMethods": null,
326+
"displayMode": null,
327+
"format": null,
328+
"additionalProperties": false
329+
},
230330
"occurred": {
231331
"label": "Occurred",
232332
"description": "When the Trait was set",
@@ -915,9 +1015,9 @@
9151015
"fields": {
9161016
"named_user_id": {
9171017
"label": "Airship Named User ID",
918-
"description": "The identifier assigned in Airship as the Named User",
1018+
"description": "The identifier assigned in Airship as the Named User. Provide either this or Channel ID.",
9191019
"type": "string",
920-
"required": true,
1020+
"required": false,
9211021
"multiple": false,
9221022
"allowNull": false,
9231023
"dynamic": false,
@@ -939,6 +1039,56 @@
9391039
"format": null,
9401040
"additionalProperties": false
9411041
},
1042+
"channel_id": {
1043+
"label": "Channel ID",
1044+
"description": "Airship Channel ID. Provide either this or Named User ID.",
1045+
"type": "string",
1046+
"required": false,
1047+
"multiple": false,
1048+
"allowNull": false,
1049+
"dynamic": false,
1050+
"default": null,
1051+
"choices": null,
1052+
"placeholder": null,
1053+
"properties": null,
1054+
"category": null,
1055+
"depends_on": null,
1056+
"readOnly": null,
1057+
"hidden": null,
1058+
"minimum": null,
1059+
"maximum": null,
1060+
"defaultObjectUI": null,
1061+
"disabledInputMethods": null,
1062+
"displayMode": null,
1063+
"format": null,
1064+
"additionalProperties": false
1065+
},
1066+
"channel_type": {
1067+
"label": "Channel Type",
1068+
"description": "The device type for the Channel ID (e.g. ios, android, amazon, web). Defaults to the device type from the event. If omitted or unrecognized, the generic channel key is used and Airship resolves the type, which may introduce a slight delay.",
1069+
"type": "string",
1070+
"required": false,
1071+
"multiple": false,
1072+
"allowNull": false,
1073+
"dynamic": false,
1074+
"default": {
1075+
"@path": "$.context.device.type"
1076+
},
1077+
"choices": null,
1078+
"placeholder": null,
1079+
"properties": null,
1080+
"category": null,
1081+
"depends_on": null,
1082+
"readOnly": null,
1083+
"hidden": null,
1084+
"minimum": null,
1085+
"maximum": null,
1086+
"defaultObjectUI": null,
1087+
"disabledInputMethods": null,
1088+
"displayMode": null,
1089+
"format": null,
1090+
"additionalProperties": false
1091+
},
9421092
"tags": {
9431093
"label": "Tag Name",
9441094
"description": "Tag name to add or remove. Values for each tag should be boolean only. A true value creates a tag, a false value removes a tag. Non-boolean values will be ignored.",
@@ -1533,6 +1683,9 @@
15331683
"named_user_id": {
15341684
"@path": "$.userId"
15351685
},
1686+
"channel_type": {
1687+
"@path": "$.context.device.type"
1688+
},
15361689
"name": {
15371690
"@path": "$.event"
15381691
},
@@ -1555,6 +1708,9 @@
15551708
"named_user_id": {
15561709
"@path": "$.userId"
15571710
},
1711+
"channel_type": {
1712+
"@path": "$.context.device.type"
1713+
},
15581714
"occurred": {
15591715
"@path": "$.timestamp"
15601716
},

packages/destination-actions/src/destinations/airship/setAttributes/generated-types.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)