@segment/action-destinations 3.252.1-staging → 3.253.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/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
- package/dist/destinations/braze/index.js.map +1 -1
- 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.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.map +1 -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.map +1 -0
- package/dist/destinations/chartmogul/sendCustomer/index.js +102 -0
- package/dist/destinations/chartmogul/sendCustomer/index.js.map +1 -0
- package/dist/destinations/customerio/index.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/iterable/index.js.map +1 -1
- package/dist/destinations/kafka/utils.js.map +1 -1
- package/dist/destinations/klaviyo/index.js +1 -1
- 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/{engage/sendgrid/Profile.js → mantle/generated-types.js} +1 -1
- 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/{responsys/asyncMergeProfileListMembers → mantle/identify}/index.d.ts +1 -1
- 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 +1 -13
- package/dist/destinations/marketo-static-lists/addToList/index.js +2 -69
- package/dist/destinations/marketo-static-lists/addToList/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/constants.d.ts +3 -10
- package/dist/destinations/marketo-static-lists/constants.js +14 -2
- package/dist/destinations/marketo-static-lists/constants.js.map +1 -1
- package/dist/destinations/marketo-static-lists/functions.d.ts +1 -18
- package/dist/destinations/marketo-static-lists/functions.js +1 -87
- package/dist/destinations/marketo-static-lists/functions.js.map +1 -1
- package/dist/destinations/marketo-static-lists/index.js +42 -4
- package/dist/destinations/marketo-static-lists/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/properties.js +2 -1
- 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/moloco-rmp/addToCart/index.js.map +1 -1
- package/dist/destinations/moloco-rmp/addToWishlist/index.js +1 -1
- package/dist/destinations/moloco-rmp/addToWishlist/index.js.map +1 -1
- package/dist/destinations/moloco-rmp/common/convert.js +17 -29
- package/dist/destinations/moloco-rmp/common/convert.js.map +1 -1
- package/dist/destinations/moloco-rmp/common/event.js.map +1 -1
- package/dist/destinations/moloco-rmp/common/fields.js +10 -10
- package/dist/destinations/moloco-rmp/common/fields.js.map +1 -1
- package/dist/destinations/moloco-rmp/common/request-client.js.map +1 -1
- package/dist/destinations/moloco-rmp/home/index.js +1 -1
- package/dist/destinations/moloco-rmp/home/index.js.map +1 -1
- package/dist/destinations/moloco-rmp/itemPageView/index.js +1 -1
- package/dist/destinations/moloco-rmp/itemPageView/index.js.map +1 -1
- package/dist/destinations/moloco-rmp/land/index.js +1 -1
- package/dist/destinations/moloco-rmp/land/index.js.map +1 -1
- package/dist/destinations/moloco-rmp/pageView/index.js.map +1 -1
- package/dist/destinations/moloco-rmp/purchase/index.js.map +1 -1
- package/dist/destinations/moloco-rmp/search/index.js.map +1 -1
- package/dist/destinations/responsys/index.js +0 -12
- package/dist/destinations/responsys/index.js.map +1 -1
- package/dist/destinations/responsys/sendAudience/generated-types.d.ts +1 -0
- package/dist/destinations/responsys/sendAudience/index.js +11 -4
- 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 +11 -4
- package/dist/destinations/responsys/sendCustomTraits/index.js.map +1 -1
- package/dist/destinations/responsys/utils.d.ts +3 -2
- package/dist/destinations/responsys/utils.js +12 -3
- package/dist/destinations/responsys/utils.js.map +1 -1
- 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-profiles/index.js +1 -3
- package/dist/destinations/segment-profiles/index.js.map +1 -1
- package/dist/destinations/segment-profiles/segment-properties.d.ts +0 -2
- package/dist/destinations/segment-profiles/segment-properties.js +1 -14
- package/dist/destinations/segment-profiles/segment-properties.js.map +1 -1
- 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/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
- package/dist/destinations/engage/sendgrid/Profile.d.ts +0 -6
- package/dist/destinations/engage/sendgrid/Profile.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +0 -21
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +0 -174
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +0 -1
- package/dist/destinations/mixpanel/utils.d.ts +0 -13
- package/dist/destinations/mixpanel/utils.js +0 -117
- package/dist/destinations/mixpanel/utils.js.map +0 -1
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +0 -14
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +0 -1
- package/dist/destinations/responsys/asyncMergePetRecords/index.js +0 -113
- package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +0 -1
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +0 -20
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +0 -1
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +0 -174
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +0 -1
- package/dist/destinations/responsys/rsp-operations.d.ts +0 -14
- package/dist/destinations/responsys/rsp-operations.js +0 -33
- package/dist/destinations/responsys/rsp-operations.js.map +0 -1
- package/dist/destinations/responsys/rsp-properties.d.ts +0 -4
- package/dist/destinations/responsys/rsp-properties.js +0 -27
- package/dist/destinations/responsys/rsp-properties.js.map +0 -1
- package/dist/destinations/segment-profiles/sendTrack/generated-types.d.ts +0 -11
- package/dist/destinations/segment-profiles/sendTrack/generated-types.js.map +0 -1
- package/dist/destinations/segment-profiles/sendTrack/index.js +0 -42
- package/dist/destinations/segment-profiles/sendTrack/index.js.map +0 -1
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +0 -3
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +0 -43
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +0 -1
- /package/dist/destinations/{responsys/asyncMergePetRecords → chartmogul}/generated-types.js +0 -0
- /package/dist/destinations/{responsys/asyncMergeProfileListMembers → chartmogul/sendContact}/generated-types.js +0 -0
- /package/dist/destinations/{responsys/asyncMergePetRecords → chartmogul/sendContact}/index.d.ts +0 -0
- /package/dist/destinations/{segment-profiles/sendTrack → chartmogul/sendCustomer}/generated-types.js +0 -0
- /package/dist/destinations/{segment-profiles/sendTrack → chartmogul/sendCustomer}/index.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/linkedin-conversions/streamConversion/index.ts"],"names":[],"mappings":";;AACA,wDAAwH;AAExH,gCAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/linkedin-conversions/streamConversion/index.ts"],"names":[],"mappings":";;AACA,wDAAwH;AAExH,gCAA4C;AAC5C,4CAKqB;AAIrB,MAAM,MAAM,GAA+D;IACzE,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,mEAAmE;IAChF,mBAAmB,EAAE,gBAAgB;IACrC,KAAK,EAAE;QACL,aAAa,EAAE;YACb,KAAK,EAAE,0BAA0B;YACjC,WAAW,EACT,uGAAuG;YACzG,WAAW,EAAE;gBACX,WAAW,EAAE;oBACX,KAAK,EAAE,YAAY;oBACnB,WAAW,EAAE,iDAAiD;oBAC9D,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;wBACzB,MAAM,QAAQ,GAAG,IAAI,yBAAmB,CAAC,OAAO,CA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AAI,IAAI,CAAC,sBAAsB,CAAC,CAAC,OAAO,EAAE,CAAA;QAC1D,IAAI,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,kBAAkB,IAAI,SAAS,IAAI,kBAAkB,IAAI,OAAO,EAAE;YAChH,OAAO,KAAK,CAAA;SACb;KACF;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED,SAAS,oBAAoB,CAAC,SAAiB;IAC7C,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAA;IAChC,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;AACvB,CAAC;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const API_URL = "https://appapi.heymantle.com/v1";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/destinations/mantle/config.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,iCAAiC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/mantle/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/mantle/identify/generated-types.ts"],"names":[],"mappings":""}
|
package/dist/destinations/{responsys/asyncMergeProfileListMembers → mantle/identify}/index.d.ts
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionDefinition } from '@segment/actions-core';
|
|
1
|
+
import type { ActionDefinition } from '@segment/actions-core';
|
|
2
2
|
import type { Settings } from '../generated-types';
|
|
3
3
|
import type { Payload } from './generated-types';
|
|
4
4
|
declare const action: ActionDefinition<Settings, Payload>;
|
|
@@ -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;IACjB,WAAW,EACT,wHAAwH;IAC1H,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,UAAU,EAAE;YACV,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,kHAAkH;YACpH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,eAAe,EAAE;YACf,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EACT,4HAA4H;YAC9H,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,iCAAiC;YAC9C,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;SACtC;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,2BAA2B;YACxC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;SACvC;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,eAAe;YACtB,WAAW,EAAE,0CAA0C;YACvD,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,eAAe,EAAE,UAAU;YAC3B,OAAO,EAAE;gBACP,OAAO,EAAE,wBAAwB;aAClC;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,GAAG,gBAAO,WAAW,EAAE;YACpC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,SAAS;gBACnB,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU;gBACnC,eAAe,EAAE,IAAI,CAAC,OAAO,CAAC,eAAe;gBAC7C,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;gBACvB,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK;gBACzB,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,YAAY;YACnB,WAAW,EAAE,kDAAkD;YAC/D,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;SAChC;QACD,OAAO,EAAE;YACP,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,mFAAmF;YAChG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;SACpC;QACD,UAAU,EAAE;YACV,KAAK,EAAE,aAAa;YACpB,WAAW,EACT,+LAA+L;YACjM,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,UAAU,EAAE;YACV,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,qFAAqF;YAClG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;SACrC;QACD,SAAS,EAAE;YACT,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,0DAA0D;YACvE,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;SACpC;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,MAAM,OAAO,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AI,EAAE;gBACJ,MAAM;aACP;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
|
-
external_id
|
|
2
|
+
external_id: string;
|
|
3
3
|
lookup_field: string;
|
|
4
4
|
data: {
|
|
5
5
|
email?: string;
|
|
@@ -12,15 +12,3 @@ export interface Payload {
|
|
|
12
12
|
batch_size: number;
|
|
13
13
|
event_name: string;
|
|
14
14
|
}
|
|
15
|
-
export interface HookBundle {
|
|
16
|
-
onMappingSave: {
|
|
17
|
-
inputs?: {
|
|
18
|
-
list_id?: string;
|
|
19
|
-
list_name?: string;
|
|
20
|
-
};
|
|
21
|
-
outputs?: {
|
|
22
|
-
id?: string;
|
|
23
|
-
name?: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
}
|
|
@@ -14,79 +14,12 @@ const action = {
|
|
|
14
14
|
batch_size: { ...properties_1.batch_size },
|
|
15
15
|
event_name: { ...properties_1.event_name }
|
|
16
16
|
},
|
|
17
|
-
|
|
18
|
-
onMappingSave: {
|
|
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 }) => {
|
|
17
|
+
perform: async (request, { settings, payload, statsContext }) => {
|
|
79
18
|
statsContext?.statsClient?.incr('addToAudience', 1, statsContext?.tags);
|
|
80
|
-
if (hookOutputs?.retlOnMappingSave?.outputs.id) {
|
|
81
|
-
payload.external_id = hookOutputs?.retlOnMappingSave?.outputs.id;
|
|
82
|
-
}
|
|
83
19
|
return functions_1.addToList(request, settings, [payload], statsContext);
|
|
84
20
|
},
|
|
85
|
-
performBatch: async (request, { settings, payload, statsContext
|
|
21
|
+
performBatch: async (request, { settings, payload, statsContext }) => {
|
|
86
22
|
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
|
-
}
|
|
90
23
|
return functions_1.addToList(request, settings, payload, statsContext);
|
|
91
24
|
}
|
|
92
25
|
};
|
|
@@ -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,4CAAwC;AAExC,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,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;QAC9D,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,CAAA;QACvE,OAAO,qBAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC,CAAA;IAC9D,CAAC;IACD,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;QACnE,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,qBAAqB,EAAE,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,CAAA;QAC7E,OAAO,qBAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,CAAC,CAAA;IAC5D,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { RequestClient } from '@segment/actions-core';
|
|
2
|
+
import { Settings } from './generated-types';
|
|
2
3
|
export declare const GET_FOLDER_ENDPOINT: string;
|
|
3
4
|
export declare const CREATE_LIST_ENDPOINT: string;
|
|
4
5
|
export declare const GET_LIST_ENDPOINT: string;
|
|
@@ -55,12 +56,4 @@ export interface MarketoLeads {
|
|
|
55
56
|
updatedAt: string;
|
|
56
57
|
createdAt: string;
|
|
57
58
|
}
|
|
58
|
-
export
|
|
59
|
-
audienceName: string;
|
|
60
|
-
settings: {
|
|
61
|
-
client_id: string;
|
|
62
|
-
client_secret: string;
|
|
63
|
-
api_endpoint: string;
|
|
64
|
-
folder_name: string;
|
|
65
|
-
};
|
|
66
|
-
}
|
|
59
|
+
export declare function getAccessToken(request: RequestClient, settings: Settings): Promise<string>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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 =
|
|
3
|
+
exports.getAccessToken = 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 = void 0;
|
|
4
4
|
const API_VERSION = 'v1';
|
|
5
|
-
|
|
5
|
+
const 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,4 +10,16 @@ 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;
|
|
13
25
|
//# 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":";;;AAGA,MAAM,WAAW,GAAG,IAAI,CAAA;AACxB,MAAM,cAAc,GAAG,sBAAsB,CAAA;AAChC,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;AAyD1B,KAAK,UAAU,cAAc,CAAC,OAAsB,EAAE,QAAkB;IAC7E,MAAM,GAAG,GAAG,MAAM,OAAO,CAAuB,GAAG,QAAQ,CAAC,YAAY,IAAI,cAAc,EAAE,EAAE;QAC5F,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,eAAe,CAAC;YACxB,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,aAAa,EAAE,QAAQ,CAAC,aAAa;YACrC,UAAU,EAAE,oBAAoB;SACjC,CAAC;KACH,CAAC,CAAA;IAEF,OAAO,GAAG,CAAC,IAAI,CAAC,YAAY,CAAA;AAC9B,CAAC;AAXD,wCAWC"}
|
|
@@ -2,24 +2,7 @@ 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
|
|
5
|
+
import { MarketoBulkImportResponse, MarketoDeleteLeadsResponse } 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>;
|