@segment/action-destinations 3.127.2 → 3.127.3-staging.138
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/index.js +1 -1
- package/dist/destinations/actable-predictive/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendCustomEvent/index.js +13 -13
- package/dist/destinations/actable-predictive/sendCustomEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js +20 -20
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js +28 -28
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendWebEvent/index.js +25 -25
- package/dist/destinations/actable-predictive/sendWebEvent/index.js.map +1 -1
- package/dist/destinations/actions-bingads/functions.d.ts +0 -0
- package/dist/destinations/actions-bingads/functions.js +2 -0
- package/dist/destinations/actions-bingads/functions.js.map +1 -0
- package/dist/destinations/actions-bingads/generated-types.d.ts +10 -0
- package/dist/destinations/actions-bingads/generated-types.js +3 -0
- package/dist/destinations/actions-bingads/generated-types.js.map +1 -0
- package/dist/destinations/actions-bingads/index.d.ts +4 -0
- package/dist/destinations/actions-bingads/index.js +77 -0
- package/dist/destinations/actions-bingads/index.js.map +1 -0
- package/dist/destinations/actions-bingads/offlineConversions/formatter.d.ts +8 -0
- package/dist/destinations/actions-bingads/offlineConversions/formatter.js +33 -0
- package/dist/destinations/actions-bingads/offlineConversions/formatter.js.map +1 -0
- package/dist/destinations/actions-bingads/offlineConversions/generated-types.d.ts +7 -0
- package/dist/destinations/actions-bingads/offlineConversions/generated-types.js +3 -0
- package/dist/destinations/actions-bingads/offlineConversions/generated-types.js.map +1 -0
- package/dist/destinations/actions-bingads/offlineConversions/index.d.ts +5 -0
- package/dist/destinations/actions-bingads/offlineConversions/index.js +131 -0
- package/dist/destinations/actions-bingads/offlineConversions/index.js.map +1 -0
- package/dist/destinations/braze/trackEvent/generated-types.d.ts +0 -1
- package/dist/destinations/braze/trackEvent/index.js +35 -11
- package/dist/destinations/braze/trackEvent/index.js.map +1 -1
- package/dist/destinations/braze/trackPurchase/index.js +43 -2
- package/dist/destinations/braze/trackPurchase/index.js.map +1 -1
- package/dist/destinations/braze-cohorts/cohortChanges.d.ts +10 -0
- package/dist/destinations/braze-cohorts/cohortChanges.js +3 -0
- package/dist/destinations/braze-cohorts/cohortChanges.js.map +1 -0
- package/dist/destinations/clevertap/userDelete/index.js +4 -4
- package/dist/destinations/clevertap/userDelete/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/index.js +3 -1
- package/dist/destinations/engage-messaging-twilio/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js +2 -104
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.d.ts +15 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js +66 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.d.ts +23 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.d.ts +5 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js +122 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.d.ts +15 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js +66 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.d.ts +23 -0
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js +97 -0
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js.map +1 -0
- package/dist/destinations/google-sheets-partner/constants.d.ts +3 -0
- package/dist/destinations/google-sheets-partner/constants.js +7 -0
- package/dist/destinations/google-sheets-partner/constants.js.map +1 -0
- package/dist/destinations/google-sheets-partner/generated-types.d.ts +2 -0
- package/dist/destinations/google-sheets-partner/generated-types.js +3 -0
- package/dist/destinations/google-sheets-partner/generated-types.js.map +1 -0
- package/dist/destinations/google-sheets-partner/googleapis/index.d.ts +17 -0
- package/dist/destinations/google-sheets-partner/googleapis/index.js +34 -0
- package/dist/destinations/google-sheets-partner/googleapis/index.js.map +1 -0
- package/dist/destinations/google-sheets-partner/index.d.ts +4 -0
- package/dist/destinations/google-sheets-partner/index.js +43 -0
- package/dist/destinations/google-sheets-partner/index.js.map +1 -0
- package/dist/destinations/google-sheets-partner/postSheet/generated-types.d.ts +11 -0
- package/dist/destinations/google-sheets-partner/postSheet/generated-types.js +3 -0
- package/dist/destinations/google-sheets-partner/postSheet/generated-types.js.map +1 -0
- package/dist/destinations/google-sheets-partner/postSheet/index.d.ts +5 -0
- package/dist/destinations/google-sheets-partner/postSheet/index.js +79 -0
- package/dist/destinations/google-sheets-partner/postSheet/index.js.map +1 -0
- package/dist/destinations/google-sheets-partner/postSheet/operations.d.ts +10 -0
- package/dist/destinations/google-sheets-partner/postSheet/operations.js +96 -0
- package/dist/destinations/google-sheets-partner/postSheet/operations.js.map +1 -0
- package/dist/destinations/heap/index.js +1 -1
- package/dist/destinations/heap/index.js.map +1 -1
- package/dist/destinations/heap/trackEvent/generated-types.d.ts +3 -1
- package/dist/destinations/heap/trackEvent/index.js +31 -5
- package/dist/destinations/heap/trackEvent/index.js.map +1 -1
- package/dist/destinations/index.js +1 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/mixpanel/index.js +1 -1
- package/dist/destinations/mixpanel/mixpanel-properties.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/functions.js +1 -1
- package/dist/destinations/mixpanel/trackEvent/functions.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/index.js.map +1 -1
- package/dist/destinations/mixpanel/trackPurchase/index.js.map +1 -1
- package/dist/destinations/mixpanel/utils.js +1 -1
- package/dist/destinations/mixpanel/utils.js.map +1 -1
- package/dist/destinations/salesforce/sf-properties.d.ts +1 -0
- package/dist/destinations/salesforce/sf-properties.js.map +1 -1
- package/dist/destinations/segment/segment-properties.js +1 -2
- package/dist/destinations/segment/segment-properties.js.map +1 -1
- package/dist/destinations/segment/sendTrack/generated-types.d.ts +1 -1
- package/package.json +4 -2
- package/dist/destinations/braze/utils.d.ts +0 -6
- package/dist/destinations/braze/utils.js +0 -81
- package/dist/destinations/braze/utils.js.map +0 -1
|
@@ -9,7 +9,7 @@ const sendWebEvent_1 = __importDefault(require("./sendWebEvent"));
|
|
|
9
9
|
const sendTransactionEvent_1 = __importDefault(require("./sendTransactionEvent"));
|
|
10
10
|
const sendCustomEvent_1 = __importDefault(require("./sendCustomEvent"));
|
|
11
11
|
const dayjs_1 = __importDefault(require("../../lib/dayjs"));
|
|
12
|
-
exports.API_URL =
|
|
12
|
+
exports.API_URL = 'https://api.converscience.com/events';
|
|
13
13
|
function formatTimestampAsUnixSeconds(ISOTimestamp) {
|
|
14
14
|
return dayjs_1.default.utc(ISOTimestamp).unix();
|
|
15
15
|
}
|
|
@@ -1 +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;
|
|
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;AAEtB,QAAA,OAAO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, "__esModule", { value: true });
|
|
|
3
3
|
const index_1 = require("../index");
|
|
4
4
|
const action = {
|
|
5
5
|
title: 'Send Custom Event',
|
|
6
|
-
description:
|
|
6
|
+
description: "Send a custom event to Actable for prediction. Use this to supply events that are not in Actable 's customer view.",
|
|
7
7
|
fields: {
|
|
8
8
|
customer_id: {
|
|
9
9
|
label: 'Customer ID',
|
|
@@ -15,9 +15,9 @@ const action = {
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
timestamp: {
|
|
18
|
-
type:
|
|
19
|
-
label:
|
|
20
|
-
description:
|
|
18
|
+
type: 'datetime',
|
|
19
|
+
label: 'Timestamp of Event',
|
|
20
|
+
description: 'Timestamp of when the custom event occured.',
|
|
21
21
|
format: 'date-time',
|
|
22
22
|
required: true,
|
|
23
23
|
default: {
|
|
@@ -25,20 +25,20 @@ const action = {
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
properties: {
|
|
28
|
-
type:
|
|
29
|
-
label:
|
|
30
|
-
description:
|
|
31
|
-
format:
|
|
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
32
|
required: true,
|
|
33
33
|
default: { '@path': '$.properties' }
|
|
34
34
|
},
|
|
35
35
|
stream_key: {
|
|
36
|
-
type:
|
|
37
|
-
format:
|
|
38
|
-
label:
|
|
39
|
-
description:
|
|
36
|
+
type: 'string',
|
|
37
|
+
format: 'text',
|
|
38
|
+
label: 'Stream Key',
|
|
39
|
+
description: 'Dataset label, should be left as default unless specified otherwise.',
|
|
40
40
|
required: true,
|
|
41
|
-
default:
|
|
41
|
+
default: 'custom'
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
perform: (request, data) => {
|
|
@@ -1 +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,
|
|
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,EACT,oHAAoH;IACtH,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;SACrC;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"}
|
|
@@ -15,9 +15,9 @@ const action = {
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
date_email_sent: {
|
|
18
|
-
type:
|
|
19
|
-
label:
|
|
20
|
-
description:
|
|
18
|
+
type: 'datetime',
|
|
19
|
+
label: 'timestamp of event',
|
|
20
|
+
description: 'Timestamp of event',
|
|
21
21
|
format: 'date-time',
|
|
22
22
|
required: true,
|
|
23
23
|
default: {
|
|
@@ -25,9 +25,9 @@ const action = {
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
campaign_name: {
|
|
28
|
-
type:
|
|
29
|
-
label:
|
|
30
|
-
description:
|
|
28
|
+
type: 'string',
|
|
29
|
+
label: 'Campaign Name of Email',
|
|
30
|
+
description: 'name of the campaign associated with the email',
|
|
31
31
|
format: 'text',
|
|
32
32
|
required: false,
|
|
33
33
|
default: {
|
|
@@ -35,33 +35,33 @@ const action = {
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
clicked_flag: {
|
|
38
|
-
type:
|
|
39
|
-
label:
|
|
40
|
-
description:
|
|
38
|
+
type: 'integer',
|
|
39
|
+
label: 'Click Event Indicator',
|
|
40
|
+
description: '1=email was clicked, 0 email was not clicked',
|
|
41
41
|
format: 'text',
|
|
42
42
|
required: false
|
|
43
43
|
},
|
|
44
44
|
opened_flag: {
|
|
45
|
-
type:
|
|
46
|
-
label:
|
|
47
|
-
description:
|
|
45
|
+
type: 'integer',
|
|
46
|
+
label: 'Open Event Indicator',
|
|
47
|
+
description: '1=email was opened, 0 email was not opened',
|
|
48
48
|
format: 'text',
|
|
49
49
|
required: false
|
|
50
50
|
},
|
|
51
51
|
unsub_flag: {
|
|
52
|
-
type:
|
|
53
|
-
label:
|
|
54
|
-
description:
|
|
52
|
+
type: 'integer',
|
|
53
|
+
label: 'Unsubscribe Event Indicator',
|
|
54
|
+
description: '1=customer unsubscribed from the email list, 0 user remained subscribed',
|
|
55
55
|
format: 'text',
|
|
56
56
|
required: false
|
|
57
57
|
},
|
|
58
58
|
stream_key: {
|
|
59
|
-
type:
|
|
60
|
-
format:
|
|
61
|
-
label:
|
|
62
|
-
description:
|
|
59
|
+
type: 'string',
|
|
60
|
+
format: 'text',
|
|
61
|
+
label: 'Stream Key',
|
|
62
|
+
description: 'Dataset label, should be left as default unless directed otherwise',
|
|
63
63
|
required: true,
|
|
64
|
-
default:
|
|
64
|
+
default: 'email'
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
perform: (request, data) => {
|
|
@@ -1 +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,oGAAoG;IACjH,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;
|
|
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,oGAAoG;IACjH,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;SACF;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,uBAAuB;YAC9B,WAAW,EAAE,8CAA8C;YAC3D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atPurchasePayload(purchaseEvent) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
return {
|
|
28
|
-
...actions_core_1.omit(purchaseEvent, [
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
...actions_core_1.omit(purchaseEvent, ['products', 'discount_code']),
|
|
29
|
+
product_column: productList.join('|'),
|
|
30
|
+
discount_code: codeList.join('|')
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
const action = {
|
|
@@ -44,52 +44,52 @@ const action = {
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
discount_code: {
|
|
47
|
-
type:
|
|
48
|
-
label:
|
|
49
|
-
description:
|
|
50
|
-
format:
|
|
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
51
|
required: false
|
|
52
52
|
},
|
|
53
53
|
transaction_id: {
|
|
54
|
-
type:
|
|
55
|
-
label:
|
|
56
|
-
description:
|
|
57
|
-
format:
|
|
54
|
+
type: 'string',
|
|
55
|
+
label: 'Transaction ID',
|
|
56
|
+
description: 'Optional Identifier for transaction.',
|
|
57
|
+
format: 'text',
|
|
58
58
|
required: false,
|
|
59
59
|
default: { '@path': '$.properties.order_id' }
|
|
60
60
|
},
|
|
61
61
|
spend: {
|
|
62
|
-
type:
|
|
63
|
-
label:
|
|
64
|
-
description:
|
|
65
|
-
format:
|
|
62
|
+
type: 'number',
|
|
63
|
+
label: 'Amount',
|
|
64
|
+
description: 'Total order amount.',
|
|
65
|
+
format: 'text',
|
|
66
66
|
required: false,
|
|
67
67
|
default: { '@path': '$.properties.total' }
|
|
68
68
|
},
|
|
69
69
|
products: {
|
|
70
|
-
type:
|
|
70
|
+
type: 'object',
|
|
71
71
|
multiple: true,
|
|
72
|
-
label:
|
|
73
|
-
description:
|
|
74
|
-
format:
|
|
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
75
|
required: true,
|
|
76
76
|
default: { '@path': '$.properties.products' }
|
|
77
77
|
},
|
|
78
78
|
purchase_datetime: {
|
|
79
|
-
type:
|
|
80
|
-
label:
|
|
81
|
-
description:
|
|
82
|
-
format:
|
|
79
|
+
type: 'datetime',
|
|
80
|
+
label: 'Timestamp',
|
|
81
|
+
description: 'timestamp of when transaction event occurred.',
|
|
82
|
+
format: 'date-time',
|
|
83
83
|
required: true,
|
|
84
84
|
default: { '@path': '$.timestamp' }
|
|
85
85
|
},
|
|
86
86
|
stream_key: {
|
|
87
|
-
type:
|
|
88
|
-
format:
|
|
89
|
-
label:
|
|
90
|
-
description:
|
|
87
|
+
type: 'string',
|
|
88
|
+
format: 'text',
|
|
89
|
+
label: 'Stream Key',
|
|
90
|
+
description: 'Dataset label, should be left as default unless directed otherwise.',
|
|
91
91
|
required: true,
|
|
92
|
-
default:
|
|
92
|
+
default: 'transaction'
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
perform: (request, data) => {
|
|
@@ -1 +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,O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},
|
|
17
17
|
datetime: {
|
|
18
|
-
type:
|
|
19
|
-
format:
|
|
20
|
-
label:
|
|
21
|
-
description:
|
|
18
|
+
type: 'datetime',
|
|
19
|
+
format: 'date-time',
|
|
20
|
+
label: 'Event Timestamp',
|
|
21
|
+
description: 'Timestamp of event',
|
|
22
22
|
required: true,
|
|
23
23
|
default: { '@path': '$.timestamp' }
|
|
24
24
|
},
|
|
25
25
|
interaction_type: {
|
|
26
|
-
type:
|
|
27
|
-
format:
|
|
28
|
-
label:
|
|
29
|
-
description:
|
|
26
|
+
type: 'string',
|
|
27
|
+
format: 'text',
|
|
28
|
+
label: 'Event Type',
|
|
29
|
+
description: 'type of interaction (page view, add to cart, etc).',
|
|
30
30
|
required: true,
|
|
31
31
|
default: { '@path': '$.event' }
|
|
32
32
|
},
|
|
33
33
|
utm_campaign: {
|
|
34
|
-
type:
|
|
35
|
-
format:
|
|
36
|
-
label:
|
|
37
|
-
description:
|
|
34
|
+
type: 'string',
|
|
35
|
+
format: 'text',
|
|
36
|
+
label: 'UTM Campaign',
|
|
37
|
+
description: 'UTM campaign parameter associated with event.',
|
|
38
38
|
required: false,
|
|
39
39
|
default: { '@path': '$.context.campaign.name' }
|
|
40
40
|
},
|
|
41
41
|
utm_medium: {
|
|
42
|
-
type:
|
|
43
|
-
format:
|
|
44
|
-
label:
|
|
45
|
-
description:
|
|
42
|
+
type: 'string',
|
|
43
|
+
format: 'text',
|
|
44
|
+
label: 'UTM Medium',
|
|
45
|
+
description: 'UTM medium parameter associated with event.',
|
|
46
46
|
required: false,
|
|
47
47
|
default: { '@path': '$.context.campaign.medium' }
|
|
48
48
|
},
|
|
49
49
|
utm_source: {
|
|
50
|
-
type:
|
|
51
|
-
format:
|
|
52
|
-
label:
|
|
53
|
-
description:
|
|
50
|
+
type: 'string',
|
|
51
|
+
format: 'text',
|
|
52
|
+
label: 'UTM Source',
|
|
53
|
+
description: 'UTM source parameter associated with event.',
|
|
54
54
|
required: false,
|
|
55
55
|
default: { '@path': '$.context.campaign.source' }
|
|
56
56
|
},
|
|
57
57
|
stream_key: {
|
|
58
|
-
type:
|
|
59
|
-
format:
|
|
60
|
-
label:
|
|
61
|
-
description:
|
|
58
|
+
type: 'string',
|
|
59
|
+
format: 'text',
|
|
60
|
+
label: 'Stream Key',
|
|
61
|
+
description: 'Dataset label, should be left as default unless directed otherwise',
|
|
62
62
|
required: true,
|
|
63
|
-
default:
|
|
63
|
+
default: 'web'
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
perform: (request, data) => {
|
|
@@ -1 +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,
|
|
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,EACT,mHAAmH;IACrH,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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CAAC,OAAO,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"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/destinations/actions-bingads/functions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/actions-bingads/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 offlineConversions_1 = __importDefault(require("./offlineConversions"));
|
|
7
|
+
const destination = {
|
|
8
|
+
name: 'Bingads',
|
|
9
|
+
slug: 'actions-bingads',
|
|
10
|
+
mode: 'cloud',
|
|
11
|
+
authentication: {
|
|
12
|
+
scheme: 'oauth2',
|
|
13
|
+
fields: {
|
|
14
|
+
client_id: {
|
|
15
|
+
label: 'Client ID',
|
|
16
|
+
description: 'ID of your Microsoft Bing Ads Account. This should be a 36-characters alpha-numeric string. **Required**',
|
|
17
|
+
type: 'string'
|
|
18
|
+
},
|
|
19
|
+
client_secret: {
|
|
20
|
+
label: 'Client Secret',
|
|
21
|
+
description: 'Client Secret from your Azure Portal account registered app. **Required**',
|
|
22
|
+
type: 'string'
|
|
23
|
+
},
|
|
24
|
+
redirect_uri: {
|
|
25
|
+
label: 'Redirect URI',
|
|
26
|
+
description: 'Redirect URI for user consent (https://login.microsoftonline.com/common/oauth2/nativeclient). **Required**',
|
|
27
|
+
type: 'string'
|
|
28
|
+
},
|
|
29
|
+
scope: {
|
|
30
|
+
label: 'Scope',
|
|
31
|
+
description: 'Scope. **Required**',
|
|
32
|
+
type: 'string'
|
|
33
|
+
},
|
|
34
|
+
refreshToken: {
|
|
35
|
+
label: 'Refresh Token',
|
|
36
|
+
description: 'Refresh Token. **Required**',
|
|
37
|
+
type: 'string'
|
|
38
|
+
},
|
|
39
|
+
customer_account_id: {
|
|
40
|
+
label: 'Customer Account ID',
|
|
41
|
+
description: 'Customer Account ID. **Required**',
|
|
42
|
+
type: 'string'
|
|
43
|
+
},
|
|
44
|
+
customer_id: {
|
|
45
|
+
label: 'Customer ID',
|
|
46
|
+
description: 'Customer ID. **Required**',
|
|
47
|
+
type: 'string'
|
|
48
|
+
},
|
|
49
|
+
developer_token: {
|
|
50
|
+
label: 'Developer Token',
|
|
51
|
+
description: 'Developer Token. **Required**',
|
|
52
|
+
type: 'string'
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
refreshAccessToken: async (request, { auth }) => {
|
|
56
|
+
const baseUrl = 'https://login.microsoftonline.com/common/oauth2/v2.0/token';
|
|
57
|
+
console.log(baseUrl);
|
|
58
|
+
const res = await request(`${baseUrl}`, {
|
|
59
|
+
method: 'POST',
|
|
60
|
+
body: new URLSearchParams({
|
|
61
|
+
refresh_token: auth.refreshToken,
|
|
62
|
+
client_id: auth.clientId,
|
|
63
|
+
client_secret: auth.clientSecret,
|
|
64
|
+
grant_type: 'refresh_token',
|
|
65
|
+
scope: 'openid offline_access https://ads.microsoft.com/msads.manage',
|
|
66
|
+
redirect_uri: 'https://login.microsoftonline.com/common/oauth2/nativeclient'
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
return { accessToken: res.data.access_token };
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
actions: {
|
|
73
|
+
offlineConversions: offlineConversions_1.default
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
exports.default = destination;
|
|
77
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/actions-bingads/index.ts"],"names":[],"mappings":";;;;;AAGA,8EAAqD;AAMrD,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,SAAS,EAAE;gBACT,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,0GAA0G;gBAC5G,IAAI,EAAE,QAAQ;aACf;YACD,aAAa,EAAE;gBACb,KAAK,EAAE,eAAe;gBACtB,WAAW,EAAE,2EAA2E;gBACxF,IAAI,EAAE,QAAQ;aACf;YACD,YAAY,EAAE;gBACZ,KAAK,EAAE,cAAc;gBACrB,WAAW,EACT,4GAA4G;gBAC9G,IAAI,EAAE,QAAQ;aACf;YACD,KAAK,EAAE;gBACL,KAAK,EAAE,OAAO;gBACd,WAAW,EAAE,qBAAqB;gBAClC,IAAI,EAAE,QAAQ;aACf;YACD,YAAY,EAAE;gBACZ,KAAK,EAAE,eAAe;gBACtB,WAAW,EAAE,6BAA6B;gBAC1C,IAAI,EAAE,QAAQ;aACf;YACD,mBAAmB,EAAE;gBACnB,KAAK,EAAE,qBAAqB;gBAC5B,WAAW,EAAE,mCAAmC;gBAChD,IAAI,EAAE,QAAQ;aACf;YACD,WAAW,EAAE;gBACX,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,QAAQ;aACf;YACD,eAAe,EAAE;gBACf,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,+BAA+B;gBAC5C,IAAI,EAAE,QAAQ;aACf;SACF;QAQD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YAG9C,MAAM,OAAO,GAAG,4DAA4D,CAAA;YAC5E,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;YACpB,MAAM,GAAG,GAAG,MAAM,OAAO,CAAuB,GAAG,OAAO,EAAE,EAAE;gBAC5D,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI,eAAe,CAAC;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,SAAS,EAAE,IAAI,CAAC,QAAQ;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,UAAU,EAAE,eAAe;oBAC3B,KAAK,EAAE,8DAA8D;oBACrE,YAAY,EAAE,8DAA8D;iBAC7E,CAAC;aACH,CAAC,CAAA;YAEF,OAAO,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,CAAA;QAC/C,CAAC;KASF;IAQD,OAAO,EAAE;QACP,kBAAkB,EAAlB,4BAAkB;KACnB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function getAccessToken(mapping: {
|
|
2
|
+
refresh_token: string | undefined;
|
|
3
|
+
grant_type: string | undefined;
|
|
4
|
+
scope: string | undefined;
|
|
5
|
+
redirect_uri: string | undefined;
|
|
6
|
+
client_secret: string | undefined;
|
|
7
|
+
client_id: string | undefined;
|
|
8
|
+
}): Promise<any> | undefined;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAccessToken = void 0;
|
|
4
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
5
|
+
function getAccessToken(mapping) {
|
|
6
|
+
const endpoint = 'https://login.microsoftonline.com/common/oauth2/v2.0/token';
|
|
7
|
+
const uspCoded = new URLSearchParams({
|
|
8
|
+
client_id: mapping.client_id,
|
|
9
|
+
refresh_token: mapping.refresh_token,
|
|
10
|
+
scope: mapping.scope,
|
|
11
|
+
redirect_uri: mapping.redirect_uri,
|
|
12
|
+
grant_type: 'refresh_token',
|
|
13
|
+
client_secret: mapping.client_secret
|
|
14
|
+
});
|
|
15
|
+
try {
|
|
16
|
+
return actions_core_1.fetch(endpoint, {
|
|
17
|
+
method: 'post',
|
|
18
|
+
headers: {
|
|
19
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
20
|
+
},
|
|
21
|
+
body: uspCoded
|
|
22
|
+
})
|
|
23
|
+
.then((response) => response.json())
|
|
24
|
+
.then((data) => {
|
|
25
|
+
return data;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
console.log(error.message);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.getAccessToken = getAccessToken;
|
|
33
|
+
//# sourceMappingURL=formatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../../../src/destinations/actions-bingads/offlineConversions/formatter.ts"],"names":[],"mappings":";;;AAAA,wDAA6C;AAE7C,SAAgB,cAAc,CAAC,OAO9B;IACC,MAAM,QAAQ,GAAG,4DAA4D,CAAA;IAG7E,MAAM,QAAQ,GAAG,IAAI,eAAe,CAAC;QACnC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,UAAU,EAAE,eAAe;QAC3B,aAAa,EAAE,OAAO,CAAC,aAAa;KACrC,CAAC,CAAA;IAEF,IAAI;QACF,OAAO,oBAAK,CAAC,QAAQ,EAAE;YACrB,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,cAAc,EAAE,mCAAmC;aACpD;YACD,IAAI,EAAE,QAAQ;SACf,CAAC;aACC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;aACnC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;YACb,OAAO,IAAI,CAAA;QACb,CAAC,CAAC,CAAA;KAGL;IAAC,OAAO,KAAK,EAAE;QAEd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;KAC3B;AACH,CAAC;AAtCD,wCAsCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/actions-bingads/offlineConversions/generated-types.ts"],"names":[],"mappings":""}
|