@segment/action-destinations 3.110.2-alpha.0 → 3.111.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/adobe-target/adobeTarget_operations.js +3 -1
- package/dist/destinations/adobe-target/adobeTarget_operations.js.map +1 -1
- package/dist/destinations/adobe-target/generated-types.d.ts +1 -0
- package/dist/destinations/adobe-target/index.js +15 -0
- package/dist/destinations/adobe-target/index.js.map +1 -1
- package/dist/destinations/amplitude/compact.d.ts +2 -0
- package/dist/destinations/amplitude/compact.js +7 -0
- package/dist/destinations/amplitude/compact.js.map +1 -0
- package/dist/destinations/amplitude/index.js +6 -6
- package/dist/destinations/amplitude/index.js.map +1 -1
- package/dist/destinations/amplitude/logEventV2/index.js +16 -15
- package/dist/destinations/amplitude/logEventV2/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/viewContent/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/viewContent/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/functions.d.ts +1 -1
- package/dist/destinations/google-enhanced-conversions/functions.js +6 -7
- package/dist/destinations/google-enhanced-conversions/functions.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/generated-types.d.ts +2 -2
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js +4 -3
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.d.ts +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/generated-types.d.ts +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js +2 -2
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js.map +1 -1
- package/dist/destinations/hubspot/index.js +8 -7
- package/dist/destinations/hubspot/index.js.map +1 -1
- package/dist/destinations/hubspot/properties.d.ts +1 -1
- package/dist/destinations/hubspot/properties.js +2 -2
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +2 -2
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
- package/dist/destinations/hubspot/{contact → upsertContact}/generated-types.d.ts +0 -0
- package/dist/destinations/hubspot/{contact → upsertContact}/generated-types.js +0 -0
- package/dist/destinations/hubspot/upsertContact/generated-types.js.map +1 -0
- package/dist/destinations/{salesforce-marketing-cloud/dataExtension → hubspot/upsertContact}/index.d.ts +0 -0
- package/dist/destinations/hubspot/{contact → upsertContact}/index.js +8 -11
- package/dist/destinations/hubspot/upsertContact/index.js.map +1 -0
- package/dist/destinations/hubspot/{createCustomObjectRecord → upsertCustomObjectRecord}/generated-types.d.ts +0 -0
- package/dist/destinations/hubspot/{createCustomObjectRecord → upsertCustomObjectRecord}/generated-types.js +0 -0
- package/dist/destinations/hubspot/upsertCustomObjectRecord/generated-types.js.map +1 -0
- package/dist/destinations/hubspot/{contact → upsertCustomObjectRecord}/index.d.ts +0 -0
- package/dist/destinations/hubspot/{createCustomObjectRecord → upsertCustomObjectRecord}/index.js +5 -8
- package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js.map +1 -0
- package/dist/destinations/index.js +0 -1
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/linkedin-audiences/index.js +32 -7
- package/dist/destinations/linkedin-audiences/index.js.map +1 -1
- package/dist/destinations/mixpanel/groupIdentifyUser/index.js +5 -2
- package/dist/destinations/mixpanel/groupIdentifyUser/index.js.map +1 -1
- package/dist/destinations/mixpanel/identifyUser/index.js +11 -2
- package/dist/destinations/mixpanel/identifyUser/index.js.map +1 -1
- package/dist/destinations/mixpanel/index.js +10 -2
- package/dist/destinations/mixpanel/index.js.map +1 -1
- package/dist/destinations/mixpanel/mixpanel-properties.d.ts +3 -0
- package/dist/destinations/mixpanel/mixpanel-properties.js +440 -0
- package/dist/destinations/mixpanel/mixpanel-properties.js.map +1 -0
- package/dist/destinations/mixpanel/mixpanel-types.d.ts +55 -0
- package/dist/destinations/mixpanel/{trackEvent/types.js → mixpanel-types.js} +1 -1
- package/dist/destinations/mixpanel/mixpanel-types.js.map +1 -0
- package/dist/destinations/mixpanel/trackEvent/functions.d.ts +4 -0
- package/dist/destinations/mixpanel/trackEvent/functions.js +64 -0
- package/dist/destinations/mixpanel/trackEvent/functions.js.map +1 -0
- package/dist/destinations/mixpanel/trackEvent/generated-types.d.ts +3 -0
- package/dist/destinations/mixpanel/trackEvent/index.js +25 -1
- package/dist/destinations/mixpanel/trackEvent/index.js.map +1 -1
- package/dist/destinations/mixpanel/trackPurchase/generated-types.d.ts +65 -0
- package/dist/destinations/{salesforce-marketing-cloud/apiEvent → mixpanel/trackPurchase}/generated-types.js +0 -0
- package/dist/destinations/mixpanel/trackPurchase/generated-types.js.map +1 -0
- package/dist/destinations/{hubspot/createCustomObjectRecord → mixpanel/trackPurchase}/index.d.ts +1 -1
- package/dist/destinations/mixpanel/trackPurchase/index.js +80 -0
- package/dist/destinations/mixpanel/trackPurchase/index.js.map +1 -0
- package/dist/destinations/salesforce/customObject/index.js +0 -4
- package/dist/destinations/salesforce/customObject/index.js.map +1 -1
- package/dist/destinations/salesforce/sf-operations.d.ts +0 -1
- package/dist/destinations/salesforce/sf-operations.js +6 -20
- package/dist/destinations/salesforce/sf-operations.js.map +1 -1
- package/dist/destinations/salesforce/sf-properties.js +1 -2
- package/dist/destinations/salesforce/sf-properties.js.map +1 -1
- package/dist/destinations/sendgrid/sendgrid-properties.js +3 -0
- package/dist/destinations/sendgrid/sendgrid-properties.js.map +1 -1
- package/dist/destinations/twilio/sendSms/generated-types.d.ts +1 -0
- package/dist/destinations/twilio/sendSms/index.js +6 -0
- package/dist/destinations/twilio/sendSms/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/destinations/amplitude/emptyObject.d.ts +0 -2
- package/dist/destinations/amplitude/emptyObject.js +0 -7
- package/dist/destinations/amplitude/emptyObject.js.map +0 -1
- package/dist/destinations/hubspot/contact/generated-types.js.map +0 -1
- package/dist/destinations/hubspot/contact/index.js.map +0 -1
- package/dist/destinations/hubspot/createCustomObjectRecord/generated-types.js.map +0 -1
- package/dist/destinations/hubspot/createCustomObjectRecord/index.js.map +0 -1
- package/dist/destinations/mixpanel/trackEvent/types.d.ts +0 -51
- package/dist/destinations/mixpanel/trackEvent/types.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/apiEvent/generated-types.d.ts +0 -7
- package/dist/destinations/salesforce-marketing-cloud/apiEvent/generated-types.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/apiEvent/index.d.ts +0 -5
- package/dist/destinations/salesforce-marketing-cloud/apiEvent/index.js +0 -20
- package/dist/destinations/salesforce-marketing-cloud/apiEvent/index.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/contact/generated-types.d.ts +0 -3
- package/dist/destinations/salesforce-marketing-cloud/contact/generated-types.js +0 -3
- package/dist/destinations/salesforce-marketing-cloud/contact/generated-types.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/contact/index.d.ts +0 -5
- package/dist/destinations/salesforce-marketing-cloud/contact/index.js +0 -23
- package/dist/destinations/salesforce-marketing-cloud/contact/index.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/contactDataExtension/generated-types.d.ts +0 -12
- package/dist/destinations/salesforce-marketing-cloud/contactDataExtension/generated-types.js +0 -3
- package/dist/destinations/salesforce-marketing-cloud/contactDataExtension/generated-types.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/contactDataExtension/index.d.ts +0 -5
- package/dist/destinations/salesforce-marketing-cloud/contactDataExtension/index.js +0 -34
- package/dist/destinations/salesforce-marketing-cloud/contactDataExtension/index.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/dataExtension/generated-types.d.ts +0 -11
- package/dist/destinations/salesforce-marketing-cloud/dataExtension/generated-types.js +0 -3
- package/dist/destinations/salesforce-marketing-cloud/dataExtension/generated-types.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/dataExtension/index.js +0 -23
- package/dist/destinations/salesforce-marketing-cloud/dataExtension/index.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/generated-types.d.ts +0 -4
- package/dist/destinations/salesforce-marketing-cloud/generated-types.js +0 -3
- package/dist/destinations/salesforce-marketing-cloud/generated-types.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/index.d.ts +0 -4
- package/dist/destinations/salesforce-marketing-cloud/index.js +0 -46
- package/dist/destinations/salesforce-marketing-cloud/index.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.d.ts +0 -3
- package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.js +0 -31
- package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.js.map +0 -1
- package/dist/destinations/salesforce-marketing-cloud/sfmc-properties.d.ts +0 -10
- package/dist/destinations/salesforce-marketing-cloud/sfmc-properties.js +0 -59
- package/dist/destinations/salesforce-marketing-cloud/sfmc-properties.js.map +0 -1
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const sfmc_properties_1 = require("../sfmc-properties");
|
|
4
|
-
const action = {
|
|
5
|
-
title: 'Create Contact',
|
|
6
|
-
description: 'Create contacts in Salesforce Marketing Cloud.',
|
|
7
|
-
defaultSubscription: 'type = "identify"',
|
|
8
|
-
fields: {
|
|
9
|
-
contactKey: { ...sfmc_properties_1.contactKey, required: true }
|
|
10
|
-
},
|
|
11
|
-
perform: (request, { settings, payload }) => {
|
|
12
|
-
const requestUrl = `https://${settings.subdomain}.rest.marketingcloudapis.com/contacts/v1/contacts`;
|
|
13
|
-
return request(requestUrl, {
|
|
14
|
-
method: 'post',
|
|
15
|
-
json: {
|
|
16
|
-
contactKey: payload.contactKey,
|
|
17
|
-
attributeSets: []
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.default = action;
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/salesforce-marketing-cloud/contact/index.ts"],"names":[],"mappings":";;AAEA,wDAA+C;AAG/C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,gDAAgD;IAC7D,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,UAAU,EAAE,EAAE,GAAG,4BAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC9C;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,MAAM,UAAU,GAAG,WAAW,QAAQ,CAAC,SAAS,mDAAmD,CAAA;QACnG,OAAO,OAAO,CAAC,UAAU,EAAE;YACzB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,aAAa,EAAE,EAAE;aAClB;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
package/dist/destinations/salesforce-marketing-cloud/contactDataExtension/generated-types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/salesforce-marketing-cloud/contactDataExtension/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const sfmc_properties_1 = require("../sfmc-properties");
|
|
4
|
-
const sfmc_operations_1 = require("../sfmc-operations");
|
|
5
|
-
const action = {
|
|
6
|
-
title: 'Contact Data Extension',
|
|
7
|
-
description: '',
|
|
8
|
-
fields: {
|
|
9
|
-
key: sfmc_properties_1.key,
|
|
10
|
-
id: sfmc_properties_1.id,
|
|
11
|
-
keys: {
|
|
12
|
-
...sfmc_properties_1.keys,
|
|
13
|
-
properties: {
|
|
14
|
-
contactKey: {
|
|
15
|
-
label: 'Contact Key',
|
|
16
|
-
description: 'TODO',
|
|
17
|
-
type: 'string',
|
|
18
|
-
required: true,
|
|
19
|
-
default: { '@path': '$.userId' }
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
values: sfmc_properties_1.values,
|
|
24
|
-
enable_batching: sfmc_properties_1.enable_batching
|
|
25
|
-
},
|
|
26
|
-
perform: async (request, { settings, payload }) => {
|
|
27
|
-
return sfmc_operations_1.upsertRows(request, settings.subdomain, [payload]);
|
|
28
|
-
},
|
|
29
|
-
performBatch: async (request, { settings, payload }) => {
|
|
30
|
-
return sfmc_operations_1.upsertRows(request, settings.subdomain, payload);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
exports.default = action;
|
|
34
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/salesforce-marketing-cloud/contactDataExtension/index.ts"],"names":[],"mappings":";;AAGA,wDAA2E;AAC3E,wDAA+C;AAE/C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN,GAAG,EAAE,qBAAG;QACR,EAAE,EAAE,oBAAE;QACN,IAAI,EAAE;YACJ,GAAG,sBAAI;YACP,UAAU,EAAE;gBACV,UAAU,EAAE;oBACV,KAAK,EAAE,aAAa;oBACpB,WAAW,EAAE,MAAM;oBACnB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;iBACjC;aACF;SACF;QACD,MAAM,EAAE,wBAAM;QACd,eAAe,EAAE,iCAAe;KACjC;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,OAAO,4BAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAC3D,CAAC;IACD,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QACrD,OAAO,4BAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IACzD,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/salesforce-marketing-cloud/dataExtension/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const sfmc_properties_1 = require("../sfmc-properties");
|
|
4
|
-
const sfmc_operations_1 = require("../sfmc-operations");
|
|
5
|
-
const action = {
|
|
6
|
-
title: 'Send Event to Data Extension',
|
|
7
|
-
description: 'Upsert events as rows into an existing data extension in Salesforce Marketing Cloud.',
|
|
8
|
-
fields: {
|
|
9
|
-
key: sfmc_properties_1.key,
|
|
10
|
-
id: sfmc_properties_1.id,
|
|
11
|
-
keys: { ...sfmc_properties_1.keys, required: true },
|
|
12
|
-
values: sfmc_properties_1.values,
|
|
13
|
-
enable_batching: sfmc_properties_1.enable_batching
|
|
14
|
-
},
|
|
15
|
-
perform: async (request, { settings, payload }) => {
|
|
16
|
-
return sfmc_operations_1.upsertRows(request, settings.subdomain, [payload]);
|
|
17
|
-
},
|
|
18
|
-
performBatch: async (request, { settings, payload }) => {
|
|
19
|
-
return sfmc_operations_1.upsertRows(request, settings.subdomain, payload);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.default = action;
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/salesforce-marketing-cloud/dataExtension/index.ts"],"names":[],"mappings":";;AAGA,wDAA2E;AAC3E,wDAA+C;AAE/C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,8BAA8B;IACrC,WAAW,EAAE,sFAAsF;IACnG,MAAM,EAAE;QACN,GAAG,EAAE,qBAAG;QACR,EAAE,EAAE,oBAAE;QACN,IAAI,EAAE,EAAE,GAAG,sBAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;QACjC,MAAM,EAAE,wBAAM;QACd,eAAe,EAAE,iCAAe;KACjC;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,OAAO,4BAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAC3D,CAAC;IACD,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QACrD,OAAO,4BAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IACzD,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/salesforce-marketing-cloud/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,46 +0,0 @@
|
|
|
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 contact_1 = __importDefault(require("./contact"));
|
|
7
|
-
const dataExtension_1 = __importDefault(require("./dataExtension"));
|
|
8
|
-
const contactDataExtension_1 = __importDefault(require("./contactDataExtension"));
|
|
9
|
-
const apiEvent_1 = __importDefault(require("./apiEvent"));
|
|
10
|
-
const destination = {
|
|
11
|
-
name: 'Salesforce Marketing Cloud (Actions)',
|
|
12
|
-
slug: 'actions-salesforce-marketing-cloud',
|
|
13
|
-
mode: 'cloud',
|
|
14
|
-
authentication: {
|
|
15
|
-
scheme: 'oauth2',
|
|
16
|
-
fields: {
|
|
17
|
-
subdomain: {
|
|
18
|
-
label: 'Subdomain',
|
|
19
|
-
description: 'The unique subdomain Salesforce Marketing Cloud assigned to your account. Subdomains are tenant specific and should be a 28-character string starting with the letters "mc". Do not include the .rest.marketingcloudapis.com part of your subdomain URL. See more information on how to find your subdomain [here](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/your-subdomain-tenant-specific-endpoints.html)',
|
|
20
|
-
type: 'string',
|
|
21
|
-
required: true
|
|
22
|
-
},
|
|
23
|
-
token: {
|
|
24
|
-
label: 'Token',
|
|
25
|
-
description: 'STAGE TESTING',
|
|
26
|
-
type: 'string',
|
|
27
|
-
required: true
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
extendRequest({ settings }) {
|
|
32
|
-
return {
|
|
33
|
-
headers: {
|
|
34
|
-
authorization: `Bearer ${settings.token}`
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
},
|
|
38
|
-
actions: {
|
|
39
|
-
contact: contact_1.default,
|
|
40
|
-
dataExtension: dataExtension_1.default,
|
|
41
|
-
contactDataExtension: contactDataExtension_1.default,
|
|
42
|
-
apiEvent: apiEvent_1.default
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
exports.default = destination;
|
|
46
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/salesforce-marketing-cloud/index.ts"],"names":[],"mappings":";;;;;AAEA,wDAA+B;AAC/B,oEAA2C;AAC3C,kFAAyD;AACzD,0DAAiC;AAEjC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,sCAAsC;IAC5C,IAAI,EAAE,oCAAoC;IAC1C,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,SAAS,EAAE;gBACT,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,yaAAya;gBAC3a,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,KAAK,EAAE;gBACL,KAAK,EAAE,OAAO;gBACd,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,QAAQ,CAAC,KAAK,EAAE;aAC1C;SACF,CAAA;IACH,CAAC;IAOD,OAAO,EAAE;QACP,OAAO,EAAP,iBAAO;QACP,aAAa,EAAb,uBAAa;QACb,oBAAoB,EAApB,8BAAoB;QACpB,QAAQ,EAAR,kBAAQ;KACT;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { RequestClient } from '@segment/actions-core';
|
|
2
|
-
import { Payload } from './dataExtension/generated-types';
|
|
3
|
-
export declare function upsertRows(request: RequestClient, subdomain: String, payloads: Payload[]): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.upsertRows = void 0;
|
|
4
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
5
|
-
function upsertRows(request, subdomain, payloads) {
|
|
6
|
-
const { key, id } = payloads[0];
|
|
7
|
-
if (!key && !id) {
|
|
8
|
-
throw new actions_core_1.IntegrationError(`In order to send an event to a data extension either Data Extension ID or Data Extension Key must be defined.`, 'Misconfigured required field', 400);
|
|
9
|
-
}
|
|
10
|
-
const rows = [];
|
|
11
|
-
payloads.forEach((payload) => {
|
|
12
|
-
rows.push({
|
|
13
|
-
keys: payload.keys,
|
|
14
|
-
values: payload.values
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
if (key) {
|
|
18
|
-
return request(`https://${subdomain}.rest.marketingcloudapis.com/hub/v1/dataevents/key:${key}/rowset`, {
|
|
19
|
-
method: 'post',
|
|
20
|
-
json: rows
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
return request(`https://${subdomain}.rest.marketingcloudapis.com/hub/v1/dataevents/${id}/rowset`, {
|
|
25
|
-
method: 'post',
|
|
26
|
-
json: rows
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.upsertRows = upsertRows;
|
|
31
|
-
//# sourceMappingURL=sfmc-operations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sfmc-operations.js","sourceRoot":"","sources":["../../../src/destinations/salesforce-marketing-cloud/sfmc-operations.ts"],"names":[],"mappings":";;;AAAA,wDAAuE;AAGvE,SAAgB,UAAU,CAAC,OAAsB,EAAE,SAAiB,EAAE,QAAmB;IACvF,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IAE/B,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,EAAE;QACf,MAAM,IAAI,+BAAgB,CACxB,+GAA+G,EAC/G,8BAA8B,EAC9B,GAAG,CACJ,CAAA;KACF;IACD,MAAM,IAAI,GAA0B,EAAE,CAAA;IACtC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAgB,EAAE,EAAE;QACpC,IAAI,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IACF,IAAI,GAAG,EAAE;QACP,OAAO,OAAO,CAAC,WAAW,SAAS,sDAAsD,GAAG,SAAS,EAAE;YACrG,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;KACH;SAAM;QACL,OAAO,OAAO,CAAC,WAAW,SAAS,kDAAkD,EAAE,SAAS,EAAE;YAChG,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;KACH;AACH,CAAC;AA5BD,gCA4BC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { InputField } from '@segment/actions-core/src/destination-kit/types';
|
|
2
|
-
export declare const contactKey: InputField;
|
|
3
|
-
export declare const contactKeyAPIEvent: InputField;
|
|
4
|
-
export declare const key: InputField;
|
|
5
|
-
export declare const id: InputField;
|
|
6
|
-
export declare const keys: InputField;
|
|
7
|
-
export declare const values: InputField;
|
|
8
|
-
export declare const eventDefinitionKey: InputField;
|
|
9
|
-
export declare const eventData: InputField;
|
|
10
|
-
export declare const enable_batching: InputField;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.enable_batching = exports.eventData = exports.eventDefinitionKey = exports.values = exports.keys = exports.id = exports.key = exports.contactKeyAPIEvent = exports.contactKey = void 0;
|
|
4
|
-
exports.contactKey = {
|
|
5
|
-
label: 'Contact Key',
|
|
6
|
-
description: 'The unique identifier that you assign to a contact. This will be used to create a contact if one does not already exist with this Contact Key.',
|
|
7
|
-
type: 'string',
|
|
8
|
-
default: { '@path': '$.userId' }
|
|
9
|
-
};
|
|
10
|
-
exports.contactKeyAPIEvent = {
|
|
11
|
-
label: 'Contact Key',
|
|
12
|
-
description: 'The unique identifier that identifies a subscriber or a contact.',
|
|
13
|
-
type: 'string',
|
|
14
|
-
default: { '@path': '$.userId' },
|
|
15
|
-
required: true
|
|
16
|
-
};
|
|
17
|
-
exports.key = {
|
|
18
|
-
label: 'Data Extension Key',
|
|
19
|
-
description: 'The key of the data extension that you want to store contact information in. The data extension must be predefined in SFMC. Segment recommends storing all contact information in a single data extension. The key is required if a Data Extension ID is not provided.',
|
|
20
|
-
type: 'string'
|
|
21
|
-
};
|
|
22
|
-
exports.id = {
|
|
23
|
-
label: 'Data Extension ID',
|
|
24
|
-
description: 'The ID of the data extension that you want to store contact information in. The data extension must be predefined in SFMC. Segment recommends storing all contact information in a single data extension. The ID is required if a Data Extension Key is not provided.',
|
|
25
|
-
type: 'string'
|
|
26
|
-
};
|
|
27
|
-
exports.keys = {
|
|
28
|
-
label: 'Data Extension Primary Keys',
|
|
29
|
-
description: 'The primary key(s) that uniquely identify a contact in the data extension. At a minimum, Contact Key must exist in your data extension as a Primary Key.On the left-hand side, input the SFMC key name. On the right-hand side, map the Segment field that contains the corresponding value.When multiple primary keys are provided, SFMC will update an existing row if all primary keys match, otherwise a new row will be created.',
|
|
30
|
-
type: 'object',
|
|
31
|
-
required: true,
|
|
32
|
-
defaultObjectUI: 'keyvalue:only',
|
|
33
|
-
additionalProperties: true
|
|
34
|
-
};
|
|
35
|
-
exports.values = {
|
|
36
|
-
label: 'Contact Fields',
|
|
37
|
-
description: 'The fields in the data extension that contain data about a contact, such as Email, Last Name, etc. Fields must be created in the data extension before sending data for it.On the left-hand side, input the SFMC field name exactly how it appears in the data extension. On the right-hand side, map the Segment field that contains the corresponding value.',
|
|
38
|
-
type: 'object',
|
|
39
|
-
defaultObjectUI: 'keyvalue:only'
|
|
40
|
-
};
|
|
41
|
-
exports.eventDefinitionKey = {
|
|
42
|
-
label: 'Event Definition Key',
|
|
43
|
-
description: 'The unique key for an event definition in Salesforce Marketing Cloud. The event defintion must be predefined in SFMC. ',
|
|
44
|
-
type: 'string',
|
|
45
|
-
required: true
|
|
46
|
-
};
|
|
47
|
-
exports.eventData = {
|
|
48
|
-
label: 'Event Data',
|
|
49
|
-
description: 'The properties of the event. Fields must be created in the event definition schema before sending data for it.On the left-hand side, input the SFMC field name exactly how it appears in the event definition schema. On the right-hand side, map the Segment field that contains the corresponding value.',
|
|
50
|
-
type: 'object',
|
|
51
|
-
defaultObjectUI: 'keyvalue:only'
|
|
52
|
-
};
|
|
53
|
-
exports.enable_batching = {
|
|
54
|
-
label: 'Enable Batching',
|
|
55
|
-
description: 'If true, data is batched before sending to the SFMC Data Extension to help reduce API calls.',
|
|
56
|
-
type: 'boolean',
|
|
57
|
-
default: true
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=sfmc-properties.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sfmc-properties.js","sourceRoot":"","sources":["../../../src/destinations/salesforce-marketing-cloud/sfmc-properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,aAAa;IACpB,WAAW,EACT,gJAAgJ;IAClJ,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;CACjC,CAAA;AAEY,QAAA,kBAAkB,GAAe;IAC5C,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,kEAAkE;IAC/E,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;IAChC,QAAQ,EAAE,IAAI;CACf,CAAA;AAEY,QAAA,GAAG,GAAe;IAC7B,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,wQAAwQ;IAC1Q,IAAI,EAAE,QAAQ;CACf,CAAA;AACY,QAAA,EAAE,GAAe;IAC5B,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,uQAAuQ;IACzQ,IAAI,EAAE,QAAQ;CACf,CAAA;AACY,QAAA,IAAI,GAAe;IAC9B,KAAK,EAAE,6BAA6B;IACpC,WAAW,EACT,uaAAua;IACza,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,eAAe,EAAE,eAAe;IAChC,oBAAoB,EAAE,IAAI;CAC3B,CAAA;AACY,QAAA,MAAM,GAAe;IAChC,KAAK,EAAE,gBAAgB;IACvB,WAAW,EACT,gWAAgW;IAClW,IAAI,EAAE,QAAQ;IACd,eAAe,EAAE,eAAe;CACjC,CAAA;AACY,QAAA,kBAAkB,GAAe;IAC5C,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EACT,wHAAwH;IAC1H,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;CACf,CAAA;AACY,QAAA,SAAS,GAAe;IACnC,KAAK,EAAE,YAAY;IACnB,WAAW,EACT,4SAA4S;IAC9S,IAAI,EAAE,QAAQ;IACd,eAAe,EAAE,eAAe;CACjC,CAAA;AAEY,QAAA,eAAe,GAAe;IACzC,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,8FAA8F;IAC3G,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,IAAI;CACd,CAAA"}
|