@segment/action-destinations 3.290.0-staging-041024fe6 → 3.290.0-staging-f91c8ae9b
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 +1 -1
- package/dist/destinations/amazon-ads/index.js +76 -95
- package/dist/destinations/amazon-ads/index.js.map +1 -1
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +13 -19
- package/dist/destinations/amazon-ads/syncAudiences/index.js +155 -140
- package/dist/destinations/amazon-ads/syncAudiences/index.js.map +1 -1
- package/dist/destinations/amazon-ads/types.d.ts +25 -0
- package/dist/destinations/amazon-ads/utils.d.ts +13 -1
- package/dist/destinations/amazon-ads/utils.js +18 -1
- package/dist/destinations/amazon-ads/utils.js.map +1 -1
- package/dist/destinations/amazon-amc/index.js +22 -16
- package/dist/destinations/amazon-amc/index.js.map +1 -1
- package/dist/destinations/aws-s3/index.js +2 -2
- package/dist/destinations/aws-s3/index.js.map +1 -1
- package/dist/destinations/aws-s3/syncAudienceToCSV/s3.d.ts +1 -0
- package/dist/destinations/aws-s3/syncAudienceToCSV/s3.js +22 -33
- package/dist/destinations/aws-s3/syncAudienceToCSV/s3.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
- package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.d.ts +1 -0
- package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js +184 -0
- package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js.map +1 -0
- package/dist/destinations/contentstack/constants.d.ts +3 -0
- package/dist/destinations/contentstack/constants.js +7 -0
- package/dist/destinations/contentstack/constants.js.map +1 -0
- package/dist/destinations/contentstack/customAttributesSync/index.js.map +1 -1
- package/dist/destinations/customerio/utils.d.ts +1 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +5 -2
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +98 -18
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +1 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +2 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +2 -20
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.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 +12 -15
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.d.ts +3 -3
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.js +9 -9
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.d.ts +2 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js +1 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/PushSender.d.ts +1 -1
- package/dist/destinations/engage-messaging-twilio/utils/PhoneMessageSender.d.ts +1 -1
- package/dist/destinations/facebook-custom-audiences/generated-types.d.ts +1 -1
- package/dist/destinations/facebook-custom-audiences/index.js +15 -5
- package/dist/destinations/facebook-custom-audiences/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/functions.d.ts +3 -22
- package/dist/destinations/google-enhanced-conversions/functions.js +3 -253
- package/dist/destinations/google-enhanced-conversions/functions.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/generated-types.d.ts +0 -4
- package/dist/destinations/google-enhanced-conversions/index.d.ts +2 -2
- package/dist/destinations/google-enhanced-conversions/index.js +1 -50
- package/dist/destinations/google-enhanced-conversions/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/types.d.ts +0 -31
- package/dist/destinations/index.js +0 -1
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/klaviyo/orderCompleted/generated-types.d.ts +0 -9
- package/dist/destinations/klaviyo/orderCompleted/index.js +64 -166
- package/dist/destinations/klaviyo/orderCompleted/index.js.map +1 -1
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.d.ts +4 -0
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.js.map +1 -0
- package/dist/destinations/klaviyo/removeProfileToList/index.d.ts +5 -0
- package/dist/destinations/klaviyo/removeProfileToList/index.js +43 -0
- package/dist/destinations/klaviyo/removeProfileToList/index.js.map +1 -0
- package/dist/destinations/klaviyo/trackEvent/index.js +1 -1
- package/dist/destinations/klaviyo/trackEvent/index.js.map +1 -1
- package/dist/destinations/movable-ink/categoryView/generated-types.d.ts +22 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/categoryView/index.js +43 -0
- package/dist/destinations/movable-ink/categoryView/index.js.map +1 -0
- package/dist/destinations/movable-ink/conversion/generated-types.d.ts +20 -0
- package/dist/destinations/movable-ink/conversion/generated-types.js +3 -0
- package/dist/destinations/movable-ink/conversion/generated-types.js.map +1 -0
- package/dist/destinations/{facebook-custom-audiences/sync → movable-ink/conversion}/index.d.ts +1 -1
- package/dist/destinations/movable-ink/conversion/index.js +45 -0
- package/dist/destinations/movable-ink/conversion/index.js.map +1 -0
- package/dist/destinations/movable-ink/fields.d.ts +21 -0
- package/dist/destinations/movable-ink/fields.js +236 -0
- package/dist/destinations/movable-ink/fields.js.map +1 -0
- package/dist/destinations/movable-ink/identify/generated-types.d.ts +7 -0
- package/dist/destinations/movable-ink/identify/generated-types.js +3 -0
- package/dist/destinations/movable-ink/identify/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/identify/index.d.ts +5 -0
- package/dist/destinations/movable-ink/identify/index.js +32 -0
- package/dist/destinations/movable-ink/identify/index.js.map +1 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.d.ts +22 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.js +3 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/productAdded/index.d.ts +5 -0
- package/dist/destinations/movable-ink/productAdded/index.js +43 -0
- package/dist/destinations/movable-ink/productAdded/index.js.map +1 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.d.ts +21 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.js +3 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/productViewed/index.d.ts +5 -0
- package/dist/destinations/movable-ink/productViewed/index.js +43 -0
- package/dist/destinations/movable-ink/productViewed/index.js.map +1 -0
- package/dist/destinations/movable-ink/search/generated-types.d.ts +12 -0
- package/dist/destinations/movable-ink/search/generated-types.js +3 -0
- package/dist/destinations/movable-ink/search/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/search/index.d.ts +5 -0
- package/dist/destinations/movable-ink/search/index.js +43 -0
- package/dist/destinations/movable-ink/search/index.js.map +1 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.d.ts +25 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js +3 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.d.ts +5 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.js +48 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.js.map +1 -0
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +14 -0
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js +3 -0
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +1 -0
- package/dist/destinations/responsys/asyncMergePetRecords/index.d.ts +5 -0
- package/dist/destinations/responsys/asyncMergePetRecords/index.js +113 -0
- package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +1 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +20 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js +3 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +1 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.d.ts +5 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +174 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +1 -0
- package/dist/destinations/responsys/rsp-operations.d.ts +14 -0
- package/dist/destinations/responsys/rsp-operations.js +33 -0
- package/dist/destinations/responsys/rsp-operations.js.map +1 -0
- package/dist/destinations/responsys/rsp-properties.d.ts +4 -0
- package/dist/destinations/responsys/rsp-properties.js +27 -0
- package/dist/destinations/responsys/rsp-properties.js.map +1 -0
- package/dist/destinations/segment/index.js.map +1 -1
- package/dist/destinations/segment/segment-properties.d.ts +1 -1
- package/dist/destinations/segment/segment-properties.js +8 -34
- package/dist/destinations/segment/segment-properties.js.map +1 -1
- package/dist/destinations/segment/sendGroup/generated-types.d.ts +1 -0
- package/dist/destinations/segment/sendGroup/index.js +41 -27
- package/dist/destinations/segment/sendGroup/index.js.map +1 -1
- package/dist/destinations/segment/sendIdentify/generated-types.d.ts +1 -7
- package/dist/destinations/segment/sendIdentify/index.js +41 -29
- package/dist/destinations/segment/sendIdentify/index.js.map +1 -1
- package/dist/destinations/segment/sendPage/generated-types.d.ts +1 -0
- package/dist/destinations/segment/sendPage/index.js +49 -35
- package/dist/destinations/segment/sendPage/index.js.map +1 -1
- package/dist/destinations/segment/sendScreen/generated-types.d.ts +1 -0
- package/dist/destinations/segment/sendScreen/index.js +42 -28
- package/dist/destinations/segment/sendScreen/index.js.map +1 -1
- package/dist/destinations/segment/sendTrack/generated-types.d.ts +1 -0
- package/dist/destinations/segment/sendTrack/index.js +45 -31
- package/dist/destinations/segment/sendTrack/index.js.map +1 -1
- package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.d.ts +1 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js +381 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js.map +1 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.d.ts +1 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js +581 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js.map +1 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.d.ts +4 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js +97 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +3 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +43 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +1 -0
- package/dist/destinations/trackey/group.types.d.ts +11 -0
- package/dist/destinations/trackey/group.types.js +3 -0
- package/dist/destinations/trackey/group.types.js.map +1 -0
- package/dist/destinations/trackey/identify.types.d.ts +11 -0
- package/dist/destinations/trackey/identify.types.js +3 -0
- package/dist/destinations/trackey/identify.types.js.map +1 -0
- package/dist/destinations/trackey/track.types.d.ts +12 -0
- package/dist/destinations/trackey/track.types.js +3 -0
- package/dist/destinations/trackey/track.types.js.map +1 -0
- package/dist/destinations/yahoo-audiences/index.js +2 -1
- package/dist/destinations/yahoo-audiences/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/destinations/facebook-custom-audiences/fbca-operations.d.ts +0 -32
- package/dist/destinations/facebook-custom-audiences/fbca-operations.js +0 -50
- package/dist/destinations/facebook-custom-audiences/fbca-operations.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/fbca-properties.d.ts +0 -2
- package/dist/destinations/facebook-custom-audiences/fbca-properties.js +0 -10
- package/dist/destinations/facebook-custom-audiences/fbca-properties.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/sync/generated-types.d.ts +0 -14
- package/dist/destinations/facebook-custom-audiences/sync/generated-types.js.map +0 -1
- package/dist/destinations/facebook-custom-audiences/sync/index.js +0 -87
- package/dist/destinations/facebook-custom-audiences/sync/index.js.map +0 -1
- package/dist/destinations/liveramp-audiences/audienceEntered/generated-types.d.ts +0 -13
- package/dist/destinations/liveramp-audiences/audienceEntered/generated-types.js.map +0 -1
- package/dist/destinations/liveramp-audiences/audienceEntered/index.js +0 -95
- package/dist/destinations/liveramp-audiences/audienceEntered/index.js.map +0 -1
- package/dist/destinations/liveramp-audiences/audienceEntered/s3.d.ts +0 -6
- package/dist/destinations/liveramp-audiences/audienceEntered/s3.js +0 -37
- package/dist/destinations/liveramp-audiences/audienceEntered/s3.js.map +0 -1
- package/dist/destinations/liveramp-audiences/audienceEntered/sftp.d.ts +0 -7
- package/dist/destinations/liveramp-audiences/audienceEntered/sftp.js +0 -52
- package/dist/destinations/liveramp-audiences/audienceEntered/sftp.js.map +0 -1
- /package/dist/destinations/{facebook-custom-audiences/sync → klaviyo/removeProfileToList}/generated-types.js +0 -0
- /package/dist/destinations/{liveramp-audiences/audienceEntered → movable-ink/categoryView}/generated-types.js +0 -0
- /package/dist/destinations/{liveramp-audiences/audienceEntered → movable-ink/categoryView}/index.d.ts +0 -0
|
@@ -26,28 +26,27 @@ const destination = {
|
|
|
26
26
|
required: true
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
-
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
|
-
}
|
|
29
|
+
testAuthentication: async (request, { auth, settings }) => {
|
|
33
30
|
if (!auth?.accessToken) {
|
|
34
31
|
throw new actions_core_1.InvalidAuthenticationError('Please authenticate via Oauth before enabling the destination.');
|
|
35
32
|
}
|
|
36
33
|
try {
|
|
37
|
-
await request(
|
|
34
|
+
await request(`${settings.region}/v2/profiles`, {
|
|
38
35
|
method: 'GET'
|
|
39
36
|
});
|
|
40
37
|
}
|
|
41
38
|
catch (e) {
|
|
42
39
|
const error = e;
|
|
43
40
|
if (error.message === 'Unauthorized') {
|
|
44
|
-
throw new
|
|
41
|
+
throw new actions_core_1.InvalidAuthenticationError('Invalid Amazon Oauth access token. Please reauthenticate to retrieve a valid access token before enabling the destination.');
|
|
45
42
|
}
|
|
46
43
|
throw e;
|
|
47
44
|
}
|
|
48
45
|
},
|
|
49
|
-
refreshAccessToken: async (request, { auth }) => {
|
|
46
|
+
refreshAccessToken: async (request, { auth, settings }) => {
|
|
47
|
+
const endpoint = utils_1.AUTHORIZATION_URL[`${settings.region}`];
|
|
50
48
|
let res;
|
|
49
|
+
console.log(settings.region, auth, endpoint);
|
|
51
50
|
try {
|
|
52
51
|
res = await request('https://api.amazon.com/auth/o2/token', {
|
|
53
52
|
method: 'POST',
|
|
@@ -56,17 +55,21 @@ const destination = {
|
|
|
56
55
|
client_id: auth.clientId,
|
|
57
56
|
client_secret: auth.clientSecret,
|
|
58
57
|
grant_type: 'refresh_token'
|
|
59
|
-
})
|
|
58
|
+
}),
|
|
59
|
+
headers: {
|
|
60
|
+
authorization: ''
|
|
61
|
+
}
|
|
60
62
|
});
|
|
63
|
+
return { accessToken: res.data.access_token };
|
|
61
64
|
}
|
|
62
65
|
catch (e) {
|
|
66
|
+
console.log(e);
|
|
63
67
|
const error = e;
|
|
64
68
|
if (error.response?.data?.error === 'invalid_grant') {
|
|
65
|
-
throw new actions_core_1.
|
|
69
|
+
throw new actions_core_1.InvalidAuthenticationError(`Invalid Authentication: Your refresh token is invalid or expired. Please re-authenticate to fetch a new refresh token.`, actions_core_1.ErrorCodes.REFRESH_TOKEN_EXPIRED);
|
|
66
70
|
}
|
|
67
|
-
throw new actions_core_1.
|
|
71
|
+
throw new actions_core_1.InvalidAuthenticationError(`Failed to fetch a new access token. Reason: ${error.response?.data?.error}`, actions_core_1.ErrorCodes.OAUTH_REFRESH_FAILED);
|
|
68
72
|
}
|
|
69
|
-
return { accessToken: res?.data?.access_token };
|
|
70
73
|
}
|
|
71
74
|
},
|
|
72
75
|
extendRequest({ auth }) {
|
|
@@ -87,7 +90,7 @@ const destination = {
|
|
|
87
90
|
countryCode: {
|
|
88
91
|
type: 'string',
|
|
89
92
|
label: 'Country Code',
|
|
90
|
-
required:
|
|
93
|
+
required: true,
|
|
91
94
|
description: 'A String value representing ISO 3166-1 alpha-2 country code for the members in this audience.'
|
|
92
95
|
},
|
|
93
96
|
externalAudienceId: {
|
|
@@ -104,7 +107,7 @@ const destination = {
|
|
|
104
107
|
currency: {
|
|
105
108
|
label: 'Currency',
|
|
106
109
|
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)`
|
|
110
|
+
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).Refer [Aamzon Ads Documentation](https://advertising.amazon.com/API/docs/en-us/amc-advertiser-audience#tag/Audience-Metadata/operation/CreateAudienceMetadataV2) to view supported Currency`
|
|
108
111
|
},
|
|
109
112
|
ttl: {
|
|
110
113
|
type: 'number',
|
|
@@ -125,27 +128,36 @@ const destination = {
|
|
|
125
128
|
full_audience_sync: false
|
|
126
129
|
},
|
|
127
130
|
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;
|
|
131
|
+
const { audienceName, statsContext, audienceSettings } = createAudienceInput;
|
|
137
132
|
const { statsClient, tags: statsTags } = statsContext || {};
|
|
133
|
+
const endpoint = createAudienceInput.settings.region;
|
|
134
|
+
const description = audienceSettings?.description;
|
|
135
|
+
const advertiser_id = audienceSettings?.advertiserId;
|
|
136
|
+
const external_audience_id = audienceSettings?.externalAudienceId;
|
|
137
|
+
const country_code = audienceSettings?.countryCode;
|
|
138
|
+
const ttl = audienceSettings?.ttl;
|
|
139
|
+
const currency = audienceSettings?.currency;
|
|
140
|
+
const cpm_cents = audienceSettings?.cpmCents;
|
|
141
|
+
const statsName = 'createAmazonAudience';
|
|
142
|
+
statsTags?.push(`slug:${destination.slug}`);
|
|
143
|
+
statsTags?.push(`ttl_type:${typeof ttl}_${ttl}`);
|
|
144
|
+
statsTags?.push(`cpmcents_type:${typeof cpm_cents}_${cpm_cents}`);
|
|
145
|
+
statsClient?.incr(`${statsName}.intialise`, 1, statsTags);
|
|
146
|
+
console.log(ttl, cpm_cents);
|
|
138
147
|
if (!advertiser_id) {
|
|
139
|
-
throw new actions_core_1.IntegrationError('Missing advertiserId
|
|
148
|
+
throw new actions_core_1.IntegrationError('Missing advertiserId Value', 'MISSING_REQUIRED_FIELD', 400);
|
|
140
149
|
}
|
|
141
150
|
if (!description) {
|
|
142
|
-
throw new actions_core_1.IntegrationError('Missing
|
|
151
|
+
throw new actions_core_1.IntegrationError('Missing description Value', 'MISSING_REQUIRED_FIELD', 400);
|
|
143
152
|
}
|
|
144
153
|
if (!external_audience_id) {
|
|
145
|
-
throw new actions_core_1.IntegrationError('Missing
|
|
154
|
+
throw new actions_core_1.IntegrationError('Missing externalAudienceId Value', 'MISSING_REQUIRED_FIELD', 400);
|
|
146
155
|
}
|
|
147
156
|
if (!audienceName) {
|
|
148
|
-
throw new actions_core_1.IntegrationError('Missing
|
|
157
|
+
throw new actions_core_1.IntegrationError('Missing audienceName Value', 'MISSING_REQUIRED_FIELD', 400);
|
|
158
|
+
}
|
|
159
|
+
if (!country_code) {
|
|
160
|
+
throw new actions_core_1.IntegrationError('Missing countryCode Value', 'MISSING_REQUIRED_FIELD', 400);
|
|
149
161
|
}
|
|
150
162
|
const payload = {
|
|
151
163
|
name: audienceName,
|
|
@@ -155,58 +167,46 @@ const destination = {
|
|
|
155
167
|
},
|
|
156
168
|
metadata: {
|
|
157
169
|
externalAudienceId: external_audience_id
|
|
158
|
-
}
|
|
170
|
+
},
|
|
171
|
+
countryCode: country_code
|
|
159
172
|
};
|
|
160
|
-
if (country_code) {
|
|
161
|
-
payload.countryCode = country_code;
|
|
162
|
-
}
|
|
163
173
|
if (ttl) {
|
|
164
|
-
|
|
174
|
+
const timeToLive = Number(ttl);
|
|
175
|
+
if (!timeToLive) {
|
|
176
|
+
throw new actions_core_1.IntegrationError('TTL:-String can not be converted to Number', 'INVALID_TTL_VALUE', 400);
|
|
177
|
+
}
|
|
178
|
+
payload.metadata.ttl = timeToLive;
|
|
165
179
|
}
|
|
166
180
|
if (cpm_cents && currency) {
|
|
181
|
+
if (!utils_1.CURRENCY.includes(currency)) {
|
|
182
|
+
throw new actions_core_1.IntegrationError('Invalid Currency Value', 'INVALID_CURRENCY_VALUE', 400);
|
|
183
|
+
}
|
|
184
|
+
const cpmCents = Number(cpm_cents);
|
|
185
|
+
if (!cpmCents) {
|
|
186
|
+
throw new actions_core_1.IntegrationError('CPM_CENTS:-String can not be converted to Number', 'INVALID_CPMCENTS_VALUE', 400);
|
|
187
|
+
}
|
|
167
188
|
payload.metadata.audienceFees = [];
|
|
168
189
|
payload.metadata?.audienceFees.push({
|
|
169
190
|
currency,
|
|
170
|
-
cpmCents:
|
|
191
|
+
cpmCents: cpmCents
|
|
171
192
|
});
|
|
172
193
|
}
|
|
173
|
-
const statsName = 'createAudience';
|
|
174
194
|
statsTags?.push(`slug:${destination.slug}`);
|
|
175
195
|
statsClient?.incr(`${statsName}.call`, 1, statsTags);
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
headers: {
|
|
184
|
-
'Content-Type': 'application/vnd.amcaudiences.v1+json'
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
const r = await response.json();
|
|
188
|
-
const externalId = r?.audienceId;
|
|
189
|
-
if (!externalId) {
|
|
190
|
-
statsClient?.incr(`${statsName}.error`, 1, statsTags);
|
|
191
|
-
throw new actions_core_1.IntegrationError('Invalid response from create audience request', 'INVALID_RESPONSE', 400);
|
|
196
|
+
let payloadString = JSON.stringify(payload);
|
|
197
|
+
payloadString = payloadString.replace(utils_1.REGEX_ADVERTISERID, '"advertiserId":$1');
|
|
198
|
+
const response = await request(`${endpoint}/amc/audiences/metadata`, {
|
|
199
|
+
method: 'POST',
|
|
200
|
+
body: payloadString,
|
|
201
|
+
headers: {
|
|
202
|
+
'Content-Type': 'application/vnd.amcaudiences.v1+json'
|
|
192
203
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
if (e instanceof utils_1.AmazonAdsError) {
|
|
200
|
-
const message = JSON.parse(e.response?.data?.message || '');
|
|
201
|
-
throw new actions_core_1.APIError(message, e.response?.status);
|
|
202
|
-
}
|
|
203
|
-
else if (e instanceof actions_core_1.IntegrationError) {
|
|
204
|
-
throw new actions_core_1.APIError(e.message, 400);
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
throw e;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
204
|
+
});
|
|
205
|
+
const res = await response.text();
|
|
206
|
+
const resp = utils_1.extractNumberAndSubstituteWithStringValue(res, utils_1.REGEX_AUDIENCEID, '"audienceId":"$1"');
|
|
207
|
+
return {
|
|
208
|
+
externalId: resp.audienceId
|
|
209
|
+
};
|
|
210
210
|
},
|
|
211
211
|
async getAudience(request, getAudienceInput) {
|
|
212
212
|
const { statsContext } = getAudienceInput;
|
|
@@ -217,35 +217,16 @@ const destination = {
|
|
|
217
217
|
statsTags?.push(`slug:${destination.slug}`);
|
|
218
218
|
statsClient?.incr(`${statsName}.call`, 1, statsTags);
|
|
219
219
|
if (!audience_id) {
|
|
220
|
-
throw new actions_core_1.IntegrationError('Missing
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
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);
|
|
231
|
-
}
|
|
232
|
-
statsClient?.incr(`${statsName}.success`, 1, statsTags);
|
|
233
|
-
return {
|
|
234
|
-
externalId
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
catch (e) {
|
|
238
|
-
if (e instanceof utils_1.AmazonAdsError) {
|
|
239
|
-
const message = JSON.parse(e.response?.data?.message || '');
|
|
240
|
-
throw new actions_core_1.APIError(message, e.response?.status);
|
|
241
|
-
}
|
|
242
|
-
else if (e instanceof actions_core_1.IntegrationError) {
|
|
243
|
-
throw new actions_core_1.APIError(e.message, 400);
|
|
244
|
-
}
|
|
245
|
-
else {
|
|
246
|
-
throw e;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
220
|
+
throw new actions_core_1.IntegrationError('Missing audienceId value', 'MISSING_REQUIRED_FIELD', 400);
|
|
221
|
+
}
|
|
222
|
+
const response = await request(`${endpoint}/amc/audiences/metadata/${audience_id}`, {
|
|
223
|
+
method: 'GET'
|
|
224
|
+
});
|
|
225
|
+
const res = await response.text();
|
|
226
|
+
const resp = utils_1.extractNumberAndSubstituteWithStringValue(res, utils_1.REGEX_AUDIENCEID, '"audienceId":"$1"');
|
|
227
|
+
return {
|
|
228
|
+
externalId: resp.audienceId
|
|
229
|
+
};
|
|
249
230
|
}
|
|
250
231
|
},
|
|
251
232
|
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;AAGhG,mCAOgB;AAEhB,oEAA2C;AAE3C,MAAM,WAAW,GAA8D;IAC7E,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,oCAAoC;gBAC7C,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;YACxD,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE;gBACtB,MAAM,IAAI,yCAA0B,CAAC,gEAAgE,CAAC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AAgB,CAAC,QAAQ,CAAC,MAAM,CAAA;YACjD,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,YAAY,IAAI,EAAE,CAAA;YAE3D,MAAM,SAAS,GAAG,aAAa,CAAA;YAC/B,SAAS,EAAE,IAAI,CAAC,QAAQ,WAAW,CAAC,IAAI,EAAE,CAAC,CAAA;YAC3C,WAAW,EAAE,IAAI,CAAC,GAAG,SAAS,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;YAEpD,IAAI,CAAC,WAAW,EAAE;gBAChB,MAAM,IAAI,+BAAgB,CAAC,0BAA0B,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;aACtF;YACD,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,QAAQ,2BAA2B,WAAW,EAAE,EAAE;gBAClF,MAAM,EAAE,KAAK;aACd,CAAC,CAAA;YACF,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;YAEjC,MAAM,IAAI,GAAG,iDAAyC,CAAC,GAAG,EAAE,wBAAgB,EAAE,mBAAmB,CAAC,CAAA;YAClG,OAAO;gBACL,UAAU,EAAE,IAAI,CAAC,UAAU;aAC5B,CAAA;QACH,CAAC;KACF;IACD,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;KACd;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
email?: string;
|
|
16
|
-
lastname?: string;
|
|
17
|
-
postal?: string;
|
|
18
|
-
}[];
|
|
19
|
-
}[];
|
|
20
|
-
audienceId: number;
|
|
2
|
+
event_name?: string;
|
|
3
|
+
externalUserId: string;
|
|
4
|
+
email?: string;
|
|
5
|
+
firstName?: string;
|
|
6
|
+
lastName?: string;
|
|
7
|
+
phone?: string;
|
|
8
|
+
postal?: string;
|
|
9
|
+
state?: string;
|
|
10
|
+
city?: string;
|
|
11
|
+
address?: string;
|
|
12
|
+
audienceId: string;
|
|
13
|
+
enable_batching: boolean;
|
|
14
|
+
batch_size?: number;
|
|
21
15
|
}
|