@segment/action-destinations 3.437.1-staging-ea6c83c19.0 → 3.439.0
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/dist/destinations/criteo-audiences/addUserToAudience/generated-types.d.ts +1 -0
- package/dist/destinations/criteo-audiences/addUserToAudience/index.js +7 -0
- package/dist/destinations/criteo-audiences/addUserToAudience/index.js.map +1 -1
- package/dist/destinations/criteo-audiences/removeUserFromAudience/generated-types.d.ts +1 -0
- package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js +7 -0
- package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js.map +1 -1
- package/dist/destinations/first-party-dv360/_tests_/index.test.js +2 -2
- package/dist/destinations/first-party-dv360/_tests_/index.test.js.map +1 -1
- package/dist/destinations/first-party-dv360/functions.d.ts +1 -1
- package/dist/destinations/first-party-dv360/generated-types.d.ts +1 -1
- package/dist/destinations/first-party-dv360/index.js +2 -4
- package/dist/destinations/first-party-dv360/index.js.map +1 -1
- package/dist/destinations/first-party-dv360/types.d.ts +2 -2
- package/dist/destinations/kafka/generated-types.d.ts +3 -0
- package/dist/destinations/kafka/index.js +21 -0
- package/dist/destinations/kafka/index.js.map +1 -1
- package/dist/destinations/kafka/send/generated-types.d.ts +0 -1
- package/dist/destinations/kafka/send/index.js +0 -7
- package/dist/destinations/kafka/send/index.js.map +1 -1
- package/dist/destinations/kafka/utils.js +13 -0
- package/dist/destinations/kafka/utils.js.map +1 -1
- package/dist/destinations/linkedin-audiences/updateAudience/fields.js.map +1 -1
- package/dist/destinations/ms-bing-ads-audiences/index.js +1 -1
- package/dist/destinations/ms-bing-ads-audiences/index.js.map +1 -1
- package/dist/destinations/ms-bing-ads-audiences/syncAudiences/fields.js +13 -17
- package/dist/destinations/ms-bing-ads-audiences/syncAudiences/fields.js.map +1 -1
- package/dist/destinations/salesforce-marketing-cloud/index.js +1 -3
- package/dist/destinations/salesforce-marketing-cloud/index.js.map +1 -1
- package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.d.ts +0 -3
- package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.js +0 -109
- package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.js.map +1 -1
- package/dist/destinations/snap-audiences/constants.d.ts +2 -0
- package/dist/destinations/snap-audiences/constants.js +6 -0
- package/dist/destinations/snap-audiences/constants.js.map +1 -0
- package/dist/destinations/snap-audiences/index.js +24 -40
- package/dist/destinations/snap-audiences/index.js.map +1 -1
- package/dist/destinations/snap-audiences/syncAudience/constants.d.ts +5 -0
- package/dist/destinations/snap-audiences/syncAudience/constants.js +9 -0
- package/dist/destinations/snap-audiences/syncAudience/constants.js.map +1 -0
- package/dist/destinations/snap-audiences/syncAudience/fields.d.ts +2 -0
- package/dist/destinations/snap-audiences/syncAudience/fields.js +90 -0
- package/dist/destinations/snap-audiences/syncAudience/fields.js.map +1 -0
- package/dist/destinations/snap-audiences/syncAudience/functions.d.ts +5 -0
- package/dist/destinations/snap-audiences/syncAudience/functions.js +119 -0
- package/dist/destinations/snap-audiences/syncAudience/functions.js.map +1 -0
- package/dist/destinations/snap-audiences/syncAudience/generated-types.d.ts +2 -1
- package/dist/destinations/snap-audiences/syncAudience/index.js +6 -146
- package/dist/destinations/snap-audiences/syncAudience/index.js.map +1 -1
- package/dist/destinations/snap-audiences/syncAudience/types.d.ts +18 -0
- package/dist/destinations/snap-audiences/syncAudience/types.js.map +1 -0
- package/dist/destinations/snap-audiences/types.d.ts +19 -0
- package/dist/destinations/snap-audiences/types.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/common-constants.d.ts +2 -0
- package/dist/destinations/stackadapt-audiences/common-constants.js +6 -0
- package/dist/destinations/stackadapt-audiences/common-constants.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/common-functions.d.ts +0 -7
- package/dist/destinations/stackadapt-audiences/common-functions.js +0 -193
- package/dist/destinations/stackadapt-audiences/common-functions.js.map +1 -1
- package/dist/destinations/stackadapt-audiences/common-types.d.ts +15 -0
- package/dist/destinations/stackadapt-audiences/{forwardProfile/generated-types.js → common-types.js} +1 -1
- package/dist/destinations/stackadapt-audiences/common-types.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/{constants.js → forwardAudienceEvent/constants.js} +1 -22
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/constants.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/fields.d.ts +1 -0
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/fields.js +184 -1
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/fields.js.map +1 -1
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/functions.d.ts +6 -0
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/functions.js +184 -0
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/functions.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/generated-types.d.ts +0 -3
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/index.js +4 -5
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/index.js.map +1 -1
- package/dist/destinations/stackadapt-audiences/{types.d.ts → forwardAudienceEvent/types.d.ts} +0 -15
- package/dist/destinations/{yonoma/sendEvent/generated-types.js → stackadapt-audiences/forwardAudienceEvent/types.js} +1 -1
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/types.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/index.d.ts +1 -1
- package/dist/destinations/stackadapt-audiences/index.js +5 -7
- package/dist/destinations/stackadapt-audiences/index.js.map +1 -1
- package/dist/destinations/yonoma/index.js +0 -2
- package/dist/destinations/yonoma/index.js.map +1 -1
- package/dist/destinations/yonoma/trackEvent/generated-types.d.ts +24 -3
- package/dist/destinations/yonoma/trackEvent/index.js +140 -16
- package/dist/destinations/yonoma/trackEvent/index.js.map +1 -1
- package/dist/destinations/yonoma/trackEvent/types.d.ts +24 -3
- package/dist/destinations/yonoma/trackPageView/generated-types.d.ts +23 -7
- package/dist/destinations/yonoma/trackPageView/index.js +133 -50
- package/dist/destinations/yonoma/trackPageView/index.js.map +1 -1
- package/dist/destinations/yonoma/trackPageView/types.d.ts +22 -4
- package/dist/destinations/yonoma/upsertContact/generated-types.d.ts +25 -3
- package/dist/destinations/yonoma/upsertContact/index.js +153 -21
- package/dist/destinations/yonoma/upsertContact/index.js.map +1 -1
- package/dist/destinations/yonoma/upsertContact/types.d.ts +26 -4
- package/package.json +4 -4
- package/dist/destinations/salesforce-marketing-cloud/_tests_/asyncDataExtension.test.d.ts +0 -1
- package/dist/destinations/salesforce-marketing-cloud/_tests_/asyncDataExtension.test.js +0 -96
- package/dist/destinations/salesforce-marketing-cloud/_tests_/asyncDataExtension.test.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/asyncDataExtension/generated-types.d.ts +0 -58
- package/dist/destinations/salesforce-marketing-cloud/asyncDataExtension/generated-types.js +0 -3
- package/dist/destinations/salesforce-marketing-cloud/asyncDataExtension/generated-types.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/asyncDataExtension/index.d.ts +0 -5
- package/dist/destinations/salesforce-marketing-cloud/asyncDataExtension/index.js +0 -61
- package/dist/destinations/salesforce-marketing-cloud/asyncDataExtension/index.js.map +0 -1
- package/dist/destinations/snap-audiences/syncAudience/utils.d.ts +0 -8
- package/dist/destinations/snap-audiences/syncAudience/utils.js +0 -61
- package/dist/destinations/snap-audiences/syncAudience/utils.js.map +0 -1
- package/dist/destinations/stackadapt-audiences/common-fields.d.ts +0 -2
- package/dist/destinations/stackadapt-audiences/common-fields.js +0 -227
- package/dist/destinations/stackadapt-audiences/common-fields.js.map +0 -1
- package/dist/destinations/stackadapt-audiences/constants.js.map +0 -1
- package/dist/destinations/stackadapt-audiences/forwardProfile/generated-types.d.ts +0 -26
- package/dist/destinations/stackadapt-audiences/forwardProfile/generated-types.js.map +0 -1
- package/dist/destinations/stackadapt-audiences/forwardProfile/index.d.ts +0 -5
- package/dist/destinations/stackadapt-audiences/forwardProfile/index.js +0 -140
- package/dist/destinations/stackadapt-audiences/forwardProfile/index.js.map +0 -1
- package/dist/destinations/stackadapt-audiences/types.js.map +0 -1
- package/dist/destinations/yonoma/sendEvent/constants.d.ts +0 -1
- package/dist/destinations/yonoma/sendEvent/constants.js +0 -5
- package/dist/destinations/yonoma/sendEvent/constants.js.map +0 -1
- package/dist/destinations/yonoma/sendEvent/functions.d.ts +0 -1
- package/dist/destinations/yonoma/sendEvent/functions.js +0 -19
- package/dist/destinations/yonoma/sendEvent/functions.js.map +0 -1
- package/dist/destinations/yonoma/sendEvent/generated-types.d.ts +0 -13
- package/dist/destinations/yonoma/sendEvent/generated-types.js.map +0 -1
- package/dist/destinations/yonoma/sendEvent/index.d.ts +0 -5
- package/dist/destinations/yonoma/sendEvent/index.js +0 -103
- package/dist/destinations/yonoma/sendEvent/index.js.map +0 -1
- package/dist/destinations/yonoma/sendEvent/types.d.ts +0 -10
- package/dist/destinations/yonoma/sendEvent/types.js.map +0 -1
- /package/dist/destinations/{stackadapt-audiences → snap-audiences/syncAudience}/types.js +0 -0
- /package/dist/destinations/{yonoma/sendEvent → snap-audiences}/types.js +0 -0
- /package/dist/destinations/stackadapt-audiences/{constants.d.ts → forwardAudienceEvent/constants.d.ts} +0 -0
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.common_fields = void 0;
|
|
4
|
-
const constants_1 = require("./constants");
|
|
5
|
-
exports.common_fields = {
|
|
6
|
-
standard_traits: {
|
|
7
|
-
label: 'Standard User Properties',
|
|
8
|
-
type: 'object',
|
|
9
|
-
description: 'Standard properties for the user.',
|
|
10
|
-
defaultObjectUI: 'keyvalue',
|
|
11
|
-
additionalProperties: false,
|
|
12
|
-
required: false,
|
|
13
|
-
properties: {
|
|
14
|
-
first_name: {
|
|
15
|
-
label: 'First Name',
|
|
16
|
-
type: 'string',
|
|
17
|
-
description: "The user's first name."
|
|
18
|
-
},
|
|
19
|
-
last_name: {
|
|
20
|
-
label: 'Last Name',
|
|
21
|
-
type: 'string',
|
|
22
|
-
description: "The user's last name."
|
|
23
|
-
},
|
|
24
|
-
phone: {
|
|
25
|
-
label: 'Phone',
|
|
26
|
-
type: 'string',
|
|
27
|
-
description: 'The phone number of the user.'
|
|
28
|
-
},
|
|
29
|
-
address: {
|
|
30
|
-
label: 'Address',
|
|
31
|
-
type: 'string',
|
|
32
|
-
description: 'The address of the user.'
|
|
33
|
-
},
|
|
34
|
-
city: {
|
|
35
|
-
label: 'City',
|
|
36
|
-
type: 'string',
|
|
37
|
-
description: 'The city of the user.'
|
|
38
|
-
},
|
|
39
|
-
country: {
|
|
40
|
-
label: 'Country',
|
|
41
|
-
type: 'string',
|
|
42
|
-
description: 'The country of the user.'
|
|
43
|
-
},
|
|
44
|
-
state: {
|
|
45
|
-
label: 'State',
|
|
46
|
-
type: 'string',
|
|
47
|
-
description: 'The state of the user.'
|
|
48
|
-
},
|
|
49
|
-
timezone: {
|
|
50
|
-
label: 'Time Zone',
|
|
51
|
-
type: 'string',
|
|
52
|
-
description: 'The timezone of the user.'
|
|
53
|
-
},
|
|
54
|
-
postal_code: {
|
|
55
|
-
label: 'Postal Code',
|
|
56
|
-
type: 'string',
|
|
57
|
-
description: 'The postal code of the user.'
|
|
58
|
-
},
|
|
59
|
-
birth_day: {
|
|
60
|
-
label: 'Birth Day',
|
|
61
|
-
type: 'number',
|
|
62
|
-
description: 'The numeric birth day of the user. e.g 15 for the 15th of the month.',
|
|
63
|
-
maximum: 31,
|
|
64
|
-
minimum: 1
|
|
65
|
-
},
|
|
66
|
-
birth_month: {
|
|
67
|
-
label: 'Birth Month',
|
|
68
|
-
type: 'number',
|
|
69
|
-
description: 'The numeric birth month of the user. e.g 6 for June.',
|
|
70
|
-
maximum: 12,
|
|
71
|
-
minimum: 1
|
|
72
|
-
},
|
|
73
|
-
birth_year: {
|
|
74
|
-
label: 'Birth Year',
|
|
75
|
-
type: 'number',
|
|
76
|
-
description: 'The numeric birth year of the user. e.g 1990.'
|
|
77
|
-
},
|
|
78
|
-
birth_date: {
|
|
79
|
-
label: 'Birth Date',
|
|
80
|
-
type: 'string',
|
|
81
|
-
format: 'date',
|
|
82
|
-
description: "The birth date of the user in YYYY-MM-DD format. If set, overrides 'Birth Day', 'Birth Month' and 'Birth Year' fields."
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
default: {
|
|
86
|
-
first_name: {
|
|
87
|
-
'@if': {
|
|
88
|
-
exists: { '@path': '$.traits.first_name' },
|
|
89
|
-
then: { '@path': '$.traits.first_name' },
|
|
90
|
-
else: { '@path': '$.properties.first_name' }
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
last_name: {
|
|
94
|
-
'@if': {
|
|
95
|
-
exists: { '@path': '$.traits.last_name' },
|
|
96
|
-
then: { '@path': '$.traits.last_name' },
|
|
97
|
-
else: { '@path': '$.properties.last_name' }
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
phone: {
|
|
101
|
-
'@if': {
|
|
102
|
-
exists: { '@path': '$.traits.phone' },
|
|
103
|
-
then: { '@path': '$.traits.phone' },
|
|
104
|
-
else: { '@path': '$.properties.phone' }
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
address: {
|
|
108
|
-
'@if': {
|
|
109
|
-
exists: { '@path': '$.traits.street' },
|
|
110
|
-
then: { '@path': '$.traits.street' },
|
|
111
|
-
else: { '@path': '$.properties.street' }
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
city: {
|
|
115
|
-
'@if': {
|
|
116
|
-
exists: { '@path': '$.traits.city' },
|
|
117
|
-
then: { '@path': '$.traits.city' },
|
|
118
|
-
else: { '@path': '$.properties.city' }
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
country: {
|
|
122
|
-
'@if': {
|
|
123
|
-
exists: { '@path': '$.traits.country' },
|
|
124
|
-
then: { '@path': '$.traits.country' },
|
|
125
|
-
else: { '@path': '$.properties.country' }
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
state: {
|
|
129
|
-
'@if': {
|
|
130
|
-
exists: { '@path': '$.traits.state' },
|
|
131
|
-
then: { '@path': '$.traits.state' },
|
|
132
|
-
else: { '@path': '$.properties.state' }
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
postal_code: {
|
|
136
|
-
'@if': {
|
|
137
|
-
exists: { '@path': '$.traits.postal_code' },
|
|
138
|
-
then: { '@path': '$.traits.postal_code' },
|
|
139
|
-
else: { '@path': '$.properties.postal_code' }
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
timezone: {
|
|
143
|
-
'@if': {
|
|
144
|
-
exists: { '@path': '$.traits.timezone' },
|
|
145
|
-
then: { '@path': '$.traits.timezone' },
|
|
146
|
-
else: { '@path': '$.properties.timezone' }
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
birth_day: {
|
|
150
|
-
'@if': {
|
|
151
|
-
exists: { '@path': '$.traits.birth_day' },
|
|
152
|
-
then: { '@path': '$.traits.birth_day' },
|
|
153
|
-
else: { '@path': '$.properties.birth_day' }
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
birth_month: {
|
|
157
|
-
'@if': {
|
|
158
|
-
exists: { '@path': '$.traits.birth_month' },
|
|
159
|
-
then: { '@path': '$.traits.birth_month' },
|
|
160
|
-
else: { '@path': '$.properties.birth_month' }
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
birth_year: {
|
|
164
|
-
'@if': {
|
|
165
|
-
exists: { '@path': '$.traits.birth_year' },
|
|
166
|
-
then: { '@path': '$.traits.birth_year' },
|
|
167
|
-
else: { '@path': '$.properties.birth_year' }
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
birth_date: {
|
|
171
|
-
'@if': {
|
|
172
|
-
exists: { '@path': '$.traits.birth_date' },
|
|
173
|
-
then: { '@path': '$.traits.birth_date' },
|
|
174
|
-
else: { '@path': '$.properties.birth_date' }
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
custom_traits: {
|
|
180
|
-
label: 'Custom User Properties',
|
|
181
|
-
type: 'object',
|
|
182
|
-
description: 'Custom properties for the user.',
|
|
183
|
-
defaultObjectUI: 'keyvalue',
|
|
184
|
-
required: false
|
|
185
|
-
},
|
|
186
|
-
user_id: {
|
|
187
|
-
label: 'Segment User ID',
|
|
188
|
-
description: 'The ID of the user in Segment',
|
|
189
|
-
type: 'string',
|
|
190
|
-
default: {
|
|
191
|
-
'@if': {
|
|
192
|
-
exists: { '@path': '$.userId' },
|
|
193
|
-
then: { '@path': '$.userId' },
|
|
194
|
-
else: { '@path': '$.anonymousId' }
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
event_type: {
|
|
199
|
-
label: 'Event Type',
|
|
200
|
-
description: 'The Segment event type - track or identify',
|
|
201
|
-
type: 'string',
|
|
202
|
-
required: true,
|
|
203
|
-
default: {
|
|
204
|
-
'@path': '$.type'
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
marketing_status: {
|
|
208
|
-
label: 'Marketing Status',
|
|
209
|
-
description: 'In certain jurisdictions, explicit consent may be required to send email marketing communications to imported profiles. Consult independent counsel for further guidance.',
|
|
210
|
-
type: 'string',
|
|
211
|
-
required: true,
|
|
212
|
-
disabledInputMethods: ['literal', 'variable', 'function', 'freeform', 'enrichment'],
|
|
213
|
-
choices: [
|
|
214
|
-
{ label: 'Opted-in (Profiles can receive email marketing)', value: constants_1.MarketingStatus.OPT_IN },
|
|
215
|
-
{ label: 'Indeterminate (Profiles that have not opted-out, but are excluded from email marketing)', value: constants_1.MarketingStatus.Indeterminate }
|
|
216
|
-
]
|
|
217
|
-
},
|
|
218
|
-
enable_batching: {
|
|
219
|
-
type: 'boolean',
|
|
220
|
-
label: 'Batch Profiles',
|
|
221
|
-
unsafe_hidden: true,
|
|
222
|
-
description: 'When enabled, Segment will batch profiles together and send them to StackAdapt in a single request.',
|
|
223
|
-
required: true,
|
|
224
|
-
default: true
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
//# sourceMappingURL=common-fields.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common-fields.js","sourceRoot":"","sources":["../../../src/destinations/stackadapt-audiences/common-fields.ts"],"names":[],"mappings":";;;AACA,2CAA6C;AAEhC,QAAA,aAAa,GAA+B;IACrD,eAAe,EAAE;QACf,KAAK,EAAE,0BAA0B;QACjC,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,mCAAmC;QAChD,eAAe,EAAE,UAAU;QAC3B,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,KAAK;QACf,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,KAAK,EAAE,YAAY;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wBAAwB;aACtC;YACD,SAAS,EAAE;gBACT,KAAK,EAAE,WAAW;gBAClB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uBAAuB;aACrC;YACD,KAAK,EAAE;gBACL,KAAK,EAAE,OAAO;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+BAA+B;aAC7C;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,IAAI,EAAE;gBACJ,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uBAAuB;aACrC;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,KAAK,EAAE;gBACL,KAAK,EAAE,OAAO;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wBAAwB;aACtC;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,WAAW;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AAO,EAAE,UAAU,EAAE;gBAC7B,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;aACnC;SACF;KACF;IACD,UAAU,EAAE;QACV,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,4CAA4C;QACzD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE;YACP,OAAO,EAAE,QAAQ;SAClB;KACF;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,2KAA2K;QACxL,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,oBAAoB,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,CAAC;QACnF,OAAO,EAAE;YACP,EAAE,KAAK,EAAE,iDAAiD,EAAE,KAAK,EAAE,2BAAe,CAAC,MAAM,EAAE;YAC3F,EAAE,KAAK,EAAE,yFAAyF,EAAE,KAAK,EAAE,2BAAe,CAAC,aAAa,EAAE;SAC3I;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,gBAAgB;QACvB,aAAa,EAAE,IAAI;QACnB,WAAW,EACT,qGAAqG;QACvG,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACd;CACJ,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/destinations/stackadapt-audiences/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAG,YAAY,CAAA;AAEhC,QAAA,YAAY,GAAG,oCAAoC,CAAA;AAInD,QAAA,sBAAsB,GAAyB;IAC1D;QACE,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,oCAAoC;QACjD,KAAK,EAAE,KAAK;KACb;IACD;QACE,GAAG,EAAE,OAAO;QACZ,KAAK,EAAE,OAAO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QACvC,KAAK,EAAE,KAAK;KACb;IACD;QACE,GAAG,EAAE,WAAW;QAChB,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,kCAAkC;QAC/C,KAAK,EAAE,KAAK;KACb;IACD;QACE,GAAG,EAAE,aAAa;QAClB,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,oCAAoC;QACjD,KAAK,EAAE,KAAK;KACb;IACD;QACE,GAAG,EAAE,YAAY;QACjB,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,mCAAmC;QAChD,KAAK,EAAE,KAAK;KACb;IACD;QACE,GAAG,EAAE,YAAY;QACjB,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,4BAA4B;QACzC,KAAK,EAAE,IAAI;KACZ;CACF,CAAA;AAEY,QAAA,cAAc,GAAG;IAC5B;QACE,WAAW,EAAE,YAAY;QACzB,cAAc,EAAE,aAAa;QAC7B,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,sBAAsB;QAC7B,KAAK,EAAE,KAAK;KACb;IACD;QACE,WAAW,EAAE,cAAc;QAC3B,cAAc,EAAE,MAAM;QACtB,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,wBAAwB;QAC/B,KAAK,EAAE,KAAK;KACb;CACF,CAAA;AAEY,QAAA,eAAe,GAAG;IAC7B,MAAM,EAAE,UAAU;IAClB,aAAa,EAAE,eAAe;CACtB,CAAA"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export interface Payload {
|
|
2
|
-
standard_traits?: {
|
|
3
|
-
first_name?: string;
|
|
4
|
-
last_name?: string;
|
|
5
|
-
phone?: string;
|
|
6
|
-
address?: string;
|
|
7
|
-
city?: string;
|
|
8
|
-
country?: string;
|
|
9
|
-
state?: string;
|
|
10
|
-
timezone?: string;
|
|
11
|
-
postal_code?: string;
|
|
12
|
-
birth_day?: number;
|
|
13
|
-
birth_month?: number;
|
|
14
|
-
birth_year?: number;
|
|
15
|
-
birth_date?: string;
|
|
16
|
-
};
|
|
17
|
-
custom_traits?: {
|
|
18
|
-
[k: string]: unknown;
|
|
19
|
-
};
|
|
20
|
-
user_id?: string;
|
|
21
|
-
event_type: string;
|
|
22
|
-
marketing_status: string;
|
|
23
|
-
enable_batching: boolean;
|
|
24
|
-
previous_id?: string;
|
|
25
|
-
email?: string;
|
|
26
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/stackadapt-audiences/forwardProfile/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const common_functions_1 = require("../common-functions");
|
|
4
|
-
const common_fields_1 = require("../common-fields");
|
|
5
|
-
const action = {
|
|
6
|
-
title: 'Forward Profile',
|
|
7
|
-
description: 'Forward new or updated user profiles to StackAdapt',
|
|
8
|
-
defaultSubscription: 'type = "identify" or type = "alias" or type = "track"',
|
|
9
|
-
fields: {
|
|
10
|
-
...common_fields_1.common_fields,
|
|
11
|
-
previous_id: {
|
|
12
|
-
label: 'Previous ID',
|
|
13
|
-
type: 'string',
|
|
14
|
-
description: "The user's previous ID, for alias events",
|
|
15
|
-
default: {
|
|
16
|
-
'@path': '$.previousId'
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
email: {
|
|
20
|
-
label: 'Email',
|
|
21
|
-
description: 'The email address of the user.',
|
|
22
|
-
type: 'string',
|
|
23
|
-
format: 'email',
|
|
24
|
-
required: {
|
|
25
|
-
conditions: [{ fieldKey: 'previous_id', operator: 'is', value: undefined }]
|
|
26
|
-
},
|
|
27
|
-
default: {
|
|
28
|
-
'@if': {
|
|
29
|
-
exists: { '@path': '$.traits.email' },
|
|
30
|
-
then: { '@path': '$.traits.email' },
|
|
31
|
-
else: { '@path': '$.context.traits.email' }
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
standard_traits: {
|
|
36
|
-
...common_fields_1.common_fields.standard_traits,
|
|
37
|
-
default: {
|
|
38
|
-
first_name: {
|
|
39
|
-
'@if': {
|
|
40
|
-
exists: { '@path': '$.traits.first_name' },
|
|
41
|
-
then: { '@path': '$.traits.first_name' },
|
|
42
|
-
else: { '@path': '$.context.traits.first_name' }
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
last_name: {
|
|
46
|
-
'@if': {
|
|
47
|
-
exists: { '@path': '$.traits.last_name' },
|
|
48
|
-
then: { '@path': '$.traits.last_name' },
|
|
49
|
-
else: { '@path': '$.context.traits.last_name' }
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
phone: {
|
|
53
|
-
'@if': {
|
|
54
|
-
exists: { '@path': '$.traits.phone' },
|
|
55
|
-
then: { '@path': '$.traits.phone' },
|
|
56
|
-
else: { '@path': '$.context.traits.phone' }
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
address: {
|
|
60
|
-
'@if': {
|
|
61
|
-
exists: { '@path': '$.traits.address.street' },
|
|
62
|
-
then: { '@path': '$.traits.address.street' },
|
|
63
|
-
else: { '@path': '$.context.traits.address.street' }
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
city: {
|
|
67
|
-
'@if': {
|
|
68
|
-
exists: { '@path': '$.traits.address.city' },
|
|
69
|
-
then: { '@path': '$.traits.address.city' },
|
|
70
|
-
else: { '@path': '$.context.traits.address.city' }
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
country: {
|
|
74
|
-
'@if': {
|
|
75
|
-
exists: { '@path': '$.traits.address.country' },
|
|
76
|
-
then: { '@path': '$.traits.address.country' },
|
|
77
|
-
else: { '@path': '$.context.traits.address.country' }
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
state: {
|
|
81
|
-
'@if': {
|
|
82
|
-
exists: { '@path': '$.traits.address.state' },
|
|
83
|
-
then: { '@path': '$.traits.address.state' },
|
|
84
|
-
else: { '@path': '$.context.traits.address.state' }
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
postal_code: {
|
|
88
|
-
'@if': {
|
|
89
|
-
exists: { '@path': '$.traits.address.postal_code' },
|
|
90
|
-
then: { '@path': '$.traits.address.postal_code' },
|
|
91
|
-
else: { '@path': '$.context.traits.address.postal_code' }
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
timezone: {
|
|
95
|
-
'@if': {
|
|
96
|
-
exists: { '@path': '$.traits.timezone' },
|
|
97
|
-
then: { '@path': '$.traits.timezone' },
|
|
98
|
-
else: { '@path': '$.context.traits.timezone' }
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
birth_day: {
|
|
102
|
-
'@if': {
|
|
103
|
-
exists: { '@path': '$.traits.birth_day' },
|
|
104
|
-
then: { '@path': '$.traits.birth_day' },
|
|
105
|
-
else: { '@path': '$.context.traits.birth_day' }
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
birth_month: {
|
|
109
|
-
'@if': {
|
|
110
|
-
exists: { '@path': '$.traits.birth_month' },
|
|
111
|
-
then: { '@path': '$.traits.birth_month' },
|
|
112
|
-
else: { '@path': '$.context.traits.birth_month' }
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
birth_year: {
|
|
116
|
-
'@if': {
|
|
117
|
-
exists: { '@path': '$.traits.birth_year' },
|
|
118
|
-
then: { '@path': '$.traits.birth_year' },
|
|
119
|
-
else: { '@path': '$.context.traits.birth_year' }
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
birth_date: {
|
|
123
|
-
'@if': {
|
|
124
|
-
exists: { '@path': '$.traits.birth_date' },
|
|
125
|
-
then: { '@path': '$.traits.birth_date' },
|
|
126
|
-
else: { '@path': '$.context.traits.birth_date' }
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
perform: async (request, { settings, payload }) => {
|
|
133
|
-
return await (0, common_functions_1.send)(request, [payload], settings, false);
|
|
134
|
-
},
|
|
135
|
-
performBatch: async (request, { settings, payload }) => {
|
|
136
|
-
return await (0, common_functions_1.send)(request, payload, settings, false);
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
exports.default = action;
|
|
140
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/stackadapt-audiences/forwardProfile/index.ts"],"names":[],"mappings":";;AAGA,0DAA0C;AAC1C,oDAAgD;AAEhD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,oDAAoD;IACjE,mBAAmB,EAAE,uDAAuD;IAC5E,MAAM,EAAE;QACN,GAAG,6BAAa;QAChB,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,0CAA0C;YACvD,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;aACxB;SACF;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,gCAAgC;YAC7C,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE;gBACR,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;aAC5E;YACD,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;oBACrC,IAAI,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;oBACnC,IAAI,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE;iBAC5C;aACF;SACF;QACD,eAAe,EAAE;YACf,GAAG,6BAAa,CAAC,eAAe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;qBACjD;iBACF;gBACD,UAAU,EAAE;oBACV,KAAK,EAAE;wBACL,MAAM,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;wBAC1C,IAAI,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;wBACxC,IAAI,EAAE,EAAE,OAAO,EAAE,6BAA6B,EAAE;qBACjD;iBACF;aACF;SACF;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,OAAO,MAAM,IAAA,uBAAI,EAAC,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;IACxD,CAAC;IACD,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QACrD,OAAO,MAAM,IAAA,uBAAI,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;IACtD,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/stackadapt-audiences/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SEND_EVENT_URL = "https://api.yonoma.io/integration/segment/sendevent";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/sendEvent/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG,qDAAqD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function formatDate(input: string): string;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatDate = formatDate;
|
|
4
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
5
|
-
function formatDate(input) {
|
|
6
|
-
const ymdRegex = /^\d{4}-\d{2}-\d{2}$/;
|
|
7
|
-
if (ymdRegex.test(input)) {
|
|
8
|
-
return input;
|
|
9
|
-
}
|
|
10
|
-
const date = new Date(input);
|
|
11
|
-
if (isNaN(date.getTime())) {
|
|
12
|
-
throw new actions_core_1.PayloadValidationError(`Invalid date string: ${input}`);
|
|
13
|
-
}
|
|
14
|
-
const year = date.getFullYear();
|
|
15
|
-
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
16
|
-
const day = String(date.getDate()).padStart(2, '0');
|
|
17
|
-
return `${year}-${month}-${day}`;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=functions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/sendEvent/functions.ts"],"names":[],"mappings":";;AAEA,gCAiBC;AAnBD,wDAA8D;AAE9D,SAAgB,UAAU,CAAC,KAAa;IACtC,MAAM,QAAQ,GAAG,qBAAqB,CAAA;IACtC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAA;IACd,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAA;IAE5B,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,qCAAsB,CAAC,wBAAwB,KAAK,EAAE,CAAC,CAAA;IACnE,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;IAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;IAC1D,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;IAEnD,OAAO,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,EAAE,CAAA;AAClC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/sendEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
-
const constants_1 = require("./constants");
|
|
5
|
-
const action = {
|
|
6
|
-
title: 'Send Event',
|
|
7
|
-
description: 'Trigger automation based on a contact’s action within your product',
|
|
8
|
-
defaultSubscription: 'type = "track"',
|
|
9
|
-
fields: {
|
|
10
|
-
event: {
|
|
11
|
-
label: 'Event Name',
|
|
12
|
-
type: 'string',
|
|
13
|
-
description: 'The name of the event to track.',
|
|
14
|
-
required: true,
|
|
15
|
-
default: { '@path': '$.event' }
|
|
16
|
-
},
|
|
17
|
-
identifiers: {
|
|
18
|
-
label: 'Identifiers',
|
|
19
|
-
type: 'object',
|
|
20
|
-
description: 'Unique identifiers for the contact. At least one of userId or anonymousId is required.',
|
|
21
|
-
required: true,
|
|
22
|
-
additionalProperties: false,
|
|
23
|
-
properties: {
|
|
24
|
-
userId: {
|
|
25
|
-
label: 'User ID',
|
|
26
|
-
type: 'string',
|
|
27
|
-
description: 'Unique user identifier from your app.'
|
|
28
|
-
},
|
|
29
|
-
anonymousId: {
|
|
30
|
-
label: 'Anonymous ID',
|
|
31
|
-
type: 'string',
|
|
32
|
-
description: 'Anonymous identifier from Segment.',
|
|
33
|
-
readOnly: false
|
|
34
|
-
},
|
|
35
|
-
email: {
|
|
36
|
-
label: 'Email',
|
|
37
|
-
type: 'string',
|
|
38
|
-
description: "Contact's email address. Required if userId is not provided."
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
default: {
|
|
42
|
-
userId: { '@path': '$.userId' },
|
|
43
|
-
anonymousId: { '@path': '$.anonymousId' },
|
|
44
|
-
email: {
|
|
45
|
-
'@if': {
|
|
46
|
-
exists: { '@path': '$.context.traits.email' },
|
|
47
|
-
then: { '@path': '$.context.traits.email' },
|
|
48
|
-
else: { '@path': '$.properties.email' }
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
listId: {
|
|
54
|
-
label: 'List ID',
|
|
55
|
-
type: 'string',
|
|
56
|
-
description: "The Yonoma list to add the contact to.",
|
|
57
|
-
required: true,
|
|
58
|
-
default: {
|
|
59
|
-
'@if': {
|
|
60
|
-
exists: { '@path': '$.context.traits.list_id' },
|
|
61
|
-
then: { '@path': '$.context.traits.list_id' },
|
|
62
|
-
else: { '@path': '$.properties.list_id' }
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
properties: {
|
|
67
|
-
label: 'Event Properties',
|
|
68
|
-
type: 'object',
|
|
69
|
-
description: 'Additional properties associated with the event.',
|
|
70
|
-
required: false,
|
|
71
|
-
defaultObjectUI: 'keyvalue',
|
|
72
|
-
default: { '@path': '$.properties' }
|
|
73
|
-
},
|
|
74
|
-
timestamp: {
|
|
75
|
-
label: 'Timestamp',
|
|
76
|
-
type: 'string',
|
|
77
|
-
description: 'The timestamp of the event. Defaults to the current time if not provided.',
|
|
78
|
-
format: 'date-time',
|
|
79
|
-
default: { '@path': '$.timestamp' }
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
perform: async (request, { payload }) => {
|
|
83
|
-
const { event, properties, identifiers: { userId, email, } = {}, listId, timestamp } = payload;
|
|
84
|
-
if (!userId && !email) {
|
|
85
|
-
throw new actions_core_1.PayloadValidationError('At least one identifier (userId or email) is required.');
|
|
86
|
-
}
|
|
87
|
-
delete properties?.email;
|
|
88
|
-
delete properties?.list_id;
|
|
89
|
-
const json = {
|
|
90
|
-
event,
|
|
91
|
-
userId,
|
|
92
|
-
listId,
|
|
93
|
-
properties,
|
|
94
|
-
timestamp
|
|
95
|
-
};
|
|
96
|
-
return await request(constants_1.SEND_EVENT_URL, {
|
|
97
|
-
method: 'POST',
|
|
98
|
-
json
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
exports.default = action;
|
|
103
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/sendEvent/index.ts"],"names":[],"mappings":";;AAAA,wDAAgF;AAIhF,2CAA4C;AAE5C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,oEAAoE;IACjF,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;SAChC;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,wFAAwF;YACrG,QAAQ,EAAE,IAAI;YACd,oBAAoB,EAAE,KAAK;YAC3B,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,KAAK,EAAE,SAAS;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uCAAuC;iBACrD;gBACD,WAAW,EAAE;oBACX,KAAK,EAAE,cAAc;oBACrB,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,oCAAoC;oBACjD,QAAQ,EAAE,KAAK;iBAChB;gBACD,KAAK,EAAE;oBACL,KAAK,EAAE,OAAO;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,8DAA8D;iBAC5E;aACF;YACD,OAAO,EAAE;gBACP,MAAM,EAAE,EAAE,OAAO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AE,CAAC;YACrB,MAAM,IAAI,qCAAsB,CAAC,wDAAwD,CAAC,CAAA;QAC5F,CAAC;QAED,OAAO,UAAU,EAAE,KAAK,CAAA;QACxB,OAAO,UAAU,EAAE,OAAO,CAAA;QAE1B,MAAM,IAAI,GAAkB;YAC1B,KAAK;YACL,MAAM;YACN,MAAM;YACN,UAAU;YACV,SAAS;SACV,CAAA;QAED,OAAO,MAAM,OAAO,CAAC,0BAAc,EAAE;YACnC,MAAM,EAAE,MAAM;YACd,IAAI;SACL,CAAC,CAAA;IAEJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/sendEvent/types.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|