@segment/action-destinations 3.216.3-staging.0 → 3.217.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/acoustic-s3tc/generated-types.d.ts +5 -5
- package/dist/destinations/acoustic-s3tc/index.js +22 -18
- package/dist/destinations/acoustic-s3tc/index.js.map +1 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js +30 -33
- package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js.map +1 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/index.js +9 -9
- package/dist/destinations/acoustic-s3tc/receiveEvents/index.js.map +1 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/preCheck.js +3 -3
- package/dist/destinations/acoustic-s3tc/receiveEvents/preCheck.js.map +1 -1
- package/dist/destinations/actions-pardot/pa-operations.d.ts +2 -2
- package/dist/destinations/actions-pardot/pa-operations.js +1 -2
- package/dist/destinations/actions-pardot/pa-operations.js.map +1 -1
- package/dist/destinations/actions-pardot/prospects/index.js +2 -2
- package/dist/destinations/actions-pardot/prospects/index.js.map +1 -1
- package/dist/destinations/airship/utilities.js +2 -2
- package/dist/destinations/airship/utilities.js.map +1 -1
- package/dist/destinations/algolia-insights/algolia-insight-api.d.ts +7 -1
- package/dist/destinations/algolia-insights/conversionEvents/generated-types.d.ts +3 -0
- package/dist/destinations/algolia-insights/conversionEvents/index.js +14 -3
- package/dist/destinations/algolia-insights/conversionEvents/index.js.map +1 -1
- package/dist/destinations/algolia-insights/index.js +12 -2
- package/dist/destinations/algolia-insights/index.js.map +1 -1
- package/dist/destinations/algolia-insights/productAddedEvents/generated-types.d.ts +10 -0
- package/dist/destinations/algolia-insights/productAddedEvents/generated-types.js +3 -0
- package/dist/destinations/algolia-insights/productAddedEvents/generated-types.js.map +1 -0
- package/dist/destinations/algolia-insights/productAddedEvents/index.d.ts +5 -0
- package/dist/destinations/algolia-insights/productAddedEvents/index.js +93 -0
- package/dist/destinations/algolia-insights/productAddedEvents/index.js.map +1 -0
- package/dist/destinations/algolia-insights/productClickedEvents/generated-types.d.ts +3 -0
- package/dist/destinations/algolia-insights/productClickedEvents/index.js +13 -2
- package/dist/destinations/algolia-insights/productClickedEvents/index.js.map +1 -1
- package/dist/destinations/algolia-insights/productListFilteredEvents/generated-types.d.ts +13 -0
- package/dist/destinations/algolia-insights/productListFilteredEvents/generated-types.js +3 -0
- package/dist/destinations/algolia-insights/productListFilteredEvents/generated-types.js.map +1 -0
- package/dist/destinations/algolia-insights/productListFilteredEvents/index.d.ts +5 -0
- package/dist/destinations/algolia-insights/productListFilteredEvents/index.js +101 -0
- package/dist/destinations/algolia-insights/productListFilteredEvents/index.js.map +1 -0
- package/dist/destinations/algolia-insights/productViewedEvents/generated-types.d.ts +3 -0
- package/dist/destinations/algolia-insights/productViewedEvents/index.js +13 -2
- package/dist/destinations/algolia-insights/productViewedEvents/index.js.map +1 -1
- package/dist/destinations/attio/assertRecord/index.js +4 -5
- package/dist/destinations/attio/assertRecord/index.js.map +1 -1
- package/dist/destinations/attio/groupWorkspace/generated-types.d.ts +1 -1
- package/dist/destinations/attio/groupWorkspace/index.js +13 -14
- package/dist/destinations/attio/groupWorkspace/index.js.map +1 -1
- package/dist/destinations/attio/identifyUser/generated-types.d.ts +1 -0
- package/dist/destinations/attio/identifyUser/index.js +17 -8
- package/dist/destinations/attio/identifyUser/index.js.map +1 -1
- package/dist/destinations/devrev/mocks/index.d.ts +3 -0
- package/dist/destinations/devrev/mocks/index.js +4 -1
- package/dist/destinations/devrev/mocks/index.js.map +1 -1
- package/dist/destinations/devrev/streamEvent/generated-types.d.ts +3 -0
- package/dist/destinations/devrev/streamEvent/index.js +41 -2
- package/dist/destinations/devrev/streamEvent/index.js.map +1 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +11 -10
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +1 -3
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +1 -1
- package/dist/destinations/engage/utils/MessageSendPerformer.js +1 -3
- package/dist/destinations/engage/utils/MessageSendPerformer.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.js +11 -1
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.js.map +1 -1
- package/dist/destinations/facebook-custom-audiences/index.js +1 -14
- package/dist/destinations/facebook-custom-audiences/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js +1 -2
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js +0 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +0 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js +0 -4
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js.map +1 -1
- package/dist/destinations/google-sheets/postSheet/index.js +4 -4
- package/dist/destinations/google-sheets/postSheet/index.js.map +1 -1
- package/dist/destinations/google-sheets/postSheet/operations.d.ts +2 -2
- package/dist/destinations/google-sheets/postSheet/operations.js +5 -8
- package/dist/destinations/google-sheets/postSheet/operations.js.map +1 -1
- package/dist/destinations/hubspot/api/index.d.ts +5 -6
- package/dist/destinations/hubspot/api/index.js +6 -19
- package/dist/destinations/hubspot/api/index.js.map +1 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +1 -5
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
- package/dist/destinations/hubspot/upsertCompany/index.js +5 -6
- package/dist/destinations/hubspot/upsertCompany/index.js.map +1 -1
- package/dist/destinations/hubspot/upsertContact/index.js +7 -9
- package/dist/destinations/hubspot/upsertContact/index.js.map +1 -1
- package/dist/destinations/index.js +1 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/intercom/groupIdentifyContact/index.js +1 -9
- package/dist/destinations/intercom/groupIdentifyContact/index.js.map +1 -1
- package/dist/destinations/intercom/identifyContact/index.js +1 -9
- package/dist/destinations/intercom/identifyContact/index.js.map +1 -1
- package/dist/destinations/intercom/trackEvent/index.js +2 -3
- package/dist/destinations/intercom/trackEvent/index.js.map +1 -1
- package/dist/destinations/intercom/util.d.ts +2 -2
- package/dist/destinations/intercom/util.js +1 -2
- package/dist/destinations/intercom/util.js.map +1 -1
- package/dist/destinations/iterable/trackEvent/index.js.map +1 -1
- package/dist/destinations/iterable/utils.js +1 -1
- package/dist/destinations/iterable/utils.js.map +1 -1
- package/dist/destinations/klaviyo/index.js +3 -3
- package/dist/destinations/klaviyo/index.js.map +1 -1
- package/dist/destinations/klaviyo/upsertProfile/generated-types.d.ts +1 -21
- package/dist/destinations/klaviyo/upsertProfile/index.js +5 -149
- package/dist/destinations/klaviyo/upsertProfile/index.js.map +1 -1
- package/dist/destinations/linkedin-audiences/updateAudience/index.js +11 -16
- package/dist/destinations/linkedin-audiences/updateAudience/index.js.map +1 -1
- package/dist/destinations/listrak/updateEmailContactProfileFields/index.js.map +1 -1
- package/dist/destinations/liveramp-audiences/audienceEnteredSFTP.types.d.ts +16 -0
- package/dist/destinations/liveramp-audiences/audienceEnteredSFTP.types.js +3 -0
- package/dist/destinations/liveramp-audiences/audienceEnteredSFTP.types.js.map +1 -0
- package/dist/destinations/m3ter/auth.js.map +1 -1
- package/dist/destinations/m3ter/submitMeasurements/index.js +3 -3
- package/dist/destinations/m3ter/submitMeasurements/index.js.map +1 -1
- package/dist/destinations/optimizely-advanced-audience-targeting/syncAudience/index.js +1 -1
- package/dist/destinations/optimizely-advanced-audience-targeting/syncAudience/index.js.map +1 -1
- package/dist/destinations/optimizely-data-platform/customEvent/generated-types.d.ts +16 -0
- package/dist/destinations/optimizely-data-platform/customEvent/generated-types.js +3 -0
- package/dist/destinations/optimizely-data-platform/customEvent/generated-types.js.map +1 -0
- package/dist/destinations/optimizely-data-platform/customEvent/index.d.ts +5 -0
- package/dist/destinations/optimizely-data-platform/customEvent/index.js +33 -0
- package/dist/destinations/optimizely-data-platform/customEvent/index.js.map +1 -0
- package/dist/destinations/optimizely-data-platform/emailEvent/generated-types.d.ts +13 -0
- package/dist/destinations/optimizely-data-platform/emailEvent/generated-types.js +3 -0
- package/dist/destinations/optimizely-data-platform/emailEvent/generated-types.js.map +1 -0
- package/dist/destinations/optimizely-data-platform/emailEvent/index.d.ts +5 -0
- package/dist/destinations/optimizely-data-platform/emailEvent/index.js +55 -0
- package/dist/destinations/optimizely-data-platform/emailEvent/index.js.map +1 -0
- package/dist/destinations/optimizely-data-platform/fields.d.ts +8 -0
- package/dist/destinations/optimizely-data-platform/fields.js +148 -0
- package/dist/destinations/optimizely-data-platform/fields.js.map +1 -0
- package/dist/destinations/optimizely-data-platform/generated-types.d.ts +4 -0
- package/dist/destinations/optimizely-data-platform/generated-types.js +3 -0
- package/dist/destinations/optimizely-data-platform/generated-types.js.map +1 -0
- package/dist/destinations/optimizely-data-platform/index.d.ts +4 -0
- package/dist/destinations/optimizely-data-platform/index.js +155 -0
- package/dist/destinations/optimizely-data-platform/index.js.map +1 -0
- package/dist/destinations/optimizely-data-platform/upsertContact/generated-types.d.ts +25 -0
- package/dist/destinations/optimizely-data-platform/upsertContact/generated-types.js +3 -0
- package/dist/destinations/optimizely-data-platform/upsertContact/generated-types.js.map +1 -0
- package/dist/destinations/optimizely-data-platform/upsertContact/index.d.ts +5 -0
- package/dist/destinations/optimizely-data-platform/upsertContact/index.js +134 -0
- package/dist/destinations/optimizely-data-platform/upsertContact/index.js.map +1 -0
- package/dist/destinations/optimizely-data-platform/utils.d.ts +3 -0
- package/dist/destinations/optimizely-data-platform/utils.js +9 -0
- package/dist/destinations/optimizely-data-platform/utils.js.map +1 -0
- package/dist/destinations/playerzero-cloud/identifyUser/index.js +3 -3
- package/dist/destinations/salesforce/account/index.js +7 -7
- package/dist/destinations/salesforce/account/index.js.map +1 -1
- package/dist/destinations/salesforce/cases/index.js +7 -7
- package/dist/destinations/salesforce/cases/index.js.map +1 -1
- package/dist/destinations/salesforce/contact/index.js +7 -7
- package/dist/destinations/salesforce/contact/index.js.map +1 -1
- package/dist/destinations/salesforce/customObject/index.js +7 -7
- package/dist/destinations/salesforce/customObject/index.js.map +1 -1
- package/dist/destinations/salesforce/lead/index.js +7 -7
- package/dist/destinations/salesforce/lead/index.js.map +1 -1
- package/dist/destinations/salesforce/opportunity/index.js +7 -7
- package/dist/destinations/salesforce/opportunity/index.js.map +1 -1
- package/dist/destinations/salesforce/sf-operations.d.ts +6 -6
- package/dist/destinations/salesforce/sf-operations.js +27 -45
- package/dist/destinations/salesforce/sf-operations.js.map +1 -1
- package/dist/destinations/salesforce-marketing-cloud/apiEvent/index.js +1 -2
- package/dist/destinations/salesforce-marketing-cloud/apiEvent/index.js.map +1 -1
- package/dist/destinations/salesforce-marketing-cloud/contact/index.js +1 -2
- package/dist/destinations/salesforce-marketing-cloud/contact/index.js.map +1 -1
- package/dist/destinations/salesforce-marketing-cloud/contactDataExtension/index.js +4 -4
- package/dist/destinations/salesforce-marketing-cloud/contactDataExtension/index.js.map +1 -1
- package/dist/destinations/salesforce-marketing-cloud/dataExtension/index.js +4 -4
- package/dist/destinations/salesforce-marketing-cloud/dataExtension/index.js.map +1 -1
- package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.d.ts +2 -2
- package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.js +1 -2
- package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.js.map +1 -1
- package/dist/destinations/segment/properties.js +4 -4
- package/dist/destinations/segment/properties.js.map +1 -1
- package/dist/destinations/snap-conversions-api/_tests_/index.test.js +8 -6
- package/dist/destinations/snap-conversions-api/_tests_/index.test.js.map +1 -1
- package/dist/destinations/snap-conversions-api/reportConversionEvent/generated-types.d.ts +0 -2
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js +19 -41
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +1 -1
- package/dist/destinations/the-trade-desk-crm/awsClient.js +1 -1
- package/dist/destinations/the-trade-desk-crm/awsClient.js.map +1 -1
- package/dist/destinations/the-trade-desk-crm/index.js +12 -8
- package/dist/destinations/the-trade-desk-crm/index.js.map +1 -1
- package/dist/destinations/the-trade-desk-crm/properties.d.ts +0 -1
- package/dist/destinations/the-trade-desk-crm/properties.js +9 -23
- package/dist/destinations/the-trade-desk-crm/properties.js.map +1 -1
- package/dist/destinations/webhook-audiences/index.js +1 -13
- package/dist/destinations/webhook-audiences/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/destinations/klaviyo/config.d.ts +0 -1
- package/dist/destinations/klaviyo/config.js +0 -5
- package/dist/destinations/klaviyo/config.js.map +0 -1
- package/dist/destinations/klaviyo/types.d.ts +0 -33
- package/dist/destinations/klaviyo/types.js +0 -8
- package/dist/destinations/klaviyo/types.js.map +0 -1
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const upsertProfile_1 = __importDefault(require("./upsertProfile"));
|
|
7
|
-
const
|
|
7
|
+
const API_URL = 'https://a.klaviyo.com/api';
|
|
8
8
|
const destination = {
|
|
9
9
|
name: 'Klaviyo (Actions)',
|
|
10
10
|
slug: 'actions-klaviyo',
|
|
@@ -20,13 +20,13 @@ const destination = {
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
testAuthentication: (request) => {
|
|
23
|
-
return request(`${
|
|
23
|
+
return request(`${API_URL}/accounts/`, {
|
|
24
24
|
method: 'get'
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
onDelete: async (request, { payload }) => {
|
|
29
|
-
return request(`${
|
|
29
|
+
return request(`${API_URL}/data-privacy-deletion-jobs/`, {
|
|
30
30
|
method: 'post',
|
|
31
31
|
json: {
|
|
32
32
|
data: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/klaviyo/index.ts"],"names":[],"mappings":";;;;;AAGA,oEAA2C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/klaviyo/index.ts"],"names":[],"mappings":";;;;;AAGA,oEAA2C;AAE3C,MAAM,OAAO,GAAG,2BAA2B,CAAA;AAE3C,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,wGAAwG;gBACrH,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;YAC9B,OAAO,OAAO,CAAC,GAAG,OAAO,YAAY,EAAE;gBACrC,MAAM,EAAE,KAAK;aACd,CAAC,CAAA;QACJ,CAAC;KACF;IAED,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACvC,OAAO,OAAO,CAAC,GAAG,OAAO,8BAA8B,EAAE;YACvD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,IAAI,EAAE;oBACJ,IAAI,EAAE,2BAA2B;oBACjC,UAAU,EAAE;wBACV,OAAO,EAAE;4BACP,IAAI,EAAE;gCACJ,IAAI,EAAE,SAAS;gCACf,EAAE,EAAE,OAAO,CAAC,MAAM;6BACnB;yBACF;qBACF;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;IAED,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,mBAAmB,QAAQ,CAAC,OAAO,EAAE;gBACpD,MAAM,EAAE,kBAAkB;gBAC1B,QAAQ,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;aAChD;SACF,CAAA;IACH,CAAC;IAED,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;KACd;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1,23 +1,3 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
|
-
|
|
3
|
-
phone_number?: string;
|
|
4
|
-
external_id?: string;
|
|
5
|
-
first_name?: string;
|
|
6
|
-
last_name?: string;
|
|
7
|
-
organization?: string;
|
|
8
|
-
title?: string;
|
|
9
|
-
image?: string;
|
|
10
|
-
location?: {
|
|
11
|
-
address1?: string | null;
|
|
12
|
-
address2?: string | null;
|
|
13
|
-
city?: string | null;
|
|
14
|
-
region?: string | null;
|
|
15
|
-
zip?: string | null;
|
|
16
|
-
latitude?: string | null;
|
|
17
|
-
longitude?: string | null;
|
|
18
|
-
country?: string | null;
|
|
19
|
-
};
|
|
20
|
-
properties?: {
|
|
21
|
-
[k: string]: unknown;
|
|
22
|
-
};
|
|
2
|
+
placeholder?: string;
|
|
23
3
|
}
|
|
@@ -1,161 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const config_1 = require("../config");
|
|
4
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
5
3
|
const action = {
|
|
6
4
|
title: 'Upsert Profile',
|
|
7
5
|
description: 'Upsert user profile.',
|
|
8
6
|
fields: {
|
|
9
|
-
|
|
10
|
-
label: '
|
|
11
|
-
description:
|
|
12
|
-
type: 'string',
|
|
13
|
-
format: 'email',
|
|
14
|
-
default: { '@path': '$.traits.email' }
|
|
15
|
-
},
|
|
16
|
-
phone_number: {
|
|
17
|
-
label: 'Phone Number',
|
|
18
|
-
description: `Individual's phone number in E.164 format. If SMS is not enabled and if you use Phone Number as identifier, then you have to provide one of Email or External ID.`,
|
|
19
|
-
type: 'string',
|
|
20
|
-
default: { '@path': '$.context.traits.phone' }
|
|
21
|
-
},
|
|
22
|
-
external_id: {
|
|
23
|
-
label: 'External ID',
|
|
24
|
-
description: `A unique identifier used by customers to associate Klaviyo profiles with profiles in an external system.`,
|
|
7
|
+
placeholder: {
|
|
8
|
+
label: 'Placeholder',
|
|
9
|
+
description: 'Placeholder',
|
|
25
10
|
type: 'string'
|
|
26
|
-
},
|
|
27
|
-
first_name: {
|
|
28
|
-
label: 'First Name',
|
|
29
|
-
description: `Individual's first name.`,
|
|
30
|
-
type: 'string',
|
|
31
|
-
default: { '@path': '$.traits.firstName' }
|
|
32
|
-
},
|
|
33
|
-
last_name: {
|
|
34
|
-
label: 'Last Name',
|
|
35
|
-
description: `Individual's last name.`,
|
|
36
|
-
type: 'string',
|
|
37
|
-
default: { '@path': '$.traits.lastName' }
|
|
38
|
-
},
|
|
39
|
-
organization: {
|
|
40
|
-
label: 'Organization',
|
|
41
|
-
description: `Name of the company or organization within the company for whom the individual works.`,
|
|
42
|
-
type: 'string',
|
|
43
|
-
default: { '@path': '$.traits.company.name' }
|
|
44
|
-
},
|
|
45
|
-
title: {
|
|
46
|
-
label: 'Title',
|
|
47
|
-
description: `Individual's job title.`,
|
|
48
|
-
type: 'string',
|
|
49
|
-
default: { '@path': '$.traits.title' }
|
|
50
|
-
},
|
|
51
|
-
image: {
|
|
52
|
-
label: 'Image',
|
|
53
|
-
description: `URL pointing to the location of a profile image.`,
|
|
54
|
-
type: 'string',
|
|
55
|
-
default: { '@path': '$.traits.avatar' }
|
|
56
|
-
},
|
|
57
|
-
location: {
|
|
58
|
-
label: 'Location',
|
|
59
|
-
description: `Individual's address.`,
|
|
60
|
-
type: 'object',
|
|
61
|
-
properties: {
|
|
62
|
-
address1: {
|
|
63
|
-
label: 'Address 1',
|
|
64
|
-
type: 'string',
|
|
65
|
-
allowNull: true
|
|
66
|
-
},
|
|
67
|
-
address2: {
|
|
68
|
-
label: 'Address 2',
|
|
69
|
-
type: 'string',
|
|
70
|
-
allowNull: true
|
|
71
|
-
},
|
|
72
|
-
city: {
|
|
73
|
-
label: 'City',
|
|
74
|
-
type: 'string',
|
|
75
|
-
allowNull: true
|
|
76
|
-
},
|
|
77
|
-
region: {
|
|
78
|
-
label: 'Region',
|
|
79
|
-
type: 'string',
|
|
80
|
-
allowNull: true
|
|
81
|
-
},
|
|
82
|
-
zip: {
|
|
83
|
-
label: 'ZIP',
|
|
84
|
-
type: 'string',
|
|
85
|
-
allowNull: true
|
|
86
|
-
},
|
|
87
|
-
latitude: {
|
|
88
|
-
label: 'Latitude',
|
|
89
|
-
type: 'string',
|
|
90
|
-
allowNull: true
|
|
91
|
-
},
|
|
92
|
-
longitude: {
|
|
93
|
-
label: 'Longitide',
|
|
94
|
-
type: 'string',
|
|
95
|
-
allowNull: true
|
|
96
|
-
},
|
|
97
|
-
country: {
|
|
98
|
-
label: 'Country',
|
|
99
|
-
type: 'string',
|
|
100
|
-
allowNull: true
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
default: {
|
|
104
|
-
city: { '@path': '$.traits.address.city' },
|
|
105
|
-
region: { '@path': '$.traits.address.state' },
|
|
106
|
-
zip: { '@path': '$.traits.address.postal_code' },
|
|
107
|
-
address1: { '@path': '$.traits.address.street' },
|
|
108
|
-
country: { '@path': '$.traits.address.country' }
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
properties: {
|
|
112
|
-
description: 'An object containing key/value pairs for any custom properties assigned to this profile.',
|
|
113
|
-
label: 'Properties',
|
|
114
|
-
type: 'object',
|
|
115
|
-
default: {
|
|
116
|
-
'@path': '$.properties'
|
|
117
|
-
}
|
|
118
11
|
}
|
|
119
12
|
},
|
|
120
|
-
perform:
|
|
121
|
-
|
|
122
|
-
if (!email && !phone_number && !external_id) {
|
|
123
|
-
throw new actions_core_1.IntegrationError('One of External ID, Phone Number and Email is required.', 'Missing required fields', 400);
|
|
124
|
-
}
|
|
125
|
-
const profileData = {
|
|
126
|
-
data: {
|
|
127
|
-
type: 'profile',
|
|
128
|
-
attributes: {
|
|
129
|
-
email,
|
|
130
|
-
external_id,
|
|
131
|
-
phone_number,
|
|
132
|
-
...otherAttributes
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
try {
|
|
137
|
-
const profile = await request(`${config_1.API_URL}/profiles/`, {
|
|
138
|
-
method: 'POST',
|
|
139
|
-
json: profileData
|
|
140
|
-
});
|
|
141
|
-
return profile;
|
|
142
|
-
}
|
|
143
|
-
catch (error) {
|
|
144
|
-
const { response } = error;
|
|
145
|
-
if (response?.status === 409) {
|
|
146
|
-
const content = JSON.parse(response?.content);
|
|
147
|
-
const id = content?.errors[0]?.meta?.duplicate_profile_id;
|
|
148
|
-
if (id) {
|
|
149
|
-
profileData.data.id = id;
|
|
150
|
-
const profile = await request(`${config_1.API_URL}/profiles/${id}`, {
|
|
151
|
-
method: 'PATCH',
|
|
152
|
-
json: profileData
|
|
153
|
-
});
|
|
154
|
-
return profile;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
throw new Error('An error occurred while processing the request');
|
|
158
|
-
}
|
|
13
|
+
perform: () => {
|
|
14
|
+
return undefined;
|
|
159
15
|
}
|
|
160
16
|
};
|
|
161
17
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/upsertProfile/index.ts"],"names":[],"mappings":";;AAIA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/upsertProfile/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,sBAAsB;IACnC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,aAAa;YAC1B,IAAI,EAAE,QAAQ;SACf;KACF;IACD,OAAO,EAAE,GAAG,EAAE;QACZ,OAAO,SAAS,CAAA;IAClB,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -72,25 +72,21 @@ const action = {
|
|
|
72
72
|
default: 'AUTO'
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
|
-
perform: async (request, { settings, payload
|
|
76
|
-
return processPayload(request, settings, [payload]
|
|
75
|
+
perform: async (request, { settings, payload }) => {
|
|
76
|
+
return processPayload(request, settings, [payload]);
|
|
77
77
|
},
|
|
78
|
-
performBatch: async (request, { settings, payload
|
|
79
|
-
return processPayload(request, settings, payload
|
|
78
|
+
performBatch: async (request, { settings, payload }) => {
|
|
79
|
+
return processPayload(request, settings, payload);
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
-
async function processPayload(request, settings, payloads
|
|
82
|
+
async function processPayload(request, settings, payloads) {
|
|
83
83
|
validate(settings, payloads);
|
|
84
84
|
const linkedinApiClient = new api_1.LinkedInAudiences(request);
|
|
85
|
-
const dmpSegmentId = await getDmpSegmentId(linkedinApiClient, settings, payloads[0]
|
|
85
|
+
const dmpSegmentId = await getDmpSegmentId(linkedinApiClient, settings, payloads[0]);
|
|
86
86
|
const elements = extractUsers(settings, payloads);
|
|
87
87
|
if (elements.length < 1) {
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
|
-
statsContext?.statsClient?.incr('oauth_app_api_call', 1, [
|
|
91
|
-
...statsContext?.tags,
|
|
92
|
-
`endpoint:add-or-remove-users-from-dmpSegment`
|
|
93
|
-
]);
|
|
94
90
|
const res = await linkedinApiClient.batchUpdate(dmpSegmentId, elements);
|
|
95
91
|
if (res.status !== 200) {
|
|
96
92
|
throw new actions_core_1.RetryableError('Error while attempting to update LinkedIn DMP Segment. This batch will be retried.');
|
|
@@ -98,24 +94,23 @@ async function processPayload(request, settings, payloads, statsContext) {
|
|
|
98
94
|
return res;
|
|
99
95
|
}
|
|
100
96
|
function validate(settings, payloads) {
|
|
101
|
-
|
|
97
|
+
const isAutoOrUndefined = ['AUTO', undefined].includes(payloads[0]?.dmp_user_action);
|
|
98
|
+
if (isAutoOrUndefined && payloads[0].source_segment_id !== payloads[0].personas_audience_key) {
|
|
102
99
|
throw new actions_core_1.IntegrationError('The value of `source_segment_id` and `personas_audience_key` must match.', 'INVALID_SETTINGS', 400);
|
|
103
100
|
}
|
|
104
101
|
if (!settings.send_google_advertising_id && !settings.send_email) {
|
|
105
102
|
throw new actions_core_1.IntegrationError('At least one of `Send Email` or `Send Google Advertising ID` must be set to `true`.', 'INVALID_SETTINGS', 400);
|
|
106
103
|
}
|
|
107
104
|
}
|
|
108
|
-
async function getDmpSegmentId(linkedinApiClient, settings, payload
|
|
109
|
-
statsContext?.statsClient?.incr('oauth_app_api_call', 1, [...statsContext?.tags, `endpoint:get-dmpSegment`]);
|
|
105
|
+
async function getDmpSegmentId(linkedinApiClient, settings, payload) {
|
|
110
106
|
const res = await linkedinApiClient.getDmpSegment(settings, payload);
|
|
111
107
|
const body = await res.json();
|
|
112
108
|
if (body.elements?.length > 0) {
|
|
113
109
|
return body.elements[0].id;
|
|
114
110
|
}
|
|
115
|
-
return createDmpSegment(linkedinApiClient, settings, payload
|
|
111
|
+
return createDmpSegment(linkedinApiClient, settings, payload);
|
|
116
112
|
}
|
|
117
|
-
async function createDmpSegment(linkedinApiClient, settings, payload
|
|
118
|
-
statsContext?.statsClient?.incr('oauth_app_api_call', 1, [...statsContext?.tags, `endpoint:create-dmpSegment`]);
|
|
113
|
+
async function createDmpSegment(linkedinApiClient, settings, payload) {
|
|
119
114
|
const res = await linkedinApiClient.createDmpSegment(settings, payload);
|
|
120
115
|
const headers = res.headers.toJSON();
|
|
121
116
|
return headers['x-linkedin-id'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/linkedin-audiences/updateAudience/index.ts"],"names":[],"mappings":";;AACA,wDAAuF;AAGvF,mCAAmC;AACnC,gCAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,8BAA8B;IACrC,WAAW,EAAE,oEAAoE;IACjF,mBAAmB,EAAE,yDAAyD;IAC9E,MAAM,EAAE;QACN,gBAAgB,EAAE;YAChB,KAAK,EAAE,0BAA0B;YACjC,WAAW,EACT,oNAAoN;YACtN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,2BAA2B;aACrC;SACF;QACD,eAAe,EAAE;YACf,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,0DAA0D;YACvE,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,IAAI;SACd;QACD,KAAK,EAAE;YACL,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,+CAA+C;YAC5D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,wBAAwB;aAClC;SACF;QACD,qBAAqB,EAAE;YACrB,KAAK,EAAE,4BAA4B;YACnC,WAAW,EAAE,uDAAuD;YACpE,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,gCAAgC;aAC1C;SACF;QACD,iBAAiB,EAAE;YACjB,KAAK,EAAE,4BAA4B;YACnC,WAAW,EACT,oJAAoJ;YACtJ,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,2BAA2B;aACrC;SACF;QACD,qBAAqB,EAAE;YACrB,KAAK,EAAE,6BAA6B;YACpC,WAAW,EACT,iMAAiM;YACnM,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,wCAAwC;YACrD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,eAAe,EAAE;YACf,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,oDAAoD;YACjE,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE;gBACvC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;gBAC9B,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;aACrC;YACD,OAAO,EAAE,MAAM;SAChB;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/linkedin-audiences/updateAudience/index.ts"],"names":[],"mappings":";;AACA,wDAAuF;AAGvF,mCAAmC;AACnC,gCAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,8BAA8B;IACrC,WAAW,EAAE,oEAAoE;IACjF,mBAAmB,EAAE,yDAAyD;IAC9E,MAAM,EAAE;QACN,gBAAgB,EAAE;YAChB,KAAK,EAAE,0BAA0B;YACjC,WAAW,EACT,oNAAoN;YACtN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,2BAA2B;aACrC;SACF;QACD,eAAe,EAAE;YACf,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,0DAA0D;YACvE,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,IAAI;SACd;QACD,KAAK,EAAE;YACL,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,+CAA+C;YAC5D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,wBAAwB;aAClC;SACF;QACD,qBAAqB,EAAE;YACrB,KAAK,EAAE,4BAA4B;YACnC,WAAW,EAAE,uDAAuD;YACpE,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,gCAAgC;aAC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;SAAM,IAAI,eAAe,KAAK,MAAM,IAAI,CAAC,eAAe,EAAE;QACzD,IAAI,OAAO,CAAC,UAAU,KAAK,kBAAkB,EAAE;YAC7C,OAAO,KAAK,CAAA;SACb;aAAM,IAAI,OAAO,CAAC,UAAU,KAAK,iBAAiB,EAAE;YACnD,OAAO,QAAQ,CAAA;SAChB;KACF;AACH,CAAC;AAED,SAAS,UAAU,CAAC,QAAkB,EAAE,OAAgB;IACtD,MAAM,KAAK,GAAG,EAAE,CAAA;IAEhB,IAAI,OAAO,CAAC,KAAK,IAAI,QAAQ,CAAC,UAAU,KAAK,IAAI,EAAE;QACjD,KAAK,CAAC,IAAI,CAAC;YACT,MAAM,EAAE,cAAc;YACtB,OAAO,EAAE,mBAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;SAClE,CAAC,CAAA;KACH;IAED,IAAI,OAAO,CAAC,qBAAqB,IAAI,QAAQ,CAAC,0BAA0B,KAAK,IAAI,EAAE;QACjF,KAAK,CAAC,IAAI,CAAC;YACT,MAAM,EAAE,YAAY;YACpB,OAAO,EAAE,OAAO,CAAC,qBAAqB;SACvC,CAAC,CAAA;KACH;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/listrak/updateEmailContactProfileFields/index.ts"],"names":[],"mappings":";;AAiBA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,qCAAqC;IAC5C,WAAW,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/listrak/updateEmailContactProfileFields/index.ts"],"names":[],"mappings":";;AAiBA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,qCAAqC;IAC5C,WAAW,EAAE,gHAAgH;IAC7H,MAAM,EAAE;QACN,MAAM,EAA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AAC,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,CAAA;SAChC;QACD,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;YAC9B,YAAY,EAAE,CAAC,CAAC,YAAY;YAC5B,uBAAuB,EAAE,6BAA6B,CAAC,CAAC,CAAC,kBAAkB,CAAC;SAC7E,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEJ,KAAK,MAAM,MAAM,IAAI,gBAAgB,EAAE;QACrC,MAAM,OAAO,CAAC,yCAAyC,MAAM,4BAA4B,EAAE;YACzF,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC;SAC/B,CAAC,CAAA;KACH;AACH,CAAC;AAED,kBAAe,MAAM,CAAA;AAErB,SAAS,6BAA6B,CAAC,kBAA4C;IACjF,OAAO,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC;SACnC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;SAC1B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACT,MAAM,sBAAsB,GAA2B;YACrD,mBAAmB,EAAE,QAAQ,CAAC,CAAC,CAAC;YAChC,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,EAAE;SAClC,CAAA;QACD,OAAO,sBAAsB,CAAA;IAC/B,CAAC,CAAC,CAAA;AACN,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
sftp_username?: string;
|
|
3
|
+
sftp_password?: string;
|
|
4
|
+
sftp_folder_path?: string;
|
|
5
|
+
audience_key: string;
|
|
6
|
+
identifier_data?: {
|
|
7
|
+
[k: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
unhashed_identifier_data?: {
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
delimiter: string;
|
|
13
|
+
filename: string;
|
|
14
|
+
enable_batching: boolean;
|
|
15
|
+
batch_size?: number;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audienceEnteredSFTP.types.js","sourceRoot":"","sources":["../../../src/destinations/liveramp-audiences/audienceEnteredSFTP.types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/destinations/m3ter/auth.ts"],"names":[],"mappings":";;AAAA,2CAA4C;AAS7B,KAAK,UAAU,cAAc,
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/destinations/m3ter/auth.ts"],"names":[],"mappings":";;AAAA,2CAA4C;AAS7B,KAAK,UAAU,cAAc,CAAC,OAAsB,EAAE,WAAmB,EAAE,SAAiB;IACzG,MAAM,GAAG,GAAG,MAAM,OAAO,CAAsB,GAAG,0BAAc,cAAc,EAAE;QAC9E,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,qCAAqC;QAC3C,OAAO,EAAE;YACP,aAAa,EAAE,SAAS,MAAM,CAAC,IAAI,CAAC,GAAG,WAAW,IAAI,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACvF,cAAc,EAAE,kBAAkB;SACnC;KACF,CAAC,CAAA;IACF,OAAO,GAAG,CAAC,IAAI,CAAC,YAAY,CAAA;AAC9B,CAAC;AAVD,iCAUC"}
|
|
@@ -67,7 +67,7 @@ const action = {
|
|
|
67
67
|
metadata: {
|
|
68
68
|
label: 'Metadata',
|
|
69
69
|
type: 'object',
|
|
70
|
-
description:
|
|
70
|
+
description: 'Non-numeric metadata values for measurements using high-cardinality fields that you don\'t intend to segment when you aggregate the data',
|
|
71
71
|
required: false
|
|
72
72
|
},
|
|
73
73
|
measure: {
|
|
@@ -105,9 +105,9 @@ const action = {
|
|
|
105
105
|
};
|
|
106
106
|
async function submitMeasurements(request, orgId, payload) {
|
|
107
107
|
const batches = [...limitBatch(payload)];
|
|
108
|
-
const requests = batches.map(
|
|
108
|
+
const requests = batches.map(batch => request(`${constants_1.M3TER_INGEST_API}/organizations/${orgId}/measurements`, {
|
|
109
109
|
method: 'post',
|
|
110
|
-
json: { measurements: batch }
|
|
110
|
+
json: { 'measurements': batch }
|
|
111
111
|
}));
|
|
112
112
|
return Promise.all(requests);
|
|
113
113
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/m3ter/submitMeasurements/index.ts"],"names":[],"mappings":";;AAGA,4CAA2E;AAE3E,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,yCAAyC;IACtD,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,GAAG,EAAE;YACH,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE;SACzC;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yDAAyD;YACtE,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;SAC3C;QACD,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,4CAA4C;YACzD,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE;SAC7C;QACD,EAAE,EAAE;YACF,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;SACpC;QACD,GAAG,EAAE;YACH,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,UAAU;YAChB,WAAW,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/m3ter/submitMeasurements/index.ts"],"names":[],"mappings":";;AAGA,4CAA2E;AAE3E,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,yCAAyC;IACtD,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,GAAG,EAAE;YACH,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE;SACzC;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yDAAyD;YACtE,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;SAC3C;QACD,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,4CAA4C;YACzD,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE;SAC7C;QACD,EAAE,EAAE;YACF,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;SACpC;QACD,GAAG,EAAE;YACH,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,kJAAkJ;YAC/J,QAAQ,EAAE,KAAK;SAChB;QACD,GAAG,EAAE;YACH,KAAK,EAAE,KAAK;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uHAAuH;YACpI,QAAQ,EAAE,KAAK;SAChB;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,IAAI,EAA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AO,kBAAkB,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9D,CAAC;CACF,CAAA;AAED,KAAK,UAAU,kBAAkB,CAAC,OAAsB,EAAE,KAAa,EAAE,OAAkB;IACzF,MAAM,OAAO,GAAG,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,CAAA;IACxC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CACnC,OAAO,CAAC,GAAG,4BAAgB,kBAAkB,KAAK,eAAe,EAAE;QACjE,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE;KAChC,CAAC,CAAC,CAAA;IACL,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;AAC9B,CAAC;AAED,QAAQ,CAAC,CAAC,UAAU,CAAI,GAAQ;IAC9B,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,KAAK,IAAI,sCAA0B,EAAE;QAC3E,MAAM,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,sCAA0B,CAAC,CAAA;KAC3D;AACH,CAAC;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -65,7 +65,7 @@ const action = {
|
|
|
65
65
|
const audienceId = payload.segment_computation_id;
|
|
66
66
|
const audienceName = payload.custom_audience_name;
|
|
67
67
|
const audienceValue = d?.rawData?.properties?.[audienceName] ?? d?.rawData?.traits?.[audienceName];
|
|
68
|
-
return request(`${host}/
|
|
68
|
+
return request(`${host}/sync_audience`, {
|
|
69
69
|
method: 'post',
|
|
70
70
|
json: {
|
|
71
71
|
audienceId: audienceId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/optimizely-advanced-audience-targeting/syncAudience/index.ts"],"names":[],"mappings":";;AAGA,oCAAkC;AAwBlC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IAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC/B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;QAC5B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;QAE9B,MAAM,IAAI,GAAG,eAAO,CAAC,QAAQ,CAAC,CAAA;QAE9B,MAAM,CAAC,GAAS,IAAI,CAAA;QACpB,MAAM,UAAU,GAAG,OAAO,CAAC,sBAAsB,CAAA;QACjD,MAAM,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAA;QACjD,MAAM,aAAa,GAAG,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,YAAY,CAAC,CAAA;QAElG,OAAO,OAAO,CAAC,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/optimizely-advanced-audience-targeting/syncAudience/index.ts"],"names":[],"mappings":";;AAGA,oCAAkC;AAwBlC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,4DAA4D;IACzE,mBAAmB,EAAE,qCAAqC;IAC1D,MAAM,EAAE;QACN,oBAAoB,EAAE;YACpB,KAAK,EAAE,sBAAsB;YAC7B,WAAW,EAAE,wDAAwD;YACrE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,oCAAoC;aAC9C;SACF;QACD,0BAA0B,EAAE;YAC1B,KAAK,EAAE,4BAA4B;YACnC,WAAW,EAAE,wEAAwE;YACrF,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,sCAAsC;aAChD;YACD,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;SACpD;QACD,sBAAs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AAM;YACd,IAAI,EAAE;gBACJ,UAAU,EAAE,UAAU;gBACtB,YAAY,EAAE,YAAY;gBAC1B,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,YAAY,EAAE,aAAa;gBAC3B,MAAM,EAAE,OAAO,CAAC,gBAAgB;aACjC;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
user_identifiers: {
|
|
3
|
+
anonymousId?: string;
|
|
4
|
+
userId?: string;
|
|
5
|
+
email?: string;
|
|
6
|
+
optimizely_vuid?: string;
|
|
7
|
+
};
|
|
8
|
+
event_action: string;
|
|
9
|
+
products?: {
|
|
10
|
+
product_id?: string;
|
|
11
|
+
qty?: number;
|
|
12
|
+
}[];
|
|
13
|
+
order_id?: string;
|
|
14
|
+
total?: string;
|
|
15
|
+
timestamp: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/optimizely-data-platform/customEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const fields_1 = require("../fields");
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Ecommerce Event',
|
|
7
|
+
description: 'Send Segment track() events to Optimizely Data Platform',
|
|
8
|
+
fields: {
|
|
9
|
+
user_identifiers: fields_1.user_identifiers,
|
|
10
|
+
event_action: { ...fields_1.event_action },
|
|
11
|
+
products: { ...fields_1.products },
|
|
12
|
+
order_id: { ...fields_1.order_id },
|
|
13
|
+
total: { ...fields_1.total },
|
|
14
|
+
timestamp: { ...fields_1.timestamp }
|
|
15
|
+
},
|
|
16
|
+
perform: (request, { payload, settings }) => {
|
|
17
|
+
const host = utils_1.hosts[settings.region];
|
|
18
|
+
const body = {
|
|
19
|
+
user_identifiers: payload.user_identifiers,
|
|
20
|
+
action: payload.event_action,
|
|
21
|
+
timestamp: payload.timestamp,
|
|
22
|
+
order_id: payload.order_id,
|
|
23
|
+
total: payload.total,
|
|
24
|
+
products: payload.products
|
|
25
|
+
};
|
|
26
|
+
return request(`${host}/custom_event`, {
|
|
27
|
+
method: 'post',
|
|
28
|
+
json: body
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.default = action;
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/optimizely-data-platform/customEvent/index.ts"],"names":[],"mappings":";;AAGA,sCAAgG;AAChG,oCAAgC;AAEhC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,yDAAyD;IACtE,MAAM,EAAE;QACN,gBAAgB,EAAE,yBAAgB;QAClC,YAAY,EAAE,EAAE,GAAG,qBAAY,EAAE;QACjC,QAAQ,EAAE,EAAE,GAAG,iBAAQ,EAAE;QACzB,QAAQ,EAAE,EAAE,GAAG,iBAAQ,EAAE;QACzB,KAAK,EAAE,EAAE,GAAG,cAAK,EAAE;QACnB,SAAS,EAAE,EAAE,GAAG,kBAAS,EAAE;KAC5B;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,MAAM,IAAI,GAAG,aAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;QAEnC,MAAM,IAAI,GAAG;YACX,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;YAC1C,MAAM,EAAE,OAAO,CAAC,YAAY;YAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAA;QAED,OAAO,OAAO,CAAC,GAAG,IAAI,eAAe,EAAE;YACrC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
user_identifiers: {
|
|
3
|
+
anonymousId?: string;
|
|
4
|
+
userId?: string;
|
|
5
|
+
email: string;
|
|
6
|
+
optimizely_vuid?: string;
|
|
7
|
+
};
|
|
8
|
+
event_action: string;
|
|
9
|
+
campaign_id?: string;
|
|
10
|
+
campaign: string;
|
|
11
|
+
link_url?: string;
|
|
12
|
+
timestamp: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/optimizely-data-platform/emailEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const fields_1 = require("../fields");
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Email Event',
|
|
7
|
+
description: 'Send Segment track() events containing email related details to Optimizely Data Platform',
|
|
8
|
+
fields: {
|
|
9
|
+
user_identifiers: fields_1.email_action_identifiers,
|
|
10
|
+
event_action: fields_1.event_action,
|
|
11
|
+
campaign_id: {
|
|
12
|
+
label: 'Campaign ID',
|
|
13
|
+
description: 'The campaign unique identifier',
|
|
14
|
+
type: 'string',
|
|
15
|
+
default: {
|
|
16
|
+
'@path': '$.properties.campaign_id'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
campaign: {
|
|
20
|
+
label: 'Campaign Name',
|
|
21
|
+
description: 'The campaign name',
|
|
22
|
+
type: 'string',
|
|
23
|
+
required: true,
|
|
24
|
+
default: {
|
|
25
|
+
'@path': '$.properties.campaign_name'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
link_url: {
|
|
29
|
+
label: 'Link URL',
|
|
30
|
+
description: 'URL of the link which was clicked',
|
|
31
|
+
type: 'string',
|
|
32
|
+
default: {
|
|
33
|
+
'@path': '$.properties.link_url'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
timestamp: { ...fields_1.timestamp }
|
|
37
|
+
},
|
|
38
|
+
perform: (request, { payload, settings }) => {
|
|
39
|
+
const host = utils_1.hosts[settings.region];
|
|
40
|
+
const body = {
|
|
41
|
+
type: 'email',
|
|
42
|
+
action: payload.event_action,
|
|
43
|
+
campaign: payload.campaign,
|
|
44
|
+
user_identifiers: payload.user_identifiers,
|
|
45
|
+
campaign_event_value: payload.link_url ?? null,
|
|
46
|
+
timestamp: payload.timestamp
|
|
47
|
+
};
|
|
48
|
+
return request(`${host}/email_event`, {
|
|
49
|
+
method: 'post',
|
|
50
|
+
json: body
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
exports.default = action;
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/optimizely-data-platform/emailEvent/index.ts"],"names":[],"mappings":";;AAGA,sCAA6E;AAC7E,oCAAgC;AAEhC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,0FAA0F;IACvG,MAAM,EAAE;QACN,gBAAgB,EAAE,iCAAwB;QAC1C,YAAY,EAAE,qBAAY;QAC1B,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,gCAAgC;YAC7C,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,0BAA0B;aACpC;SACF;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,eAAe;YACtB,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,4BAA4B;aACtC;SACF;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,mCAAmC;YAChD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,uBAAuB;aACjC;SACF;QACD,SAAS,EAAE,EAAE,GAAG,kBAAS,EAAE;KAC5B;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,MAAM,IAAI,GAAG,aAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;QAEnC,MAAM,IAAI,GAAG;YACX,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,OAAO,CAAC,YAAY;YAC5B,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;YAC1C,oBAAoB,EAAE,OAAO,CAAC,QAAQ,IAAI,IAAI;YAC9C,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAA;QAED,OAAO,OAAO,CAAC,GAAG,IAAI,cAAc,EAAE;YACpC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InputField } from '@segment/actions-core/destination-kit/types';
|
|
2
|
+
export declare const event_action: InputField;
|
|
3
|
+
export declare const user_identifiers: InputField;
|
|
4
|
+
export declare const email_action_identifiers: InputField;
|
|
5
|
+
export declare const timestamp: InputField;
|
|
6
|
+
export declare const order_id: InputField;
|
|
7
|
+
export declare const total: InputField;
|
|
8
|
+
export declare const products: InputField;
|