@segment/action-destinations 3.116.1-staging.64 → 3.117.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/actable-predictive/generated-types.d.ts +4 -0
- package/dist/destinations/{actions-bingads → actable-predictive}/generated-types.js +0 -0
- package/dist/destinations/actable-predictive/generated-types.js.map +1 -0
- package/dist/destinations/{actions-bingads → actable-predictive}/index.d.ts +2 -0
- package/dist/destinations/actable-predictive/index.js +57 -0
- package/dist/destinations/actable-predictive/index.js.map +1 -0
- package/dist/destinations/actable-predictive/sendCustomEvent/generated-types.d.ts +8 -0
- package/dist/destinations/{actions-bingads/offlineConversions → actable-predictive/sendCustomEvent}/generated-types.js +0 -0
- package/dist/destinations/actable-predictive/sendCustomEvent/generated-types.js.map +1 -0
- package/dist/destinations/{actions-bingads/offlineConversions → actable-predictive/sendCustomEvent}/index.d.ts +0 -0
- package/dist/destinations/actable-predictive/sendCustomEvent/index.js +62 -0
- package/dist/destinations/actable-predictive/sendCustomEvent/index.js.map +1 -0
- package/dist/destinations/actable-predictive/sendEmailEvent/generated-types.d.ts +9 -0
- package/dist/destinations/{google-sheets-partner → actable-predictive/sendEmailEvent}/generated-types.js +0 -0
- package/dist/destinations/actable-predictive/sendEmailEvent/generated-types.js.map +1 -0
- package/dist/destinations/actable-predictive/sendEmailEvent/index.d.ts +5 -0
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js +85 -0
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js.map +1 -0
- package/dist/destinations/actable-predictive/sendTransactionEvent/generated-types.d.ts +11 -0
- package/dist/destinations/{google-sheets-partner/postSheet → actable-predictive/sendTransactionEvent}/generated-types.js +0 -0
- package/dist/destinations/actable-predictive/sendTransactionEvent/generated-types.js.map +1 -0
- package/dist/destinations/{google-sheets-partner/postSheet → actable-predictive/sendTransactionEvent}/index.d.ts +0 -0
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js +113 -0
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js.map +1 -0
- package/dist/destinations/actable-predictive/sendWebEvent/generated-types.d.ts +9 -0
- package/dist/destinations/actable-predictive/sendWebEvent/generated-types.js +3 -0
- package/dist/destinations/actable-predictive/sendWebEvent/generated-types.js.map +1 -0
- package/dist/destinations/actable-predictive/sendWebEvent/index.d.ts +5 -0
- package/dist/destinations/actable-predictive/sendWebEvent/index.js +84 -0
- package/dist/destinations/actable-predictive/sendWebEvent/index.js.map +1 -0
- package/dist/destinations/amplitude/logPurchase/index.js +2 -6
- package/dist/destinations/amplitude/logPurchase/index.js.map +1 -1
- package/dist/destinations/clevertap/userDelete/index.js +1 -1
- package/dist/destinations/clevertap/userDelete/index.js.map +1 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +1 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
- package/dist/destinations/hubspot/upsertContact/index.js +1 -1
- package/dist/destinations/hubspot/upsertContact/index.js.map +1 -1
- package/dist/destinations/index.js +1 -3
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/mixpanel/mixpanel-properties.js +24 -0
- package/dist/destinations/mixpanel/mixpanel-properties.js.map +1 -1
- package/dist/destinations/mixpanel/mixpanel-types.d.ts +1 -1
- package/dist/destinations/mixpanel/trackEvent/functions.js +9 -3
- package/dist/destinations/mixpanel/trackEvent/functions.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/generated-types.d.ts +4 -1
- package/dist/destinations/mixpanel/trackEvent/index.js +2 -75
- package/dist/destinations/mixpanel/trackEvent/index.js.map +1 -1
- package/dist/destinations/mixpanel/trackPurchase/generated-types.d.ts +5 -0
- package/dist/destinations/mixpanel/trackPurchase/index.js +1 -1
- package/dist/destinations/mixpanel/trackPurchase/index.js.map +1 -1
- package/dist/destinations/moengage/index.js +4 -0
- package/dist/destinations/moengage/index.js.map +1 -1
- package/dist/destinations/moengage/regional-endpoints.d.ts +1 -0
- package/dist/destinations/moengage/regional-endpoints.js +2 -1
- package/dist/destinations/moengage/regional-endpoints.js.map +1 -1
- package/dist/destinations/salesforce/account/generated-types.d.ts +0 -1
- package/dist/destinations/salesforce/account/index.js +0 -1
- package/dist/destinations/salesforce/account/index.js.map +1 -1
- package/dist/destinations/salesforce/cases/generated-types.d.ts +0 -1
- package/dist/destinations/salesforce/cases/index.js +0 -1
- package/dist/destinations/salesforce/cases/index.js.map +1 -1
- package/dist/destinations/salesforce/contact/generated-types.d.ts +0 -1
- package/dist/destinations/salesforce/contact/index.js +0 -1
- package/dist/destinations/salesforce/contact/index.js.map +1 -1
- package/dist/destinations/salesforce/customObject/generated-types.d.ts +0 -1
- package/dist/destinations/salesforce/customObject/index.js +0 -1
- package/dist/destinations/salesforce/customObject/index.js.map +1 -1
- package/dist/destinations/salesforce/lead/generated-types.d.ts +0 -1
- package/dist/destinations/salesforce/lead/index.js +0 -1
- package/dist/destinations/salesforce/lead/index.js.map +1 -1
- package/dist/destinations/salesforce/opportunity/generated-types.d.ts +0 -1
- package/dist/destinations/salesforce/opportunity/index.js +0 -1
- package/dist/destinations/salesforce/opportunity/index.js.map +1 -1
- package/dist/destinations/salesforce/sf-operations.js +6 -6
- package/dist/destinations/salesforce/sf-operations.js.map +1 -1
- package/dist/destinations/salesforce/sf-properties.d.ts +0 -2
- package/dist/destinations/salesforce/sf-properties.js +1 -11
- package/dist/destinations/salesforce/sf-properties.js.map +1 -1
- package/dist/destinations/segment/segment-properties.js +9 -9
- package/dist/destinations/segment/segment-properties.js.map +1 -1
- package/package.json +4 -4
- package/dist/destinations/actions-bingads/functions.d.ts +0 -0
- package/dist/destinations/actions-bingads/functions.js +0 -2
- package/dist/destinations/actions-bingads/functions.js.map +0 -1
- package/dist/destinations/actions-bingads/generated-types.d.ts +0 -10
- package/dist/destinations/actions-bingads/generated-types.js.map +0 -1
- package/dist/destinations/actions-bingads/index.js +0 -77
- package/dist/destinations/actions-bingads/index.js.map +0 -1
- package/dist/destinations/actions-bingads/offlineConversions/formatter.d.ts +0 -8
- package/dist/destinations/actions-bingads/offlineConversions/formatter.js +0 -33
- package/dist/destinations/actions-bingads/offlineConversions/formatter.js.map +0 -1
- package/dist/destinations/actions-bingads/offlineConversions/generated-types.d.ts +0 -7
- package/dist/destinations/actions-bingads/offlineConversions/generated-types.js.map +0 -1
- package/dist/destinations/actions-bingads/offlineConversions/index.js +0 -131
- package/dist/destinations/actions-bingads/offlineConversions/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/constants.d.ts +0 -3
- package/dist/destinations/google-sheets-partner/constants.js +0 -7
- package/dist/destinations/google-sheets-partner/constants.js.map +0 -1
- package/dist/destinations/google-sheets-partner/generated-types.d.ts +0 -2
- package/dist/destinations/google-sheets-partner/generated-types.js.map +0 -1
- package/dist/destinations/google-sheets-partner/googleapis/index.d.ts +0 -17
- package/dist/destinations/google-sheets-partner/googleapis/index.js +0 -34
- package/dist/destinations/google-sheets-partner/googleapis/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/index.d.ts +0 -4
- package/dist/destinations/google-sheets-partner/index.js +0 -39
- package/dist/destinations/google-sheets-partner/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/postSheet/generated-types.d.ts +0 -11
- package/dist/destinations/google-sheets-partner/postSheet/generated-types.js.map +0 -1
- package/dist/destinations/google-sheets-partner/postSheet/index.js +0 -79
- package/dist/destinations/google-sheets-partner/postSheet/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/postSheet/operations.d.ts +0 -10
- package/dist/destinations/google-sheets-partner/postSheet/operations.js +0 -96
- package/dist/destinations/google-sheets-partner/postSheet/operations.js.map +0 -1
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/actable-predictive/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { DestinationDefinition } from '@segment/actions-core';
|
|
2
2
|
import type { Settings } from './generated-types';
|
|
3
|
+
export declare const API_URL = "https://api.converscience.com/events";
|
|
4
|
+
export declare function formatTimestampAsUnixSeconds(ISOTimestamp: string | number): number;
|
|
3
5
|
declare const destination: DestinationDefinition<Settings>;
|
|
4
6
|
export default destination;
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
exports.formatTimestampAsUnixSeconds = exports.API_URL = void 0;
|
|
7
|
+
const sendEmailEvent_1 = __importDefault(require("./sendEmailEvent"));
|
|
8
|
+
const sendWebEvent_1 = __importDefault(require("./sendWebEvent"));
|
|
9
|
+
const sendTransactionEvent_1 = __importDefault(require("./sendTransactionEvent"));
|
|
10
|
+
const sendCustomEvent_1 = __importDefault(require("./sendCustomEvent"));
|
|
11
|
+
const dayjs_1 = __importDefault(require("../../lib/dayjs"));
|
|
12
|
+
exports.API_URL = "https://api.converscience.com/events";
|
|
13
|
+
function formatTimestampAsUnixSeconds(ISOTimestamp) {
|
|
14
|
+
return dayjs_1.default.utc(ISOTimestamp).unix();
|
|
15
|
+
}
|
|
16
|
+
exports.formatTimestampAsUnixSeconds = formatTimestampAsUnixSeconds;
|
|
17
|
+
const destination = {
|
|
18
|
+
name: 'Actable Predictive',
|
|
19
|
+
slug: 'actions-actable-predictive',
|
|
20
|
+
mode: 'cloud',
|
|
21
|
+
authentication: {
|
|
22
|
+
scheme: 'custom',
|
|
23
|
+
fields: {
|
|
24
|
+
client_id: {
|
|
25
|
+
label: 'Client ID',
|
|
26
|
+
description: 'Your Actable-supplied Client ID.',
|
|
27
|
+
type: 'string',
|
|
28
|
+
required: true
|
|
29
|
+
},
|
|
30
|
+
client_secret: {
|
|
31
|
+
label: 'Client Secret',
|
|
32
|
+
description: 'Your Actable-supplied Client Secret.',
|
|
33
|
+
type: 'string',
|
|
34
|
+
required: true
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
testAuthentication: (request) => {
|
|
38
|
+
return request(exports.API_URL, {
|
|
39
|
+
method: 'post',
|
|
40
|
+
json: { data: [{ stream_key: 'auth' }] }
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
extendRequest({ settings }) {
|
|
45
|
+
return {
|
|
46
|
+
headers: { Authorization: Buffer.from(settings.client_id + ':' + settings.client_secret).toString('base64') }
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
actions: {
|
|
50
|
+
sendEmailEvent: sendEmailEvent_1.default,
|
|
51
|
+
sendWebEvent: sendWebEvent_1.default,
|
|
52
|
+
sendTransactionEvent: sendTransactionEvent_1.default,
|
|
53
|
+
sendCustomEvent: sendCustomEvent_1.default
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
exports.default = destination;
|
|
57
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/actable-predictive/index.ts"],"names":[],"mappings":";;;;;;AAGA,sEAA6C;AAC7C,kEAAyC;AACzC,kFAAyD;AACzD,wEAA+C;AAE/C,4DAAmC;AAGtB,QAAA,OAAO,GAAG,sCAAsC,CAAA;AAE7D,SAAgB,4BAA4B,CAAC,YAA6B;IACxE,OAAO,eAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,CAAA;AACvC,CAAC;AAFD,oEAEC;AAED,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,SAAS,EAAE;gBACT,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,kCAAkC;gBAC/C,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,aAAa,EAAE;gBACb,KAAK,EAAE,eAAe;gBACtB,WAAW,EAAE,sCAAsC;gBACnD,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;YAC9B,OAAO,OAAO,CAAC,eAAO,EAAE;gBACtB,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE;aACzC,CAAC,CAAA;QACJ,CAAC;KACF;IAED,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO;YACL,OAAO,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,GAAG,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;SAC9G,CAAA;IACH,CAAC;IAED,OAAO,EAAE;QACP,cAAc,EAAd,wBAAc;QACd,YAAY,EAAZ,sBAAY;QACZ,oBAAoB,EAApB,8BAAoB;QACpB,eAAe,EAAf,yBAAe;KAChB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendCustomEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const index_1 = require("../index");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Send Custom Event',
|
|
6
|
+
description: 'Send a custom event to Actable for prediction.',
|
|
7
|
+
fields: {
|
|
8
|
+
customer_id: {
|
|
9
|
+
label: 'Customer ID',
|
|
10
|
+
description: 'The unique user identifier.',
|
|
11
|
+
type: 'string',
|
|
12
|
+
required: true,
|
|
13
|
+
default: {
|
|
14
|
+
'@path': '$.userId'
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
timestamp: {
|
|
18
|
+
type: "datetime",
|
|
19
|
+
label: "Timestamp of Event",
|
|
20
|
+
description: "Timestamp of when the custom event occured.",
|
|
21
|
+
format: 'date-time',
|
|
22
|
+
required: true,
|
|
23
|
+
default: {
|
|
24
|
+
'@path': '$.timestamp'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
properties: {
|
|
28
|
+
type: "object",
|
|
29
|
+
label: "Custom Properties",
|
|
30
|
+
description: "Send an object of custom properties to Actable Predictive for custom data modeling.",
|
|
31
|
+
format: "text",
|
|
32
|
+
required: true,
|
|
33
|
+
default: { '@path': '$.properties' }
|
|
34
|
+
},
|
|
35
|
+
stream_key: {
|
|
36
|
+
type: "string",
|
|
37
|
+
format: "text",
|
|
38
|
+
label: "Stream Key",
|
|
39
|
+
description: "Dataset label, should be left as default unless specified otherwise.",
|
|
40
|
+
required: true,
|
|
41
|
+
default: "custom"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
perform: (request, data) => {
|
|
45
|
+
data.payload.timestamp = index_1.formatTimestampAsUnixSeconds(data.payload.timestamp);
|
|
46
|
+
return request(index_1.API_URL, {
|
|
47
|
+
method: 'post',
|
|
48
|
+
json: { data: [data.payload] }
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
performBatch: (request, data) => {
|
|
52
|
+
for (const ev of data.payload) {
|
|
53
|
+
ev.timestamp = index_1.formatTimestampAsUnixSeconds(ev.timestamp);
|
|
54
|
+
}
|
|
55
|
+
return request(index_1.API_URL, {
|
|
56
|
+
method: 'post',
|
|
57
|
+
json: { data: data.payload }
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
exports.default = action;
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendCustomEvent/index.ts"],"names":[],"mappings":";;AAGA,oCAAgE;AAEhE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EAAE,gDAAgD;IAC7D,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,6BAA6B;YAC1C,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,SAAS,EAAE;YACT,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,6CAA6C;YAC1D,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EAAE,qFAAqF;YAClG,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;SAErC;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,sEAAsE;YACnF,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,QAAQ;SAClB;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,oCAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;QAE7E,OAAO,OAAO,CAAC,eAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;SAC/B,CAAC,CAAA;IACJ,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,OAAO,EAAE;YAC7B,EAAE,CAAC,SAAS,GAAG,oCAA4B,CAAC,EAAE,CAAC,SAAS,CAAC,CAAA;SAC1D;QACD,OAAO,OAAO,CAAC,eAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;SAC7B,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendEmailEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const index_1 = require("../index");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Send Email Event',
|
|
6
|
+
description: '',
|
|
7
|
+
fields: {
|
|
8
|
+
customer_id: {
|
|
9
|
+
label: 'Customer ID',
|
|
10
|
+
description: 'The unique user identifier.',
|
|
11
|
+
type: 'string',
|
|
12
|
+
required: true,
|
|
13
|
+
default: {
|
|
14
|
+
'@path': '$.userId'
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
date_email_sent: {
|
|
18
|
+
type: "datetime",
|
|
19
|
+
label: "timestamp of event",
|
|
20
|
+
description: "Timestamp of event",
|
|
21
|
+
format: 'date-time',
|
|
22
|
+
required: true,
|
|
23
|
+
default: {
|
|
24
|
+
'@path': '$.timestamp'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
campaign_name: {
|
|
28
|
+
type: "string",
|
|
29
|
+
label: "Campaign Name of Email",
|
|
30
|
+
description: "name of the campaign associated with the email",
|
|
31
|
+
format: 'text',
|
|
32
|
+
required: false,
|
|
33
|
+
default: {
|
|
34
|
+
'@path': '$.context.campaign.name'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
clicked_flag: {
|
|
38
|
+
type: "integer",
|
|
39
|
+
label: "Click Event Indicator",
|
|
40
|
+
description: "1=email was clicked, 0 email was not clicked",
|
|
41
|
+
format: 'text',
|
|
42
|
+
required: false
|
|
43
|
+
},
|
|
44
|
+
opened_flag: {
|
|
45
|
+
type: "integer",
|
|
46
|
+
label: "Open Event Indicator",
|
|
47
|
+
description: "1=email was opened, 0 email was not opened",
|
|
48
|
+
format: 'text',
|
|
49
|
+
required: false
|
|
50
|
+
},
|
|
51
|
+
unsub_flag: {
|
|
52
|
+
type: "integer",
|
|
53
|
+
label: "Unsubscribe Event Indicator",
|
|
54
|
+
description: "1=customer unsubscribed from the email list, 0 user remained subscribed",
|
|
55
|
+
format: 'text',
|
|
56
|
+
required: false
|
|
57
|
+
},
|
|
58
|
+
stream_key: {
|
|
59
|
+
type: "string",
|
|
60
|
+
format: "text",
|
|
61
|
+
label: "Stream Key",
|
|
62
|
+
description: "Dataset label, should be left as default unless directed otherwise",
|
|
63
|
+
required: true,
|
|
64
|
+
default: "email"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
perform: (request, data) => {
|
|
68
|
+
data.payload.date_email_sent = index_1.formatTimestampAsUnixSeconds(data.payload.date_email_sent);
|
|
69
|
+
return request(index_1.API_URL, {
|
|
70
|
+
method: 'post',
|
|
71
|
+
json: { data: [data.payload] }
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
performBatch: (request, data) => {
|
|
75
|
+
for (const ev of data.payload) {
|
|
76
|
+
ev.date_email_sent = index_1.formatTimestampAsUnixSeconds(ev.date_email_sent);
|
|
77
|
+
}
|
|
78
|
+
return request(index_1.API_URL, {
|
|
79
|
+
method: 'post',
|
|
80
|
+
json: { data: data.payload }
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
exports.default = action;
|
|
85
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendEmailEvent/index.ts"],"names":[],"mappings":";;AAGA,oCAAgE;AAEhE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,6BAA6B;YAC1C,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,eAAe,EAAE;YACf,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,oBAAoB;YACjC,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,wBAAwB;YAC/B,WAAW,EAAE,gDAAgD;YAC7D,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,yBAAyB;aACnC;SAEF;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,uBAAuB;YAC9B,WAAW,EAAE,8CAA8C;YAC3D,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,KAAK;SAChB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,sBAAsB;YAC7B,WAAW,EAAE,4CAA4C;YACzD,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,KAAK;SAChB;QACD,UAAU,EAAE;YACV,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,6BAA6B;YACpC,WAAW,EAAE,yEAAyE;YACtF,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,KAAK;SAChB;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,oEAAoE;YACjF,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,OAAO;SACjB;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,IAAI,CAAC,OAAO,CAAC,eAAe,GAAG,oCAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;QAEzF,OAAO,OAAO,CAAC,eAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;SAC/B,CAAC,CAAA;IACJ,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,OAAO,EAAE;YAC7B,EAAE,CAAC,eAAe,GAAG,oCAA4B,CAAC,EAAE,CAAC,eAAe,CAAC,CAAA;SACtE;QACD,OAAO,OAAO,CAAC,eAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;SAC7B,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendTransactionEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
function formatPurchasePayload(purchaseEvent) {
|
|
6
|
+
purchaseEvent.purchase_datetime = index_1.formatTimestampAsUnixSeconds(purchaseEvent.purchase_datetime);
|
|
7
|
+
const codeList = [];
|
|
8
|
+
if (purchaseEvent.discount_code) {
|
|
9
|
+
codeList.push(purchaseEvent.discount_code);
|
|
10
|
+
}
|
|
11
|
+
if (purchaseEvent.products) {
|
|
12
|
+
for (const product of purchaseEvent.products) {
|
|
13
|
+
if (product.coupon) {
|
|
14
|
+
codeList.push(product.coupon);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
const productList = [];
|
|
19
|
+
if (purchaseEvent.products) {
|
|
20
|
+
for (const product of purchaseEvent.products) {
|
|
21
|
+
const productIdentifier = product.product_id || product.sku;
|
|
22
|
+
if (productIdentifier) {
|
|
23
|
+
productList.push(productIdentifier);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
...actions_core_1.omit(purchaseEvent, ["products", "discount_code"]),
|
|
29
|
+
"product_column": productList.join("|"),
|
|
30
|
+
"discount_code": codeList.join("|")
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const action = {
|
|
34
|
+
title: 'Send Transaction Event',
|
|
35
|
+
description: '',
|
|
36
|
+
fields: {
|
|
37
|
+
customer_id: {
|
|
38
|
+
label: 'Customer ID',
|
|
39
|
+
description: 'The unique user identifier.',
|
|
40
|
+
type: 'string',
|
|
41
|
+
required: true,
|
|
42
|
+
default: {
|
|
43
|
+
'@path': '$.userId'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
discount_code: {
|
|
47
|
+
type: "string",
|
|
48
|
+
label: "Discount Code",
|
|
49
|
+
description: "Discount code, if any, used on purchase. Will be used in addition to per-product coupons in Segment v2commerce events spec.",
|
|
50
|
+
format: "text",
|
|
51
|
+
required: false
|
|
52
|
+
},
|
|
53
|
+
transaction_id: {
|
|
54
|
+
type: "string",
|
|
55
|
+
label: "Transaction ID",
|
|
56
|
+
description: "Optional Identifier for transaction.",
|
|
57
|
+
format: "text",
|
|
58
|
+
required: false,
|
|
59
|
+
default: { '@path': '$.properties.order_id' }
|
|
60
|
+
},
|
|
61
|
+
spend: {
|
|
62
|
+
type: "number",
|
|
63
|
+
label: "Amount",
|
|
64
|
+
description: "Total order amount.",
|
|
65
|
+
format: "text",
|
|
66
|
+
required: false,
|
|
67
|
+
default: { '@path': '$.properties.total' }
|
|
68
|
+
},
|
|
69
|
+
products: {
|
|
70
|
+
type: "object",
|
|
71
|
+
multiple: true,
|
|
72
|
+
label: "Products Purchased",
|
|
73
|
+
description: "product(s) purchased in transaction. This value should be an array of objects which at the minimum contains a Product ID or SKU per-product.",
|
|
74
|
+
format: "text",
|
|
75
|
+
required: true,
|
|
76
|
+
default: { '@path': '$.properties.products' }
|
|
77
|
+
},
|
|
78
|
+
purchase_datetime: {
|
|
79
|
+
type: "datetime",
|
|
80
|
+
label: "Timestamp",
|
|
81
|
+
description: "timestamp of when transaction event occurred.",
|
|
82
|
+
format: "date-time",
|
|
83
|
+
required: true,
|
|
84
|
+
default: { '@path': '$.timestamp' }
|
|
85
|
+
},
|
|
86
|
+
stream_key: {
|
|
87
|
+
type: "string",
|
|
88
|
+
format: "text",
|
|
89
|
+
label: "Stream Key",
|
|
90
|
+
description: "Dataset label, should be left as default unless directed otherwise.",
|
|
91
|
+
required: true,
|
|
92
|
+
default: "transaction"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
perform: (request, data) => {
|
|
96
|
+
return request(index_1.API_URL, {
|
|
97
|
+
method: 'post',
|
|
98
|
+
json: { data: [formatPurchasePayload(data.payload)] }
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
performBatch: (request, data) => {
|
|
102
|
+
const formattedPayload = [];
|
|
103
|
+
for (const ev of data.payload) {
|
|
104
|
+
formattedPayload.push(formatPurchasePayload(ev));
|
|
105
|
+
}
|
|
106
|
+
return request(index_1.API_URL, {
|
|
107
|
+
method: 'post',
|
|
108
|
+
json: { data: formattedPayload }
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
exports.default = action;
|
|
113
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendTransactionEvent/index.ts"],"names":[],"mappings":";;AAAA,wDAA8D;AAG9D,oCAAgE;AAEhE,SAAS,qBAAqB,CAAC,aAAsB;IACnD,aAAa,CAAC,iBAAiB,GAAG,oCAA4B,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAA;IAG/F,MAAM,QAAQ,GAAG,EAAE,CAAA;IACnB,IAAI,aAAa,CAAC,aAAa,EAAE;QAC/B,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,CAAA;KAC3C;IACD,IAAI,aAAa,CAAC,QAAQ,EAAE;QAC1B,KAAK,MAAM,OAAO,IAAI,aAAa,CAAC,QAAQ,EAAE;YAC5C,IAAI,OAAO,CAAC,MAAM,EAAE;gBAClB,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;aAC9B;SACF;KACF;IAGD,MAAM,WAAW,GAAG,EAAE,CAAA;IACtB,IAAI,aAAa,CAAC,QAAQ,EAAE;QAC1B,KAAK,MAAM,OAAO,IAAI,aAAa,CAAC,QAAQ,EAAE;YAC5C,MAAM,iBAAiB,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAA;YAC3D,IAAI,iBAAiB,EAAE;gBACrB,WAAW,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;aACpC;SACF;KACF;IAED,OAAO;QACL,GAAG,mBAAI,CAAC,aAAa,EAAE,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;QACrD,gBAAgB,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC;QACvC,eAAe,EAAE,QAAQ,C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,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;SACpC;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,qEAAqE;YAClF,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,aAAa;SACvB;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,eAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE;SACtD,CAAC,CAAA;IACJ,CAAC;IACD,YAAY,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QAC9B,MAAM,gBAAgB,GAAa,EAAE,CAAA;QAErC,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,OAAO,EAAE;YAC7B,gBAAgB,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAAE,CAAC,CAAC,CAAA;SACjD;QACD,OAAO,OAAO,CAAC,eAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;SACjC,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AACD,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendWebEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const index_1 = require("../index");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Send Web Activity Event',
|
|
6
|
+
description: '',
|
|
7
|
+
fields: {
|
|
8
|
+
customer_id: {
|
|
9
|
+
label: 'Customer ID',
|
|
10
|
+
description: 'The unique user identifier.',
|
|
11
|
+
type: 'string',
|
|
12
|
+
required: true,
|
|
13
|
+
default: {
|
|
14
|
+
'@path': '$.userId'
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
datetime: {
|
|
18
|
+
type: "datetime",
|
|
19
|
+
format: "date-time",
|
|
20
|
+
label: "Event Timestamp",
|
|
21
|
+
description: "Timestamp of event",
|
|
22
|
+
required: true,
|
|
23
|
+
default: { '@path': '$.timestamp' }
|
|
24
|
+
},
|
|
25
|
+
interaction_type: {
|
|
26
|
+
type: "string",
|
|
27
|
+
format: "text",
|
|
28
|
+
label: "Event Type",
|
|
29
|
+
description: "type of interaction (page view, add to cart, etc).",
|
|
30
|
+
required: true,
|
|
31
|
+
default: { '@path': '$.event' }
|
|
32
|
+
},
|
|
33
|
+
utm_campaign: {
|
|
34
|
+
type: "string",
|
|
35
|
+
format: "text",
|
|
36
|
+
label: "UTM Campaign",
|
|
37
|
+
description: "UTM campaign parameter associated with event.",
|
|
38
|
+
required: false,
|
|
39
|
+
default: { '@path': '$.context.campaign.name' }
|
|
40
|
+
},
|
|
41
|
+
utm_medium: {
|
|
42
|
+
type: "string",
|
|
43
|
+
format: "text",
|
|
44
|
+
label: "UTM Medium",
|
|
45
|
+
description: "UTM medium parameter associated with event.",
|
|
46
|
+
required: false,
|
|
47
|
+
default: { '@path': '$.context.campaign.medium' }
|
|
48
|
+
},
|
|
49
|
+
utm_source: {
|
|
50
|
+
type: "string",
|
|
51
|
+
format: "text",
|
|
52
|
+
label: "UTM Source",
|
|
53
|
+
description: "UTM source parameter associated with event.",
|
|
54
|
+
required: false,
|
|
55
|
+
default: { '@path': '$.context.campaign.source' }
|
|
56
|
+
},
|
|
57
|
+
stream_key: {
|
|
58
|
+
type: "string",
|
|
59
|
+
format: "text",
|
|
60
|
+
label: "Stream Key",
|
|
61
|
+
description: "Dataset label, should be left as default unless directed otherwise",
|
|
62
|
+
required: true,
|
|
63
|
+
default: "web"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
perform: (request, data) => {
|
|
67
|
+
data.payload.datetime = index_1.formatTimestampAsUnixSeconds(data.payload.datetime);
|
|
68
|
+
return request(index_1.API_URL, {
|
|
69
|
+
method: 'post',
|
|
70
|
+
json: { data: [data.payload] }
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
performBatch: (request, data) => {
|
|
74
|
+
for (const ev of data.payload) {
|
|
75
|
+
ev.datetime = index_1.formatTimestampAsUnixSeconds(ev.datetime);
|
|
76
|
+
}
|
|
77
|
+
return request(index_1.API_URL, {
|
|
78
|
+
method: 'post',
|
|
79
|
+
json: { data: data.payload }
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
exports.default = action;
|
|
84
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendWebEvent/index.ts"],"names":[],"mappings":";;AAGA,oCAAgE;AAEhE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,6BAA6B;YAC1C,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,WAAW;YACnB,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,oBAAoB;YACjC,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;SACpC;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,oDAAoD;YACjE,QAAQ,EAAE,IA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O,EAAE;YAC7B,EAAE,CAAC,QAAQ,GAAG,oCAA4B,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAA;SACxD;QACD,OAAO,OAAO,CAAC,eAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE;SAC7B,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -13,15 +13,11 @@ const user_agent_1 = require("../user-agent");
|
|
|
13
13
|
const regional_endpoints_1 = require("../regional-endpoints");
|
|
14
14
|
const revenueKeys = ['revenue', 'price', 'productId', 'quantity', 'revenueType'];
|
|
15
15
|
function getRevenueProperties(payload) {
|
|
16
|
-
|
|
17
|
-
if (typeof payload.quantity === 'number' && typeof payload.price === 'number') {
|
|
18
|
-
revenue = payload.quantity * payload.price;
|
|
19
|
-
}
|
|
20
|
-
if (!revenue) {
|
|
16
|
+
if (typeof payload.revenue !== 'number') {
|
|
21
17
|
return {};
|
|
22
18
|
}
|
|
23
19
|
return {
|
|
24
|
-
revenue,
|
|
20
|
+
revenue: payload.revenue,
|
|
25
21
|
revenueType: payload.revenueType ?? 'Purchase',
|
|
26
22
|
quantity: typeof payload.quantity === 'number' ? Math.round(payload.quantity) : undefined,
|
|
27
23
|
price: payload.price,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/amplitude/logPurchase/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA6D;AAC7D,+DAAsC;AACtC,kDAA6C;AAI7C,gCAA6C;AAC7C,0CAAqD;AACrD,oEAA8D;AAC9D,8CAAwD;AACxD,8DAA2D;AAW3D,MAAM,WAAW,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,CAAC,CAAA;AAUhF,SAAS,oBAAoB,CAAC,OAAqB;IACjD,IAAI,OAAO,
|
|
1
|
+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
|
|
10
|
+
description: 'The ID of the profile which you want to delete',
|
|
11
11
|
default: { '@path': '$.userId' },
|
|
12
12
|
required: true
|
|
13
13
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/clevertap/userDelete/index.ts"],"names":[],"mappings":";;AAKA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,0EAA0E;IACvF,MAAM,EAAE;QACN,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/clevertap/userDelete/index.ts"],"names":[],"mappings":";;AAKA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,0EAA0E;IACvF,MAAM,EAAE;QACN,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,gDAAgD;YAC7D,OAAO,EAAE,EAAC,OAAO,EAAE,UAAU,EAAC;YAC9B,QAAQ,EAAE,IAAI;SACf;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAC,QAAQ,EAAE,OAAO,EAAC,EAAE,EAAE;QACxC,MAAM,KAAK,GAAgB;YACzB,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAA;QACD,OAAO,OAAO,CAAC,GAAG,QAAQ,CAAC,iBAAiB,yBAAyB,EAAE;YACrE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,KAAK;YACX,OAAO,EAAE;gBACP,wBAAwB,EAAE,GAAG,QAAQ,CAAC,kBAAkB,EAAE;gBAC1D,sBAAsB,EAAE,GAAG,QAAQ,CAAC,iBAAiB,EAAE;aACxD;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -8,7 +8,7 @@ const action = {
|
|
|
8
8
|
fields: {
|
|
9
9
|
eventName: {
|
|
10
10
|
label: 'Event Name',
|
|
11
|
-
description: 'The internal event name assigned by HubSpot. This can be found in your HubSpot account. Events must be predefined in HubSpot. Learn how to find the internal name in [HubSpot’s documentation](https://knowledge.hubspot.com/analytics-tools/create-custom-behavioral-events).',
|
|
11
|
+
description: 'The internal event name assigned by HubSpot. This can be found in your HubSpot account. Events must be predefined in HubSpot. Please input the full internal event name including the `pe` prefix (i.e. `pe<HubID>_event_name`). Learn how to find the internal name in [HubSpot’s documentation](https://knowledge.hubspot.com/analytics-tools/create-custom-behavioral-events).',
|
|
12
12
|
type: 'string',
|
|
13
13
|
required: true
|
|
14
14
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/sendCustomBehavioralEvent/index.ts"],"names":[],"mappings":";;AAEA,8CAAgD;AAYhD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,8BAA8B;IACrC,WAAW,EAAE,4CAA4C;IACzD,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,SAAS,EAAE;YACT,KAAK,EAAE,YAAY;YACnB,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/sendCustomBehavioralEvent/index.ts"],"names":[],"mappings":";;AAEA,8CAAgD;AAYhD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,8BAA8B;IACrC,WAAW,EAAE,4CAA4C;IACzD,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,SAAS,EAAE;YACT,KAAK,EAAE,YAAY;YACnB,WAAW,EACT,mXAAmX;YACrX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,UAAU,EAAE;YACV,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,sFAAsF;YACnG,IAAI,EAAE,UAAU;YAChB,OAA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
|
}
|
|
152
152
|
catch (ex) {
|
|
153
|
-
if (ex?.response
|
|
153
|
+
if (ex?.response?.status == 404) {
|
|
154
154
|
const result = await createContact(request, contactProperties);
|
|
155
155
|
transactionContext?.setTransaction('contact_id', result.data.id);
|
|
156
156
|
return result;
|