@segment/action-destinations 3.252.0 → 3.253.0-staging-4e92a29a3
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/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/chartmogul/common_fields.d.ts +7 -0
- package/dist/destinations/chartmogul/common_fields.js +49 -0
- package/dist/destinations/chartmogul/common_fields.js.map +1 -0
- package/dist/destinations/chartmogul/generated-types.d.ts +3 -0
- package/dist/destinations/chartmogul/generated-types.js +3 -0
- package/dist/destinations/chartmogul/generated-types.js.map +1 -0
- package/dist/destinations/chartmogul/index.d.ts +4 -0
- package/dist/destinations/chartmogul/index.js +42 -0
- package/dist/destinations/chartmogul/index.js.map +1 -0
- package/dist/destinations/chartmogul/sendContact/generated-types.d.ts +20 -0
- package/dist/destinations/chartmogul/sendContact/generated-types.js +3 -0
- package/dist/destinations/chartmogul/sendContact/generated-types.js.map +1 -0
- package/dist/destinations/chartmogul/sendContact/index.d.ts +5 -0
- package/dist/destinations/chartmogul/sendContact/index.js +106 -0
- package/dist/destinations/chartmogul/sendContact/index.js.map +1 -0
- package/dist/destinations/chartmogul/sendCustomer/generated-types.d.ts +20 -0
- package/dist/destinations/chartmogul/sendCustomer/generated-types.js +3 -0
- package/dist/destinations/chartmogul/sendCustomer/generated-types.js.map +1 -0
- package/dist/destinations/chartmogul/sendCustomer/index.d.ts +5 -0
- package/dist/destinations/chartmogul/sendCustomer/index.js +102 -0
- package/dist/destinations/chartmogul/sendCustomer/index.js.map +1 -0
- package/dist/destinations/engage/sendgrid/Profile.d.ts +6 -0
- package/dist/destinations/engage/sendgrid/Profile.js +3 -0
- package/dist/destinations/engage/sendgrid/Profile.js.map +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +21 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +174 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js +19 -11
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +1 -1
- package/dist/destinations/engage/utils/track.d.ts +17 -17
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js +20 -2
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js.map +1 -1
- package/dist/destinations/index.js +4 -1
- package/dist/destinations/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 +5 -4
- package/dist/destinations/linkedin-conversions/api/api.test.js.map +1 -1
- package/dist/destinations/linkedin-conversions/api/index.d.ts +8 -6
- package/dist/destinations/linkedin-conversions/api/index.js +41 -10
- package/dist/destinations/linkedin-conversions/api/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/constants.d.ts +2 -0
- package/dist/destinations/linkedin-conversions/constants.js +11 -1
- package/dist/destinations/linkedin-conversions/constants.js.map +1 -1
- package/dist/destinations/linkedin-conversions/streamConversion/generated-types.d.ts +2 -2
- package/dist/destinations/linkedin-conversions/streamConversion/index.js +55 -66
- package/dist/destinations/linkedin-conversions/streamConversion/index.js.map +1 -1
- package/dist/destinations/mantle/config.d.ts +1 -0
- package/dist/destinations/mantle/config.js +5 -0
- package/dist/destinations/mantle/config.js.map +1 -0
- package/dist/destinations/mantle/generated-types.d.ts +4 -0
- package/dist/destinations/mantle/generated-types.js +3 -0
- package/dist/destinations/mantle/generated-types.js.map +1 -0
- package/dist/destinations/mantle/identify/generated-types.d.ts +9 -0
- package/dist/destinations/mantle/identify/generated-types.js +3 -0
- package/dist/destinations/mantle/identify/generated-types.js.map +1 -0
- package/dist/destinations/mantle/identify/index.d.ts +5 -0
- package/dist/destinations/mantle/identify/index.js +61 -0
- package/dist/destinations/mantle/identify/index.js.map +1 -0
- package/dist/destinations/mantle/index.d.ts +4 -0
- package/dist/destinations/mantle/index.js +50 -0
- package/dist/destinations/mantle/index.js.map +1 -0
- package/dist/destinations/mantle/pushEvent/generated-types.d.ts +9 -0
- package/dist/destinations/mantle/pushEvent/generated-types.js +3 -0
- package/dist/destinations/mantle/pushEvent/generated-types.js.map +1 -0
- package/dist/destinations/mantle/pushEvent/index.d.ts +5 -0
- package/dist/destinations/mantle/pushEvent/index.js +74 -0
- package/dist/destinations/mantle/pushEvent/index.js.map +1 -0
- package/dist/destinations/marketo-static-lists/addToList/generated-types.d.ts +13 -4
- package/dist/destinations/marketo-static-lists/addToList/index.js +69 -2
- package/dist/destinations/marketo-static-lists/addToList/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/constants.d.ts +10 -3
- package/dist/destinations/marketo-static-lists/constants.js +2 -14
- package/dist/destinations/marketo-static-lists/constants.js.map +1 -1
- package/dist/destinations/marketo-static-lists/functions.d.ts +18 -1
- package/dist/destinations/marketo-static-lists/functions.js +88 -1
- package/dist/destinations/marketo-static-lists/functions.js.map +1 -1
- package/dist/destinations/marketo-static-lists/index.js +4 -42
- package/dist/destinations/marketo-static-lists/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/properties.js +2 -39
- package/dist/destinations/marketo-static-lists/properties.js.map +1 -1
- package/dist/destinations/marketo-static-lists/removeFromList/generated-types.d.ts +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/index.js +0 -12
- package/dist/destinations/responsys/index.js.map +1 -1
- 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/responsys/sendAudience/generated-types.d.ts +1 -0
- package/dist/destinations/responsys/sendAudience/index.js +12 -5
- package/dist/destinations/responsys/sendAudience/index.js.map +1 -1
- package/dist/destinations/responsys/sendCustomTraits/generated-types.d.ts +1 -0
- package/dist/destinations/responsys/sendCustomTraits/index.js +12 -5
- package/dist/destinations/responsys/sendCustomTraits/index.js.map +1 -1
- package/dist/destinations/responsys/upsertListMember/generated-types.d.ts +1 -0
- package/dist/destinations/responsys/upsertListMember/index.js +8 -1
- package/dist/destinations/responsys/upsertListMember/index.js.map +1 -1
- package/dist/destinations/responsys/utils.d.ts +3 -2
- package/dist/destinations/responsys/utils.js +23 -6
- package/dist/destinations/responsys/utils.js.map +1 -1
- package/dist/destinations/responsys-cloud/generated-types.d.ts +20 -0
- package/dist/destinations/responsys-cloud/generated-types.js +3 -0
- package/dist/destinations/responsys-cloud/generated-types.js.map +1 -0
- package/dist/destinations/responsys-cloud/index.d.ts +4 -0
- package/dist/destinations/responsys-cloud/index.js +207 -0
- package/dist/destinations/responsys-cloud/index.js.map +1 -0
- package/dist/destinations/responsys-cloud/sendAudience/generated-types.d.ts +16 -0
- package/dist/destinations/responsys-cloud/sendAudience/generated-types.js +3 -0
- package/dist/destinations/responsys-cloud/sendAudience/generated-types.js.map +1 -0
- package/dist/destinations/responsys-cloud/sendAudience/index.d.ts +5 -0
- package/dist/destinations/responsys-cloud/sendAudience/index.js +109 -0
- package/dist/destinations/responsys-cloud/sendAudience/index.js.map +1 -0
- package/dist/destinations/responsys-cloud/sendCustomTraits/generated-types.d.ts +11 -0
- package/dist/destinations/responsys-cloud/sendCustomTraits/generated-types.js +3 -0
- package/dist/destinations/responsys-cloud/sendCustomTraits/generated-types.js.map +1 -0
- package/dist/destinations/responsys-cloud/sendCustomTraits/index.d.ts +5 -0
- package/dist/destinations/responsys-cloud/sendCustomTraits/index.js +72 -0
- package/dist/destinations/responsys-cloud/sendCustomTraits/index.js.map +1 -0
- package/dist/destinations/responsys-cloud/shared_properties.d.ts +3 -0
- package/dist/destinations/responsys-cloud/shared_properties.js +19 -0
- package/dist/destinations/responsys-cloud/shared_properties.js.map +1 -0
- package/dist/destinations/responsys-cloud/types.d.ts +38 -0
- package/dist/destinations/responsys-cloud/types.js +3 -0
- package/dist/destinations/responsys-cloud/types.js.map +1 -0
- package/dist/destinations/responsys-cloud/upsertListMember/generated-types.d.ts +14 -0
- package/dist/destinations/responsys-cloud/upsertListMember/generated-types.js +3 -0
- package/dist/destinations/responsys-cloud/upsertListMember/generated-types.js.map +1 -0
- package/dist/destinations/responsys-cloud/upsertListMember/index.d.ts +5 -0
- package/dist/destinations/responsys-cloud/upsertListMember/index.js +85 -0
- package/dist/destinations/responsys-cloud/upsertListMember/index.js.map +1 -0
- package/dist/destinations/responsys-cloud/utils.d.ts +20 -0
- package/dist/destinations/responsys-cloud/utils.js +179 -0
- package/dist/destinations/responsys-cloud/utils.js.map +1 -0
- package/dist/destinations/ripe/index.js +1 -1
- package/dist/destinations/ripe/index.js.map +1 -1
- package/dist/destinations/schematic/identifyUser/generated-types.d.ts +2 -1
- package/dist/destinations/schematic/identifyUser/index.js +19 -10
- package/dist/destinations/schematic/identifyUser/index.js.map +1 -1
- package/dist/destinations/schematic/trackEvent/generated-types.d.ts +1 -0
- package/dist/destinations/schematic/trackEvent/index.js +14 -5
- package/dist/destinations/schematic/trackEvent/index.js.map +1 -1
- package/dist/destinations/segment/segment-properties.js +3 -2
- package/dist/destinations/segment/segment-properties.js.map +1 -1
- package/dist/destinations/segment-profiles/sendTrack/generated-types.d.ts +11 -0
- package/dist/destinations/segment-profiles/sendTrack/generated-types.js +3 -0
- package/dist/destinations/segment-profiles/sendTrack/generated-types.js.map +1 -0
- package/dist/destinations/segment-profiles/sendTrack/index.d.ts +5 -0
- package/dist/destinations/segment-profiles/sendTrack/index.js +42 -0
- package/dist/destinations/segment-profiles/sendTrack/index.js.map +1 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js +1 -1
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js.map +1 -1
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v3.js +14 -3
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v3.js.map +1 -1
- package/dist/destinations/stackadapt/forwardEvent/index.js +10 -9
- package/dist/destinations/stackadapt/forwardEvent/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +3 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +43 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +1 -0
- package/dist/destinations/trackey/group.types.d.ts +11 -0
- package/dist/destinations/trackey/group.types.js +3 -0
- package/dist/destinations/trackey/group.types.js.map +1 -0
- package/dist/destinations/trackey/identify.types.d.ts +11 -0
- package/dist/destinations/trackey/identify.types.js +3 -0
- package/dist/destinations/trackey/identify.types.js.map +1 -0
- package/dist/destinations/trackey/track.types.d.ts +12 -0
- package/dist/destinations/trackey/track.types.js +3 -0
- package/dist/destinations/trackey/track.types.js.map +1 -0
- package/dist/destinations/yahoo-audiences/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/dist/destinations/yotpo/generated-types.d.ts +3 -0
- package/dist/destinations/yotpo/generated-types.js +3 -0
- package/dist/destinations/yotpo/generated-types.js.map +1 -0
- package/dist/destinations/yotpo/index.d.ts +4 -0
- package/dist/destinations/yotpo/index.js +53 -0
- package/dist/destinations/yotpo/index.js.map +1 -0
- package/dist/destinations/yotpo/sendData/generated-types.d.ts +5 -0
- package/dist/destinations/yotpo/sendData/generated-types.js +3 -0
- package/dist/destinations/yotpo/sendData/generated-types.js.map +1 -0
- package/dist/destinations/yotpo/sendData/index.d.ts +5 -0
- package/dist/destinations/yotpo/sendData/index.js +22 -0
- package/dist/destinations/yotpo/sendData/index.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const config_1 = require("../config");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Identify',
|
|
6
|
+
description: 'Identify (create or update) a customer for your app in Mantle, including any additional information about the customer',
|
|
7
|
+
defaultSubscription: 'type = "identify"',
|
|
8
|
+
fields: {
|
|
9
|
+
platformId: {
|
|
10
|
+
label: 'Shopify Shop ID',
|
|
11
|
+
description: 'The unique identifier for the Shopify shop. This is used to associate the customer with a Shopify shop in Mantle',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true
|
|
14
|
+
},
|
|
15
|
+
myshopifyDomain: {
|
|
16
|
+
label: 'Shopify Shop Domain',
|
|
17
|
+
description: 'The unique .myshopify.com domain of the Shopify shop. This is used to associate the customer with a Shopify shop in Mantle',
|
|
18
|
+
type: 'string',
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
name: {
|
|
22
|
+
label: 'Name',
|
|
23
|
+
description: 'The name of the customer / shop',
|
|
24
|
+
type: 'string',
|
|
25
|
+
required: false,
|
|
26
|
+
default: { '@path': '$.traits.name' }
|
|
27
|
+
},
|
|
28
|
+
email: {
|
|
29
|
+
label: 'Email',
|
|
30
|
+
description: 'The email of the customer',
|
|
31
|
+
type: 'string',
|
|
32
|
+
required: false,
|
|
33
|
+
default: { '@path': '$.traits.email' }
|
|
34
|
+
},
|
|
35
|
+
customFields: {
|
|
36
|
+
label: 'Custom Fields',
|
|
37
|
+
description: 'The custom fields of the customer / shop',
|
|
38
|
+
type: 'object',
|
|
39
|
+
required: false,
|
|
40
|
+
defaultObjectUI: 'keyvalue',
|
|
41
|
+
default: {
|
|
42
|
+
'@path': '$.traits.custom_fields'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
perform: (request, data) => {
|
|
47
|
+
return request(`${config_1.API_URL}/identify`, {
|
|
48
|
+
method: 'post',
|
|
49
|
+
json: {
|
|
50
|
+
platform: 'shopify',
|
|
51
|
+
platformId: data.payload.platformId,
|
|
52
|
+
myshopifyDomain: data.payload.myshopifyDomain,
|
|
53
|
+
name: data.payload.name,
|
|
54
|
+
email: data.payload.email,
|
|
55
|
+
...(data.payload.customFields ? { customFields: data.payload.customFields } : {})
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
exports.default = action;
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mantle/identify/index.ts"],"names":[],"mappings":";;AAIA,sCAAmC;AAEnC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,UAAU;IAC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GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAClF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 pushEvent_1 = __importDefault(require("./pushEvent"));
|
|
7
|
+
const identify_1 = __importDefault(require("./identify"));
|
|
8
|
+
const config_1 = require("./config");
|
|
9
|
+
const destination = {
|
|
10
|
+
name: 'Mantle (Actions)',
|
|
11
|
+
description: 'Track important revenue metrics for your Shopify apps. Manage plans and pricing. Improve customer relationships. Focus on growing your business.',
|
|
12
|
+
slug: 'actions-mantle',
|
|
13
|
+
mode: 'cloud',
|
|
14
|
+
authentication: {
|
|
15
|
+
scheme: 'custom',
|
|
16
|
+
fields: {
|
|
17
|
+
appId: {
|
|
18
|
+
label: 'App ID',
|
|
19
|
+
description: 'The unique identifier for the app in Mantle. Get this from the API Keys section for your app in Mantle.',
|
|
20
|
+
type: 'string',
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
apiKey: {
|
|
24
|
+
label: 'API Key',
|
|
25
|
+
description: 'The API key for the app in Mantle. Get this from the API Keys section for your app in Mantle.',
|
|
26
|
+
type: 'string',
|
|
27
|
+
required: true
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
testAuthentication: (request) => {
|
|
31
|
+
return request(`${config_1.API_URL}/app`, {
|
|
32
|
+
method: 'GET'
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
extendRequest: ({ settings }) => {
|
|
37
|
+
return {
|
|
38
|
+
headers: {
|
|
39
|
+
'x-mantle-app-id': settings.appId,
|
|
40
|
+
'x-mantle-app-api-key': settings.apiKey
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
actions: {
|
|
45
|
+
pushEvent: pushEvent_1.default,
|
|
46
|
+
identify: identify_1.default
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
exports.default = destination;
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/mantle/index.ts"],"names":[],"mappings":";;;;;AAGA,4DAAmC;AACnC,0DAAiC;AACjC,qCAAkC;AAElC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,kBAAkB;IACxB,WAAW,EACT,kJAAkJ;IACpJ,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,KAAK,EAAE;gBACL,KAAK,EAAE,QAAQ;gBACf,WAAW,EACT,yGAAyG;gBAC3G,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,+FAA+F;gBAC5G,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;YAC9B,OAAO,OAAO,CAAC,GAAG,gBAAO,MAAM,EAAE;gBAC/B,MAAM,EAAE,KAAK;aACd,CAAC,CAAA;QACJ,CAAC;KACF;IAED,aAAa,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC9B,OAAO;YACL,OAAO,EAAE;gBACP,iBAAiB,EAAE,QAAQ,CAAC,KAAK;gBACjC,sBAAsB,EAAE,QAAQ,CAAC,MAAM;aACxC;SACF,CAAA;IACH,CAAC;IAED,OAAO,EAAE;QACP,SAAS,EAAT,mBAAS;QACT,QAAQ,EAAR,kBAAQ;KACT;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/mantle/pushEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const config_1 = require("../config");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Push Event',
|
|
6
|
+
description: 'Push event to your app in Mantle',
|
|
7
|
+
defaultSubscription: 'type = "track"',
|
|
8
|
+
fields: {
|
|
9
|
+
eventName: {
|
|
10
|
+
label: 'Event Name',
|
|
11
|
+
description: 'The name of the event you want to push to Mantle',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
default: { '@path': '$.event' }
|
|
15
|
+
},
|
|
16
|
+
eventId: {
|
|
17
|
+
label: 'Event ID',
|
|
18
|
+
description: 'The unique identifier for the event. This is used to deduplicate events in Mantle',
|
|
19
|
+
type: 'string',
|
|
20
|
+
required: false,
|
|
21
|
+
default: { '@path': '$.messageId' }
|
|
22
|
+
},
|
|
23
|
+
customerId: {
|
|
24
|
+
label: 'Customer ID',
|
|
25
|
+
description: 'The unique identifier for the customer. This is used to associate the event with a customer in Mantle. It can be the internal customer ID, API token, Shopify shop ID, or Shopify shop domain',
|
|
26
|
+
type: 'string',
|
|
27
|
+
required: true
|
|
28
|
+
},
|
|
29
|
+
properties: {
|
|
30
|
+
label: 'Event Properties',
|
|
31
|
+
description: 'The properties of the event. This is the extra data you want to attach to the event',
|
|
32
|
+
type: 'object',
|
|
33
|
+
required: false,
|
|
34
|
+
default: { '@path': '$.properties' }
|
|
35
|
+
},
|
|
36
|
+
timestamp: {
|
|
37
|
+
label: 'Event timestamp',
|
|
38
|
+
description: 'The timestamp of the event, defaults to the current time',
|
|
39
|
+
type: 'datetime',
|
|
40
|
+
required: false,
|
|
41
|
+
default: { '@path': '$.timestamp' }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
perform: (request, data) => {
|
|
45
|
+
const payload = {
|
|
46
|
+
event_name: data.payload.eventName,
|
|
47
|
+
...(data.payload.eventId ? { event_id: data.payload.eventId } : {}),
|
|
48
|
+
customerId: data.payload.customerId,
|
|
49
|
+
properties: data.payload.properties || {},
|
|
50
|
+
...(data.payload.timestamp ? { timestamp: data.payload.timestamp } : {})
|
|
51
|
+
};
|
|
52
|
+
return request(`${config_1.API_URL}/usage_events`, {
|
|
53
|
+
method: 'post',
|
|
54
|
+
json: payload
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
performBatch: (request, data) => {
|
|
58
|
+
const events = data.payload.map((payload) => ({
|
|
59
|
+
event_name: payload.eventName,
|
|
60
|
+
...(payload.eventId ? { event_id: payload.eventId } : {}),
|
|
61
|
+
customerId: payload.customerId,
|
|
62
|
+
properties: payload.properties || {},
|
|
63
|
+
...(payload.timestamp ? { timestamp: payload.timestamp } : {})
|
|
64
|
+
}));
|
|
65
|
+
return request(`${config_1.API_URL}/usage_events`, {
|
|
66
|
+
method: 'post',
|
|
67
|
+
json: {
|
|
68
|
+
events
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
exports.default = action;
|
|
74
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mantle/pushEvent/index.ts"],"names":[],"mappings":";;AAIA,sCAAmC;AAEnC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,kCAAkC;IAC/C,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,SAAS,EAAE;YACT,KAAK,EAAE,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EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACzE,CAAA;QACD,OAAO,OAAO,CAAC,GAAG,gBAAO,eAAe,EAAE;YACxC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO;SACd,CAAC,CAAA;IACJ,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAC5C,UAAU,EAAE,OAAO,CAAC,SAAS;YAC7B,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACzD,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,EAAE;YACpC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC/D,CAAC,CAAC,CAAA;QACH,OAAO,OAAO,CAAC,GAAG,gBAAO,eAAe,EAAE;YACxC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,MAAM;aACP;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
|
-
external_id
|
|
2
|
+
external_id?: string;
|
|
3
3
|
lookup_field: string;
|
|
4
4
|
data: {
|
|
5
5
|
email?: string;
|
|
6
|
-
firstName?: string;
|
|
7
|
-
lastName?: string;
|
|
8
|
-
phone?: string;
|
|
9
6
|
[k: string]: unknown;
|
|
10
7
|
};
|
|
11
8
|
enable_batching: boolean;
|
|
12
9
|
batch_size: number;
|
|
13
10
|
event_name: string;
|
|
14
11
|
}
|
|
12
|
+
export interface HookBundle {
|
|
13
|
+
retlOnMappingSave: {
|
|
14
|
+
inputs?: {
|
|
15
|
+
list_id?: string;
|
|
16
|
+
list_name?: string;
|
|
17
|
+
};
|
|
18
|
+
outputs?: {
|
|
19
|
+
id?: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -14,12 +14,79 @@ const action = {
|
|
|
14
14
|
batch_size: { ...properties_1.batch_size },
|
|
15
15
|
event_name: { ...properties_1.event_name }
|
|
16
16
|
},
|
|
17
|
-
|
|
17
|
+
hooks: {
|
|
18
|
+
retlOnMappingSave: {
|
|
19
|
+
label: 'Create a new static list in Marketo',
|
|
20
|
+
description: 'When saving this mapping, we will create a static list in Marketo using the fields you provided.',
|
|
21
|
+
inputFields: {
|
|
22
|
+
list_id: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
label: 'List ID',
|
|
25
|
+
description: 'The ID of the Marketo Static List that users will be synced to. If defined, we will not create a new list.',
|
|
26
|
+
required: false
|
|
27
|
+
},
|
|
28
|
+
list_name: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
label: 'List Name',
|
|
31
|
+
description: 'The name of the Marketo Static List that you would like to create.',
|
|
32
|
+
required: false
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
outputTypes: {
|
|
36
|
+
id: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
label: 'ID',
|
|
39
|
+
description: 'The ID of the created Marketo Static List that users will be synced to.',
|
|
40
|
+
required: false
|
|
41
|
+
},
|
|
42
|
+
name: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
label: 'List Name',
|
|
45
|
+
description: 'The name of the created Marketo Static List that users will be synced to.',
|
|
46
|
+
required: false
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
performHook: async (request, { settings, hookInputs, statsContext }) => {
|
|
50
|
+
if (hookInputs.list_id) {
|
|
51
|
+
return functions_1.getList(request, settings, hookInputs.list_id);
|
|
52
|
+
}
|
|
53
|
+
try {
|
|
54
|
+
const input = {
|
|
55
|
+
audienceName: hookInputs.list_name,
|
|
56
|
+
settings: settings
|
|
57
|
+
};
|
|
58
|
+
const listId = await functions_1.createList(request, input, statsContext);
|
|
59
|
+
return {
|
|
60
|
+
successMessage: `List ${listId} created successfully!`,
|
|
61
|
+
savedData: {
|
|
62
|
+
id: listId,
|
|
63
|
+
name: hookInputs.list_name
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
catch (e) {
|
|
68
|
+
return {
|
|
69
|
+
error: {
|
|
70
|
+
message: 'Failed to create list',
|
|
71
|
+
code: 'CREATE_LIST_FAILURE'
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
perform: async (request, { settings, payload, statsContext, hookOutputs }) => {
|
|
18
79
|
statsContext?.statsClient?.incr('addToAudience', 1, statsContext?.tags);
|
|
80
|
+
if (hookOutputs?.retlOnMappingSave?.outputs.id) {
|
|
81
|
+
payload.external_id = hookOutputs?.retlOnMappingSave?.outputs.id;
|
|
82
|
+
}
|
|
19
83
|
return functions_1.addToList(request, settings, [payload], statsContext);
|
|
20
84
|
},
|
|
21
|
-
performBatch: async (request, { settings, payload, statsContext }) => {
|
|
85
|
+
performBatch: async (request, { settings, payload, statsContext, hookOutputs }) => {
|
|
22
86
|
statsContext?.statsClient?.incr('addToAudience.batch', 1, statsContext?.tags);
|
|
87
|
+
if (hookOutputs?.retlOnMappingSave?.outputs.new_list_id) {
|
|
88
|
+
payload[0].external_id = hookOutputs?.retlOnMappingSave?.outputs.new_list_id;
|
|
89
|
+
}
|
|
23
90
|
return functions_1.addToList(request, settings, payload, statsContext);
|
|
24
91
|
}
|
|
25
92
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/marketo-static-lists/addToList/index.ts"],"names":[],"mappings":";;AAGA,8CAAwG;AACxG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/marketo-static-lists/addToList/index.ts"],"names":[],"mappings":";;AAGA,8CAAwG;AACxG,4CAA6D;AAE7D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,yDAAyD;IACtE,mBAAmB,EAAE,4BAA4B;IACjD,MAAM,EAAE;QACN,WAAW,EAAE,EAAE,GAAG,wBAAW,EAAE;QAC/B,YAAY,EAAE,EAAE,GAAG,yBAAY,EAAE;QACjC,IAAI,EAAE,EAAE,GAAG,iBAAI,EAAE;QACjB,eAAe,EAAE,EAAE,GAAG,4BAAe,EAAE;QACvC,UAAU,EAAE,EAAE,GAAG,uBAAU,EAAE;QAC7B,UAAU,EAAE,EAAE,GAAG,uBAAU,EAAE;KAC9B;IACD,KAAK,EAAE;QACL,iBAAiB,EAAE;YACjB,KAAK,EAAE,qCAAqC;YAC5C,WAAW,EAAE,kGAAkG;YAC/G,WAAW,EAAE;gBACX,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,SAAS;oBAChB,WAAW,EACT,4GAA4G;oBAC9G,QAAQ,EAAE,KAAK;iBAChB;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,WAAW;oBAClB,WAAW,EAAE,oEAAoE;oBACjF,QAAQ,EAAE,KAAK;iBAChB;aACF;YACD,WAAW,EAAE;gBACX,EAAE,EAAE;oBACF,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,IAAI;oBACX,WAAW,EAAE,yEAAyE;oBACtF,QAAQ,EAAE,KAAK;iBAChB;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,WAAW;oBAClB,WAAW,EAAE,2EAA2E;oBACxF,QAAQ,EAAE,KAAK;iBAChB;aACF;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AO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,EAAE;QAChF,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,qBAAqB,EAAE,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,CAAA;QAE7E,IAAI,WAAW,EAAE,iBAAiB,EAAE,OAAO,CAAC,WAAW,EAAE;YACvD,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,WAAW,EAAE,iBAAiB,EAAE,OAAO,CAAC,WAAW,CAAA;SAC7E;QACD,OAAO,qBAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,CAAC,CAAA;IAC5D,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { Settings } from './generated-types';
|
|
1
|
+
export declare const OAUTH_ENDPOINT = "identity/oauth/token";
|
|
3
2
|
export declare const GET_FOLDER_ENDPOINT: string;
|
|
4
3
|
export declare const CREATE_LIST_ENDPOINT: string;
|
|
5
4
|
export declare const GET_LIST_ENDPOINT: string;
|
|
@@ -56,4 +55,12 @@ export interface MarketoLeads {
|
|
|
56
55
|
updatedAt: string;
|
|
57
56
|
createdAt: string;
|
|
58
57
|
}
|
|
59
|
-
export
|
|
58
|
+
export interface CreateListInput {
|
|
59
|
+
audienceName: string;
|
|
60
|
+
settings: {
|
|
61
|
+
client_id: string;
|
|
62
|
+
client_secret: string;
|
|
63
|
+
api_endpoint: string;
|
|
64
|
+
folder_name: string;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.CSV_LIMIT = exports.REMOVE_USERS_ENDPOINT = exports.GET_LEADS_ENDPOINT = exports.BULK_IMPORT_ENDPOINT = exports.GET_LIST_ENDPOINT = exports.CREATE_LIST_ENDPOINT = exports.GET_FOLDER_ENDPOINT = exports.OAUTH_ENDPOINT = void 0;
|
|
4
4
|
const API_VERSION = 'v1';
|
|
5
|
-
|
|
5
|
+
exports.OAUTH_ENDPOINT = 'identity/oauth/token';
|
|
6
6
|
exports.GET_FOLDER_ENDPOINT = `/rest/asset/${API_VERSION}/folder/byName.json?name=folderName`;
|
|
7
7
|
exports.CREATE_LIST_ENDPOINT = `/rest/asset/${API_VERSION}/staticLists.json?folder=folderId&name=listName`;
|
|
8
8
|
exports.GET_LIST_ENDPOINT = `/rest/asset/${API_VERSION}/staticList/listId.json`;
|
|
@@ -10,16 +10,4 @@ exports.BULK_IMPORT_ENDPOINT = `/bulk/${API_VERSION}/leads.json?format=csv&listI
|
|
|
10
10
|
exports.GET_LEADS_ENDPOINT = `/rest/${API_VERSION}/leads.json?filterType=field&filterValues=emailsToFilter`;
|
|
11
11
|
exports.REMOVE_USERS_ENDPOINT = `/rest/${API_VERSION}/lists/listId/leads.json?id=idsToDelete`;
|
|
12
12
|
exports.CSV_LIMIT = 10000000;
|
|
13
|
-
async function getAccessToken(request, settings) {
|
|
14
|
-
const res = await request(`${settings.api_endpoint}/${OAUTH_ENDPOINT}`, {
|
|
15
|
-
method: 'POST',
|
|
16
|
-
body: new URLSearchParams({
|
|
17
|
-
client_id: settings.client_id,
|
|
18
|
-
client_secret: settings.client_secret,
|
|
19
|
-
grant_type: 'client_credentials'
|
|
20
|
-
})
|
|
21
|
-
});
|
|
22
|
-
return res.data.access_token;
|
|
23
|
-
}
|
|
24
|
-
exports.getAccessToken = getAccessToken;
|
|
25
13
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/destinations/marketo-static-lists/constants.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/destinations/marketo-static-lists/constants.ts"],"names":[],"mappings":";;;AAAA,MAAM,WAAW,GAAG,IAAI,CAAA;AACX,QAAA,cAAc,GAAG,sBAAsB,CAAA;AACvC,QAAA,mBAAmB,GAAG,eAAe,WAAW,qCAAqC,CAAA;AACrF,QAAA,oBAAoB,GAAG,eAAe,WAAW,iDAAiD,CAAA;AAClG,QAAA,iBAAiB,GAAG,eAAe,WAAW,yBAAyB,CAAA;AACvE,QAAA,oBAAoB,GAAG,SAAS,WAAW,oEAAoE,CAAA;AAC/G,QAAA,kBAAkB,GAAG,SAAS,WAAW,0DAA0D,CAAA;AACnG,QAAA,qBAAqB,GAAG,SAAS,WAAW,yCAAyC,CAAA;AAErF,QAAA,SAAS,GAAG,QAAQ,CAAA"}
|
|
@@ -2,7 +2,24 @@ import { RequestClient, StatsContext } from '@segment/actions-core';
|
|
|
2
2
|
import { Settings } from './generated-types';
|
|
3
3
|
import { Payload as AddToListPayload } from './addToList/generated-types';
|
|
4
4
|
import { Payload as RemoveFromListPayload } from './removeFromList/generated-types';
|
|
5
|
-
import { MarketoBulkImportResponse, MarketoDeleteLeadsResponse } from './constants';
|
|
5
|
+
import { MarketoBulkImportResponse, MarketoDeleteLeadsResponse, CreateListInput } from './constants';
|
|
6
6
|
export declare function formatEndpoint(endpoint: string): string;
|
|
7
7
|
export declare function addToList(request: RequestClient, settings: Settings, payloads: AddToListPayload[], statsContext?: StatsContext): Promise<MarketoBulkImportResponse>;
|
|
8
8
|
export declare function removeFromList(request: RequestClient, settings: Settings, payloads: RemoveFromListPayload[], statsContext?: StatsContext): Promise<MarketoDeleteLeadsResponse>;
|
|
9
|
+
export declare function getAccessToken(request: RequestClient, settings: Settings): Promise<string>;
|
|
10
|
+
export declare function getList(request: RequestClient, settings: Settings, id: string): Promise<{
|
|
11
|
+
error: {
|
|
12
|
+
message: string;
|
|
13
|
+
code: string;
|
|
14
|
+
};
|
|
15
|
+
successMessage?: undefined;
|
|
16
|
+
savedData?: undefined;
|
|
17
|
+
} | {
|
|
18
|
+
successMessage: string;
|
|
19
|
+
savedData: {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
};
|
|
23
|
+
error?: undefined;
|
|
24
|
+
}>;
|
|
25
|
+
export declare function createList(request: RequestClient, input: CreateListInput, statsContext?: StatsContext): Promise<string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeFromList = exports.addToList = exports.formatEndpoint = void 0;
|
|
3
|
+
exports.createList = exports.getList = exports.getAccessToken = exports.removeFromList = exports.addToList = exports.formatEndpoint = void 0;
|
|
4
4
|
const actions_core_1 = require("@segment/actions-core");
|
|
5
5
|
const constants_1 = require("./constants");
|
|
6
6
|
function formatEndpoint(endpoint) {
|
|
@@ -8,6 +8,9 @@ function formatEndpoint(endpoint) {
|
|
|
8
8
|
}
|
|
9
9
|
exports.formatEndpoint = formatEndpoint;
|
|
10
10
|
async function addToList(request, settings, payloads, statsContext) {
|
|
11
|
+
if (!payloads[0].external_id) {
|
|
12
|
+
throw new actions_core_1.IntegrationError('No external_id found in payload', 'INVALID_REQUEST_DATA', 400);
|
|
13
|
+
}
|
|
11
14
|
const api_endpoint = formatEndpoint(settings.api_endpoint);
|
|
12
15
|
const csvData = formatData(payloads);
|
|
13
16
|
const csvSize = Buffer.byteLength(csvData, 'utf8');
|
|
@@ -33,6 +36,9 @@ async function addToList(request, settings, payloads, statsContext) {
|
|
|
33
36
|
}
|
|
34
37
|
exports.addToList = addToList;
|
|
35
38
|
async function removeFromList(request, settings, payloads, statsContext) {
|
|
39
|
+
if (!payloads[0].external_id) {
|
|
40
|
+
throw new actions_core_1.IntegrationError('No external_id found in payload', 'INVALID_REQUEST_DATA', 400);
|
|
41
|
+
}
|
|
36
42
|
const api_endpoint = formatEndpoint(settings.api_endpoint);
|
|
37
43
|
const usersToRemove = extractFilterData(payloads);
|
|
38
44
|
const getLeadsUrl = api_endpoint +
|
|
@@ -99,4 +105,85 @@ function parseErrorResponse(response) {
|
|
|
99
105
|
}
|
|
100
106
|
throw new actions_core_1.IntegrationError(response.errors[0].message, 'INVALID_RESPONSE', 400);
|
|
101
107
|
}
|
|
108
|
+
async function getAccessToken(request, settings) {
|
|
109
|
+
const api_endpoint = formatEndpoint(settings.api_endpoint);
|
|
110
|
+
const res = await request(`${api_endpoint}/${constants_1.OAUTH_ENDPOINT}`, {
|
|
111
|
+
method: 'POST',
|
|
112
|
+
body: new URLSearchParams({
|
|
113
|
+
client_id: settings.client_id,
|
|
114
|
+
client_secret: settings.client_secret,
|
|
115
|
+
grant_type: 'client_credentials'
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
return res.data.access_token;
|
|
119
|
+
}
|
|
120
|
+
exports.getAccessToken = getAccessToken;
|
|
121
|
+
async function getList(request, settings, id) {
|
|
122
|
+
const accessToken = await getAccessToken(request, settings);
|
|
123
|
+
const endpoint = formatEndpoint(settings.api_endpoint);
|
|
124
|
+
const getListUrl = endpoint + constants_1.GET_LIST_ENDPOINT.replace('listId', id);
|
|
125
|
+
const getListResponse = await request(getListUrl, {
|
|
126
|
+
method: 'GET',
|
|
127
|
+
headers: {
|
|
128
|
+
authorization: `Bearer ${accessToken}`
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
if (!getListResponse.data.success && getListResponse.data.errors) {
|
|
132
|
+
return {
|
|
133
|
+
error: {
|
|
134
|
+
message: getListResponse.data.errors[0].message,
|
|
135
|
+
code: 'LIST_ID_VERIFICATION_FAILURE'
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
return {
|
|
140
|
+
successMessage: `Using existing list ${id}.`,
|
|
141
|
+
savedData: {
|
|
142
|
+
id: id,
|
|
143
|
+
name: getListResponse.data.result[0].name
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
exports.getList = getList;
|
|
148
|
+
async function createList(request, input, statsContext) {
|
|
149
|
+
const statsClient = statsContext?.statsClient;
|
|
150
|
+
const statsTags = statsContext?.tags;
|
|
151
|
+
if (!input.audienceName) {
|
|
152
|
+
throw new actions_core_1.IntegrationError('Missing audience name value', 'MISSING_REQUIRED_FIELD', 400);
|
|
153
|
+
}
|
|
154
|
+
const endpoint = formatEndpoint(input.settings.api_endpoint);
|
|
155
|
+
const accessToken = await getAccessToken(request, input.settings);
|
|
156
|
+
const getFolderUrl = endpoint + constants_1.GET_FOLDER_ENDPOINT.replace('folderName', encodeURIComponent(input.settings.folder_name));
|
|
157
|
+
const getFolderResponse = await request(getFolderUrl, {
|
|
158
|
+
method: 'GET',
|
|
159
|
+
headers: {
|
|
160
|
+
authorization: `Bearer ${accessToken}`
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
if (!getFolderResponse.data.success && getFolderResponse.data.errors) {
|
|
164
|
+
statsClient?.incr('createAudience.error', 1, statsTags);
|
|
165
|
+
throw new actions_core_1.IntegrationError(`${getFolderResponse.data.errors[0].message}`, 'INVALID_RESPONSE', 400);
|
|
166
|
+
}
|
|
167
|
+
if (!getFolderResponse.data.result) {
|
|
168
|
+
statsClient?.incr('createAudience.error', 1, statsTags);
|
|
169
|
+
throw new actions_core_1.IntegrationError(`A folder with the name ${input.settings.folder_name} not found`, 'INVALID_REQUEST_DATA', 400);
|
|
170
|
+
}
|
|
171
|
+
const folderId = getFolderResponse.data.result[0].id.toString();
|
|
172
|
+
const createListUrl = endpoint +
|
|
173
|
+
constants_1.CREATE_LIST_ENDPOINT.replace('folderId', folderId).replace('listName', encodeURIComponent(input.audienceName));
|
|
174
|
+
const createListResponse = await request(createListUrl, {
|
|
175
|
+
method: 'POST',
|
|
176
|
+
headers: {
|
|
177
|
+
authorization: `Bearer ${accessToken}`
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
if (!createListResponse.data.success && createListResponse.data.errors) {
|
|
181
|
+
statsClient?.incr('createAudience.error', 1, statsTags);
|
|
182
|
+
throw new actions_core_1.IntegrationError(`${createListResponse.data.errors[0].message}`, 'INVALID_RESPONSE', 400);
|
|
183
|
+
}
|
|
184
|
+
const listId = createListResponse.data.result[0].id.toString();
|
|
185
|
+
statsClient?.incr('createAudience.success', 1, statsTags);
|
|
186
|
+
return listId;
|
|
187
|
+
}
|
|
188
|
+
exports.createList = createList;
|
|
102
189
|
//# sourceMappingURL=functions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/destinations/marketo-static-lists/functions.ts"],"names":[],"mappings":";;;AAAA,wDAAqG;AAIrG,
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/destinations/marketo-static-lists/functions.ts"],"names":[],"mappings":";;;AAAA,wDAAqG;AAIrG,2CAiBoB;AAIpB,SAAgB,cAAc,CAAC,QAAgB;IAC7C,OAAO,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;AACtC,CAAC;AAFD,wCAEC;AAEM,KAAK,UAAU,SAAS,CAC7B,OAAsB,EACtB,QAAkB,EAClB,QAA4B,EAC5B,YAA2B;IAE3B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;QAC5B,MAAM,IAAI,+BAAgB,CAAC,iCAAiC,EAAE,sBAAsB,EAAE,GAAG,CAAC,CAAA;KAC3F;IAED,MAAM,YAAY,GAAG,cAAc,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;IAE1D,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAA;IACpC,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IAClD,IAAI,OAAO,GAAG,qBAAS,EAAE;QACvB,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,qBAAqB,EAAE,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,CAAA;QAC7E,MAAM,IAAI,+BAAgB,CAAC,kCAAkC,qBAAS,QAAQ,EAAE,sB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