@segment/action-destinations 3.246.0-snap-connector → 3.246.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/index.js +3 -3
- package/dist/destinations/acoustic-s3tc/index.js.map +1 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.d.ts +6 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js +26 -25
- package/dist/destinations/acoustic-s3tc/receiveEvents/eventprocessing.js.map +1 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/generated-types.d.ts +1 -1
- package/dist/destinations/acoustic-s3tc/receiveEvents/index.js +12 -10
- package/dist/destinations/acoustic-s3tc/receiveEvents/index.js.map +1 -1
- package/dist/destinations/avo/index.js +4 -4
- package/dist/destinations/avo/index.js.map +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/customerio/createUpdateDevice/generated-types.d.ts +3 -0
- package/dist/destinations/customerio/createUpdateDevice/index.js +29 -17
- package/dist/destinations/customerio/createUpdateDevice/index.js.map +1 -1
- package/dist/destinations/customerio/createUpdateObject/generated-types.d.ts +3 -0
- package/dist/destinations/customerio/createUpdateObject/index.js +80 -39
- package/dist/destinations/customerio/createUpdateObject/index.js.map +1 -1
- package/dist/destinations/customerio/createUpdatePerson/generated-types.d.ts +4 -1
- package/dist/destinations/customerio/createUpdatePerson/index.d.ts +1 -1
- package/dist/destinations/customerio/createUpdatePerson/index.js +51 -41
- package/dist/destinations/customerio/createUpdatePerson/index.js.map +1 -1
- package/dist/destinations/customerio/deleteDevice/index.js +15 -5
- package/dist/destinations/customerio/deleteDevice/index.js.map +1 -1
- package/dist/destinations/customerio/deletePerson/index.js +4 -8
- package/dist/destinations/customerio/deletePerson/index.js.map +1 -1
- package/dist/destinations/customerio/deleteRelationship/index.js +4 -8
- package/dist/destinations/customerio/deleteRelationship/index.js.map +1 -1
- package/dist/destinations/customerio/index.js +39 -15
- package/dist/destinations/customerio/index.js.map +1 -1
- package/dist/destinations/customerio/suppressPerson/index.js +4 -8
- package/dist/destinations/customerio/suppressPerson/index.js.map +1 -1
- package/dist/destinations/customerio/trackEvent/index.js +26 -32
- package/dist/destinations/customerio/trackEvent/index.js.map +1 -1
- package/dist/destinations/customerio/trackPageView/generated-types.d.ts +1 -0
- package/dist/destinations/customerio/trackPageView/index.js +26 -29
- package/dist/destinations/customerio/trackPageView/index.js.map +1 -1
- package/dist/destinations/customerio/trackScreenView/generated-types.d.ts +1 -0
- package/dist/destinations/customerio/trackScreenView/index.js +25 -29
- package/dist/destinations/customerio/trackScreenView/index.js.map +1 -1
- package/dist/destinations/customerio/unsuppressPerson/index.js +4 -8
- package/dist/destinations/customerio/unsuppressPerson/index.js.map +1 -1
- package/dist/destinations/customerio/utils.d.ts +46 -2
- package/dist/destinations/customerio/utils.js +88 -13
- package/dist/destinations/customerio/utils.js.map +1 -1
- package/dist/destinations/display-video-360/shared.d.ts +10 -5
- package/dist/destinations/display-video-360/shared.js +11 -6
- package/dist/destinations/display-video-360/shared.js.map +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/google-analytics-4/addPaymentInfo/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js +8 -2
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToCart/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/addToCart/index.js +8 -2
- package/dist/destinations/google-analytics-4/addToCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToWishlist/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/addToWishlist/index.js +8 -2
- package/dist/destinations/google-analytics-4/addToWishlist/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/beginCheckout/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/beginCheckout/index.js +8 -2
- package/dist/destinations/google-analytics-4/beginCheckout/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/customEvent/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/customEvent/index.js +8 -2
- package/dist/destinations/google-analytics-4/customEvent/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-functions.d.ts +2 -0
- package/dist/destinations/google-analytics-4/ga4-functions.js +13 -1
- package/dist/destinations/google-analytics-4/ga4-functions.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-properties.d.ts +2 -0
- package/dist/destinations/google-analytics-4/ga4-properties.js +19 -1
- package/dist/destinations/google-analytics-4/ga4-properties.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-types.d.ts +4 -0
- package/dist/destinations/google-analytics-4/generateLead/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/generateLead/index.js +8 -2
- package/dist/destinations/google-analytics-4/generateLead/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/login/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/login/index.js +8 -2
- package/dist/destinations/google-analytics-4/login/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/pageView/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/pageView/index.js +8 -2
- package/dist/destinations/google-analytics-4/pageView/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/purchase/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/purchase/index.js +8 -2
- package/dist/destinations/google-analytics-4/purchase/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/refund/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/refund/index.js +8 -2
- package/dist/destinations/google-analytics-4/refund/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/removeFromCart/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/removeFromCart/index.js +8 -2
- package/dist/destinations/google-analytics-4/removeFromCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/search/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/search/index.js +8 -2
- package/dist/destinations/google-analytics-4/search/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectItem/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/selectItem/index.js +8 -2
- package/dist/destinations/google-analytics-4/selectItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectPromotion/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/selectPromotion/index.js +8 -2
- package/dist/destinations/google-analytics-4/selectPromotion/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/signUp/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/signUp/index.js +8 -2
- package/dist/destinations/google-analytics-4/signUp/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewCart/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/viewCart/index.js +8 -2
- package/dist/destinations/google-analytics-4/viewCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItem/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/viewItem/index.js +8 -2
- package/dist/destinations/google-analytics-4/viewItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItemList/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/viewItemList/index.js +8 -2
- package/dist/destinations/google-analytics-4/viewItemList/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewPromotion/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/viewPromotion/index.js +8 -2
- package/dist/destinations/google-analytics-4/viewPromotion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/generated-types.d.ts +2 -0
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js +31 -0
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.d.ts +2 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +31 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -1
- package/dist/destinations/klaviyo/orderCompleted/index.js +29 -12
- 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 +3 -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/linkedin-conversions/api/api.test.js +120 -0
- package/dist/destinations/linkedin-conversions/api/api.test.js.map +1 -1
- package/dist/destinations/linkedin-conversions/api/index.d.ts +4 -1
- package/dist/destinations/linkedin-conversions/api/index.js +118 -27
- package/dist/destinations/linkedin-conversions/api/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/streamConversion/generated-types.d.ts +4 -3
- package/dist/destinations/linkedin-conversions/streamConversion/index.js +12 -6
- package/dist/destinations/linkedin-conversions/streamConversion/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/types.d.ts +2 -0
- package/dist/destinations/marketo-static-lists/addToList/generated-types.d.ts +8 -1
- package/dist/destinations/marketo-static-lists/addToList/index.js +2 -1
- package/dist/destinations/marketo-static-lists/addToList/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/constants.js +2 -2
- package/dist/destinations/marketo-static-lists/constants.js.map +1 -1
- package/dist/destinations/marketo-static-lists/functions.d.ts +1 -0
- package/dist/destinations/marketo-static-lists/functions.js +30 -13
- package/dist/destinations/marketo-static-lists/functions.js.map +1 -1
- package/dist/destinations/marketo-static-lists/index.js +3 -2
- package/dist/destinations/marketo-static-lists/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/properties.d.ts +3 -1
- package/dist/destinations/marketo-static-lists/properties.js +88 -6
- package/dist/destinations/marketo-static-lists/properties.js.map +1 -1
- package/dist/destinations/marketo-static-lists/removeFromList/generated-types.d.ts +2 -1
- package/dist/destinations/marketo-static-lists/removeFromList/index.js +2 -1
- package/dist/destinations/marketo-static-lists/removeFromList/index.js.map +1 -1
- package/dist/destinations/mixpanel/utils.d.ts +13 -0
- package/dist/destinations/mixpanel/utils.js +117 -0
- package/dist/destinations/mixpanel/utils.js.map +1 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.d.ts +22 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.js +3 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/categoryView/index.d.ts +5 -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/movable-ink/conversion/index.d.ts +5 -0
- 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/schematic/trackEvent/generated-types.d.ts +1 -0
- package/dist/destinations/schematic/trackEvent/index.js +19 -3
- package/dist/destinations/schematic/trackEvent/index.js.map +1 -1
- package/dist/destinations/{tiktok-conversions → tiktok-offline-conversions/reportOfflineEvent}/formatter.js +11 -11
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.d.ts +3 -3
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js +305 -4
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.d.ts +4 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.js +3 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.js.map +1 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.d.ts +5 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.js +33 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.js.map +1 -0
- package/dist/destinations/yahoo-audiences/createSegment/generated-types.d.ts +6 -0
- package/dist/destinations/yahoo-audiences/createSegment/generated-types.js +3 -0
- package/dist/destinations/yahoo-audiences/createSegment/generated-types.js.map +1 -0
- package/dist/destinations/yahoo-audiences/createSegment/index.d.ts +5 -0
- package/dist/destinations/yahoo-audiences/createSegment/index.js +45 -0
- package/dist/destinations/yahoo-audiences/createSegment/index.js.map +1 -0
- package/dist/destinations/yahoo-audiences/utils.d.ts +4 -0
- package/dist/destinations/yahoo-audiences/utils.js +30 -0
- package/dist/destinations/yahoo-audiences/utils.js.map +1 -0
- package/package.json +1 -1
- package/dist/destinations/mixpanel/incrementProperties/__test__/__snapshots__/snapshot.test.js.snap +0 -18
- package/dist/destinations/tiktok-conversions/common_fields.d.ts +0 -2
- package/dist/destinations/tiktok-conversions/common_fields.js +0 -245
- package/dist/destinations/tiktok-conversions/common_fields.js.map +0 -1
- package/dist/destinations/tiktok-conversions/formatter.js.map +0 -1
- package/dist/destinations/tiktok-conversions/utils.d.ts +0 -4
- package/dist/destinations/tiktok-conversions/utils.js +0 -65
- package/dist/destinations/tiktok-conversions/utils.js.map +0 -1
- package/dist/destinations/tiktok-offline-conversions/utils.d.ts +0 -8
- package/dist/destinations/tiktok-offline-conversions/utils.js +0 -67
- package/dist/destinations/tiktok-offline-conversions/utils.js.map +0 -1
- package/dist/destinations/{tiktok-conversions → tiktok-offline-conversions/reportOfflineEvent}/formatter.d.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/sendCustomEvent/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA0E;AAG1E,sCAYkB;AAClB,uDAA8B;AAE9B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EAAE,4CAA4C;IACzD,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,eAAe,EAAf,wBAAe;QACf,UAAU,EAAV,mBAAU;QACV,OAAO,EAAP,gBAAO;QACP,YAAY,EAAZ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k: string]: unknown;
|
|
6
|
+
};
|
|
7
|
+
mapTemplateName?: string;
|
|
8
|
+
insertOnNoMatch?: boolean;
|
|
9
|
+
matchColumnName1?: string;
|
|
10
|
+
matchColumnName2?: string;
|
|
11
|
+
updateOnMatch: string;
|
|
12
|
+
enable_batching?: boolean;
|
|
13
|
+
batch_size?: number;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/responsys/asyncMergePetRecords/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const rsp_properties_1 = require("../rsp-properties");
|
|
4
|
+
const rsp_operations_1 = require("../rsp-operations");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Async Merge PET Records',
|
|
7
|
+
description: '',
|
|
8
|
+
defaultSubscription: 'type = "identify"',
|
|
9
|
+
fields: {
|
|
10
|
+
profileListName: {
|
|
11
|
+
label: 'List Name',
|
|
12
|
+
description: "Name of the profile extension table's parent profile list.",
|
|
13
|
+
type: 'string',
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
profileExtensionTable: {
|
|
17
|
+
label: 'Pet Name',
|
|
18
|
+
description: 'Name of the profile extension table.',
|
|
19
|
+
type: 'string',
|
|
20
|
+
required: true
|
|
21
|
+
},
|
|
22
|
+
userData: rsp_properties_1.userData,
|
|
23
|
+
mapTemplateName: {
|
|
24
|
+
label: 'Map Template Name',
|
|
25
|
+
description: 'The Map Template in Responsys that can be used to map Field Names of the Profile List to Column Names.',
|
|
26
|
+
type: 'string',
|
|
27
|
+
default: ''
|
|
28
|
+
},
|
|
29
|
+
insertOnNoMatch: {
|
|
30
|
+
label: 'Insert On No Match',
|
|
31
|
+
description: 'Indicates what should be done for records where a match is not found.',
|
|
32
|
+
type: 'boolean',
|
|
33
|
+
default: true
|
|
34
|
+
},
|
|
35
|
+
matchColumnName1: {
|
|
36
|
+
label: 'First Column Match',
|
|
37
|
+
description: 'First match column for determining whether an insert or update should occur.',
|
|
38
|
+
type: 'string',
|
|
39
|
+
choices: [
|
|
40
|
+
{ label: 'RIID_', value: 'RIID_' },
|
|
41
|
+
{ label: 'CUSTOMER_ID_', value: 'CUSTOMER_ID_' },
|
|
42
|
+
{ label: 'EMAIL_ADDRESS_', value: 'EMAIL_ADDRESS_' },
|
|
43
|
+
{ label: 'MOBILE_NUMBER_', value: 'MOBILE_NUMBER_' },
|
|
44
|
+
{ label: 'EMAIL_MD5_HASH_', value: 'EMAIL_MD5_HASH_' },
|
|
45
|
+
{ label: 'EMAIL_SHA256_HASH_', value: 'EMAIL_SHA256_HASH_' }
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
matchColumnName2: {
|
|
49
|
+
label: 'Second Column Match',
|
|
50
|
+
description: 'Second match column for determining whether an insert or update should occur.',
|
|
51
|
+
type: 'string',
|
|
52
|
+
choices: [
|
|
53
|
+
{ label: 'RIID_', value: 'RIID_' },
|
|
54
|
+
{ label: 'CUSTOMER_ID_', value: 'CUSTOMER_ID_' },
|
|
55
|
+
{ label: 'EMAIL_ADDRESS_', value: 'EMAIL_ADDRESS_' },
|
|
56
|
+
{ label: 'MOBILE_NUMBER_', value: 'MOBILE_NUMBER_' },
|
|
57
|
+
{ label: 'EMAIL_MD5_HASH_', value: 'EMAIL_MD5_HASH_' },
|
|
58
|
+
{ label: 'EMAIL_SHA256_HASH_', value: 'EMAIL_SHA256_HASH_' }
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
updateOnMatch: {
|
|
62
|
+
label: 'Update On Match',
|
|
63
|
+
description: 'Controls how the existing record should be updated.',
|
|
64
|
+
type: 'string',
|
|
65
|
+
required: true,
|
|
66
|
+
choices: [
|
|
67
|
+
{ label: 'Replace All', value: 'REPLACE_ALL' },
|
|
68
|
+
{ label: 'No Update', value: 'NO_UPDATE' }
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
enable_batching: rsp_properties_1.enable_batching,
|
|
72
|
+
batch_size: rsp_properties_1.batch_size
|
|
73
|
+
},
|
|
74
|
+
perform: async (request, { settings, payload }) => {
|
|
75
|
+
if (payload && payload.profileListName) {
|
|
76
|
+
const { profileListName, profileExtensionTable, insertOnNoMatch, matchColumnName1, matchColumnName2, updateOnMatch, userData, mapTemplateName } = payload;
|
|
77
|
+
const baseUrl = (settings.baseUrl?.startsWith('https://') ? settings.baseUrl : `https://${settings.baseUrl}`)?.replace(/\/$/, '');
|
|
78
|
+
const endpoint = `${baseUrl}/rest/asyncApi/v1.3/lists/${profileListName}/listExtensions/${profileExtensionTable}/members`;
|
|
79
|
+
const recordData = rsp_operations_1.buildRecordData(userData, mapTemplateName ?? '');
|
|
80
|
+
const requestBody = {
|
|
81
|
+
recordData: recordData,
|
|
82
|
+
insertOnNoMatch: !!insertOnNoMatch,
|
|
83
|
+
updateOnMatch: updateOnMatch || '',
|
|
84
|
+
matchColumnName1: matchColumnName1?.replace(/_+$/, '') || '',
|
|
85
|
+
matchColumnName2: matchColumnName2?.replace(/_+$/, '') || ''
|
|
86
|
+
};
|
|
87
|
+
return request(endpoint, {
|
|
88
|
+
method: 'POST',
|
|
89
|
+
body: JSON.stringify(requestBody)
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
performBatch: async (request, { settings, payload }) => {
|
|
94
|
+
const { profileListName, profileExtensionTable, insertOnNoMatch, matchColumnName1, matchColumnName2, updateOnMatch, mapTemplateName } = payload[0];
|
|
95
|
+
const payloadData = payload.map((obj) => obj.userData);
|
|
96
|
+
const recordData = rsp_operations_1.buildRecordData(payloadData, mapTemplateName ?? '');
|
|
97
|
+
const requestBody = {
|
|
98
|
+
recordData: recordData,
|
|
99
|
+
insertOnNoMatch: !!insertOnNoMatch,
|
|
100
|
+
updateOnMatch: updateOnMatch || '',
|
|
101
|
+
matchColumnName1: matchColumnName1?.replace(/_+$/, '') || '',
|
|
102
|
+
matchColumnName2: matchColumnName2?.replace(/_+$/, '') || ''
|
|
103
|
+
};
|
|
104
|
+
const baseUrl = (settings.baseUrl?.startsWith('https://') ? settings.baseUrl : `https://${settings.baseUrl}`)?.replace(/\/$/, '');
|
|
105
|
+
const endpoint = `${baseUrl}/rest/asyncApi/v1.3/lists/${profileListName}/listExtensions/${profileExtensionTable}/members`;
|
|
106
|
+
return await request(endpoint, {
|
|
107
|
+
method: 'POST',
|
|
108
|
+
body: JSON.stringify(requestBody)
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
exports.default = action;
|
|
113
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/responsys/asyncMergePetRecords/index.ts"],"names":[],"mappings":";;AAGA,sDAAyE;AAEzE,sDAAmD;AAEnD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,EAAE;IACf,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,eAAe,EAAE;YACf,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,4DAA4D;YACzE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,qBAAqB,EAAE;YACrB,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,sCAAsC;YACnD,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,QAAQ,EAAE,yBAAQ;QAClB,eAAe,EAAE;YACf,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EACT,wGAAwG;YAC1G,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;SACZ;QACD,eAAe,EAAE;YACf,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,uEAAuE;YACpF,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,IAAI;SACd;QACD,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@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
profileListName: string;
|
|
3
|
+
userData: {
|
|
4
|
+
[k: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
mapTemplateName?: string;
|
|
7
|
+
defaultPermissionStatus?: string;
|
|
8
|
+
htmlValue?: string;
|
|
9
|
+
insertOnNoMatch?: boolean;
|
|
10
|
+
matchColumnName1?: string;
|
|
11
|
+
matchColumnName2?: string;
|
|
12
|
+
matchOperator?: string;
|
|
13
|
+
optinValue?: string;
|
|
14
|
+
optoutValue?: string;
|
|
15
|
+
rejectRecordIfChannelEmpty?: string;
|
|
16
|
+
textValue?: string;
|
|
17
|
+
updateOnMatch: string;
|
|
18
|
+
enable_batching?: boolean;
|
|
19
|
+
batch_size?: number;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/responsys/asyncMergeProfileListMembers/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const rsp_properties_1 = require("../rsp-properties");
|
|
4
|
+
const rsp_operations_1 = require("../rsp-operations");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Async Merge Profile List Members',
|
|
7
|
+
description: 'Asynchronous Merge Profile List Members API',
|
|
8
|
+
fields: {
|
|
9
|
+
profileListName: {
|
|
10
|
+
label: 'List Name',
|
|
11
|
+
description: "Name of the profile extension table's parent profile list.",
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true
|
|
14
|
+
},
|
|
15
|
+
userData: rsp_properties_1.userData,
|
|
16
|
+
mapTemplateName: {
|
|
17
|
+
label: 'Map Template Name',
|
|
18
|
+
description: 'The Map Template in Responsys that can be used to map Field Names of the Profile List to Column Names.',
|
|
19
|
+
type: 'string',
|
|
20
|
+
default: ''
|
|
21
|
+
},
|
|
22
|
+
defaultPermissionStatus: {
|
|
23
|
+
label: 'Default Permission Status',
|
|
24
|
+
description: 'This value must be specified as either OPTIN or OPTOUT and would be applied to all of the records contained in the API call. If this value is not explicitly specified, then it is set to OPTOUT.',
|
|
25
|
+
type: 'string',
|
|
26
|
+
choices: [
|
|
27
|
+
{ label: 'Opt In', value: 'OPTIN' },
|
|
28
|
+
{ label: 'Opt Out', value: 'OPTOUT' }
|
|
29
|
+
],
|
|
30
|
+
default: 'OPTOUT'
|
|
31
|
+
},
|
|
32
|
+
htmlValue: {
|
|
33
|
+
label: 'Preferred Email Format',
|
|
34
|
+
description: "Value of incoming preferred email format data. For example, 'H' may represent a preference for HTML formatted email.",
|
|
35
|
+
type: 'string'
|
|
36
|
+
},
|
|
37
|
+
insertOnNoMatch: {
|
|
38
|
+
label: 'Insert On No Match',
|
|
39
|
+
description: 'Indicates what should be done for records where a match is not found.',
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
default: true
|
|
42
|
+
},
|
|
43
|
+
matchColumnName1: {
|
|
44
|
+
label: 'First Column Match',
|
|
45
|
+
description: 'First match column for determining whether an insert or update should occur.',
|
|
46
|
+
type: 'string',
|
|
47
|
+
choices: [
|
|
48
|
+
{ label: 'RIID_', value: 'RIID_' },
|
|
49
|
+
{ label: 'CUSTOMER_ID_', value: 'CUSTOMER_ID_' },
|
|
50
|
+
{ label: 'EMAIL_ADDRESS_', value: 'EMAIL_ADDRESS_' },
|
|
51
|
+
{ label: 'MOBILE_NUMBER_', value: 'MOBILE_NUMBER_' },
|
|
52
|
+
{ label: 'EMAIL_MD5_HASH_', value: 'EMAIL_MD5_HASH_' },
|
|
53
|
+
{ label: 'EMAIL_SHA256_HASH_', value: 'EMAIL_SHA256_HASH_' }
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
matchColumnName2: {
|
|
57
|
+
label: 'Second Column Match',
|
|
58
|
+
description: 'Second match column for determining whether an insert or update should occur.',
|
|
59
|
+
type: 'string',
|
|
60
|
+
choices: [
|
|
61
|
+
{ label: 'RIID_', value: 'RIID_' },
|
|
62
|
+
{ label: 'CUSTOMER_ID_', value: 'CUSTOMER_ID_' },
|
|
63
|
+
{ label: 'EMAIL_ADDRESS_', value: 'EMAIL_ADDRESS_' },
|
|
64
|
+
{ label: 'MOBILE_NUMBER_', value: 'MOBILE_NUMBER_' },
|
|
65
|
+
{ label: 'EMAIL_MD5_HASH_', value: 'EMAIL_MD5_HASH_' },
|
|
66
|
+
{ label: 'EMAIL_SHA256_HASH_', value: 'EMAIL_SHA256_HASH_' }
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
matchOperator: {
|
|
70
|
+
label: 'Match Operator',
|
|
71
|
+
description: 'Operator to join match column names.',
|
|
72
|
+
type: 'string',
|
|
73
|
+
choices: [
|
|
74
|
+
{ label: 'None', value: 'NONE' },
|
|
75
|
+
{ label: 'And', value: 'AND' }
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
optinValue: {
|
|
79
|
+
label: 'Optin Value',
|
|
80
|
+
description: "Value of incoming opt-in status data that represents an opt-in status. For example, 'I' may represent an opt-in status.",
|
|
81
|
+
type: 'string'
|
|
82
|
+
},
|
|
83
|
+
optoutValue: {
|
|
84
|
+
label: 'Optout Value',
|
|
85
|
+
description: "Value of incoming opt-out status data that represents an optout status. For example, '0' may represent an opt-out status.",
|
|
86
|
+
type: 'string'
|
|
87
|
+
},
|
|
88
|
+
rejectRecordIfChannelEmpty: {
|
|
89
|
+
label: 'Reject Record If Channel Empty',
|
|
90
|
+
description: "String containing comma-separated channel codes that if specified will result in record rejection when the channel address field is null. Channel codes are 'E' (Email), 'M' (Mobile), 'P' (Postal Code). For example 'E,M' would indicate that a record that has a null for Email or Mobile Number value should be rejected. This parameter can also be set to null or to an empty string, which will cause the validation to not be performed for any channel, except if the matchColumnName1 parameter is set to EMAIL_ADDRESS_ or MOBILE_NUMBER_. When matchColumnName1 is set to EMAIL_ADDRESS_ or MOBILE_NUMBER_, then the null or empty string setting is effectively ignored for that channel.",
|
|
91
|
+
type: 'string'
|
|
92
|
+
},
|
|
93
|
+
textValue: {
|
|
94
|
+
label: 'Text Value',
|
|
95
|
+
description: "Value of incoming preferred email format data. For example, 'T' may represent a preference for Text formatted email.",
|
|
96
|
+
type: 'string'
|
|
97
|
+
},
|
|
98
|
+
updateOnMatch: {
|
|
99
|
+
label: 'Update On Match',
|
|
100
|
+
description: 'Controls how the existing record should be updated.',
|
|
101
|
+
type: 'string',
|
|
102
|
+
required: true,
|
|
103
|
+
choices: [
|
|
104
|
+
{ label: 'Replace All', value: 'REPLACE_ALL' },
|
|
105
|
+
{ label: 'No Update', value: 'NO_UPDATE' }
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
enable_batching: rsp_properties_1.enable_batching,
|
|
109
|
+
batch_size: rsp_properties_1.batch_size
|
|
110
|
+
},
|
|
111
|
+
perform: async (request, { settings, payload, auth }) => {
|
|
112
|
+
if (payload && payload.profileListName) {
|
|
113
|
+
const { profileListName, defaultPermissionStatus, htmlValue, insertOnNoMatch, matchColumnName1, matchColumnName2, matchOperator, optinValue, optoutValue, rejectRecordIfChannelEmpty, textValue, updateOnMatch, userData, mapTemplateName } = payload;
|
|
114
|
+
const baseUrl = (settings.baseUrl?.startsWith('https://') ? settings.baseUrl : `https://${settings.baseUrl}`)?.replace(/\/$/, '');
|
|
115
|
+
const endpoint = `${baseUrl}/rest/asyncApi/v1.3/lists/${profileListName}/members`;
|
|
116
|
+
const recordData = rsp_operations_1.buildRecordData(userData, mapTemplateName ?? '');
|
|
117
|
+
const requestBody = {
|
|
118
|
+
recordData: recordData,
|
|
119
|
+
mergeRule: {
|
|
120
|
+
defaultPermissionStatus,
|
|
121
|
+
htmlValue,
|
|
122
|
+
insertOnNoMatch,
|
|
123
|
+
matchColumnName1,
|
|
124
|
+
matchColumnName2,
|
|
125
|
+
matchOperator,
|
|
126
|
+
optinValue,
|
|
127
|
+
optoutValue,
|
|
128
|
+
rejectRecordIfChannelEmpty,
|
|
129
|
+
textValue,
|
|
130
|
+
updateOnMatch
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
const token = auth?.accessToken ?? '';
|
|
134
|
+
const response = request(endpoint, {
|
|
135
|
+
method: 'POST',
|
|
136
|
+
headers: {
|
|
137
|
+
Authorization: token,
|
|
138
|
+
'Content-Type': 'application/json'
|
|
139
|
+
},
|
|
140
|
+
body: JSON.stringify(requestBody)
|
|
141
|
+
});
|
|
142
|
+
return response;
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
performBatch: async (request, { settings, payload }) => {
|
|
146
|
+
const { profileListName, defaultPermissionStatus, htmlValue, insertOnNoMatch, matchColumnName1, matchColumnName2, matchOperator, optinValue, optoutValue, rejectRecordIfChannelEmpty, textValue, updateOnMatch, mapTemplateName } = payload[0];
|
|
147
|
+
const payloadData = payload.map((obj) => obj.userData);
|
|
148
|
+
const recordData = rsp_operations_1.buildRecordData(payloadData, mapTemplateName ?? '');
|
|
149
|
+
const requestBody = {
|
|
150
|
+
recordData: recordData,
|
|
151
|
+
mergeRule: {
|
|
152
|
+
defaultPermissionStatus,
|
|
153
|
+
htmlValue,
|
|
154
|
+
insertOnNoMatch,
|
|
155
|
+
matchColumnName1,
|
|
156
|
+
matchColumnName2,
|
|
157
|
+
matchOperator,
|
|
158
|
+
optinValue,
|
|
159
|
+
optoutValue,
|
|
160
|
+
rejectRecordIfChannelEmpty,
|
|
161
|
+
textValue,
|
|
162
|
+
updateOnMatch
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
const baseUrl = (settings.baseUrl?.startsWith('https://') ? settings.baseUrl : `https://${settings.baseUrl}`)?.replace(/\/$/, '');
|
|
166
|
+
const endpoint = `${baseUrl}/rest/asyncApi/v1.3/lists/${profileListName}/members`;
|
|
167
|
+
return await request(endpoint, {
|
|
168
|
+
method: 'POST',
|
|
169
|
+
body: JSON.stringify(requestBody)
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
exports.default = action;
|
|
174
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/responsys/asyncMergeProfileListMembers/index.ts"],"names":[],"mappings":";;AAGA,sDAAyE;AAGzE,sDAAmD;AAEnD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kCAAkC;IACzC,WAAW,EAAE,6CAA6C;IAC1D,MAAM,EAAE;QACN,eAAe,EAAE;YACf,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,4DAA4D;YACzE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,QAAQ,EAAE,yBAAQ;QAClB,eAAe,EAAE;YACf,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EACT,wGAAwG;YAC1G,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;SACZ;QACD,uBAAuB,EAAE;YACvB,KAAK,EAAE,2BAA2B;YAClC,WAAW,EACT,mMAAmM;YACrM,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;gBACnC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE;aACtC;YACD,OAAO,EAAE,QAAQ;SAClB;QACD,SAAS,EAAE;YACT,KAAK,EAAE,wBAAwB;YAC/B,WAAW,EACT,sHAAsH;YACxH,IAAI,EAAE,QAAQ;SACf;QACD,eAAe,EAAE;YACf,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,uEAAuE;YACpF,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,IAAI;SACd;QACD,gBAAgB,EAAE;YAChB,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,8EAA8E;YAC3F,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAA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e;gBACf,gBAAgB;gBAChB,gBAAgB;gBAChB,aAAa;gBACb,UAAU;gBACV,WAAW;gBACX,0BAA0B;gBAC1B,SAAS;gBACT,aAAa;aACd;SACF,CAAA;QAKD,MAAM,OAAO,GAAG,CACd,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,QAAQ,CAAC,OAAO,EAAE,CAC5F,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QACrB,MAAM,QAAQ,GAAG,GAAG,OAAO,6BAA6B,eAAe,UAAU,CAAA;QAEjF,OAAO,MAAM,OAAO,CAAC,QAAQ,EAAE;YAC7B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;SAClC,CAAC,CAAA;IA0FJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Payload } from './asyncMergePetRecords/generated-types';
|
|
2
|
+
import { DynamicData, RecordData } from './types';
|
|
3
|
+
export declare const buildRecordData: (userData: DynamicData, mapTemplateName: string) => {
|
|
4
|
+
records: unknown[][];
|
|
5
|
+
fieldNames: string[];
|
|
6
|
+
mapTemplateName: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const buildRequestBodyPET: (payload: Payload, recordData: RecordData) => {
|
|
9
|
+
recordData: RecordData;
|
|
10
|
+
insertOnNoMatch: boolean | undefined;
|
|
11
|
+
updateOnMatch: string;
|
|
12
|
+
matchColumnName1: string;
|
|
13
|
+
matchColumnName2: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildRequestBodyPET = exports.buildRecordData = void 0;
|
|
4
|
+
const buildRecordData = (userData, mapTemplateName) => {
|
|
5
|
+
if (Array.isArray(userData)) {
|
|
6
|
+
const keysFromFirstObject = Object.keys(userData[0]);
|
|
7
|
+
return {
|
|
8
|
+
records: userData.map((record) => Object.values(record)),
|
|
9
|
+
fieldNames: keysFromFirstObject,
|
|
10
|
+
mapTemplateName: mapTemplateName || ''
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
const keysFromFirstObject = Object.keys(userData);
|
|
14
|
+
return {
|
|
15
|
+
records: [Object.values(userData)],
|
|
16
|
+
fieldNames: keysFromFirstObject,
|
|
17
|
+
mapTemplateName: mapTemplateName || ''
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
exports.buildRecordData = buildRecordData;
|
|
21
|
+
const buildRequestBodyPET = (payload, recordData) => {
|
|
22
|
+
const matchColumnName1 = payload.matchColumnName1 ? String(payload.matchColumnName1) : '';
|
|
23
|
+
const matchColumnName2 = payload.matchColumnName2 ? String(payload.matchColumnName2) : '';
|
|
24
|
+
return {
|
|
25
|
+
recordData: recordData,
|
|
26
|
+
insertOnNoMatch: payload.insertOnNoMatch,
|
|
27
|
+
updateOnMatch: payload.updateOnMatch,
|
|
28
|
+
matchColumnName1: matchColumnName1.replace(/_+$/, ''),
|
|
29
|
+
matchColumnName2: matchColumnName2.replace(/_+$/, '')
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
exports.buildRequestBodyPET = buildRequestBodyPET;
|
|
33
|
+
//# sourceMappingURL=rsp-operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rsp-operations.js","sourceRoot":"","sources":["../../../src/destinations/responsys/rsp-operations.ts"],"names":[],"mappings":";;;AAGO,MAAM,eAAe,GAAG,CAAC,QAAqB,EAAE,eAAuB,EAAE,EAAE;IAEhF,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;QAC3B,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;QACpD,OA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.userData = void 0;
|
|
4
|
+
exports.userData = {
|
|
5
|
+
label: 'Recepient Data',
|
|
6
|
+
description: 'Record data that represents Field Names and corresponding values for the recipient.',
|
|
7
|
+
type: 'object',
|
|
8
|
+
defaultObjectUI: 'keyvalue:only',
|
|
9
|
+
required: true,
|
|
10
|
+
default: { '@path': '$.' }
|
|
11
|
+
};
|
|
12
|
+
exports.enable_batching = {
|
|
13
|
+
label: 'Use Responsys Async API',
|
|
14
|
+
description: 'Once enabled, Segment will collect events into batches of 200 before sending to Responsys.',
|
|
15
|
+
type: 'boolean',
|
|
16
|
+
default: true,
|
|
17
|
+
unsafe_hidden: true
|
|
18
|
+
};
|
|
19
|
+
exports.batch_size = {
|
|
20
|
+
label: 'Batch Size',
|
|
21
|
+
description: 'Maximum number of events to include in each batch. Actual batch sizes may be lower.',
|
|
22
|
+
type: 'number',
|
|
23
|
+
required: false,
|
|
24
|
+
unsafe_hidden: true,
|
|
25
|
+
default: 200
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=rsp-properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rsp-properties.js","sourceRoot":"","sources":["../../../src/destinations/responsys/rsp-properties.ts"],"names":[],"mappings":";;;AAGa,QAAA,QAAQ,GAAe;IAClC,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,qFAAqF;IAClG,IAAI,EAAE,QAAQ;IACd,eAAe,EAAE,eAAe;IAChC,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;CAC3B,CAAA;AAEY,QAAA,eAAe,GAAe;IACzC,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,4FAA4F;IACzG,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,IAAI;IACb,aAAa,EAAE,IAAI;CACpB,CAAA;AAEY,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,qFAAqF;IAClG,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,aAAa,EAAE,IAAI;IACnB,OAAO,EAAE,GAAG;CACb,CAAA"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function snakeCase(str) {
|
|
4
|
+
const result = str.replace(/([A-Z])/g, '$1');
|
|
5
|
+
return result.split(' ').join('_').toLowerCase();
|
|
6
|
+
}
|
|
3
7
|
const action = {
|
|
4
8
|
title: 'Track Event',
|
|
5
9
|
description: 'Send track events to Schematic',
|
|
@@ -7,7 +11,7 @@ const action = {
|
|
|
7
11
|
fields: {
|
|
8
12
|
event_name: {
|
|
9
13
|
label: 'Event name',
|
|
10
|
-
description: 'Name of event',
|
|
14
|
+
description: 'Name of event (this will be snake cased in request)',
|
|
11
15
|
type: 'string',
|
|
12
16
|
required: true,
|
|
13
17
|
default: { '@path': '$.event' }
|
|
@@ -44,7 +48,19 @@ const action = {
|
|
|
44
48
|
description: 'Additional properties to send with event',
|
|
45
49
|
type: 'object',
|
|
46
50
|
defaultObjectUI: 'keyvalue',
|
|
47
|
-
required: false
|
|
51
|
+
required: false,
|
|
52
|
+
additionalProperties: true,
|
|
53
|
+
properties: {
|
|
54
|
+
raw_event_name: {
|
|
55
|
+
label: 'Raw Event Name',
|
|
56
|
+
description: 'Event name',
|
|
57
|
+
type: 'string',
|
|
58
|
+
required: false
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
default: {
|
|
62
|
+
raw_event_name: { '@path': '$.event' }
|
|
63
|
+
}
|
|
48
64
|
}
|
|
49
65
|
},
|
|
50
66
|
perform: (request, { settings, payload }) => {
|
|
@@ -56,7 +72,7 @@ const action = {
|
|
|
56
72
|
company: payload.company_keys,
|
|
57
73
|
user: payload.user_keys,
|
|
58
74
|
traits: payload.traits,
|
|
59
|
-
event: payload.event_name
|
|
75
|
+
event: snakeCase(payload.event_name)
|
|
60
76
|
},
|
|
61
77
|
event_type: 'track'
|
|
62
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/schematic/trackEvent/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,gCAAgC;IAC7C,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/schematic/trackEvent/index.ts"],"names":[],"mappings":";;AAIA,SAAS,SAAS,CAAC,GAAW;IAC5B,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;IAC5C,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAA;AAClD,CAAC;AAED,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,gCAAgC;IAC7C,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,qDAAqD;YAClE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;SAChC;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,0EAA0E;YACvF,IAAI,EAAE,QAAQ;YACd,eAAe,EAAE,UAAU;YAC3B,oBAAoB,EAAE,IAAI;YAC1B,QAAQ,EAAE,KAAK;SAChB;QACD,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,0EAA0E;YACvF,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,eAAe,E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"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.formatPhones = exports.formatUserIds = exports.formatEmails = void 0;
|
|
4
4
|
const crypto_1 = require("crypto");
|
|
5
5
|
const formatEmails = (email_addresses) => {
|
|
6
6
|
const result = [];
|
|
@@ -12,6 +12,16 @@ const formatEmails = (email_addresses) => {
|
|
|
12
12
|
return result;
|
|
13
13
|
};
|
|
14
14
|
exports.formatEmails = formatEmails;
|
|
15
|
+
function formatUserIds(userIds) {
|
|
16
|
+
const result = [];
|
|
17
|
+
if (userIds) {
|
|
18
|
+
userIds.forEach((userId) => {
|
|
19
|
+
result.push(hashAndEncode(userId.toLowerCase()));
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
exports.formatUserIds = formatUserIds;
|
|
15
25
|
const formatPhones = (phone_numbers) => {
|
|
16
26
|
const result = [];
|
|
17
27
|
if (!phone_numbers)
|
|
@@ -27,16 +37,6 @@ const formatPhones = (phone_numbers) => {
|
|
|
27
37
|
return result;
|
|
28
38
|
};
|
|
29
39
|
exports.formatPhones = formatPhones;
|
|
30
|
-
function formatUserIds(userIds) {
|
|
31
|
-
const result = [];
|
|
32
|
-
if (userIds) {
|
|
33
|
-
userIds.forEach((userId) => {
|
|
34
|
-
result.push(hashAndEncode(userId.toLowerCase()));
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
return result;
|
|
38
|
-
}
|
|
39
|
-
exports.formatUserIds = formatUserIds;
|
|
40
40
|
function hashAndEncode(property) {
|
|
41
41
|
return crypto_1.createHash('sha256').update(property).digest('hex');
|
|
42
42
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAK5B,MAAM,YAAY,GAAG,CAAC,eA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f,CAAC,CAAA;AAhBY,QAAA,YAAY,gBAgBxB;AAED,SAAS,aAAa,CAAC,QAAgB;IACrC,OAAO,mBAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC5D,CAAC"}
|
package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.d.ts
CHANGED
|
@@ -3,9 +3,7 @@ export interface Payload {
|
|
|
3
3
|
event_id?: string;
|
|
4
4
|
timestamp?: string;
|
|
5
5
|
phone_numbers?: string[];
|
|
6
|
-
|
|
7
|
-
order_id?: string;
|
|
8
|
-
shop_id?: string;
|
|
6
|
+
emails?: string[];
|
|
9
7
|
external_ids?: string[];
|
|
10
8
|
ttclid?: string;
|
|
11
9
|
ttp?: string;
|
|
@@ -28,6 +26,8 @@ export interface Payload {
|
|
|
28
26
|
value?: number;
|
|
29
27
|
description?: string;
|
|
30
28
|
query?: string;
|
|
29
|
+
order_id?: string;
|
|
30
|
+
shop_id?: string;
|
|
31
31
|
limited_data_use?: boolean;
|
|
32
32
|
test_event_code?: string;
|
|
33
33
|
}
|