@segment/action-destinations 3.261.1-staging.0 → 3.262.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/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/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 +0 -3
- 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/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.map +1 -0
- package/dist/destinations/inleads-ai/group/generated-types.d.ts +44 -0
- package/dist/destinations/inleads-ai/group/generated-types.js.map +1 -0
- package/dist/destinations/{responsys/asyncMergePetRecords → inleads-ai/group}/index.d.ts +1 -1
- 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/{engage/sendgrid/Profile.js → inleads-ai/identify/generated-types.js} +1 -1
- package/dist/destinations/inleads-ai/identify/generated-types.js.map +1 -0
- package/dist/destinations/{responsys/asyncMergeProfileListMembers → inleads-ai/identify}/index.d.ts +1 -1
- 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/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/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 +4 -4
- package/dist/destinations/amazon-ads/utils.d.ts +0 -25
- package/dist/destinations/amazon-ads/utils.js +0 -8
- package/dist/destinations/amazon-ads/utils.js.map +0 -1
- 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/mixpanel/utils.d.ts +0 -13
- package/dist/destinations/mixpanel/utils.js +0 -117
- package/dist/destinations/mixpanel/utils.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/snap-conversions-api/snap-capi-properties.d.ts +0 -30
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js +0 -316
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +0 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +0 -3
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +0 -34
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +0 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +0 -1
- package/dist/destinations/{responsys/asyncMergePetRecords → inleads-ai}/generated-types.js +0 -0
- package/dist/destinations/{responsys/asyncMergeProfileListMembers → inleads-ai/group}/generated-types.js +0 -0
- package/dist/destinations/{tiktok-offline-conversions/reportOfflineEvent → tiktok-conversions}/formatter.d.ts +1 -1
|
@@ -5,6 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const actions_core_1 = require("@segment/actions-core");
|
|
7
7
|
const logEvent_1 = __importDefault(require("./logEvent"));
|
|
8
|
+
const identify_1 = __importDefault(require("./identify"));
|
|
9
|
+
const group_1 = __importDefault(require("./group"));
|
|
10
|
+
const page_1 = __importDefault(require("./page"));
|
|
8
11
|
const properties_1 = require("./properties");
|
|
9
12
|
const presets = [
|
|
10
13
|
{
|
|
@@ -17,22 +20,22 @@ const presets = [
|
|
|
17
20
|
{
|
|
18
21
|
name: 'Page Calls',
|
|
19
22
|
subscribe: 'type = "page"',
|
|
20
|
-
partnerAction: '
|
|
21
|
-
mapping: actions_core_1.defaultValues(
|
|
23
|
+
partnerAction: 'page',
|
|
24
|
+
mapping: actions_core_1.defaultValues(page_1.default.fields),
|
|
22
25
|
type: 'automatic'
|
|
23
26
|
},
|
|
24
27
|
{
|
|
25
|
-
name: '
|
|
26
|
-
subscribe: 'type = "
|
|
27
|
-
partnerAction: '
|
|
28
|
-
mapping: actions_core_1.defaultValues(
|
|
28
|
+
name: 'Group Calls',
|
|
29
|
+
subscribe: 'type = "group"',
|
|
30
|
+
partnerAction: 'group',
|
|
31
|
+
mapping: actions_core_1.defaultValues(group_1.default.fields),
|
|
29
32
|
type: 'automatic'
|
|
30
33
|
},
|
|
31
34
|
{
|
|
32
35
|
name: 'Identify Calls',
|
|
33
36
|
subscribe: 'type = "identify"',
|
|
34
|
-
partnerAction: '
|
|
35
|
-
mapping: actions_core_1.defaultValues(
|
|
37
|
+
partnerAction: 'identify',
|
|
38
|
+
mapping: actions_core_1.defaultValues(identify_1.default.fields),
|
|
36
39
|
type: 'automatic'
|
|
37
40
|
}
|
|
38
41
|
];
|
|
@@ -71,7 +74,10 @@ const destination = {
|
|
|
71
74
|
},
|
|
72
75
|
presets,
|
|
73
76
|
actions: {
|
|
74
|
-
logEvent: logEvent_1.default
|
|
77
|
+
logEvent: logEvent_1.default,
|
|
78
|
+
identify: identify_1.default,
|
|
79
|
+
group: group_1.default,
|
|
80
|
+
page: page_1.default
|
|
75
81
|
}
|
|
76
82
|
};
|
|
77
83
|
exports.default = destination;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/kameleoon/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAqD;AAGrD,0DAAiC;AACjC,6CAAuC;AAEvC,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,UAAU;QACzB,OAAO,EAAE,4BAAa,CAAC,kBAAQ,CAAC,MAAM,CAAC;QACvC,IAAI,EAAE,WAAW;KAClB;IACD;QACE,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE,eAAe;QAC1B,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/kameleoon/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAqD;AAGrD,0DAAiC;AACjC,0DAAiC;AACjC,oDAA2B;AAC3B,kDAAyB;AAEzB,6CAAuC;AAEvC,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,UAAU;QACzB,OAAO,EAAE,4BAAa,CAAC,kBAAQ,CAAC,MAAM,CAAC;QACvC,IAAI,EAAE,WAAW;KAClB;IACD;QACE,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE,eAAe;QAC1B,aAAa,EAAE,MAAM;QACrB,OAAO,EAAE,4BAAa,CAAC,cAAI,CAAC,MAAM,CAAC;QACnC,IAAI,EAAE,WAAW;KAClB;IACD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,OAAO;QACtB,OAAO,EAAE,4BAAa,CAAC,eAAK,CAAC,MAAM,CAAC;QACpC,IAAI,EAAE,WAAW;KAClB;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,mBAAmB;QAC9B,aAAa,EAAE,UAAU;QACzB,OAAO,EAAE,4BAAa,CAAC,kBAAQ,CAAC,MAAM,CAAC;QACvC,IAAI,EAAE,WAAW;KAClB;CACF,CAAA;AAED,MAAM,WAAW,GAA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Ae,WAAW,CAAA"}
|
|
@@ -7,9 +7,21 @@ const omit_1 = __importDefault(require("lodash/omit"));
|
|
|
7
7
|
const properties_1 = require("../properties");
|
|
8
8
|
const action = {
|
|
9
9
|
title: 'Log Event',
|
|
10
|
-
description: 'Send
|
|
10
|
+
description: 'Send a track event to Kameleoon',
|
|
11
11
|
defaultSubscription: 'type = "track"',
|
|
12
12
|
fields: {
|
|
13
|
+
anonymousId: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
description: 'Anonymous id',
|
|
16
|
+
label: 'Anonymous ID',
|
|
17
|
+
default: { '@path': '$.anonymousId' }
|
|
18
|
+
},
|
|
19
|
+
userId: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: 'The ID associated with the user',
|
|
22
|
+
label: 'User ID',
|
|
23
|
+
default: { '@path': '$.userId' }
|
|
24
|
+
},
|
|
13
25
|
event: {
|
|
14
26
|
type: 'string',
|
|
15
27
|
required: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/kameleoon/logEvent/index.ts"],"names":[],"mappings":";;;;;AAGA,uDAA8B;AAE9B,8CAAwC;AAExC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/kameleoon/logEvent/index.ts"],"names":[],"mappings":";;;;;AAGA,uDAA8B;AAE9B,8CAAwC;AAExC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,iCAAiC;IAC9C,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,cAAc;YAC3B,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;SACtC;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;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string;
|
|
4
|
+
type: string;
|
|
5
|
+
properties?: {
|
|
6
|
+
[k: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
kameleoonVisitorCode?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
context?: {
|
|
11
|
+
[k: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
timestamp: string;
|
|
14
|
+
messageId?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/kameleoon/page/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const omit_1 = __importDefault(require("lodash/omit"));
|
|
7
|
+
const properties_1 = require("../properties");
|
|
8
|
+
const action = {
|
|
9
|
+
title: 'Page Event',
|
|
10
|
+
description: 'Send a page event to Kameleoon',
|
|
11
|
+
defaultSubscription: 'type = "page"',
|
|
12
|
+
fields: {
|
|
13
|
+
anonymousId: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
description: 'Anonymous id',
|
|
16
|
+
label: 'Anonymous ID',
|
|
17
|
+
default: { '@path': '$.anonymousId' }
|
|
18
|
+
},
|
|
19
|
+
userId: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: 'The ID associated with the user',
|
|
22
|
+
label: 'User ID',
|
|
23
|
+
default: { '@path': '$.userId' }
|
|
24
|
+
},
|
|
25
|
+
type: {
|
|
26
|
+
label: 'Type',
|
|
27
|
+
type: 'string',
|
|
28
|
+
required: true,
|
|
29
|
+
description: 'The type of the event',
|
|
30
|
+
default: {
|
|
31
|
+
'@path': '$.type'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
properties: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
required: false,
|
|
37
|
+
description: 'Page properties',
|
|
38
|
+
label: 'Properties',
|
|
39
|
+
default: { '@path': '$.properties' }
|
|
40
|
+
},
|
|
41
|
+
kameleoonVisitorCode: {
|
|
42
|
+
type: 'string',
|
|
43
|
+
required: false,
|
|
44
|
+
description: 'Kameleoon Visitor Code - a unique identifier for the user',
|
|
45
|
+
label: 'Kameleoon Visitor Code',
|
|
46
|
+
default: { '@path': '$.properties.kameleoonVisitorCode' }
|
|
47
|
+
},
|
|
48
|
+
name: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
required: false,
|
|
51
|
+
description: 'The name of the page',
|
|
52
|
+
label: 'Page Name',
|
|
53
|
+
default: {
|
|
54
|
+
'@path': '$.name'
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
context: {
|
|
58
|
+
type: 'object',
|
|
59
|
+
required: false,
|
|
60
|
+
description: 'Context properties to send with the event',
|
|
61
|
+
label: 'Context properties',
|
|
62
|
+
default: { '@path': '$.context' }
|
|
63
|
+
},
|
|
64
|
+
timestamp: {
|
|
65
|
+
type: 'string',
|
|
66
|
+
format: 'date-time',
|
|
67
|
+
required: true,
|
|
68
|
+
description: 'The timestamp of the event',
|
|
69
|
+
label: 'Timestamp',
|
|
70
|
+
default: { '@path': '$.timestamp' }
|
|
71
|
+
},
|
|
72
|
+
messageId: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
required: false,
|
|
75
|
+
description: 'The Segment messageId',
|
|
76
|
+
label: 'MessageId',
|
|
77
|
+
default: { '@path': '$.messageId' }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
perform: (request, data) => {
|
|
81
|
+
const payload = {
|
|
82
|
+
...omit_1.default(data.payload, ['kameleoonVisitorCode']),
|
|
83
|
+
properties: {
|
|
84
|
+
...(data.payload.properties || {}),
|
|
85
|
+
kameleoonVisitorCode: data.payload.kameleoonVisitorCode
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
return request(properties_1.BASE_URL, {
|
|
89
|
+
headers: {
|
|
90
|
+
authorization: `Basic ${data.settings.apiKey}`,
|
|
91
|
+
'x-segment-settings': data.settings.sitecode
|
|
92
|
+
},
|
|
93
|
+
method: 'post',
|
|
94
|
+
json: payload
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
exports.default = action;
|
|
99
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/kameleoon/page/index.ts"],"names":[],"mappings":";;;;;AAGA,uDAA8B;AAE9B,8CAAwC;AAExC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,gCAAgC;IAC7C,mBAAmB,EAAE,eAAe;IACpC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,cAAc;YAC3B,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;SACtC;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iCAAiC;YAC9C,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,uBAAuB;YACpC,OAAO,EAAE;gBACP,OAAO,EAAE,QAAQ;aAClB;SACF;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,iBAAiB;YAC9B,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;SACrC;QACD,oBAAoB,EAAE;YACpB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,WAA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;gBAC9C,oBAAoB,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ;aAC7C;YACD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO;SACd,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { RequestClient, DynamicFieldResponse } from '@segment/actions-core';
|
|
2
|
-
import { ImportJobPayload
|
|
2
|
+
import { ImportJobPayload } from './types';
|
|
3
3
|
import { Payload } from './upsertProfile/generated-types';
|
|
4
|
-
import { ModifiedResponse } from '@segment/actions-core/*';
|
|
5
4
|
export declare function getListIdDynamicData(request: RequestClient): Promise<DynamicFieldResponse>;
|
|
6
|
-
export declare function addProfileToList(request: RequestClient, id: string, list_id: string | undefined): Promise<ModifiedResponse<unknown>>;
|
|
7
|
-
export declare function removeProfileFromList(request: RequestClient, ids: string[], list_id: string): Promise<ModifiedResponse<unknown>>;
|
|
5
|
+
export declare function addProfileToList(request: RequestClient, id: string, list_id: string | undefined): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
|
|
6
|
+
export declare function removeProfileFromList(request: RequestClient, ids: string[], list_id: string): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
|
|
8
7
|
export declare function createProfile(request: RequestClient, email: string | undefined, external_id: string | undefined): Promise<any>;
|
|
9
8
|
export declare function buildHeaders(authKey: string): {
|
|
10
9
|
Authorization: string;
|
|
@@ -17,7 +16,5 @@ export declare const createImportJobPayload: (profiles: Payload[], listId?: stri
|
|
|
17
16
|
};
|
|
18
17
|
export declare const sendImportJobRequest: (request: RequestClient, importJobPayload: {
|
|
19
18
|
data: ImportJobPayload;
|
|
20
|
-
}) => Promise<ModifiedResponse<
|
|
19
|
+
}) => Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
|
|
21
20
|
export declare function getProfiles(request: RequestClient, emails: string[] | undefined, external_ids: string[] | undefined): Promise<string[]>;
|
|
22
|
-
export declare function pollKlaviyoJobStatus(request: RequestClient, jobId: string, interval?: number, timeout?: number): Promise<KlaviyoJobStatusResponse>;
|
|
23
|
-
export declare function subscribeProfiles(request: RequestClient, profiles: SubProfile | SubProfile[], customSource?: string): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getProfiles = exports.sendImportJobRequest = exports.createImportJobPayload = exports.buildHeaders = exports.createProfile = exports.removeProfileFromList = exports.addProfileToList = exports.getListIdDynamicData = void 0;
|
|
4
4
|
const config_1 = require("./config");
|
|
5
5
|
async function getListIdDynamicData(request) {
|
|
6
6
|
try {
|
|
@@ -143,83 +143,4 @@ async function getProfiles(request, emails, external_ids) {
|
|
|
143
143
|
return Array.from(new Set(profileIds));
|
|
144
144
|
}
|
|
145
145
|
exports.getProfiles = getProfiles;
|
|
146
|
-
async function pollKlaviyoJobStatus(request, jobId, interval = 10000, timeout = 300000) {
|
|
147
|
-
const startTime = Date.now();
|
|
148
|
-
return new Promise((resolve, reject) => {
|
|
149
|
-
const checkStatus = async () => {
|
|
150
|
-
try {
|
|
151
|
-
const response = await request(`${config_1.API_URL}/profile-bulk-import-jobs/${jobId}/`, {
|
|
152
|
-
method: 'GET',
|
|
153
|
-
headers: {
|
|
154
|
-
revision: '2023-10-15.pre'
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
const parsedData = JSON.parse(response.data);
|
|
158
|
-
const jobStatus = parsedData.data.attributes.status;
|
|
159
|
-
if (jobStatus === 'complete') {
|
|
160
|
-
resolve(parsedData);
|
|
161
|
-
}
|
|
162
|
-
else if (Date.now() - startTime > timeout) {
|
|
163
|
-
reject(new Error('Polling timed out'));
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
setTimeout(checkStatusWrapper, interval);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
catch (error) {
|
|
170
|
-
reject(error);
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
const checkStatusWrapper = () => {
|
|
174
|
-
checkStatus().catch(reject);
|
|
175
|
-
};
|
|
176
|
-
checkStatusWrapper();
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
exports.pollKlaviyoJobStatus = pollKlaviyoJobStatus;
|
|
180
|
-
async function subscribeProfiles(request, profiles, customSource = 'Marketing Event') {
|
|
181
|
-
if (!Array.isArray(profiles)) {
|
|
182
|
-
profiles = [profiles];
|
|
183
|
-
}
|
|
184
|
-
const profileSubscriptions = profiles.map((profile) => {
|
|
185
|
-
const profileData = {
|
|
186
|
-
type: 'profile',
|
|
187
|
-
attributes: {}
|
|
188
|
-
};
|
|
189
|
-
if (profile.email) {
|
|
190
|
-
profileData.attributes.email = profile?.email;
|
|
191
|
-
}
|
|
192
|
-
if (profile.phone_number) {
|
|
193
|
-
profileData.attributes.phone_number = profile?.phone_number;
|
|
194
|
-
}
|
|
195
|
-
return profileData;
|
|
196
|
-
});
|
|
197
|
-
const subData = {
|
|
198
|
-
data: {
|
|
199
|
-
type: 'profile-subscription-bulk-create-job',
|
|
200
|
-
attributes: {
|
|
201
|
-
custom_source: customSource,
|
|
202
|
-
profiles: {
|
|
203
|
-
data: profileSubscriptions
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
const listId = profiles[0].list_id;
|
|
209
|
-
if (listId) {
|
|
210
|
-
subData.data.relationships = {
|
|
211
|
-
list: {
|
|
212
|
-
data: {
|
|
213
|
-
type: 'list',
|
|
214
|
-
id: listId
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
await request(`${config_1.API_URL}/profile-subscription-bulk-create-jobs/`, {
|
|
220
|
-
method: 'POST',
|
|
221
|
-
json: subData
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
exports.subscribeProfiles = subscribeProfiles;
|
|
225
146
|
//# sourceMappingURL=functions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/destinations/klaviyo/functions.ts"],"names":[],"mappings":";;;AACA,qCAAiD;
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/destinations/klaviyo/functions.ts"],"names":[],"mappings":";;;AACA,qCAAiD;AAY1C,KAAK,UAAU,oBAAoB,CAAC,OAAsB;IAC/D,IAAI;QACF,MAAM,MAAM,GAAmB,MAAM,OAAO,CAAC,GAAG,gBAAO,SAAS,EAAE;YAChE,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QACF,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAkD,EAAE,EAAE;YACzG,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAA;QACxD,CAAC,CAAC,CAAA;QACF,OAAO;YACL,OAAO;SACR,CAAA;KACF;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO;YACL,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE;gBACL,OAAO,EAAG,GAAgB,CAAC,OAAO,IAAI,eAAe;gBACrD,IAAI,EAAG,GAAgB,CAAC,MAAM,GAAG,EAAE,IAAI,eAAe;aACvD;SACF,CAAA;KACF;AACH,CAAC;AArBD,oDAqBC;AAEM,KAAK,UAAU,gBAAgB,CAAC,OAAsB,EAAE,EAAU,EAAE,OAA2B;IACpG,MAAM,QAAQ,GAAa;QACzB,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,SAAS;gBACf,EAAE,EAAE,EAAE;aACP;SACF;KACF,CAAA;IACD,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,GAAG,gBAAO,UAAU,OAAO,0BAA0B,EAAE;QAChF,MAAM,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B,YAAkC;IAElC,MAAM,UAAU,GAAa,EAAE,CAAA;IAE/B,IAAI,YAAY,EAAE,MAAM,EAAE;QACxB,MAAM,QAAQ,GAAG,iBAAiB,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAA;QAC9D,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,gBAAO,yBAAyB,QAAQ,GAAG,EAAE;YAC7E,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QACF,MAAM,IAAI,GAAuB,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;QACtD,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA;KACpE;IAED,IAAI,MAAM,EAAE,MAAM,EAAE;QAClB,MAAM,WAAW,GAAG,WAAW,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAA;QACrD,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,gBAAO,yBAAyB,WAAW,GAAG,EAAE;YAChF,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QACF,MAAM,IAAI,GAAuB,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;QACtD,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA;KACpE;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAA;AACxC,CAAC;AA1BD,kCA0BC"}
|
|
@@ -35,7 +35,6 @@ const action = {
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
perform: async (request, { payload }) => {
|
|
38
|
-
console.log('Remove perform');
|
|
39
38
|
const { email, list_id, external_id } = payload;
|
|
40
39
|
if (!email && !external_id) {
|
|
41
40
|
throw new actions_core_1.PayloadValidationError('Missing Email or External Id');
|
|
@@ -44,7 +43,6 @@ const action = {
|
|
|
44
43
|
return await functions_1.removeProfileFromList(request, profileIds, list_id);
|
|
45
44
|
},
|
|
46
45
|
performBatch: async (request, { payload }) => {
|
|
47
|
-
console.log('Remove perform Batch');
|
|
48
46
|
const filteredPayload = payload.filter((profile) => profile.email || profile.external_id);
|
|
49
47
|
const listId = filteredPayload[0]?.list_id;
|
|
50
48
|
const emails = filteredPayload.map((profile) => profile.email).filter((email) => email);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/removeProfile/index.ts"],"names":[],"mappings":";;AAAA,wDAAsG;AAItG,4CAAuF;AACvF,8CAA+C;AAE/C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,0BAA0B;IACvC,mBAAmB,EAAE,oBAAoB;IACzC,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,oEAAoE;YACjF,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;SACvC;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,+JAA+J;YAC5K,IAAI,EAAE,QAAQ;SACf;QACD,OAAO,EAAE;YACP,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,yCAAyC;YACtD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf;QACD,eAAe,EAAE,EAAE,GAAG,4BAAe,EAAE;KACxC;IACD,aAAa,EAAE;QACb,OAAO,EAAE,KAAK,EAAE,OAAO,EAAiC,EAAE;YACxD,OAAO,gCAAoB,CAAC,OAAO,CAAC,CAAA;QACtC,CAAC;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACtC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/removeProfile/index.ts"],"names":[],"mappings":";;AAAA,wDAAsG;AAItG,4CAAuF;AACvF,8CAA+C;AAE/C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,0BAA0B;IACvC,mBAAmB,EAAE,oBAAoB;IACzC,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,oEAAoE;YACjF,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;SACvC;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,+JAA+J;YAC5K,IAAI,EAAE,QAAQ;SACf;QACD,OAAO,EAAE;YACP,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,yCAAyC;YACtD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf;QACD,eAAe,EAAE,EAAE,GAAG,4BAAe,EAAE;KACxC;IACD,aAAa,EAAE;QACb,OAAO,EAAE,KAAK,EAAE,OAAO,EAAiC,EAAE;YACxD,OAAO,gCAAoB,CAAC,OAAO,CAAC,CAAA;QACtC,CAAC;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACtC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,OAAO,CAAA;QAC/C,IAAI,CAAC,KAAK,IAAI,CAAC,WAAW,EAAE;YAC1B,MAAM,IAAI,qCAAsB,CAAC,8BAA8B,CAAC,CAAA;SACjE;QACD,MAAM,UAAU,GAAG,MAAM,uBAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;QACnH,OAAO,MAAM,iCAAqB,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IAClE,CAAC;IACD,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAE3C,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,WAAW,CAAC,CAAA;QACzF,MAAM,MAAM,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,OAAO,CAAA;QAC1C,MAAM,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAa,CAAA;QACnG,MAAM,WAAW,GAAG,eAAe;aAChC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;aACrC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAa,CAAA;QAEnD,MAAM,UAAU,GAAG,MAAM,uBAAW,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,CAAA;QAClE,OAAO,MAAM,iCAAqB,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,CAAA;IACjE,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -101,7 +101,6 @@ export interface ProfileAttributes {
|
|
|
101
101
|
location?: Location | null;
|
|
102
102
|
properties?: Record<string, any>;
|
|
103
103
|
list_id?: string;
|
|
104
|
-
subscriptions?: Record<string, any>;
|
|
105
104
|
}
|
|
106
105
|
export interface ImportJobPayload {
|
|
107
106
|
type: string;
|
|
@@ -129,99 +128,3 @@ export interface Profile {
|
|
|
129
128
|
export interface GetProfileResponse {
|
|
130
129
|
data: Profile[];
|
|
131
130
|
}
|
|
132
|
-
export interface SubProfilePayload {
|
|
133
|
-
type: string;
|
|
134
|
-
attributes: {
|
|
135
|
-
email?: string;
|
|
136
|
-
phone_number?: string;
|
|
137
|
-
subscriptions?: {
|
|
138
|
-
email?: {};
|
|
139
|
-
sms?: {};
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
export interface SubscriptionData {
|
|
144
|
-
data: {
|
|
145
|
-
type: string;
|
|
146
|
-
attributes: {
|
|
147
|
-
custom_source: string;
|
|
148
|
-
profiles: {
|
|
149
|
-
data: Array<SubProfilePayload>;
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
relationships?: {
|
|
153
|
-
list: {
|
|
154
|
-
data: {
|
|
155
|
-
type: 'list';
|
|
156
|
-
id: string;
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
export interface SubProfile {
|
|
163
|
-
email?: string;
|
|
164
|
-
phone_number?: string;
|
|
165
|
-
list_id: string;
|
|
166
|
-
}
|
|
167
|
-
export interface KlaviyoJobStatusResponse {
|
|
168
|
-
data: {
|
|
169
|
-
type: string;
|
|
170
|
-
id: string;
|
|
171
|
-
attributes: {
|
|
172
|
-
status: string;
|
|
173
|
-
created_at: string;
|
|
174
|
-
total_count: number;
|
|
175
|
-
completed_count: number;
|
|
176
|
-
failed_count: number;
|
|
177
|
-
completed_at: string | null;
|
|
178
|
-
started_at: string | null;
|
|
179
|
-
};
|
|
180
|
-
relationships: {};
|
|
181
|
-
links: {
|
|
182
|
-
self: string;
|
|
183
|
-
};
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
export interface KlaviyoImportJobData {
|
|
187
|
-
data: {
|
|
188
|
-
type: string;
|
|
189
|
-
id: string;
|
|
190
|
-
attributes: {
|
|
191
|
-
status: string;
|
|
192
|
-
created_at: string;
|
|
193
|
-
total_count: number;
|
|
194
|
-
completed_count: number;
|
|
195
|
-
failed_count: number;
|
|
196
|
-
completed_at: string | null;
|
|
197
|
-
expires_at: string;
|
|
198
|
-
started_at: string | null;
|
|
199
|
-
};
|
|
200
|
-
relationships: {
|
|
201
|
-
lists: {
|
|
202
|
-
data: Array<{
|
|
203
|
-
type: string;
|
|
204
|
-
id: string;
|
|
205
|
-
}>;
|
|
206
|
-
links: {
|
|
207
|
-
self: string;
|
|
208
|
-
related: string;
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
profiles: {
|
|
212
|
-
links: {
|
|
213
|
-
self: string;
|
|
214
|
-
related: string;
|
|
215
|
-
};
|
|
216
|
-
};
|
|
217
|
-
import_errors: {
|
|
218
|
-
links: {
|
|
219
|
-
related: string;
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
};
|
|
223
|
-
links: {
|
|
224
|
-
self: string;
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
}
|
|
@@ -159,12 +159,9 @@ const action = {
|
|
|
159
159
|
json: profileData
|
|
160
160
|
});
|
|
161
161
|
if (list_id) {
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
list_id
|
|
166
|
-
};
|
|
167
|
-
await functions_1.subscribeProfiles(request, subscriptionProfile);
|
|
162
|
+
const content = JSON.parse(profile?.content);
|
|
163
|
+
const id = content.data.id;
|
|
164
|
+
await functions_1.addProfileToList(request, id, list_id);
|
|
168
165
|
}
|
|
169
166
|
return profile;
|
|
170
167
|
}
|
|
@@ -180,12 +177,7 @@ const action = {
|
|
|
180
177
|
json: profileData
|
|
181
178
|
});
|
|
182
179
|
if (list_id) {
|
|
183
|
-
|
|
184
|
-
email: profileData.data.attributes.email,
|
|
185
|
-
phone_number: profileData.data.attributes.phone_number,
|
|
186
|
-
list_id
|
|
187
|
-
};
|
|
188
|
-
await functions_1.subscribeProfiles(request, subscriptionProfile);
|
|
180
|
+
await functions_1.addProfileToList(request, id, list_id);
|
|
189
181
|
}
|
|
190
182
|
return profile;
|
|
191
183
|
}
|
|
@@ -195,25 +187,23 @@ const action = {
|
|
|
195
187
|
},
|
|
196
188
|
performBatch: async (request, { payload }) => {
|
|
197
189
|
payload = payload.filter((profile) => profile.email || profile.external_id || profile.phone_number);
|
|
198
|
-
|
|
199
|
-
|
|
190
|
+
const profilesWithList = payload.filter((profile) => profile.list_id);
|
|
191
|
+
const profilesWithoutList = payload.filter((profile) => !profile.list_id);
|
|
192
|
+
let importResponseWithList;
|
|
193
|
+
let importResponseWithoutList;
|
|
194
|
+
if (profilesWithList.length > 0) {
|
|
195
|
+
const listId = profilesWithList[0].list_id;
|
|
196
|
+
const importJobPayload = functions_1.createImportJobPayload(profilesWithList, listId);
|
|
197
|
+
importResponseWithList = await functions_1.sendImportJobRequest(request, importJobPayload);
|
|
200
198
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
const jobId = parsedData.data.id;
|
|
205
|
-
if (jobId) {
|
|
206
|
-
const jobStatusResponse = await functions_1.pollKlaviyoJobStatus(request, jobId);
|
|
207
|
-
if (jobStatusResponse.data.attributes.status !== 'complete') {
|
|
208
|
-
throw new actions_core_1.APIError('Import job did not complete successfully.', 401);
|
|
209
|
-
}
|
|
210
|
-
const profilesWithListId = payload.filter((profile) => !!profile.list_id);
|
|
211
|
-
for (let i = 0; i < profilesWithListId.length; i += 100) {
|
|
212
|
-
const batch = profilesWithListId.slice(i, i + 100);
|
|
213
|
-
await functions_1.subscribeProfiles(request, batch);
|
|
214
|
-
}
|
|
199
|
+
if (profilesWithoutList.length > 0) {
|
|
200
|
+
const importJobPayload = functions_1.createImportJobPayload(profilesWithoutList);
|
|
201
|
+
importResponseWithoutList = await functions_1.sendImportJobRequest(request, importJobPayload);
|
|
215
202
|
}
|
|
216
|
-
return
|
|
203
|
+
return {
|
|
204
|
+
withList: importResponseWithList,
|
|
205
|
+
withoutList: importResponseWithoutList
|
|
206
|
+
};
|
|
217
207
|
}
|
|
218
208
|
};
|
|
219
209
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/upsertProfile/index.ts"],"names":[],"mappings":";;AAIA,sCAAmC;AACnC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/upsertProfile/index.ts"],"names":[],"mappings":";;AAIA,sCAAmC;AACnC,wDAA8D;AAE9D,4CAAmH;AACnH,8CAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,sBAAsB;IACnC,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,kFAAkF;YAC/F,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;SACvC;QACD,eAAe,EAAE;YACf,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,uBAAuB;YAC9B,WAAW,EAAE,0DAA0D;SACxE;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,mKAAmK;YAChL,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE;SAC/C;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,+JAA+J;YAC5K,IAAI,EAAE,QAAQ;SACf;QACD,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;SAC3C;QACD,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,yBAAyB;YACtC,I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
|
},
|
|
33
33
|
audience_key: {
|
|
34
|
-
label: 'Audience Key',
|
|
35
|
-
description: 'Unique ID that identifies members of an audience. A typical audience key might be client customer IDs, email addresses, or phone numbers.',
|
|
34
|
+
label: 'LiveRamp Audience Key',
|
|
35
|
+
description: 'Unique ID that identifies members of an audience. A typical audience key might be client customer IDs, email addresses, or phone numbers. See more information on [LiveRamp Audience Key](https://docs.liveramp.com/connect/en/onboarding-terms-and-concepts.html#audience-key) ',
|
|
36
36
|
type: 'string',
|
|
37
37
|
required: true,
|
|
38
38
|
default: { '@path': '$.userId' }
|