@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
|
@@ -11,14 +11,15 @@ const action = {
|
|
|
11
11
|
identifiers: {
|
|
12
12
|
label: 'Identifiers',
|
|
13
13
|
type: 'object',
|
|
14
|
-
description: 'Unique identifiers for the contact.
|
|
14
|
+
description: 'Unique identifiers for the contact. User ID and email are required. Anonymous ID is optional.',
|
|
15
15
|
required: true,
|
|
16
16
|
additionalProperties: false,
|
|
17
17
|
properties: {
|
|
18
18
|
userId: {
|
|
19
19
|
label: 'User ID',
|
|
20
20
|
type: 'string',
|
|
21
|
-
description: 'Unique user identifier from your app.'
|
|
21
|
+
description: 'Unique user identifier from your app.',
|
|
22
|
+
required: true
|
|
22
23
|
},
|
|
23
24
|
anonymousId: {
|
|
24
25
|
label: 'Anonymous ID',
|
|
@@ -28,7 +29,8 @@ const action = {
|
|
|
28
29
|
email: {
|
|
29
30
|
label: 'Email',
|
|
30
31
|
type: 'string',
|
|
31
|
-
description: "Contact's email address.
|
|
32
|
+
description: "Contact's email address.",
|
|
33
|
+
required: true
|
|
32
34
|
}
|
|
33
35
|
},
|
|
34
36
|
default: {
|
|
@@ -44,6 +46,137 @@ const action = {
|
|
|
44
46
|
required: true,
|
|
45
47
|
default: { '@path': '$.traits.list_id' }
|
|
46
48
|
},
|
|
49
|
+
status: {
|
|
50
|
+
label: 'Email subscription status',
|
|
51
|
+
type: 'boolean',
|
|
52
|
+
description: 'Indicates if the Contact is subscribed or unsubscribed from marketing emails. Set to true to subscribe, false to unsubscribe.',
|
|
53
|
+
required: true,
|
|
54
|
+
default: true
|
|
55
|
+
},
|
|
56
|
+
timestamp: {
|
|
57
|
+
label: 'Timestamp',
|
|
58
|
+
type: 'string',
|
|
59
|
+
description: 'The timestamp of the event. Defaults to the current time if not provided.',
|
|
60
|
+
format: 'date-time',
|
|
61
|
+
default: { '@path': '$.timestamp' }
|
|
62
|
+
},
|
|
63
|
+
ip: {
|
|
64
|
+
label: 'IP Address',
|
|
65
|
+
type: 'string',
|
|
66
|
+
description: 'The IP address of the user. Defaults to the current user IP if not provided.',
|
|
67
|
+
default: { '@path': '$.context.ip' }
|
|
68
|
+
},
|
|
69
|
+
userAgent: {
|
|
70
|
+
label: 'User Agent',
|
|
71
|
+
type: 'string',
|
|
72
|
+
description: 'The user agent of the user.',
|
|
73
|
+
default: { '@path': '$.context.userAgent' }
|
|
74
|
+
},
|
|
75
|
+
page: {
|
|
76
|
+
label: 'Page',
|
|
77
|
+
type: 'object',
|
|
78
|
+
description: 'The details of the page being viewed.',
|
|
79
|
+
properties: {
|
|
80
|
+
url: {
|
|
81
|
+
label: 'Page URL',
|
|
82
|
+
type: 'string',
|
|
83
|
+
description: 'Full URL of the page visited.'
|
|
84
|
+
},
|
|
85
|
+
title: {
|
|
86
|
+
label: 'Page Title',
|
|
87
|
+
type: 'string',
|
|
88
|
+
description: 'Title of the page.'
|
|
89
|
+
},
|
|
90
|
+
referrer: {
|
|
91
|
+
label: 'Referrer URL',
|
|
92
|
+
type: 'string',
|
|
93
|
+
description: 'URL of the referring page.'
|
|
94
|
+
},
|
|
95
|
+
path: {
|
|
96
|
+
label: 'Page Path',
|
|
97
|
+
type: 'string',
|
|
98
|
+
description: 'Path of the page being viewed.'
|
|
99
|
+
},
|
|
100
|
+
search: {
|
|
101
|
+
label: 'Search Query',
|
|
102
|
+
type: 'string',
|
|
103
|
+
description: 'Search query used to find the page.'
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
default: {
|
|
107
|
+
title: { '@path': '$.context.page.title' },
|
|
108
|
+
url: { '@path': '$.context.page.url' },
|
|
109
|
+
referrer: { '@path': '$.context.page.referrer' },
|
|
110
|
+
path: { '@path': '$.context.page.path' },
|
|
111
|
+
search: { '@path': '$.context.page.search' }
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
campaign: {
|
|
115
|
+
label: 'Campaign',
|
|
116
|
+
type: 'object',
|
|
117
|
+
description: 'The marketing campaign that referred the user to the site.',
|
|
118
|
+
properties: {
|
|
119
|
+
name: {
|
|
120
|
+
label: 'UTM Campaign Name',
|
|
121
|
+
type: 'string',
|
|
122
|
+
description: 'Name of the campaign.'
|
|
123
|
+
},
|
|
124
|
+
source: {
|
|
125
|
+
label: 'UTM Campaign Source',
|
|
126
|
+
type: 'string',
|
|
127
|
+
description: 'Source of the campaign UTM parameter.'
|
|
128
|
+
},
|
|
129
|
+
medium: {
|
|
130
|
+
label: 'UTM Campaign Medium',
|
|
131
|
+
type: 'string',
|
|
132
|
+
description: 'Medium of the campaign UTM parameter.'
|
|
133
|
+
},
|
|
134
|
+
term: {
|
|
135
|
+
label: 'UTM Campaign Term',
|
|
136
|
+
type: 'string',
|
|
137
|
+
description: 'Term or keyword of the campaign UTM parameter.'
|
|
138
|
+
},
|
|
139
|
+
content: {
|
|
140
|
+
label: 'UTM Campaign Content',
|
|
141
|
+
type: 'string',
|
|
142
|
+
description: 'Content of the campaign UTM parameter.'
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
default: {
|
|
146
|
+
name: { '@path': '$.context.campaign.name' },
|
|
147
|
+
source: { '@path': '$.context.campaign.source' },
|
|
148
|
+
medium: { '@path': '$.context.campaign.medium' },
|
|
149
|
+
term: { '@path': '$.context.campaign.term' },
|
|
150
|
+
content: { '@path': '$.context.campaign.content' }
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
location: {
|
|
154
|
+
label: 'Location',
|
|
155
|
+
type: 'object',
|
|
156
|
+
description: 'The geographic location of the user.',
|
|
157
|
+
properties: {
|
|
158
|
+
country: {
|
|
159
|
+
label: 'Country',
|
|
160
|
+
type: 'string',
|
|
161
|
+
description: 'Country of the user.'
|
|
162
|
+
},
|
|
163
|
+
region: {
|
|
164
|
+
label: 'Region/State',
|
|
165
|
+
type: 'string',
|
|
166
|
+
description: 'Region or state of the user.'
|
|
167
|
+
},
|
|
168
|
+
city: {
|
|
169
|
+
label: 'City',
|
|
170
|
+
type: 'string',
|
|
171
|
+
description: 'City of the user.'
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
default: {
|
|
175
|
+
country: { '@path': '$.context.location.country' },
|
|
176
|
+
region: { '@path': '$.context.location.region' },
|
|
177
|
+
city: { '@path': '$.context.location.city' }
|
|
178
|
+
}
|
|
179
|
+
},
|
|
47
180
|
properties: {
|
|
48
181
|
label: 'Contact Properties',
|
|
49
182
|
type: 'object',
|
|
@@ -110,13 +243,6 @@ const action = {
|
|
|
110
243
|
zipcode: { '@path': '$.traits.address.postal_code' }
|
|
111
244
|
}
|
|
112
245
|
},
|
|
113
|
-
status: {
|
|
114
|
-
label: 'Email subscription status',
|
|
115
|
-
type: 'boolean',
|
|
116
|
-
description: 'Indicates if the Contact is subscribed or unsubscribed from marketing emails. Set to true to subscribe, false to unsubscribe.',
|
|
117
|
-
required: true,
|
|
118
|
-
default: true
|
|
119
|
-
},
|
|
120
246
|
tags_to_add: {
|
|
121
247
|
label: 'Tags to Add',
|
|
122
248
|
type: 'string',
|
|
@@ -135,16 +261,22 @@ const action = {
|
|
|
135
261
|
}
|
|
136
262
|
},
|
|
137
263
|
perform: async (request, { payload }) => {
|
|
138
|
-
const { listId, properties: { firstName, lastName, phone, dateOfBirth, address, city, state, country, zipcode } = {},
|
|
264
|
+
const { identifiers: { userId, email }, identifiers: { anonymousId } = {}, listId, status, ip, timestamp, userAgent, page, campaign, location, properties: { firstName, lastName, phone, dateOfBirth, address, city, state, country, zipcode } = {}, tags_to_add, tags_to_remove } = payload;
|
|
139
265
|
if (!userId && !email && !anonymousId) {
|
|
140
266
|
throw new actions_core_1.PayloadValidationError('At least one identifier (userId, email, or anonymousId) is required.');
|
|
141
267
|
}
|
|
142
268
|
const jsonUpsertContact = {
|
|
143
|
-
|
|
269
|
+
userId,
|
|
144
270
|
...(anonymousId ? { anonymousId } : {}),
|
|
145
|
-
|
|
271
|
+
email,
|
|
146
272
|
listId,
|
|
147
|
-
|
|
273
|
+
status,
|
|
274
|
+
timestamp,
|
|
275
|
+
ip,
|
|
276
|
+
userAgent,
|
|
277
|
+
page,
|
|
278
|
+
campaign,
|
|
279
|
+
location,
|
|
148
280
|
properties: {
|
|
149
281
|
...(firstName ? { firstName } : {}),
|
|
150
282
|
...(lastName ? { lastName } : {}),
|
|
@@ -154,15 +286,15 @@ const action = {
|
|
|
154
286
|
...(city ? { city } : {}),
|
|
155
287
|
...(state ? { state } : {}),
|
|
156
288
|
...(country ? { country } : {}),
|
|
157
|
-
...(zipcode ? { zipcode } : {})
|
|
289
|
+
...(zipcode ? { zipcode } : {}),
|
|
290
|
+
...((typeof tags_to_add === 'string' || (Array.isArray(tags_to_add) && tags_to_add.length > 0))
|
|
291
|
+
? { tags_to_add: Array.isArray(tags_to_add) ? tags_to_add : [tags_to_add] }
|
|
292
|
+
: {}),
|
|
293
|
+
...((typeof tags_to_remove === 'string' || (Array.isArray(tags_to_remove) && tags_to_remove.length > 0))
|
|
294
|
+
? { tags_to_remove: Array.isArray(tags_to_remove) ? tags_to_remove : [tags_to_remove] }
|
|
295
|
+
: {})
|
|
158
296
|
}
|
|
159
297
|
};
|
|
160
|
-
if (typeof tags_to_add === 'string' || ((Array.isArray(tags_to_add) && tags_to_add.length > 0))) {
|
|
161
|
-
jsonUpsertContact.properties.tags_to_add = Array.isArray(tags_to_add) ? tags_to_add : [tags_to_add];
|
|
162
|
-
}
|
|
163
|
-
if (typeof tags_to_remove === 'string' || ((Array.isArray(tags_to_remove) && tags_to_remove.length > 0))) {
|
|
164
|
-
jsonUpsertContact.properties.tags_to_remove = Array.isArray(tags_to_remove) ? tags_to_remove : [tags_to_remove];
|
|
165
|
-
}
|
|
166
298
|
await request(constants_1.UPSERT_CONTACT_URL, {
|
|
167
299
|
method: 'POST',
|
|
168
300
|
json: jsonUpsertContact
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/upsertContact/index.ts"],"names":[],"mappings":";;AAAA,wDAAgF;AAGhF,2CAAgD;AAEhD,2CAAwC;AAExC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,uDAAuD;IACpE,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yonoma/upsertContact/index.ts"],"names":[],"mappings":";;AAAA,wDAAgF;AAGhF,2CAAgD;AAEhD,2CAAwC;AAExC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,uDAAuD;IACpE,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,WAA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
|
-
status
|
|
7
|
-
|
|
6
|
+
status: boolean;
|
|
7
|
+
timestamp?: string;
|
|
8
|
+
ip?: string;
|
|
9
|
+
userAgent?: string;
|
|
10
|
+
page?: {
|
|
11
|
+
url?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
referrer?: string;
|
|
14
|
+
path?: string;
|
|
15
|
+
search?: string;
|
|
16
|
+
};
|
|
17
|
+
campaign?: {
|
|
18
|
+
name?: string;
|
|
19
|
+
source?: string;
|
|
20
|
+
medium?: string;
|
|
21
|
+
term?: string;
|
|
22
|
+
content?: string;
|
|
23
|
+
};
|
|
24
|
+
location?: {
|
|
25
|
+
country?: string;
|
|
26
|
+
region?: string;
|
|
27
|
+
city?: string;
|
|
28
|
+
};
|
|
29
|
+
properties?: {
|
|
8
30
|
firstName?: string;
|
|
9
31
|
lastName?: string;
|
|
10
32
|
phone?: string;
|
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.
|
|
4
|
+
"version": "3.439.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"@aws-sdk/client-sts": "3.614.0",
|
|
47
47
|
"@bufbuild/protobuf": "^2.2.3",
|
|
48
48
|
"@segment/a1-notation": "^2.1.4",
|
|
49
|
-
"@segment/actions-core": "3.160.
|
|
50
|
-
"@segment/actions-shared": "1.141.
|
|
49
|
+
"@segment/actions-core": "^3.160.0",
|
|
50
|
+
"@segment/actions-shared": "^1.141.0",
|
|
51
51
|
"@types/node": "^22.13.1",
|
|
52
52
|
"ajv-formats": "^2.1.1",
|
|
53
53
|
"aws4": "^1.12.0",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"__tests__/__helpers__/"
|
|
92
92
|
]
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "a945135cc54a818a4ccdc3f1961c576d30087665"
|
|
95
95
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const nock_1 = __importDefault(require("nock"));
|
|
7
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
8
|
-
const index_1 = __importDefault(require("../index"));
|
|
9
|
-
const testDestination = (0, actions_core_1.createTestIntegration)(index_1.default);
|
|
10
|
-
const timestamp = '2025-10-13T4:00:00.449Z';
|
|
11
|
-
const settings = {
|
|
12
|
-
subdomain: 'test123',
|
|
13
|
-
client_id: 'test123',
|
|
14
|
-
client_secret: 'test123',
|
|
15
|
-
account_id: 'test123'
|
|
16
|
-
};
|
|
17
|
-
const event = (0, actions_core_1.createTestEvent)({
|
|
18
|
-
timestamp: timestamp,
|
|
19
|
-
type: 'track',
|
|
20
|
-
userId: 'TonyStark001',
|
|
21
|
-
properties: {
|
|
22
|
-
id: 'ily3000'
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
const payload = {
|
|
26
|
-
keys: {
|
|
27
|
-
id: 'version'
|
|
28
|
-
},
|
|
29
|
-
values: {
|
|
30
|
-
name: 'MARK42'
|
|
31
|
-
},
|
|
32
|
-
retlOnMappingSave: {
|
|
33
|
-
outputs: {
|
|
34
|
-
id: '1234567890'
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
const authUrl = `https://${settings.subdomain}.auth.marketingcloudapis.com/v2/token`;
|
|
39
|
-
const externalKeyUrl = `https://${settings.subdomain}.rest.marketingcloudapis.com/data/v1/customobjects/1234567890`;
|
|
40
|
-
describe('Salesforce Marketing Cloud', () => {
|
|
41
|
-
describe('Async Data Extension', () => {
|
|
42
|
-
it('should send data to the correct endpoint', async () => {
|
|
43
|
-
(0, nock_1.default)(authUrl).post('').reply(200, {
|
|
44
|
-
access_token: 'test_access_token',
|
|
45
|
-
soap_instance_url: 'https://test123.soap.marketingcloudapis.com/'
|
|
46
|
-
});
|
|
47
|
-
(0, nock_1.default)(externalKeyUrl).get('').reply(200, {
|
|
48
|
-
key: '1234567890'
|
|
49
|
-
});
|
|
50
|
-
(0, nock_1.default)(`https://${settings.subdomain}.rest.marketingcloudapis.com`)
|
|
51
|
-
.post('/data/v1/async/dataextensions/key:1234567890/rows')
|
|
52
|
-
.reply(200, {
|
|
53
|
-
requestId: 'b241e73b-9b35-46ff-9c2d-e779ac5836a9',
|
|
54
|
-
resultMessages: []
|
|
55
|
-
});
|
|
56
|
-
const responses = await testDestination.testAction('asyncDataExtension', {
|
|
57
|
-
event,
|
|
58
|
-
settings,
|
|
59
|
-
mapping: payload
|
|
60
|
-
});
|
|
61
|
-
expect(responses.length).toBe(2);
|
|
62
|
-
expect(responses[1].data).toEqual({
|
|
63
|
-
requestId: 'b241e73b-9b35-46ff-9c2d-e779ac5836a9',
|
|
64
|
-
resultMessages: []
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
it('should throw an error if no data extension is connected', async () => {
|
|
68
|
-
await expect(testDestination.testAction('asyncDataExtension', {
|
|
69
|
-
event,
|
|
70
|
-
settings,
|
|
71
|
-
mapping: {
|
|
72
|
-
keys: {
|
|
73
|
-
id: 'version'
|
|
74
|
-
},
|
|
75
|
-
values: {
|
|
76
|
-
name: 'MARK42'
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
})).rejects.toThrowError('No Data Extension Connected');
|
|
80
|
-
});
|
|
81
|
-
it('should throw an error if no external Key is found', async () => {
|
|
82
|
-
nock_1.default.cleanAll();
|
|
83
|
-
(0, nock_1.default)(externalKeyUrl)
|
|
84
|
-
.get('')
|
|
85
|
-
.reply(200, { key: '' })
|
|
86
|
-
.persist();
|
|
87
|
-
nock_1.default.disableNetConnect();
|
|
88
|
-
await expect(testDestination.testAction('asyncDataExtension', {
|
|
89
|
-
event,
|
|
90
|
-
settings,
|
|
91
|
-
mapping: payload
|
|
92
|
-
})).rejects.toThrowError('No External Key found for Data Extension');
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
//# sourceMappingURL=asyncDataExtension.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"asyncDataExtension.test.js","sourceRoot":"","sources":["../../../../src/destinations/salesforce-marketing-cloud/_tests_/asyncDataExtension.test.ts"],"names":[],"mappings":";;;;;AAAA,gDAAuB;AACvB,wDAA8E;AAC9E,qDAAiC;AAGjC,MAAM,eAAe,GAAG,IAAA,oCAAqB,EAAC,eAAU,CAAC,CAAA;AACzD,MAAM,SAAS,GAAG,yBAAyB,CAAA;AAC3C,MAAM,QAAQ,GAAa;IACzB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,aAAa,EAAE,SAAS;IACxB,UAAU,EAAE,SAAS;CACtB,CAAA;AAED,MAAM,KAAK,GAAG,IAAA,8BAAe,EAAC;IAC5B,SAAS,EAAE,SAAS;IACpB,IAAI,EAAE,OAAO;IACb,MAAM,EAAE,cAAc;IACtB,UAAU,EAAE;QACV,EAAE,EAAE,SAAS;KACd;CACF,CAAC,CAAA;AAEF,MAAM,OAAO,GAAG;IACd,IAAI,EAAE;QACJ,EAAE,EAAE,SAAS;KACd;IACD,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;KACf;IACD,iBAAiB,EAAE;QACjB,OAAO,EAAE;YACP,EAAE,EAAE,YAAY;SACjB;KACF;CACF,CAAA;AAED,MAAM,OAAO,GAAG,WAAW,QAAQ,CAAC,SAAS,uCAAuC,CAAA;AACpF,MAAM,cAAc,GAAG,WAAW,QAAQ,CAAC,SAAS,+DAA+D,CAAA;AAEnH,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,SAAS;qBACd;oBACD,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;qBACf;iBACF;aACF,CAAC,CACH,CAAC,OAAO,CAAC,YAAY,CAAC,6BAA6B,CAAC,CAAA;QACvD,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,mDAAmD,EAAE,KAAK,IAAI,EAAE;YACjE,cAAI,CAAC,QAAQ,EAAE,CAAA;YAEf,IAAA,cAAI,EAAC,cAAc,CAAC;iBACjB,GAAG,CAAC,EAAE,CAAC;iBACP,KAAK,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;iBACvB,OAAO,EAAE,CAAA;YAGZ,cAAI,CAAC,iBAAiB,EAAE,CAAA;YAExB,MAAM,MAAM,CACV,eAAe,CAAC,UAAU,CAAC,oBAAoB,EAAE;gBAC/C,KAAK;gBACL,QAAQ;gBACR,OAAO,EAAE,OAAO;aACjB,CAAC,CACH,CAAC,OAAO,CAAC,YAAY,CAAC,0CAA0C,CAAC,CAAA;QACpE,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
package/dist/destinations/salesforce-marketing-cloud/asyncDataExtension/generated-types.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
export interface Payload {
|
|
2
|
-
keys: {
|
|
3
|
-
[k: string]: unknown;
|
|
4
|
-
};
|
|
5
|
-
values: {
|
|
6
|
-
[k: string]: unknown;
|
|
7
|
-
};
|
|
8
|
-
enable_batching?: boolean;
|
|
9
|
-
batch_size?: number;
|
|
10
|
-
}
|
|
11
|
-
export interface RetlOnMappingSaveInputs {
|
|
12
|
-
operation: string;
|
|
13
|
-
dataExtensionId?: string;
|
|
14
|
-
categoryId?: string;
|
|
15
|
-
name?: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
isSendable?: boolean;
|
|
18
|
-
sendableCustomObjectField?: string;
|
|
19
|
-
sendableSubscriberField?: string;
|
|
20
|
-
columns?: {
|
|
21
|
-
name: string;
|
|
22
|
-
type: string;
|
|
23
|
-
isNullable: boolean;
|
|
24
|
-
isPrimaryKey: boolean;
|
|
25
|
-
length?: number;
|
|
26
|
-
scale?: number;
|
|
27
|
-
description?: string;
|
|
28
|
-
[k: string]: unknown;
|
|
29
|
-
}[];
|
|
30
|
-
}
|
|
31
|
-
export interface RetlOnMappingSaveOutputs {
|
|
32
|
-
id: string;
|
|
33
|
-
name: string;
|
|
34
|
-
}
|
|
35
|
-
export interface OnMappingSaveInputs {
|
|
36
|
-
operation: string;
|
|
37
|
-
dataExtensionId?: string;
|
|
38
|
-
categoryId?: string;
|
|
39
|
-
name?: string;
|
|
40
|
-
description?: string;
|
|
41
|
-
isSendable?: boolean;
|
|
42
|
-
sendableCustomObjectField?: string;
|
|
43
|
-
sendableSubscriberField?: string;
|
|
44
|
-
columns?: {
|
|
45
|
-
name: string;
|
|
46
|
-
type: string;
|
|
47
|
-
isNullable: boolean;
|
|
48
|
-
isPrimaryKey: boolean;
|
|
49
|
-
length?: number;
|
|
50
|
-
scale?: number;
|
|
51
|
-
description?: string;
|
|
52
|
-
[k: string]: unknown;
|
|
53
|
-
}[];
|
|
54
|
-
}
|
|
55
|
-
export interface OnMappingSaveOutputs {
|
|
56
|
-
id: string;
|
|
57
|
-
name: string;
|
|
58
|
-
}
|
package/dist/destinations/salesforce-marketing-cloud/asyncDataExtension/generated-types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/salesforce-marketing-cloud/asyncDataExtension/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
-
const sfmc_properties_1 = require("../sfmc-properties");
|
|
5
|
-
const sfmc_operations_1 = require("../sfmc-operations");
|
|
6
|
-
const action = {
|
|
7
|
-
title: 'Send Event asynchronously to Data Extension',
|
|
8
|
-
description: 'Insert event records asynchronously as rows into a data extension in Salesforce Marketing Cloud.',
|
|
9
|
-
fields: {
|
|
10
|
-
keys: { ...sfmc_properties_1.keys, required: true, dynamic: true },
|
|
11
|
-
values: { ...sfmc_properties_1.values_dataExtensionFields, dynamic: true },
|
|
12
|
-
enable_batching: sfmc_properties_1.enable_batching,
|
|
13
|
-
batch_size: sfmc_properties_1.batch_size
|
|
14
|
-
},
|
|
15
|
-
dynamicFields: {
|
|
16
|
-
keys: {
|
|
17
|
-
__keys__: async (request, { settings, payload }) => {
|
|
18
|
-
const dataExtensionId = payload.onMappingSave?.outputs?.id || payload.retlOnMappingSave?.outputs?.id || '';
|
|
19
|
-
return await (0, sfmc_operations_1.getDataExtensionFields)(request, settings.subdomain, settings, dataExtensionId, true);
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
values: {
|
|
23
|
-
__keys__: async (request, { settings, payload }) => {
|
|
24
|
-
const dataExtensionId = payload.onMappingSave?.outputs?.id || payload.retlOnMappingSave?.outputs?.id || '';
|
|
25
|
-
return await (0, sfmc_operations_1.getDataExtensionFields)(request, settings.subdomain, settings, dataExtensionId, false);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
hooks: {
|
|
30
|
-
retlOnMappingSave: {
|
|
31
|
-
...sfmc_properties_1.dataExtensionHook
|
|
32
|
-
},
|
|
33
|
-
onMappingSave: {
|
|
34
|
-
...sfmc_properties_1.dataExtensionHook
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
perform: async (request, { settings, payload, hookOutputs }) => {
|
|
38
|
-
const dataExtensionId = hookOutputs?.onMappingSave?.outputs?.id || hookOutputs?.retlOnMappingSave?.outputs?.id;
|
|
39
|
-
if (!dataExtensionId) {
|
|
40
|
-
throw new actions_core_1.IntegrationError('No Data Extension Connected', 'INVALID_CONFIGURATION', 400);
|
|
41
|
-
}
|
|
42
|
-
const externalKey = await (0, sfmc_operations_1.getExternalKey)(request, settings, dataExtensionId);
|
|
43
|
-
if (!externalKey) {
|
|
44
|
-
throw new actions_core_1.IntegrationError('No External Key found for Data Extension', 'INVALID_CONFIGURATION', 400);
|
|
45
|
-
}
|
|
46
|
-
return (0, sfmc_operations_1.asyncInsertRowsV2)(request, settings.subdomain, [payload], externalKey);
|
|
47
|
-
},
|
|
48
|
-
performBatch: async (request, { settings, payload, hookOutputs }) => {
|
|
49
|
-
const dataExtensionId = hookOutputs?.onMappingSave?.outputs?.id || hookOutputs?.retlOnMappingSave?.outputs?.id;
|
|
50
|
-
if (!dataExtensionId) {
|
|
51
|
-
throw new actions_core_1.IntegrationError('No Data Extension Connected', 'INVALID_CONFIGURATION', 400);
|
|
52
|
-
}
|
|
53
|
-
const externalKey = await (0, sfmc_operations_1.getExternalKey)(request, settings, dataExtensionId);
|
|
54
|
-
if (!externalKey) {
|
|
55
|
-
throw new actions_core_1.IntegrationError('No External Key found for Data Extension', 'INVALID_CONFIGURATION', 400);
|
|
56
|
-
}
|
|
57
|
-
return (0, sfmc_operations_1.executeAsyncInsertRowsWithMultiStatus)(request, settings.subdomain, payload, externalKey);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
exports.default = action;
|
|
61
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/salesforce-marketing-cloud/asyncDataExtension/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAG1E,wDAAqH;AACrH,wDAK2B;AAE3B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,kGAAkG;IAC/G,MAAM,EAAE;QACN,IAAI,EAAE,EAAE,GAAG,sBAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;QAChD,MAAM,EAAE,EAAE,GAAG,4CAA0B,EAAE,OAAO,EAAE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
-
enteredAudience: string[][];
|
|
4
|
-
exitedAudience: string[][];
|
|
5
|
-
};
|
|
6
|
-
export declare const validationError: (schema_type: string) => string;
|
|
7
|
-
export declare const normalize: (identifier: string) => string;
|
|
8
|
-
export declare const normalizePhone: (phone: string) => string;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizePhone = exports.normalize = exports.validationError = exports.sortPayload = void 0;
|
|
4
|
-
const hashing_utils_1 = require("../../../lib/hashing-utils");
|
|
5
|
-
const sortPayload = (payload) => {
|
|
6
|
-
return payload.reduce((acc, payloadItem) => {
|
|
7
|
-
const audienceEntered = payloadItem.props[payloadItem.audienceKey];
|
|
8
|
-
const externalId = validateAndExtractIdentifier(payloadItem.schema_type, payloadItem.email, payloadItem.phone, payloadItem.advertising_id);
|
|
9
|
-
if (externalId) {
|
|
10
|
-
if (audienceEntered) {
|
|
11
|
-
acc.enteredAudience.push([externalId]);
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
acc.exitedAudience.push([externalId]);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return acc;
|
|
18
|
-
}, { enteredAudience: [], exitedAudience: [] });
|
|
19
|
-
};
|
|
20
|
-
exports.sortPayload = sortPayload;
|
|
21
|
-
const validationError = (schema_type) => {
|
|
22
|
-
switch (schema_type) {
|
|
23
|
-
case 'MOBILE_AD_ID_SHA256':
|
|
24
|
-
return 'Mobile Advertising ID';
|
|
25
|
-
case 'EMAIL_SHA256':
|
|
26
|
-
return 'Email';
|
|
27
|
-
case 'PHONE_SHA256':
|
|
28
|
-
return 'Phone number';
|
|
29
|
-
default:
|
|
30
|
-
return 'Identifier';
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
exports.validationError = validationError;
|
|
34
|
-
const validateAndExtractIdentifier = (schemaType, email, phone, mobileAdId) => {
|
|
35
|
-
if (schemaType === 'EMAIL_SHA256' && email) {
|
|
36
|
-
return (0, hashing_utils_1.processHashing)(email, 'sha256', 'hex', exports.normalize);
|
|
37
|
-
}
|
|
38
|
-
if (schemaType === 'MOBILE_AD_ID_SHA256' && mobileAdId) {
|
|
39
|
-
return (0, hashing_utils_1.processHashing)(mobileAdId, 'sha256', 'hex', exports.normalize);
|
|
40
|
-
}
|
|
41
|
-
if (schemaType === 'PHONE_SHA256' && phone) {
|
|
42
|
-
return (0, hashing_utils_1.processHashing)(phone, 'sha256', 'hex', exports.normalizePhone);
|
|
43
|
-
}
|
|
44
|
-
return null;
|
|
45
|
-
};
|
|
46
|
-
const normalize = (identifier) => {
|
|
47
|
-
return identifier.trim().toLowerCase();
|
|
48
|
-
};
|
|
49
|
-
exports.normalize = normalize;
|
|
50
|
-
const normalizePhone = (phone) => {
|
|
51
|
-
let normalizedPhone = phone.replace(/[\s()+-]/g, '');
|
|
52
|
-
if (normalizedPhone.startsWith('00')) {
|
|
53
|
-
normalizedPhone = normalizedPhone.substring(2);
|
|
54
|
-
}
|
|
55
|
-
if (normalizedPhone.startsWith('0')) {
|
|
56
|
-
normalizedPhone = normalizedPhone.substring(1);
|
|
57
|
-
}
|
|
58
|
-
return normalizedPhone;
|
|
59
|
-
};
|
|
60
|
-
exports.normalizePhone = normalizePhone;
|
|
61
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/destinations/snap-audiences/syncAudience/utils.ts"],"names":[],"mappings":";;;AACA,8DAA2D;AAGpD,MAAM,WAAW,GAAG,CAAC,OAAkB,EAAE,EAAE;IAChD,OAAO,OAAO,CAAC,MAAM,CAInB,CAAC,GAAG,EAAE,WAAW,EAAE,EAAE;QACnB,MAAM,eAAe,GAAG,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,CAAA;QAClE,MAAM,UAAU,GAAG,4BAA4B,CAC7C,WAAW,CAAC,WAAW,EACvB,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