@segment/action-destinations 3.261.1-staging.0 → 3.262.0-staging-dbf2c12ff
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/amazon-ads/generated-types.d.ts +0 -9
- package/dist/destinations/amazon-ads/index.d.ts +2 -2
- package/dist/destinations/amazon-ads/index.js +3 -180
- package/dist/destinations/amazon-ads/index.js.map +1 -1
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +0 -19
- package/dist/destinations/amazon-ads/syncAudiences/index.js +7 -158
- package/dist/destinations/amazon-ads/syncAudiences/index.js.map +1 -1
- package/dist/destinations/chartmogul/index.js +1 -1
- package/dist/destinations/chartmogul/index.js.map +1 -1
- package/dist/destinations/customerio/utils.d.ts +1 -1
- package/dist/destinations/display-video-360/addToAudience/index.js +1 -2
- package/dist/destinations/display-video-360/addToAudience/index.js.map +1 -1
- package/dist/destinations/engage/utils/EngageActionPerformer.js +2 -17
- package/dist/destinations/engage/utils/EngageActionPerformer.js.map +1 -1
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.d.ts +0 -3
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js +0 -15
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +1 -1
- package/dist/destinations/engage/utils/track.d.ts +17 -20
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.d.ts +36 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.js.map +1 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +452 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.d.ts +22 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.js.map +1 -0
- package/dist/destinations/{responsys/asyncMergeProfileListMembers → engage-messaging-twilio/sendSms}/index.d.ts +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js +131 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.d.ts +23 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js +131 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.d.ts +24 -0
- package/dist/destinations/{engage/sendgrid/Profile.js → engage-messaging-twilio/sendWhatsApp/generated-types.js} +1 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.d.ts +5 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js +133 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.d.ts +21 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js +75 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.d.ts +24 -0
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js +111 -0
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js.map +1 -0
- package/dist/destinations/gameball/index.js +1 -1
- package/dist/destinations/gameball/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/functions.js.map +1 -1
- package/dist/destinations/hubspot/helperFunctions.d.ts +7 -0
- package/dist/destinations/hubspot/helperFunctions.js +27 -0
- package/dist/destinations/hubspot/helperFunctions.js.map +1 -0
- package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js +4 -4
- package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js.map +1 -1
- package/dist/destinations/index.js +3 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/inleads-ai/common-fields.d.ts +3 -0
- package/dist/destinations/inleads-ai/common-fields.js +238 -0
- package/dist/destinations/inleads-ai/common-fields.js.map +1 -0
- package/dist/destinations/inleads-ai/contants.d.ts +4 -0
- package/dist/destinations/inleads-ai/contants.js +8 -0
- package/dist/destinations/inleads-ai/contants.js.map +1 -0
- package/dist/destinations/inleads-ai/generated-types.d.ts +3 -0
- package/dist/destinations/inleads-ai/generated-types.js +3 -0
- package/dist/destinations/inleads-ai/generated-types.js.map +1 -0
- package/dist/destinations/inleads-ai/group/generated-types.d.ts +44 -0
- package/dist/destinations/inleads-ai/group/generated-types.js +3 -0
- package/dist/destinations/inleads-ai/group/generated-types.js.map +1 -0
- package/dist/destinations/inleads-ai/group/index.d.ts +5 -0
- package/dist/destinations/inleads-ai/group/index.js +76 -0
- package/dist/destinations/inleads-ai/group/index.js.map +1 -0
- package/dist/destinations/inleads-ai/identify/generated-types.d.ts +46 -0
- package/dist/destinations/inleads-ai/identify/generated-types.js +3 -0
- package/dist/destinations/inleads-ai/identify/generated-types.js.map +1 -0
- package/dist/destinations/inleads-ai/identify/index.d.ts +5 -0
- package/dist/destinations/inleads-ai/identify/index.js +120 -0
- package/dist/destinations/inleads-ai/identify/index.js.map +1 -0
- package/dist/destinations/inleads-ai/index.d.ts +4 -0
- package/dist/destinations/inleads-ai/index.js +67 -0
- package/dist/destinations/inleads-ai/index.js.map +1 -0
- package/dist/destinations/inleads-ai/track/generated-types.d.ts +45 -0
- package/dist/destinations/inleads-ai/track/generated-types.js +3 -0
- package/dist/destinations/inleads-ai/track/generated-types.js.map +1 -0
- package/dist/destinations/inleads-ai/track/index.d.ts +5 -0
- package/dist/destinations/inleads-ai/track/index.js +64 -0
- package/dist/destinations/inleads-ai/track/index.js.map +1 -0
- package/dist/destinations/kameleoon/group/generated-types.d.ts +12 -0
- package/dist/destinations/kameleoon/group/generated-types.js +3 -0
- package/dist/destinations/kameleoon/group/generated-types.js.map +1 -0
- package/dist/destinations/kameleoon/group/index.d.ts +5 -0
- package/dist/destinations/kameleoon/group/index.js +94 -0
- package/dist/destinations/kameleoon/group/index.js.map +1 -0
- package/dist/destinations/kameleoon/identify/generated-types.d.ts +11 -0
- package/dist/destinations/kameleoon/identify/generated-types.js +3 -0
- package/dist/destinations/kameleoon/identify/generated-types.js.map +1 -0
- package/dist/destinations/kameleoon/identify/index.d.ts +5 -0
- package/dist/destinations/kameleoon/identify/index.js +87 -0
- package/dist/destinations/kameleoon/identify/index.js.map +1 -0
- package/dist/destinations/kameleoon/index.js +15 -9
- package/dist/destinations/kameleoon/index.js.map +1 -1
- package/dist/destinations/kameleoon/logEvent/generated-types.d.ts +2 -0
- package/dist/destinations/kameleoon/logEvent/index.js +13 -1
- package/dist/destinations/kameleoon/logEvent/index.js.map +1 -1
- package/dist/destinations/kameleoon/page/generated-types.d.ts +15 -0
- package/dist/destinations/kameleoon/page/generated-types.js +3 -0
- package/dist/destinations/kameleoon/page/generated-types.js.map +1 -0
- package/dist/destinations/kameleoon/page/index.d.ts +5 -0
- package/dist/destinations/kameleoon/page/index.js +99 -0
- package/dist/destinations/kameleoon/page/index.js.map +1 -0
- package/dist/destinations/klaviyo/functions.d.ts +4 -7
- package/dist/destinations/klaviyo/functions.js +1 -80
- package/dist/destinations/klaviyo/functions.js.map +1 -1
- package/dist/destinations/klaviyo/removeProfile/index.js +0 -2
- package/dist/destinations/klaviyo/removeProfile/index.js.map +1 -1
- package/dist/destinations/klaviyo/types.d.ts +0 -97
- package/dist/destinations/klaviyo/upsertProfile/index.js +19 -29
- package/dist/destinations/klaviyo/upsertProfile/index.js.map +1 -1
- package/dist/destinations/koala/identify/index.js +6 -1
- package/dist/destinations/koala/identify/index.js.map +1 -1
- package/dist/destinations/liveramp-audiences/audienceEnteredS3/index.js +2 -2
- package/dist/destinations/liveramp-audiences/audienceEnteredS3/index.js.map +1 -1
- package/dist/destinations/liveramp-audiences/audienceEnteredSftp/index.js +2 -2
- package/dist/destinations/liveramp-audiences/audienceEnteredSftp/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/addToList/index.js +2 -4
- package/dist/destinations/marketo-static-lists/addToList/index.js.map +1 -1
- package/dist/destinations/moloco-rmp/index.js +2 -2
- package/dist/destinations/segment/segment-properties.js +2 -2
- package/dist/destinations/segment/segment-properties.js.map +1 -1
- package/dist/destinations/snap-conversions-api/_tests_/index.test.js +420 -488
- package/dist/destinations/snap-conversions-api/_tests_/index.test.js.map +1 -1
- package/dist/destinations/snap-conversions-api/index.js +42 -42
- package/dist/destinations/snap-conversions-api/index.js.map +1 -1
- package/dist/destinations/snap-conversions-api/reportConversionEvent/generated-types.d.ts +97 -18
- package/dist/destinations/snap-conversions-api/reportConversionEvent/index.js +7 -29
- package/dist/destinations/snap-conversions-api/reportConversionEvent/index.js.map +1 -1
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-input-fields-deprecated.d.ts +31 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-input-fields-deprecated.js +174 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-input-fields-deprecated.js.map +1 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-input-fields-v3.d.ts +16 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-input-fields-v3.js +640 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-input-fields-v3.js.map +1 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v3.d.ts +0 -4
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v3.js +593 -119
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v3.js.map +1 -1
- package/dist/destinations/snap-conversions-api/reportConversionEvent/utils.d.ts +3 -4
- package/dist/destinations/snap-conversions-api/reportConversionEvent/utils.js +6 -1
- package/dist/destinations/snap-conversions-api/reportConversionEvent/utils.js.map +1 -1
- package/dist/destinations/spiffy/generated-types.d.ts +5 -0
- package/dist/destinations/spiffy/generated-types.js +3 -0
- package/dist/destinations/spiffy/generated-types.js.map +1 -0
- package/dist/destinations/spiffy/index.d.ts +4 -0
- package/dist/destinations/spiffy/index.js +62 -0
- package/dist/destinations/spiffy/index.js.map +1 -0
- package/dist/destinations/spiffy/send/generated-types.d.ts +8 -0
- package/dist/destinations/spiffy/send/generated-types.js +3 -0
- package/dist/destinations/spiffy/send/generated-types.js.map +1 -0
- package/dist/destinations/spiffy/send/index.d.ts +5 -0
- package/dist/destinations/spiffy/send/index.js +42 -0
- package/dist/destinations/spiffy/send/index.js.map +1 -0
- package/dist/destinations/stackadapt/forwardEvent/generated-types.d.ts +4 -4
- package/dist/destinations/stackadapt/forwardEvent/index.js +11 -7
- package/dist/destinations/stackadapt/forwardEvent/index.js.map +1 -1
- package/dist/destinations/tiktok-conversions/common_fields.d.ts +2 -0
- package/dist/destinations/tiktok-conversions/common_fields.js +244 -0
- package/dist/destinations/tiktok-conversions/common_fields.js.map +1 -0
- package/dist/destinations/{tiktok-offline-conversions/reportOfflineEvent → tiktok-conversions}/formatter.js +11 -11
- package/dist/destinations/tiktok-conversions/formatter.js.map +1 -0
- package/dist/destinations/tiktok-conversions/index.js +163 -75
- package/dist/destinations/tiktok-conversions/index.js.map +1 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/generated-types.d.ts +12 -4
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.d.ts +1 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.js +5 -233
- package/dist/destinations/tiktok-conversions/reportWebEvent/index.js.map +1 -1
- package/dist/destinations/tiktok-conversions/utils.d.ts +4 -0
- package/dist/destinations/tiktok-conversions/utils.js +65 -0
- package/dist/destinations/tiktok-conversions/utils.js.map +1 -0
- package/dist/destinations/vernst-test/generated-types.d.ts +2 -0
- package/dist/destinations/vernst-test/generated-types.js +3 -0
- package/dist/destinations/vernst-test/generated-types.js.map +1 -0
- package/dist/destinations/vernst-test/index.d.ts +4 -0
- package/dist/destinations/vernst-test/index.js +20 -0
- package/dist/destinations/vernst-test/index.js.map +1 -0
- package/dist/destinations/vernst-test/pingWebhook/generated-types.d.ts +3 -0
- package/dist/destinations/vernst-test/pingWebhook/generated-types.js +3 -0
- package/dist/destinations/vernst-test/pingWebhook/generated-types.js.map +1 -0
- package/dist/destinations/vernst-test/pingWebhook/index.d.ts +5 -0
- package/dist/destinations/vernst-test/pingWebhook/index.js +21 -0
- package/dist/destinations/vernst-test/pingWebhook/index.js.map +1 -0
- package/dist/destinations/xtremepush/generated-types.d.ts +4 -0
- package/dist/destinations/xtremepush/generated-types.js +3 -0
- package/dist/destinations/xtremepush/generated-types.js.map +1 -0
- package/dist/destinations/xtremepush/identify/generated-types.d.ts +14 -0
- package/dist/destinations/xtremepush/identify/generated-types.js +3 -0
- package/dist/destinations/xtremepush/identify/generated-types.js.map +1 -0
- package/dist/destinations/xtremepush/identify/index.d.ts +5 -0
- package/dist/destinations/xtremepush/identify/index.js +87 -0
- package/dist/destinations/xtremepush/identify/index.js.map +1 -0
- package/dist/destinations/xtremepush/index.d.ts +4 -0
- package/dist/destinations/xtremepush/index.js +66 -0
- package/dist/destinations/xtremepush/index.js.map +1 -0
- package/dist/destinations/xtremepush/track/generated-types.d.ts +15 -0
- package/dist/destinations/xtremepush/track/generated-types.js +3 -0
- package/dist/destinations/xtremepush/track/generated-types.js.map +1 -0
- package/dist/destinations/xtremepush/track/index.d.ts +5 -0
- package/dist/destinations/xtremepush/track/index.js +95 -0
- package/dist/destinations/xtremepush/track/index.js.map +1 -0
- package/package.json +3 -3
- package/dist/destinations/engage/sendgrid/Profile.d.ts +0 -6
- package/dist/destinations/engage/sendgrid/Profile.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +0 -21
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +0 -174
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +0 -1
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +0 -14
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +0 -1
- package/dist/destinations/responsys/asyncMergePetRecords/index.js +0 -113
- package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +0 -1
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +0 -20
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +0 -1
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +0 -174
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +0 -1
- package/dist/destinations/responsys/rsp-operations.d.ts +0 -14
- package/dist/destinations/responsys/rsp-operations.js +0 -33
- package/dist/destinations/responsys/rsp-operations.js.map +0 -1
- package/dist/destinations/responsys/rsp-properties.d.ts +0 -4
- package/dist/destinations/responsys/rsp-properties.js +0 -27
- package/dist/destinations/responsys/rsp-properties.js.map +0 -1
- package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.d.ts +0 -1
- package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js +0 -381
- package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js.map +0 -1
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.d.ts +0 -1
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js +0 -581
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js.map +0 -1
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.d.ts +0 -4
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js +0 -97
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js.map +0 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +0 -1
- package/dist/destinations/{responsys/asyncMergePetRecords → engage-messaging-sendgrid/sendEmail}/generated-types.js +0 -0
- package/dist/destinations/{responsys/asyncMergePetRecords → engage-messaging-sendgrid/sendEmail}/index.d.ts +0 -0
- package/dist/destinations/{responsys/asyncMergeProfileListMembers → engage-messaging-twilio/sendSms}/generated-types.js +0 -0
- package/dist/destinations/{tiktok-offline-conversions/reportOfflineEvent → tiktok-conversions}/formatter.d.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { AudienceDestinationDefinition } from '@segment/actions-core';
|
|
2
|
-
import type { Settings
|
|
3
|
-
declare const destination: AudienceDestinationDefinition<Settings
|
|
2
|
+
import type { Settings } from './generated-types';
|
|
3
|
+
declare const destination: AudienceDestinationDefinition<Settings>;
|
|
4
4
|
export default destination;
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const actions_core_1 = require("@segment/actions-core");
|
|
7
|
-
const utils_1 = require("./utils");
|
|
8
7
|
const syncAudiences_1 = __importDefault(require("./syncAudiences"));
|
|
9
8
|
const destination = {
|
|
10
9
|
name: 'Amazon Ads',
|
|
@@ -21,15 +20,12 @@ const destination = {
|
|
|
21
20
|
{ label: 'Europe (EU)', value: 'https://advertising-api-eu.amazon.com' },
|
|
22
21
|
{ label: 'Far East (FE)', value: 'https://advertising-api-fe.amazon.com' }
|
|
23
22
|
],
|
|
24
|
-
default: '
|
|
23
|
+
default: 'North America (NA)',
|
|
25
24
|
type: 'string',
|
|
26
25
|
required: true
|
|
27
26
|
}
|
|
28
27
|
},
|
|
29
28
|
testAuthentication: async (request, { auth }) => {
|
|
30
|
-
if (!process.env.ACTIONS_AMAZON_ADS_CLIENT_ID) {
|
|
31
|
-
throw new actions_core_1.IntegrationError('Missing amazon API client ID', 'MISSING_REQUIRED_FIELD', 400);
|
|
32
|
-
}
|
|
33
29
|
if (!auth?.accessToken) {
|
|
34
30
|
throw new actions_core_1.InvalidAuthenticationError('Please authenticate via Oauth before enabling the destination.');
|
|
35
31
|
}
|
|
@@ -72,188 +68,15 @@ const destination = {
|
|
|
72
68
|
extendRequest({ auth }) {
|
|
73
69
|
return {
|
|
74
70
|
headers: {
|
|
75
|
-
authorization: `Bearer ${auth?.accessToken}
|
|
76
|
-
'Amazon-Advertising-API-ClientID': process.env.ACTIONS_AMAZON_ADS_CLIENT_ID || ''
|
|
71
|
+
authorization: `Bearer ${auth?.accessToken}`
|
|
77
72
|
}
|
|
78
73
|
};
|
|
79
74
|
},
|
|
80
|
-
audienceFields: {
|
|
81
|
-
description: {
|
|
82
|
-
type: 'string',
|
|
83
|
-
label: 'Description',
|
|
84
|
-
required: true,
|
|
85
|
-
description: 'The audience description. Must be an alphanumeric, non-null string between 0 to 1000 characters in length.'
|
|
86
|
-
},
|
|
87
|
-
countryCode: {
|
|
88
|
-
type: 'string',
|
|
89
|
-
label: 'Country Code',
|
|
90
|
-
required: false,
|
|
91
|
-
description: 'A String value representing ISO 3166-1 alpha-2 country code for the members in this audience.'
|
|
92
|
-
},
|
|
93
|
-
externalAudienceId: {
|
|
94
|
-
type: 'string',
|
|
95
|
-
label: 'External Audience Id',
|
|
96
|
-
required: true,
|
|
97
|
-
description: 'The user-defined audience identifier.'
|
|
98
|
-
},
|
|
99
|
-
cpmCents: {
|
|
100
|
-
label: 'CPM Cents',
|
|
101
|
-
type: 'number',
|
|
102
|
-
description: `Cost per thousand impressions (CPM) in cents. For example, $1.00 = 100 cents.`
|
|
103
|
-
},
|
|
104
|
-
currency: {
|
|
105
|
-
label: 'Currency',
|
|
106
|
-
type: 'string',
|
|
107
|
-
description: `The price paid. Base units depend on the currency. As an example, USD should be reported as Dollars.Cents, whereas JPY should be reported as a whole number of Yen. All provided values will be rounded to two digits with toFixed(2)`
|
|
108
|
-
},
|
|
109
|
-
ttl: {
|
|
110
|
-
type: 'number',
|
|
111
|
-
label: 'Time-to-live',
|
|
112
|
-
required: false,
|
|
113
|
-
description: 'Time-to-live in seconds. The amount of time the record is associated with the audience.'
|
|
114
|
-
},
|
|
115
|
-
advertiserId: {
|
|
116
|
-
label: 'Advertiser ID',
|
|
117
|
-
description: 'Advertiser Id',
|
|
118
|
-
type: 'string',
|
|
119
|
-
required: true
|
|
120
|
-
}
|
|
121
|
-
},
|
|
75
|
+
audienceFields: {},
|
|
122
76
|
audienceConfig: {
|
|
123
77
|
mode: {
|
|
124
78
|
type: 'synced',
|
|
125
79
|
full_audience_sync: false
|
|
126
|
-
},
|
|
127
|
-
async createAudience(request, createAudienceInput) {
|
|
128
|
-
const { audienceName, statsContext } = createAudienceInput;
|
|
129
|
-
const endpoint = createAudienceInput.settings.region;
|
|
130
|
-
const description = createAudienceInput.audienceSettings?.description;
|
|
131
|
-
const advertiser_id = createAudienceInput.audienceSettings?.advertiserId;
|
|
132
|
-
const external_audience_id = createAudienceInput.audienceSettings?.externalAudienceId;
|
|
133
|
-
const country_code = createAudienceInput.audienceSettings?.countryCode;
|
|
134
|
-
const ttl = createAudienceInput.audienceSettings?.ttl;
|
|
135
|
-
const currency = createAudienceInput.audienceSettings?.currency;
|
|
136
|
-
const cpm_cents = createAudienceInput.audienceSettings?.cpmCents;
|
|
137
|
-
const { statsClient, tags: statsTags } = statsContext || {};
|
|
138
|
-
const statsName = 'createAmazonAudience';
|
|
139
|
-
statsTags?.push(`slug:${destination.slug}`);
|
|
140
|
-
statsClient?.incr(`${statsName}.intialise`, 1, statsTags);
|
|
141
|
-
if (!advertiser_id) {
|
|
142
|
-
throw new actions_core_1.IntegrationError('Missing advertiserId value', 'MISSING_REQUIRED_FIELD', 400);
|
|
143
|
-
}
|
|
144
|
-
if (!description) {
|
|
145
|
-
throw new actions_core_1.IntegrationError('Missing Description value', 'MISSING_REQUIRED_FIELD', 400);
|
|
146
|
-
}
|
|
147
|
-
if (!external_audience_id) {
|
|
148
|
-
throw new actions_core_1.IntegrationError('Missing External Audience Id value', 'MISSING_REQUIRED_FIELD', 400);
|
|
149
|
-
}
|
|
150
|
-
if (!audienceName) {
|
|
151
|
-
throw new actions_core_1.IntegrationError('Missing Audience name value', 'MISSING_REQUIRED_FIELD', 400);
|
|
152
|
-
}
|
|
153
|
-
const payload = {
|
|
154
|
-
name: audienceName,
|
|
155
|
-
description: description,
|
|
156
|
-
targetResource: {
|
|
157
|
-
advertiserId: advertiser_id
|
|
158
|
-
},
|
|
159
|
-
metadata: {
|
|
160
|
-
externalAudienceId: external_audience_id
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
if (country_code) {
|
|
164
|
-
payload.countryCode = country_code;
|
|
165
|
-
}
|
|
166
|
-
if (ttl) {
|
|
167
|
-
payload.metadata.ttl = ttl;
|
|
168
|
-
}
|
|
169
|
-
if (cpm_cents && currency) {
|
|
170
|
-
payload.metadata.audienceFees = [];
|
|
171
|
-
payload.metadata?.audienceFees.push({
|
|
172
|
-
currency,
|
|
173
|
-
cpmCents: cpm_cents
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
statsTags?.push(`slug:${destination.slug}`);
|
|
177
|
-
statsClient?.incr(`${statsName}.call`, 1, statsTags);
|
|
178
|
-
try {
|
|
179
|
-
let payloadString = JSON.stringify(payload);
|
|
180
|
-
const regex = /"advertiserId":"(\d+)"/;
|
|
181
|
-
payloadString = payloadString.replace(regex, '"advertiserId":$1');
|
|
182
|
-
const response = await request(`${endpoint}/amc/audiences/metadata`, {
|
|
183
|
-
method: 'POST',
|
|
184
|
-
body: payloadString,
|
|
185
|
-
headers: {
|
|
186
|
-
'Content-Type': 'application/vnd.amcaudiences.v1+json'
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
const r = await response.json();
|
|
190
|
-
const externalId = r?.audienceId;
|
|
191
|
-
if (!externalId) {
|
|
192
|
-
statsClient?.incr(`${statsName}.error`, 1, statsTags);
|
|
193
|
-
throw new actions_core_1.IntegrationError('Invalid response from create audience request', 'INVALID_RESPONSE', 400);
|
|
194
|
-
}
|
|
195
|
-
statsClient?.incr(`${statsName}.success`, 1, statsTags);
|
|
196
|
-
return {
|
|
197
|
-
externalId
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
catch (e) {
|
|
201
|
-
if (e instanceof utils_1.AmazonAdsError) {
|
|
202
|
-
const message = JSON.parse(e.response?.data?.message || '');
|
|
203
|
-
statsTags?.push(`error:${message}`);
|
|
204
|
-
statsClient?.incr(`${statsName}.error`, 1, statsTags);
|
|
205
|
-
throw new actions_core_1.APIError(message, e.response?.status);
|
|
206
|
-
}
|
|
207
|
-
else if (e instanceof actions_core_1.IntegrationError) {
|
|
208
|
-
statsTags?.push(`error:${e.message}`);
|
|
209
|
-
statsClient?.incr(`${statsName}.error`, 1, statsTags);
|
|
210
|
-
throw new actions_core_1.APIError(e.message, 400);
|
|
211
|
-
}
|
|
212
|
-
else {
|
|
213
|
-
statsTags?.push(`error:${e}`);
|
|
214
|
-
statsClient?.incr(`${statsName}.error`, 1, statsTags);
|
|
215
|
-
throw e;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
async getAudience(request, getAudienceInput) {
|
|
220
|
-
const { statsContext } = getAudienceInput;
|
|
221
|
-
const audience_id = getAudienceInput.externalId;
|
|
222
|
-
const endpoint = getAudienceInput.settings.region;
|
|
223
|
-
const { statsClient, tags: statsTags } = statsContext || {};
|
|
224
|
-
const statsName = 'getAudience';
|
|
225
|
-
statsTags?.push(`slug:${destination.slug}`);
|
|
226
|
-
statsClient?.incr(`${statsName}.call`, 1, statsTags);
|
|
227
|
-
if (!audience_id) {
|
|
228
|
-
throw new actions_core_1.IntegrationError('Missing audience_id value', 'MISSING_REQUIRED_FIELD', 400);
|
|
229
|
-
}
|
|
230
|
-
try {
|
|
231
|
-
const response = await request(`${endpoint}/amc/audiences/metadata/${audience_id}`, {
|
|
232
|
-
method: 'GET'
|
|
233
|
-
});
|
|
234
|
-
const r = await response.json();
|
|
235
|
-
const externalId = r?.audienceId;
|
|
236
|
-
if (externalId != getAudienceInput.externalId) {
|
|
237
|
-
statsClient?.incr(`${statsName}.error`, 1, statsTags);
|
|
238
|
-
throw new actions_core_1.IntegrationError("Unable to verify ownership over audience. Segment Audience ID doesn't match Amazon Ads ID.", 'INVALID_REQUEST_DATA', 400);
|
|
239
|
-
}
|
|
240
|
-
statsClient?.incr(`${statsName}.success`, 1, statsTags);
|
|
241
|
-
return {
|
|
242
|
-
externalId
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
catch (e) {
|
|
246
|
-
if (e instanceof utils_1.AmazonAdsError) {
|
|
247
|
-
const message = JSON.parse(e.response?.data?.message || '');
|
|
248
|
-
throw new actions_core_1.APIError(message, e.response?.status);
|
|
249
|
-
}
|
|
250
|
-
else if (e instanceof actions_core_1.IntegrationError) {
|
|
251
|
-
throw new actions_core_1.APIError(e.message, 400);
|
|
252
|
-
}
|
|
253
|
-
else {
|
|
254
|
-
throw e;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
80
|
}
|
|
258
81
|
},
|
|
259
82
|
actions: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/index.ts"],"names":[],"mappings":";;;;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAgG;AAIhG,oEAA2C;AAG3C,MAAM,WAAW,GAA4C;IAC3D,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,6CAA6C;gBAC1D,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,oCAAoC,EAAE;oBAC5E,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,uCAAuC,EAAE;oBACxE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,uCAAuC,EAAE;iBAC3E;gBACD,OAAO,EAAE,oBAAoB;gBAC7B,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAA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C/B,GAAG,CACJ,CAAA;aACF;YAED,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,CAAA;QACjD,CAAC;KACF;IACD,aAAa,CAAC,EAAE,IAAI,EAAE;QACpB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,EAAE,WAAW,EAAE;aAC7C;SACF,CAAA;IACH,CAAC;IAED,cAAc,EAAE,EAAE;IAElB,cAAc,EAAE;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,kBAAkB,EAAE,KAAK;SAC1B;KAWF;IACD,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;KACd;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1,21 +1,2 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
|
-
records: {
|
|
3
|
-
externalUserId: string;
|
|
4
|
-
action: string;
|
|
5
|
-
countryCode?: string;
|
|
6
|
-
measurements?: {
|
|
7
|
-
[k: string]: unknown;
|
|
8
|
-
};
|
|
9
|
-
hashedPII: {
|
|
10
|
-
firstname?: string;
|
|
11
|
-
address?: string;
|
|
12
|
-
phone?: string;
|
|
13
|
-
city?: string;
|
|
14
|
-
state?: string;
|
|
15
|
-
email?: string;
|
|
16
|
-
lastname?: string;
|
|
17
|
-
postal?: string;
|
|
18
|
-
}[];
|
|
19
|
-
}[];
|
|
20
|
-
audienceId: number;
|
|
21
2
|
}
|
|
@@ -1,166 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
23
|
-
const utils_1 = require("../utils");
|
|
24
|
-
const crypto = __importStar(require("crypto"));
|
|
25
3
|
const action = {
|
|
26
|
-
title: 'Sync
|
|
4
|
+
title: 'Sync Audiences',
|
|
27
5
|
description: 'Sync audiences from Segment to Amazon Ads Audience.',
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
type: 'object',
|
|
34
|
-
multiple: true,
|
|
35
|
-
required: true,
|
|
36
|
-
properties: {
|
|
37
|
-
externalUserId: {
|
|
38
|
-
label: 'External User ID',
|
|
39
|
-
description: 'This is an external user identifier defined by data providers.',
|
|
40
|
-
type: 'string',
|
|
41
|
-
required: true
|
|
42
|
-
},
|
|
43
|
-
action: {
|
|
44
|
-
label: 'User Action',
|
|
45
|
-
description: 'A specific key used to define action type.',
|
|
46
|
-
type: 'string',
|
|
47
|
-
required: true,
|
|
48
|
-
choices: [
|
|
49
|
-
{ label: `Create`, value: 'CREATE' },
|
|
50
|
-
{ label: 'Delete', value: 'DELETE' }
|
|
51
|
-
],
|
|
52
|
-
default: 'CREATE'
|
|
53
|
-
},
|
|
54
|
-
countryCode: {
|
|
55
|
-
label: 'Country Code',
|
|
56
|
-
description: 'A String value representing ISO 3166-1 alpha-2 country code for the members in this audience.',
|
|
57
|
-
type: 'string'
|
|
58
|
-
},
|
|
59
|
-
measurements: {
|
|
60
|
-
label: 'Measurements',
|
|
61
|
-
type: 'object'
|
|
62
|
-
},
|
|
63
|
-
hashedPII: {
|
|
64
|
-
label: `hashed PII`,
|
|
65
|
-
description: 'List of hashed personally-identifiable information records to be matched with Amazon identities for future use. All inputs must be properly normalized and SHA-256 hashed.',
|
|
66
|
-
type: 'object',
|
|
67
|
-
required: true,
|
|
68
|
-
multiple: true,
|
|
69
|
-
properties: {
|
|
70
|
-
firstname: {
|
|
71
|
-
label: 'Measurements',
|
|
72
|
-
type: 'string'
|
|
73
|
-
},
|
|
74
|
-
address: {
|
|
75
|
-
label: 'Measurements',
|
|
76
|
-
type: 'string'
|
|
77
|
-
},
|
|
78
|
-
phone: {
|
|
79
|
-
label: 'Measurements',
|
|
80
|
-
type: 'string'
|
|
81
|
-
},
|
|
82
|
-
city: {
|
|
83
|
-
label: 'Measurements',
|
|
84
|
-
type: 'string'
|
|
85
|
-
},
|
|
86
|
-
state: {
|
|
87
|
-
label: 'Measurements',
|
|
88
|
-
type: 'string'
|
|
89
|
-
},
|
|
90
|
-
email: {
|
|
91
|
-
label: 'Measurements',
|
|
92
|
-
type: 'string'
|
|
93
|
-
},
|
|
94
|
-
lastname: {
|
|
95
|
-
label: 'Measurements',
|
|
96
|
-
type: 'string'
|
|
97
|
-
},
|
|
98
|
-
postal: {
|
|
99
|
-
label: 'Measurements',
|
|
100
|
-
type: 'string'
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
audienceId: {
|
|
107
|
-
label: 'Audience ID',
|
|
108
|
-
type: 'number',
|
|
109
|
-
required: true,
|
|
110
|
-
description: 'An number value representing the Amazon audience identifier. This is the identifier that is returned during audience creation.'
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
perform: (request, { settings, payload }) => {
|
|
114
|
-
return processPayload(request, settings, payload);
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
async function processPayload(request, settings, payload) {
|
|
118
|
-
if (!payload.audienceId) {
|
|
119
|
-
throw new actions_core_1.PayloadValidationError('Audience ID is required.');
|
|
120
|
-
}
|
|
121
|
-
try {
|
|
122
|
-
for (const record of payload.records) {
|
|
123
|
-
for (const pii of record.hashedPII) {
|
|
124
|
-
for (const key in pii) {
|
|
125
|
-
if (pii[key] !== undefined) {
|
|
126
|
-
pii[key] = await normalizeAndHash(pii[key]);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
const response = await request(`${settings.region}/amc/audiences/records`, {
|
|
132
|
-
method: 'POST',
|
|
133
|
-
json: payload,
|
|
134
|
-
headers: {
|
|
135
|
-
'Content-Type': 'application/vnd.amcaudiences.v1+json'
|
|
136
|
-
}
|
|
6
|
+
fields: {},
|
|
7
|
+
perform: (request, data) => {
|
|
8
|
+
return request('https://example.com', {
|
|
9
|
+
method: 'post',
|
|
10
|
+
json: data.payload
|
|
137
11
|
});
|
|
138
|
-
const result = await response.json();
|
|
139
|
-
const jobRequestId = result?.jobRequestId;
|
|
140
|
-
if (!jobRequestId) {
|
|
141
|
-
throw new actions_core_1.IntegrationError('Invalid response from upload audinece record call', 'INVALID_RESPONSE', 400);
|
|
142
|
-
}
|
|
143
|
-
return {
|
|
144
|
-
result
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
catch (e) {
|
|
148
|
-
if (e instanceof utils_1.AmazonAdsError) {
|
|
149
|
-
const message = JSON.parse(e.response?.data?.message || '');
|
|
150
|
-
throw new actions_core_1.APIError(message, e.response?.status);
|
|
151
|
-
}
|
|
152
|
-
else if (e instanceof actions_core_1.IntegrationError) {
|
|
153
|
-
throw new actions_core_1.APIError(e.message, 400);
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
throw e;
|
|
157
|
-
}
|
|
158
12
|
}
|
|
159
|
-
}
|
|
160
|
-
async function normalizeAndHash(data) {
|
|
161
|
-
const normalizedData = data.toLowerCase().trim();
|
|
162
|
-
const sha256Hash = crypto.createHash('sha256').update(normalizedData).digest('hex');
|
|
163
|
-
return sha256Hash;
|
|
164
|
-
}
|
|
13
|
+
};
|
|
165
14
|
exports.default = action;
|
|
166
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/amazon-ads/syncAudiences/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/amazon-ads/syncAudiences/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,qDAAqD;IAClE,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,qBAAqB,EAAE;YACpC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,OAAO;SACnB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -7,7 +7,7 @@ const actions_core_1 = require("@segment/actions-core");
|
|
|
7
7
|
const sendContact_1 = __importDefault(require("./sendContact"));
|
|
8
8
|
const sendCustomer_1 = __importDefault(require("./sendCustomer"));
|
|
9
9
|
const destination = {
|
|
10
|
-
name: '
|
|
10
|
+
name: 'ChartMogul',
|
|
11
11
|
slug: 'actions-chartmogul',
|
|
12
12
|
mode: 'cloud',
|
|
13
13
|
description: 'Send Contacts and Customers to ChartMogul.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/chartmogul/index.ts"],"names":[],"mappings":";;;;;AAEA,wDAAkE;AAElE,gEAAuC;AAEvC,kEAAyC;AAEzC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/chartmogul/index.ts"],"names":[],"mappings":";;;;;AAEA,wDAAkE;AAElE,gEAAuC;AAEvC,kEAAyC;AAEzC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,4CAA4C;IACzD,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,sBAAsB,EAAE;gBACtB,KAAK,EAAE,wBAAwB;gBAC/B,WAAW,EAAE,wDAAwD;gBACrE,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,KAAK;gBACb,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;YACpC,MAAM,SAAS,GAAG,IAAI,EAAE,QAAQ,EAAE,sBAAsB,CAAA;YACxD,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;gBACnD,MAAM,IAAI,yCAA0B,CAAC,8CAA8C,CAAC,CAAA;aACrF;YAED,OAAO,OAAO,CAAC,SAAS,EAAE;gBACxB,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,EAAE;aACT,CAAC,CAAA;QACJ,CAAC;KACF;IAED,OAAO,EAAE;QACP,WAAW,EAAX,qBAAW;QACX,YAAY,EAAZ,sBAAY;KACb;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const trackApiEndpoint: ({ accountRegion }: {
|
|
2
2
|
accountRegion?: string | undefined;
|
|
3
|
-
}) => "https://track
|
|
3
|
+
}) => "https://track.customer.io" | "https://track-eu.customer.io";
|
|
4
4
|
export declare enum AccountRegion {
|
|
5
5
|
US = "US \uD83C\uDDFA\uD83C\uDDF8",
|
|
6
6
|
EU = "EU \uD83C\uDDEA\uD83C\uDDFA"
|
|
@@ -19,10 +19,9 @@ const action = {
|
|
|
19
19
|
await shared_1.handleUpdate(request, [payload], 'add', statsContext);
|
|
20
20
|
return { success: true };
|
|
21
21
|
},
|
|
22
|
-
performBatch: async (request, { payload, statsContext
|
|
22
|
+
performBatch: async (request, { payload, statsContext }) => {
|
|
23
23
|
statsContext?.tags.push('slug:actions-display-video-360');
|
|
24
24
|
statsContext?.statsClient?.incr('addToAudience.batch', 1, statsContext?.tags);
|
|
25
|
-
Math.ceil(Math.random() * 10) && logger?.info('DIFN Test -' + payload[0].mobile_advertising_id);
|
|
26
25
|
await shared_1.handleUpdate(request, payload, 'add', statsContext);
|
|
27
26
|
return { success: true };
|
|
28
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/display-video-360/addToAudience/index.ts"],"names":[],"mappings":";;AAIA,sCAAwC;AAExC,8CAMsB;AAEtB,MAAM,MAAM,GAA0D;IACpE,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,+CAA+C;IAC5D,mBAAmB,EAAE,4BAA4B;IACjD,MAAM,EAAE;QACN,eAAe,EAAE,EAAE,GAAG,4BAAe,EAAE;QACvC,oBAAoB,EAAE,EAAE,GAAG,iCAAoB,EAAE;QACjD,qBAAqB,EAAE,EAAE,GAAG,kCAAqB,EAAE;QACnD,UAAU,EAAE,EAAE,GAAG,uBAAU,EAAE;QAC7B,mBAAmB,EAAE,EAAE,GAAG,gCAAmB,EAAE;KAChD;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;QACpD,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAA;QACzD,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,CAAA;QACvE,MAAM,qBAAY,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,CAAA;QAC3D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;IAC1B,CAAC;IACD,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/display-video-360/addToAudience/index.ts"],"names":[],"mappings":";;AAIA,sCAAwC;AAExC,8CAMsB;AAEtB,MAAM,MAAM,GAA0D;IACpE,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,+CAA+C;IAC5D,mBAAmB,EAAE,4BAA4B;IACjD,MAAM,EAAE;QACN,eAAe,EAAE,EAAE,GAAG,4BAAe,EAAE;QACvC,oBAAoB,EAAE,EAAE,GAAG,iCAAoB,EAAE;QACjD,qBAAqB,EAAE,EAAE,GAAG,kCAAqB,EAAE;QACnD,UAAU,EAAE,EAAE,GAAG,uBAAU,EAAE;QAC7B,mBAAmB,EAAE,EAAE,GAAG,gCAAmB,EAAE;KAChD;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;QACpD,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAA;QACzD,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,CAAA;QACvE,MAAM,qBAAY,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,CAAA;QAC3D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;IAC1B,CAAC;IACD,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;QACzD,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAA;QACzD,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,qBAAqB,EAAE,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,CAAA;QAC7E,MAAM,qBAAY,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,CAAC,CAAA;QACzD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;IAC1B,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -17,7 +17,6 @@ const isDestinationActionService_1 = require("./isDestinationActionService");
|
|
|
17
17
|
const ResponseError_1 = require("./ResponseError");
|
|
18
18
|
const IntegrationErrorWrapper_1 = require("./IntegrationErrorWrapper");
|
|
19
19
|
const truncate_1 = __importDefault(require("lodash/truncate"));
|
|
20
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
21
20
|
class EngageActionPerformer {
|
|
22
21
|
constructor(requestClient, executeInput) {
|
|
23
22
|
this.requestClient = requestClient;
|
|
@@ -50,6 +49,7 @@ class EngageActionPerformer {
|
|
|
50
49
|
const errorCode = errorDetails.code ?? respError.code ?? 'etimedout';
|
|
51
50
|
respError.code = errorCode;
|
|
52
51
|
errorDetails.code = errorCode;
|
|
52
|
+
respError.retry = true;
|
|
53
53
|
}
|
|
54
54
|
if (errorDetails.code)
|
|
55
55
|
op.tags.push(`response_code:${errorDetails.code}`);
|
|
@@ -76,20 +76,6 @@ class EngageActionPerformer {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
|
-
op?.onCatch.push(() => {
|
|
80
|
-
const respError = op?.error;
|
|
81
|
-
if (respError) {
|
|
82
|
-
const errorDetails = ResponseError_1.getErrorDetails(respError);
|
|
83
|
-
const msgLowercare = errorDetails?.message?.toLowerCase();
|
|
84
|
-
const isTimeoutErrorInOnCatch = msgLowercare?.includes('timeout') ||
|
|
85
|
-
msgLowercare?.includes('timedout') ||
|
|
86
|
-
msgLowercare?.includes('exceeded the deadline') ||
|
|
87
|
-
errorDetails.code?.toLowerCase().includes('etimedout');
|
|
88
|
-
if (isTimeoutErrorInOnCatch) {
|
|
89
|
-
op.error = new actions_core_1.RetryableError('Timeout error in onCatch');
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
79
|
return await this.requestClient(url, options);
|
|
94
80
|
}
|
|
95
81
|
redactPii(pii) {
|
|
@@ -148,8 +134,7 @@ __decorate([
|
|
|
148
134
|
__decorate([
|
|
149
135
|
track_1.track({
|
|
150
136
|
onTry: addUrlToLog,
|
|
151
|
-
onFinally: addUrlToLog
|
|
152
|
-
onCatch: addUrlToLog
|
|
137
|
+
onFinally: addUrlToLog
|
|
153
138
|
})
|
|
154
139
|
], EngageActionPerformer.prototype, "request", null);
|
|
155
140
|
exports.EngageActionPerformer = EngageActionPerformer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngageActionPerformer.js","sourceRoot":"","sources":["../../../../src/destinations/engage/utils/EngageActionPerformer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,iDAA6C;AAC7C,+CAA2C;AAC3C,mCAAiD;AACjD,6EAAyE;AACzE,mDAAgE;AAGhE,uEAAmE;AAEnE,+DAAsC;
|
|
1
|
+
{"version":3,"file":"EngageActionPerformer.js","sourceRoot":"","sources":["../../../../src/destinations/engage/utils/EngageActionPerformer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,iDAA6C;AAC7C,+CAA2C;AAC3C,mCAAiD;AACjD,6EAAyE;AACzE,mDAAgE;AAGhE,uEAAmE;AAEnE,+DAAsC;AAKtC,MAAsB,qBAAqB;IASzC,YAAqB,aAA4B,EAAW,YAA+C;QAAtF,kBAAa,GAAb,aAAa,CAAe;QAAW,iBAAY,GAAZ,YAAY,CAAmC;QARlG,WAAM,GAAiB,IAAI,2BAAY,CAAC,IAAI,CAAC,CAAA;QAC7C,gBAAW,GAAgB,IAAI,yBAAW,CAAC,IAAI,CAAC,CAAA;QAChD,kBAAa,GAAG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AA;KACpD;AACH,CAAC"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { TryCatchFinallyContext, TryCatchFinallyHook } from './wrapTryCatchFinallyPromisable';
|
|
2
2
|
export declare type OperationFinallyHooksContext<TContext extends TryCatchFinallyContext = TryCatchFinallyContext> = TContext & {
|
|
3
3
|
onFinally: (() => void)[];
|
|
4
|
-
onCatch: (() => void)[];
|
|
5
4
|
decoratorArgs?: {
|
|
6
5
|
onTry?: (ctx: TContext) => void;
|
|
7
6
|
onFinally?: (ctx: TContext) => void;
|
|
8
|
-
onCatch?: (ctx: TContext) => void;
|
|
9
7
|
};
|
|
10
8
|
};
|
|
11
9
|
export declare class OperationFinallyHooks {
|
|
@@ -13,5 +11,4 @@ export declare class OperationFinallyHooks {
|
|
|
13
11
|
static getPriority(): number;
|
|
14
12
|
static onTry<TContext extends TryCatchFinallyContext>(ctx: OperationFinallyHooksContext<TContext>): void;
|
|
15
13
|
static onFinally<TContext extends TryCatchFinallyContext>(ctx: OperationFinallyHooksContext<TContext>): void;
|
|
16
|
-
static onCatch<TContext extends TryCatchFinallyContext>(ctx: OperationFinallyHooksContext<TContext>): void;
|
|
17
14
|
}
|
|
@@ -10,7 +10,6 @@ class OperationFinallyHooks {
|
|
|
10
10
|
}
|
|
11
11
|
static onTry(ctx) {
|
|
12
12
|
ctx.onFinally = [];
|
|
13
|
-
ctx.onCatch = [];
|
|
14
13
|
ctx.decoratorArgs?.onTry?.(ctx);
|
|
15
14
|
}
|
|
16
15
|
static onFinally(ctx) {
|
|
@@ -27,20 +26,6 @@ class OperationFinallyHooks {
|
|
|
27
26
|
}
|
|
28
27
|
ctx.decoratorArgs?.onFinally?.(ctx);
|
|
29
28
|
}
|
|
30
|
-
static onCatch(ctx) {
|
|
31
|
-
for (const hook of ctx.onCatch) {
|
|
32
|
-
try {
|
|
33
|
-
hook();
|
|
34
|
-
}
|
|
35
|
-
catch (e) {
|
|
36
|
-
const error = e;
|
|
37
|
-
const loggerCtx = ctx;
|
|
38
|
-
if (loggerCtx.logs)
|
|
39
|
-
loggerCtx.logs.push(`Error in onCatch hook: ${error?.message || error.toString()}`);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
ctx.decoratorArgs?.onFinally?.(ctx);
|
|
43
|
-
}
|
|
44
29
|
}
|
|
45
30
|
exports.OperationFinallyHooks = OperationFinallyHooks;
|
|
46
31
|
//# sourceMappingURL=OperationFinallyHooks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationFinallyHooks.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/utils/operationTracking/OperationFinallyHooks.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"OperationFinallyHooks.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/utils/operationTracking/OperationFinallyHooks.ts"],"names":[],"mappings":";;;AAeA,MAAa,qBAAqB;IAChC,MAAM,CAAC,sBAAsB,CAAC,IAAkC;QAC9D,OAAO,IAAI,CAAA;IACb,CAAC;IACD,MAAM,CAAC,WAAW;QAChB,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,MAAM,CAAC,KAAK,CAA0C,GAA2C;QAC/F,GAAG,CAAC,SAAS,GAAG,EAAE,CAAA;QAClB,GAAG,CAAC,aAAa,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAA;IACjC,CAAC;IAED,MAAM,CAAC,SAAS,CAA0C,GAA2C;QACnG,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,SAAS,EAAE;YAChC,IAAI;gBACF,IAAI,EAAE,CAAA;aACP;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,KAAK,GAAG,CAAU,CAAA;gBAExB,MAAM,SAAS,GAAG,GAAsC,CAAA;gBACxD,IAAI,SAAS,CAAC,IAAI;oBAAE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,4BAA4B,KAAK,EAAE,OAAO,IAAI,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;aAC1G;SACF;QACD,GAAG,CAAC,aAAa,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,CAAA;IACrC,CAAC;CACF;AA1BD,sDA0BC"}
|