@segment/action-destinations 3.444.1-staging-d64d76661.0 → 3.445.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/aampe/index.js +1 -1
- package/dist/destinations/aampe/index.js.map +1 -1
- package/dist/destinations/actable-predictive/index.js +2 -2
- package/dist/destinations/actable-predictive/index.js.map +1 -1
- package/dist/destinations/adjust/index.js +2 -2
- package/dist/destinations/adjust/index.js.map +1 -1
- package/dist/destinations/algolia-insights/index.js +1 -1
- package/dist/destinations/algolia-insights/index.js.map +1 -1
- package/dist/destinations/ambee/index.js +1 -1
- package/dist/destinations/ambee/index.js.map +1 -1
- package/dist/destinations/amplitude/index.js +2 -2
- package/dist/destinations/amplitude/index.js.map +1 -1
- package/dist/destinations/app-fit/index.js +1 -1
- package/dist/destinations/app-fit/index.js.map +1 -1
- package/dist/destinations/attentive/index.js +1 -1
- package/dist/destinations/attentive/index.js.map +1 -1
- package/dist/destinations/avo/index.js +1 -1
- package/dist/destinations/avo/index.js.map +1 -1
- package/dist/destinations/aws-kinesis/send/generated-types.d.ts +0 -2
- package/dist/destinations/aws-kinesis/send/index.js +16 -32
- package/dist/destinations/aws-kinesis/send/index.js.map +1 -1
- package/dist/destinations/aws-kinesis/utils.js +1 -2
- package/dist/destinations/aws-kinesis/utils.js.map +1 -1
- package/dist/destinations/blend-ai/index.js +1 -1
- package/dist/destinations/blend-ai/index.js.map +1 -1
- package/dist/destinations/canny-functions/index.js +1 -1
- package/dist/destinations/canny-functions/index.js.map +1 -1
- package/dist/destinations/clay/index.js +1 -1
- package/dist/destinations/clay/index.js.map +1 -1
- package/dist/destinations/clevertap/index.js +1 -1
- package/dist/destinations/clevertap/index.js.map +1 -1
- package/dist/destinations/cordial/index.js +2 -2
- package/dist/destinations/cordial/index.js.map +1 -1
- package/dist/destinations/criteo/index.js +1 -1
- package/dist/destinations/criteo/index.js.map +1 -1
- package/dist/destinations/dawn/index.js +1 -1
- package/dist/destinations/dawn/index.js.map +1 -1
- package/dist/destinations/drip/index.js +1 -1
- package/dist/destinations/drip/index.js.map +1 -1
- package/dist/destinations/dub/index.js +1 -1
- package/dist/destinations/dub/index.js.map +1 -1
- package/dist/destinations/encharge/index.js +1 -1
- package/dist/destinations/encharge/index.js.map +1 -1
- package/dist/destinations/friendbuy/index.js +1 -1
- package/dist/destinations/friendbuy/index.js.map +1 -1
- package/dist/destinations/gainsight-px-cloud-action/index.js +1 -1
- package/dist/destinations/gainsight-px-cloud-action/index.js.map +1 -1
- package/dist/destinations/gleap/index.js +1 -1
- package/dist/destinations/gleap/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/index.js +1 -1
- package/dist/destinations/google-analytics-4/index.js.map +1 -1
- package/dist/destinations/hyperengage/index.js +1 -1
- package/dist/destinations/hyperengage/index.js.map +1 -1
- package/dist/destinations/index.js +0 -1
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/iterable/index.js +1 -1
- package/dist/destinations/iterable/index.js.map +1 -1
- package/dist/destinations/iterable-lists/index.js +1 -1
- package/dist/destinations/iterable-lists/index.js.map +1 -1
- package/dist/destinations/june/index.js +1 -1
- package/dist/destinations/june/index.js.map +1 -1
- 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/kevel/index.js +1 -1
- package/dist/destinations/kevel/index.js.map +1 -1
- package/dist/destinations/linkedin-audiences/updateAudience/fields.js.map +1 -1
- package/dist/destinations/linkedin-conversions/api/index.js +2 -6
- package/dist/destinations/linkedin-conversions/api/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/streamConversion/index.js.map +1 -1
- package/dist/destinations/loops/index.js +1 -1
- package/dist/destinations/loops/index.js.map +1 -1
- package/dist/destinations/magellan-ai/index.js +1 -1
- package/dist/destinations/magellan-ai/index.js.map +1 -1
- package/dist/destinations/mantle/index.js +1 -1
- package/dist/destinations/mantle/index.js.map +1 -1
- package/dist/destinations/mixpanel/index.js +1 -1
- package/dist/destinations/mixpanel/index.js.map +1 -1
- package/dist/destinations/movable-ink/index.js +1 -1
- package/dist/destinations/movable-ink/index.js.map +1 -1
- package/dist/destinations/nudge/index.js +1 -1
- package/dist/destinations/nudge/index.js.map +1 -1
- package/dist/destinations/outfunnel/index.js +1 -1
- package/dist/destinations/outfunnel/index.js.map +1 -1
- package/dist/destinations/playerzero-cloud/index.js +1 -1
- package/dist/destinations/playerzero-cloud/index.js.map +1 -1
- package/dist/destinations/rehook/index.js +2 -2
- package/dist/destinations/rehook/index.js.map +1 -1
- package/dist/destinations/revend/index.js +1 -1
- package/dist/destinations/revend/index.js.map +1 -1
- package/dist/destinations/ripe/index.js +1 -1
- package/dist/destinations/ripe/index.js.map +1 -1
- package/dist/destinations/roadwayai/index.js +1 -1
- package/dist/destinations/roadwayai/index.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/schematic/index.js +1 -1
- package/dist/destinations/schematic/index.js.map +1 -1
- package/dist/destinations/snap-audiences/index.js.map +1 -1
- package/dist/destinations/snap-audiences/syncAudience/fields.js +2 -2
- package/dist/destinations/snap-audiences/syncAudience/fields.js.map +1 -1
- package/dist/destinations/snap-audiences/syncAudience/functions.js +6 -27
- package/dist/destinations/snap-audiences/syncAudience/functions.js.map +1 -1
- package/dist/destinations/snap-audiences/syncAudience/types.d.ts +1 -1
- package/dist/destinations/spiffy/index.js +1 -1
- package/dist/destinations/spiffy/index.js.map +1 -1
- package/dist/destinations/sprig/index.js +1 -1
- package/dist/destinations/sprig/index.js.map +1 -1
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/constants.js +11 -11
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/fields.js +3 -9
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/fields.js.map +1 -1
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/functions.js +2 -2
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/functions.js.map +1 -1
- package/dist/destinations/stackadapt-audiences/index.js +3 -3
- package/dist/destinations/stackadapt-audiences/index.js.map +1 -1
- package/dist/destinations/survicate/identifyGroup/generated-types.d.ts +3 -3
- package/dist/destinations/survicate/identifyGroup/index.js +9 -9
- package/dist/destinations/survicate/identifyGroup/index.js.map +1 -1
- package/dist/destinations/survicate/identifyUser/generated-types.d.ts +2 -2
- package/dist/destinations/survicate/identifyUser/index.js +10 -7
- package/dist/destinations/survicate/identifyUser/index.js.map +1 -1
- package/dist/destinations/survicate/index.js +2 -2
- package/dist/destinations/survicate/index.js.map +1 -1
- package/dist/destinations/survicate/trackEvent/generated-types.d.ts +2 -2
- package/dist/destinations/survicate/trackEvent/index.js +6 -6
- package/dist/destinations/survicate/trackEvent/index.js.map +1 -1
- package/dist/destinations/taguchi/index.js +2 -2
- package/dist/destinations/taguchi/index.js.map +1 -1
- package/dist/destinations/taguchi/syncUserProfile/utils.js.map +1 -1
- package/dist/destinations/talon-one/index.js +1 -1
- package/dist/destinations/talon-one/index.js.map +1 -1
- package/dist/destinations/tiktok-app-events/index.js.map +1 -1
- package/dist/destinations/tiktok-app-events/reportAppEvent/constants.js.map +1 -1
- package/dist/destinations/tiktok-app-events/reportAppEvent/fields/common_fields.js +29 -29
- package/dist/destinations/tiktok-app-events/reportAppEvent/fields/common_fields.js.map +1 -1
- package/dist/destinations/tiktok-app-events/reportAppEvent/utils.js +3 -4
- package/dist/destinations/tiktok-app-events/reportAppEvent/utils.js.map +1 -1
- package/dist/destinations/tiktok-conversions-sandbox/index.js +1 -1
- package/dist/destinations/tiktok-conversions-sandbox/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions-sandbox/index.js +1 -1
- package/dist/destinations/tiktok-offline-conversions-sandbox/index.js.map +1 -1
- package/dist/destinations/toplyne/index.js +1 -1
- package/dist/destinations/toplyne/index.js.map +1 -1
- package/dist/destinations/trackey/index.js +1 -1
- package/dist/destinations/trackey/index.js.map +1 -1
- package/dist/destinations/trubrics/index.js +1 -1
- package/dist/destinations/trubrics/index.js.map +1 -1
- package/dist/destinations/twilio/index.js +1 -1
- package/dist/destinations/twilio/index.js.map +1 -1
- package/dist/destinations/usermaven/index.js +2 -2
- package/dist/destinations/usermaven/index.js.map +1 -1
- package/dist/destinations/usermotion/index.js +1 -1
- package/dist/destinations/usermotion/index.js.map +1 -1
- package/dist/destinations/userpilot/index.js +1 -1
- package/dist/destinations/userpilot/index.js.map +1 -1
- package/dist/destinations/voucherify/index.js +1 -1
- package/dist/destinations/voucherify/index.js.map +1 -1
- package/dist/destinations/vwo/index.js +1 -1
- package/dist/destinations/vwo/index.js.map +1 -1
- package/dist/destinations/webhook-audiences/index.js +1 -1
- package/dist/destinations/webhook-audiences/index.js.map +1 -1
- package/dist/destinations/xtremepush/index.js +1 -1
- package/dist/destinations/xtremepush/index.js.map +1 -1
- package/dist/destinations/yonoma/index.js +4 -4
- package/dist/destinations/yonoma/index.js.map +1 -1
- package/dist/destinations/yonoma/trackEvent/index.js +1 -1
- package/dist/destinations/yonoma/trackEvent/index.js.map +1 -1
- package/dist/destinations/yonoma/trackPageView/index.js +1 -1
- package/dist/destinations/yonoma/trackPageView/index.js.map +1 -1
- package/dist/destinations/yonoma/upsertContact/index.js +3 -3
- package/dist/destinations/yonoma/upsertContact/index.js.map +1 -1
- package/dist/lib/AWS/sts.js +2 -5
- package/dist/lib/AWS/sts.js.map +1 -1
- package/package.json +4 -4
- package/dist/destinations/memora/generated-types.d.ts +0 -6
- package/dist/destinations/memora/generated-types.js +0 -3
- package/dist/destinations/memora/generated-types.js.map +0 -1
- package/dist/destinations/memora/index.d.ts +0 -4
- package/dist/destinations/memora/index.js +0 -78
- package/dist/destinations/memora/index.js.map +0 -1
- package/dist/destinations/memora/upsertProfile/generated-types.d.ts +0 -8
- package/dist/destinations/memora/upsertProfile/generated-types.js +0 -3
- package/dist/destinations/memora/upsertProfile/generated-types.js.map +0 -1
- package/dist/destinations/memora/upsertProfile/index.d.ts +0 -5
- package/dist/destinations/memora/upsertProfile/index.js +0 -280
- package/dist/destinations/memora/upsertProfile/index.js.map +0 -1
- 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 -76
- package/dist/destinations/salesforce-marketing-cloud/asyncDataExtension/index.js.map +0 -1
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
-
const API_VERSION = 'v1';
|
|
5
|
-
const action = {
|
|
6
|
-
title: 'Upsert Profile',
|
|
7
|
-
description: 'Create or update Memora profiles using the bulk upsert API. If a profile already exists, its traits are merged (new keys added, existing keys overwritten). Supports batching up to 1000 profiles.',
|
|
8
|
-
defaultSubscription: 'type = "identify"',
|
|
9
|
-
fields: {
|
|
10
|
-
contact: {
|
|
11
|
-
label: 'Contact Information',
|
|
12
|
-
description: 'Contact information object containing email, firstName, lastName, and phone fields that will be placed in the Contact trait group in the Memora API call.',
|
|
13
|
-
type: 'object',
|
|
14
|
-
dynamic: true,
|
|
15
|
-
additionalProperties: true,
|
|
16
|
-
defaultObjectUI: 'keyvalue',
|
|
17
|
-
default: {
|
|
18
|
-
email: { '@path': '$.properties.email' },
|
|
19
|
-
firstName: { '@path': '$.traits.first_name' },
|
|
20
|
-
lastName: { '@path': '$.traits.last_name' },
|
|
21
|
-
phone: { '@path': '$.traits.phone' }
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
traitGroups: {
|
|
25
|
-
label: 'Trait Groups',
|
|
26
|
-
description: 'Additional trait groups to merge into the Memora profile. Keys should match trait group names and values should be objects of traits for that group.',
|
|
27
|
-
type: 'object',
|
|
28
|
-
required: false,
|
|
29
|
-
dynamic: true,
|
|
30
|
-
additionalProperties: true,
|
|
31
|
-
defaultObjectUI: 'keyvalue'
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
dynamicFields: {
|
|
35
|
-
contact: {
|
|
36
|
-
__keys__: async (request, { settings }) => {
|
|
37
|
-
return fetchTraitFields(request, settings, 'Contact');
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
traitGroups: {
|
|
41
|
-
__keys__: async (request, { settings }) => {
|
|
42
|
-
return fetchTraitGroups(request, settings);
|
|
43
|
-
},
|
|
44
|
-
__values__: async (request, { settings, dynamicFieldContext }) => {
|
|
45
|
-
const traitGroup = dynamicFieldContext?.selectedKey;
|
|
46
|
-
if (!traitGroup) {
|
|
47
|
-
return { choices: [] };
|
|
48
|
-
}
|
|
49
|
-
return fetchTraitFields(request, settings, traitGroup);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
perform: async (request, { payload, settings }) => {
|
|
54
|
-
const serviceId = settings.serviceId;
|
|
55
|
-
if (!serviceId) {
|
|
56
|
-
throw new actions_core_1.IntegrationError('Service ID is required', 'MISSING_REQUIRED_FIELD', 400);
|
|
57
|
-
}
|
|
58
|
-
const traitGroups = buildTraitGroups(payload);
|
|
59
|
-
if (Object.keys(traitGroups).length === 0) {
|
|
60
|
-
throw new actions_core_1.IntegrationError('Profile must contain at least one trait group or contact field', 'EMPTY_PROFILE', 400);
|
|
61
|
-
}
|
|
62
|
-
try {
|
|
63
|
-
const baseUrl = normalizeBaseUrl(settings.url);
|
|
64
|
-
const response = await request(`${baseUrl}/${API_VERSION}/Services/${serviceId}/Profiles/Bulk`, {
|
|
65
|
-
method: 'PUT',
|
|
66
|
-
headers: {
|
|
67
|
-
'Content-Type': 'application/json',
|
|
68
|
-
Authorization: `Bearer ${settings.api_key}`,
|
|
69
|
-
...(settings.twilioAccount && { 'X-Pre-Auth-Context': settings.twilioAccount })
|
|
70
|
-
},
|
|
71
|
-
json: {
|
|
72
|
-
profiles: [
|
|
73
|
-
{
|
|
74
|
-
traits: traitGroups
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
if (response.status !== 202) {
|
|
80
|
-
throw new actions_core_1.IntegrationError(`Unexpected response status: ${response.status}`, 'API_ERROR', response.status);
|
|
81
|
-
}
|
|
82
|
-
return response;
|
|
83
|
-
}
|
|
84
|
-
catch (error) {
|
|
85
|
-
if (error instanceof actions_core_1.IntegrationError) {
|
|
86
|
-
throw error;
|
|
87
|
-
}
|
|
88
|
-
handleMemoraApiError(error);
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
performBatch: async (request, { payload: payloads, settings }) => {
|
|
92
|
-
const serviceId = settings.serviceId;
|
|
93
|
-
if (!serviceId) {
|
|
94
|
-
throw new actions_core_1.IntegrationError('Service ID is required', 'MISSING_REQUIRED_FIELD', 400);
|
|
95
|
-
}
|
|
96
|
-
if (!payloads || payloads.length === 0) {
|
|
97
|
-
throw new actions_core_1.IntegrationError('No profiles provided for batch sync', 'EMPTY_BATCH', 400);
|
|
98
|
-
}
|
|
99
|
-
if (payloads.length > 1000) {
|
|
100
|
-
throw new actions_core_1.IntegrationError('Batch size cannot exceed 1000 profiles', 'BATCH_SIZE_EXCEEDED', 400);
|
|
101
|
-
}
|
|
102
|
-
const profiles = payloads.map((payload, index) => {
|
|
103
|
-
const traitGroups = buildTraitGroups(payload);
|
|
104
|
-
if (Object.keys(traitGroups).length === 0) {
|
|
105
|
-
throw new actions_core_1.IntegrationError(`Profile at index ${index} must contain at least one trait group or contact field`, 'EMPTY_PROFILE', 400);
|
|
106
|
-
}
|
|
107
|
-
return { traits: traitGroups };
|
|
108
|
-
});
|
|
109
|
-
try {
|
|
110
|
-
const baseUrl = normalizeBaseUrl(settings.url);
|
|
111
|
-
const response = await request(`${baseUrl}/${API_VERSION}/Services/${serviceId}/Profiles/Bulk`, {
|
|
112
|
-
method: 'PUT',
|
|
113
|
-
headers: {
|
|
114
|
-
'Content-Type': 'application/json',
|
|
115
|
-
Authorization: `Bearer ${settings.api_key}`,
|
|
116
|
-
...(settings.twilioAccount && { 'X-Pre-Auth-Context': settings.twilioAccount })
|
|
117
|
-
},
|
|
118
|
-
json: {
|
|
119
|
-
profiles
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
if (response.status !== 202) {
|
|
123
|
-
throw new actions_core_1.IntegrationError(`Unexpected response status: ${response.status}`, 'API_ERROR', response.status);
|
|
124
|
-
}
|
|
125
|
-
return response;
|
|
126
|
-
}
|
|
127
|
-
catch (error) {
|
|
128
|
-
if (error instanceof actions_core_1.IntegrationError) {
|
|
129
|
-
throw error;
|
|
130
|
-
}
|
|
131
|
-
handleMemoraApiError(error);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
function buildTraitGroups(payload) {
|
|
136
|
-
const traitGroups = {};
|
|
137
|
-
if (payload.traitGroups && typeof payload.traitGroups === 'object' && !Array.isArray(payload.traitGroups)) {
|
|
138
|
-
for (const [groupName, groupValue] of Object.entries(payload.traitGroups)) {
|
|
139
|
-
if (!groupValue || typeof groupValue !== 'object' || Array.isArray(groupValue)) {
|
|
140
|
-
continue;
|
|
141
|
-
}
|
|
142
|
-
const cleanedGroup = cleanObject(groupValue);
|
|
143
|
-
if (Object.keys(cleanedGroup).length > 0) {
|
|
144
|
-
traitGroups[groupName] = cleanedGroup;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
if (payload.contact && typeof payload.contact === 'object') {
|
|
149
|
-
const contact = cleanObject(payload.contact);
|
|
150
|
-
if (Object.keys(contact).length > 0) {
|
|
151
|
-
traitGroups.Contact = {
|
|
152
|
-
...(traitGroups.Contact ?? {}),
|
|
153
|
-
...contact
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
return traitGroups;
|
|
158
|
-
}
|
|
159
|
-
function cleanObject(input) {
|
|
160
|
-
if (!input || typeof input !== 'object') {
|
|
161
|
-
return {};
|
|
162
|
-
}
|
|
163
|
-
const value = input;
|
|
164
|
-
const cleaned = {};
|
|
165
|
-
for (const [key, fieldValue] of Object.entries(value)) {
|
|
166
|
-
if (fieldValue === undefined || fieldValue === null) {
|
|
167
|
-
continue;
|
|
168
|
-
}
|
|
169
|
-
if (Array.isArray(fieldValue)) {
|
|
170
|
-
if (fieldValue.length > 0) {
|
|
171
|
-
cleaned[key] = fieldValue;
|
|
172
|
-
}
|
|
173
|
-
continue;
|
|
174
|
-
}
|
|
175
|
-
if (typeof fieldValue === 'object') {
|
|
176
|
-
const nested = cleanObject(fieldValue);
|
|
177
|
-
if (Object.keys(nested).length > 0) {
|
|
178
|
-
cleaned[key] = nested;
|
|
179
|
-
}
|
|
180
|
-
continue;
|
|
181
|
-
}
|
|
182
|
-
cleaned[key] = fieldValue;
|
|
183
|
-
}
|
|
184
|
-
return cleaned;
|
|
185
|
-
}
|
|
186
|
-
function handleMemoraApiError(error) {
|
|
187
|
-
const httpError = error;
|
|
188
|
-
if (httpError.response) {
|
|
189
|
-
const status = httpError.response.status;
|
|
190
|
-
const data = httpError.response.data;
|
|
191
|
-
switch (status) {
|
|
192
|
-
case 400:
|
|
193
|
-
throw new actions_core_1.IntegrationError(data?.message || 'Bad Request - Invalid request data', 'INVALID_REQUEST_DATA', 400);
|
|
194
|
-
case 404:
|
|
195
|
-
throw new actions_core_1.IntegrationError(data?.message || 'Profile or service not found', 'SERVICE_NOT_FOUND', 404);
|
|
196
|
-
case 429: {
|
|
197
|
-
const retryAfter = httpError.response.headers?.['retry-after'];
|
|
198
|
-
const message = retryAfter ? `Rate limit exceeded. Retry after ${retryAfter} seconds` : 'Rate limit exceeded';
|
|
199
|
-
throw new actions_core_1.RetryableError(data?.message || message);
|
|
200
|
-
}
|
|
201
|
-
case 500:
|
|
202
|
-
throw new actions_core_1.RetryableError(data?.message || 'Internal server error');
|
|
203
|
-
case 503:
|
|
204
|
-
throw new actions_core_1.RetryableError(data?.message || 'Service unavailable');
|
|
205
|
-
default:
|
|
206
|
-
throw new actions_core_1.IntegrationError(data?.message || `HTTP ${status} error`, 'API_ERROR', status);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
throw new actions_core_1.RetryableError(httpError.message || 'Network error occurred');
|
|
210
|
-
}
|
|
211
|
-
async function fetchTraitFields(request, settings, traitGroup) {
|
|
212
|
-
try {
|
|
213
|
-
const baseUrl = normalizeBaseUrl(settings.url);
|
|
214
|
-
const response = await request(`${baseUrl}/${API_VERSION}/Services/${settings.serviceId}/Profiles/traits-schema?traitGroups=${traitGroup}`, {
|
|
215
|
-
method: 'GET',
|
|
216
|
-
headers: {
|
|
217
|
-
Authorization: `Bearer ${settings.api_key}`,
|
|
218
|
-
...(settings.twilioAccount && { 'X-Pre-Auth-Context': settings.twilioAccount })
|
|
219
|
-
},
|
|
220
|
-
skipResponseCloning: true
|
|
221
|
-
});
|
|
222
|
-
const traits = response?.data?.traits || [];
|
|
223
|
-
const choices = traits.map((trait) => ({
|
|
224
|
-
label: trait.name || trait.key || '',
|
|
225
|
-
value: trait.key || trait.name || ''
|
|
226
|
-
}));
|
|
227
|
-
return {
|
|
228
|
-
choices,
|
|
229
|
-
nextPage: response?.data?.meta?.nextPageToken
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
catch (error) {
|
|
233
|
-
return {
|
|
234
|
-
choices: [],
|
|
235
|
-
error: {
|
|
236
|
-
message: 'Unable to fetch trait fields. You can still manually enter trait names.',
|
|
237
|
-
code: 'FETCH_ERROR'
|
|
238
|
-
}
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
async function fetchTraitGroups(request, settings) {
|
|
243
|
-
try {
|
|
244
|
-
const baseUrl = normalizeBaseUrl(settings.url);
|
|
245
|
-
const response = await request(`${baseUrl}/${API_VERSION}/Services/${settings.serviceId}/trait-groups`, {
|
|
246
|
-
method: 'GET',
|
|
247
|
-
headers: {
|
|
248
|
-
Authorization: `Bearer ${settings.api_key}`,
|
|
249
|
-
...(settings.twilioAccount && { 'X-Pre-Auth-Context': settings.twilioAccount })
|
|
250
|
-
},
|
|
251
|
-
skipResponseCloning: true
|
|
252
|
-
});
|
|
253
|
-
const traitGroups = response?.data?.traitGroups || [];
|
|
254
|
-
const choices = traitGroups.map((group) => ({
|
|
255
|
-
label: group.name || '',
|
|
256
|
-
value: group.name || ''
|
|
257
|
-
}));
|
|
258
|
-
return {
|
|
259
|
-
choices,
|
|
260
|
-
nextPage: response?.data?.meta?.nextPageToken
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
catch (error) {
|
|
264
|
-
return {
|
|
265
|
-
choices: [
|
|
266
|
-
{ label: 'Contact', value: 'Contact' },
|
|
267
|
-
{ label: 'Custom', value: 'Custom' }
|
|
268
|
-
],
|
|
269
|
-
error: {
|
|
270
|
-
message: 'Unable to fetch trait groups. Showing default options.',
|
|
271
|
-
code: 'FETCH_ERROR'
|
|
272
|
-
}
|
|
273
|
-
};
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
exports.default = action;
|
|
277
|
-
function normalizeBaseUrl(url) {
|
|
278
|
-
return url.replace(/\/+$/, '');
|
|
279
|
-
}
|
|
280
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/memora/upsertProfile/index.ts"],"names":[],"mappings":";;AAGA,wDAAwE;AAExE,MAAM,WAAW,GAAG,IAAI,CAAA;AAExB,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EACT,oMAAoM;IACtM,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EACT,2JAA2J;YAC7J,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,IAAI;YACb,oBAAoB,EAAE,IAAI;YAC1B,eAAe,EAAE,UAAU;YAC3B,OAAO,EAAE;gBACP,KAAK,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;gBACxC,SAAS,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;gBAC7C,QAAQ,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;gBAC3C,KAAK,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;aACrC;SACF;QACD,WAAW,EAAE;YACX,KAAK,EAAE,cAAc;YACrB,WAAW,EACT,sJAAsJ;YACxJ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,IAAI;YACb,oBAAoB,EAAE,IAAI;YAC1B,eAAe,EAAE,UAAU;SAC5B;KACF;IACD,aAAa,EAAE;QACb,OAAO,EAAE;YACP,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;gBACxC,OAAO,gBAAgB,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CA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,EAAE,CAAC;aAChF;YACD,mBAAmB,EAAE,IAAI;SAC1B,CACF,CAAA;QAED,MAAM,WAAW,GAAG,QAAQ,EAAE,IAAI,EAAE,WAAW,IAAI,EAAE,CAAA;QACrD,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,KAAiB,EAAE,EAAE,CAAC,CAAC;YACtD,KAAK,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE;YACvB,KAAK,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE;SACxB,CAAC,CAAC,CAAA;QAEH,OAAO;YACL,OAAO;YACP,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa;SAC9C,CAAA;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAEf,OAAO;YACL,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;gBACtC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;aACrC;YACD,KAAK,EAAE;gBACL,OAAO,EAAE,wDAAwD;gBACjE,IAAI,EAAE,aAAa;aACpB;SACF,CAAA;IACH,CAAC;AACH,CAAC;AAED,kBAAe,MAAM,CAAA;AAErB,SAAS,gBAAgB,CAAC,GAAW;IACnC,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AAChC,CAAC"}
|
|
@@ -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":";;;;;A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;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,76 +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_bytes: {
|
|
14
|
-
label: 'Batch Bytes',
|
|
15
|
-
description: 'The maximum size of a batch in bytes.',
|
|
16
|
-
type: 'number',
|
|
17
|
-
unsafe_hidden: true,
|
|
18
|
-
required: false,
|
|
19
|
-
default: 6000000
|
|
20
|
-
},
|
|
21
|
-
batch_size: {
|
|
22
|
-
...sfmc_properties_1.batch_size,
|
|
23
|
-
minimum: 10,
|
|
24
|
-
default: 30000,
|
|
25
|
-
maximum: 32000,
|
|
26
|
-
description: 'Maximum number of events to include in each batch for async operations. Defaults to 30000.',
|
|
27
|
-
unsafe_hidden: false
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
dynamicFields: {
|
|
31
|
-
keys: {
|
|
32
|
-
__keys__: async (request, { settings, payload }) => {
|
|
33
|
-
const dataExtensionId = payload.onMappingSave?.outputs?.id || payload.retlOnMappingSave?.outputs?.id || '';
|
|
34
|
-
return await (0, sfmc_operations_1.getDataExtensionFields)(request, settings.subdomain, settings, dataExtensionId, true);
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
values: {
|
|
38
|
-
__keys__: async (request, { settings, payload }) => {
|
|
39
|
-
const dataExtensionId = payload.onMappingSave?.outputs?.id || payload.retlOnMappingSave?.outputs?.id || '';
|
|
40
|
-
return await (0, sfmc_operations_1.getDataExtensionFields)(request, settings.subdomain, settings, dataExtensionId, false);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
hooks: {
|
|
45
|
-
retlOnMappingSave: {
|
|
46
|
-
...sfmc_properties_1.dataExtensionHook
|
|
47
|
-
},
|
|
48
|
-
onMappingSave: {
|
|
49
|
-
...sfmc_properties_1.dataExtensionHook
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
perform: async (request, { settings, payload, hookOutputs }) => {
|
|
53
|
-
const dataExtensionId = hookOutputs?.onMappingSave?.outputs?.id || hookOutputs?.retlOnMappingSave?.outputs?.id;
|
|
54
|
-
if (!dataExtensionId) {
|
|
55
|
-
throw new actions_core_1.IntegrationError('No Data Extension Connected', 'INVALID_CONFIGURATION', 400);
|
|
56
|
-
}
|
|
57
|
-
const externalKey = await (0, sfmc_operations_1.getExternalKey)(request, settings, dataExtensionId);
|
|
58
|
-
if (!externalKey) {
|
|
59
|
-
throw new actions_core_1.IntegrationError('No External Key found for Data Extension', 'INVALID_CONFIGURATION', 400);
|
|
60
|
-
}
|
|
61
|
-
return (0, sfmc_operations_1.asyncInsertRowsV2)(request, settings.subdomain, [payload], externalKey);
|
|
62
|
-
},
|
|
63
|
-
performBatch: async (request, { settings, payload, hookOutputs }) => {
|
|
64
|
-
const dataExtensionId = hookOutputs?.onMappingSave?.outputs?.id || hookOutputs?.retlOnMappingSave?.outputs?.id;
|
|
65
|
-
if (!dataExtensionId) {
|
|
66
|
-
throw new actions_core_1.IntegrationError('No Data Extension Connected', 'INVALID_CONFIGURATION', 400);
|
|
67
|
-
}
|
|
68
|
-
const externalKey = await (0, sfmc_operations_1.getExternalKey)(request, settings, dataExtensionId);
|
|
69
|
-
if (!externalKey) {
|
|
70
|
-
throw new actions_core_1.IntegrationError('No External Key found for Data Extension', 'INVALID_CONFIGURATION', 400);
|
|
71
|
-
}
|
|
72
|
-
return (0, sfmc_operations_1.executeAsyncInsertRowsWithMultiStatus)(request, settings.subdomain, payload, externalKey);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
exports.default = action;
|
|
76
|
-
//# 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,IAAI,EAAE;QACxD,eAAe,EAAE,iCAAe;QAChC,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB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