@segment/action-destinations 3.123.0 → 3.125.1-staging.104
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 +12 -12
- 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/braze-cohorts/api/index.d.ts +15 -0
- package/dist/destinations/braze-cohorts/api/index.js +36 -0
- package/dist/destinations/braze-cohorts/api/index.js.map +1 -0
- package/dist/destinations/braze-cohorts/braze-cohorts-types.d.ts +10 -0
- package/dist/destinations/braze-cohorts/braze-cohorts-types.js +3 -0
- package/dist/destinations/braze-cohorts/braze-cohorts-types.js.map +1 -0
- package/dist/destinations/braze-cohorts/generated-types.d.ts +4 -0
- package/dist/destinations/braze-cohorts/generated-types.js +3 -0
- package/dist/destinations/braze-cohorts/generated-types.js.map +1 -0
- package/dist/destinations/braze-cohorts/index.d.ts +4 -0
- package/dist/destinations/braze-cohorts/index.js +53 -0
- package/dist/destinations/braze-cohorts/index.js.map +1 -0
- package/dist/destinations/braze-cohorts/syncAudiences/generated-types.d.ts +16 -0
- package/dist/destinations/braze-cohorts/syncAudiences/generated-types.js +3 -0
- package/dist/destinations/braze-cohorts/syncAudiences/generated-types.js.map +1 -0
- package/dist/destinations/braze-cohorts/syncAudiences/index.d.ts +5 -0
- package/dist/destinations/braze-cohorts/syncAudiences/index.js +158 -0
- package/dist/destinations/braze-cohorts/syncAudiences/index.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-sendgrid/sendEmail/generated-types.d.ts +1 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +12 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.d.ts +1 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js +12 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/addToCart/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/addToCart/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/custom/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/custom/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/generated-types.d.ts +1 -0
- package/dist/destinations/facebook-conversions-api/index.js +7 -1
- package/dist/destinations/facebook-conversions-api/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/pageView/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/pageView/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/purchase/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/purchase/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/search/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/search/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/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/package.json +2 -2
|
@@ -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,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"}
|
|
@@ -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,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;
|
|
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;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,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;
|
|
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;SACF;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,uBAAu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,CAAA"}
|
|
@@ -25,9 +25,9 @@ function formatPurchasePayload(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,aAA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{
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
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,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,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendWebEvent/index.ts"],"names":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OAAO,EAAE,2BAA2B,EAAE;SAClD;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,KAAK;SACf;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG,oCAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QAE3E,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,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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RequestClient, ModifiedResponse } from '@segment/actions-core';
|
|
2
|
+
import type { Settings } from '../generated-types';
|
|
3
|
+
import type { Payload } from '../syncAudiences/generated-types';
|
|
4
|
+
import { CohortChanges } from '../braze-cohorts-types';
|
|
5
|
+
interface APIResponse {
|
|
6
|
+
message: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class SyncAudiences {
|
|
9
|
+
request: RequestClient;
|
|
10
|
+
partnerApiKey: String;
|
|
11
|
+
constructor(request: RequestClient, settings: Settings);
|
|
12
|
+
createCohort(settings: Settings, payload: Payload): Promise<ModifiedResponse<APIResponse>>;
|
|
13
|
+
batchUpdate(settings: Settings, cohort_id: string, cohortChanges: Array<CohortChanges>): Promise<ModifiedResponse>;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SyncAudiences = void 0;
|
|
4
|
+
class SyncAudiences {
|
|
5
|
+
constructor(request, settings) {
|
|
6
|
+
this.request = request;
|
|
7
|
+
this.partnerApiKey = (settings.endpoint.includes('eu')
|
|
8
|
+
? process.env.BRAZE_COHORTS_PARTNER_API_KEY_EU
|
|
9
|
+
: process.env.BRAZE_COHORTS_PARTNER_API_KEY_US);
|
|
10
|
+
}
|
|
11
|
+
async createCohort(settings, payload) {
|
|
12
|
+
return this.request(`${settings.endpoint}/partners/segment/cohorts`, {
|
|
13
|
+
method: 'POST',
|
|
14
|
+
json: {
|
|
15
|
+
partner_api_key: this.partnerApiKey,
|
|
16
|
+
client_secret: settings.client_secret,
|
|
17
|
+
name: payload?.cohort_name,
|
|
18
|
+
cohort_id: payload?.cohort_id,
|
|
19
|
+
created_at: payload?.time
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
async batchUpdate(settings, cohort_id, cohortChanges) {
|
|
24
|
+
return this.request(`${settings.endpoint}/partners/segment/cohorts/users`, {
|
|
25
|
+
method: 'POST',
|
|
26
|
+
json: {
|
|
27
|
+
partner_api_key: this.partnerApiKey,
|
|
28
|
+
client_secret: settings.client_secret,
|
|
29
|
+
cohort_id: cohort_id,
|
|
30
|
+
cohort_changes: cohortChanges
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.SyncAudiences = SyncAudiences;
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/braze-cohorts/api/index.ts"],"names":[],"mappings":";;;AASA,MAAa,aAAa;IAIxB,YAAY,OAAsB,EAAE,QAAkB;QACpD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,aAAa,GAAG,CACnB,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC9B,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,gCAAgC;YAC9C,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,gCAAgC,CACvC,CAAA;IACb,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,QAAkB,EAAE,OAAgB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,QAAQ,2BAA2B,EAAE;YACnE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,eAAe,EAAE,IAAI,CAAC,aAAa;gBACnC,aAAa,EAAE,QAAQ,CAAC,aAAa;gBACrC,IAAI,EAAE,OAAO,EAAE,WAAW;gBAC1B,SAAS,EAAE,OAAO,EAAE,SAAS;gBAC7B,UAAU,EAAE,OAAO,EAAE,IAAI;aAC1B;SACF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,WAAW,CACf,QAAkB,EAClB,SAAiB,EACjB,aAAmC;QAEnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,QAAQ,iCAAiC,EAAE;YACzE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,eAAe,EAAE,IAAI,CAAC,aAAa;gBACnC,aAAa,EAAE,QAAQ,CAAC,aAAa;gBACrC,SAAS,EAAE,SAAS;gBACpB,cAAc,EAAE,aAAa;aAC9B;SACF,CAAC,CAAA;IACJ,CAAC;CACF;AAzCD,sCAyCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"braze-cohorts-types.js","sourceRoot":"","sources":["../../../src/destinations/braze-cohorts/braze-cohorts-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/braze-cohorts/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 index_1 = require("./api/index");
|
|
7
|
+
const syncAudiences_1 = __importDefault(require("./syncAudiences"));
|
|
8
|
+
const destination = {
|
|
9
|
+
name: 'Braze Cohorts',
|
|
10
|
+
slug: 'actions-braze-cohorts',
|
|
11
|
+
mode: 'cloud',
|
|
12
|
+
authentication: {
|
|
13
|
+
scheme: 'custom',
|
|
14
|
+
fields: {
|
|
15
|
+
client_secret: {
|
|
16
|
+
label: 'Client Secret key',
|
|
17
|
+
description: 'Data Import Key for the client whose cohort this belongs to. Also known as customer key.',
|
|
18
|
+
type: 'password',
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
endpoint: {
|
|
22
|
+
label: 'REST Endpoint',
|
|
23
|
+
description: 'Your Braze REST endpoint. [See more details](https://www.braze.com/docs/api/basics/#endpoints)',
|
|
24
|
+
type: 'string',
|
|
25
|
+
format: 'uri',
|
|
26
|
+
choices: [
|
|
27
|
+
{ label: 'US-01 (https://dashboard-01.braze.com)', value: 'https://rest.iad-01.braze.com' },
|
|
28
|
+
{ label: 'US-02 (https://dashboard-02.braze.com)', value: 'https://rest.iad-02.braze.com' },
|
|
29
|
+
{ label: 'US-03 (https://dashboard-03.braze.com)', value: 'https://rest.iad-03.braze.com' },
|
|
30
|
+
{ label: 'US-04 (https://dashboard-04.braze.com)', value: 'https://rest.iad-04.braze.com' },
|
|
31
|
+
{ label: 'US-05 (https://dashboard-05.braze.com)', value: 'https://rest.iad-05.braze.com' },
|
|
32
|
+
{ label: 'US-06 (https://dashboard-06.braze.com)', value: 'https://rest.iad-06.braze.com' },
|
|
33
|
+
{ label: 'US-08 (https://dashboard-08.braze.com)', value: 'https://rest.iad-08.braze.com' },
|
|
34
|
+
{ label: 'EU-01 (https://dashboard-01.braze.eu)', value: 'https://rest.fra-01.braze.eu' },
|
|
35
|
+
{ label: 'EU-02 (https://dashboard-02.braze.eu)', value: 'https://rest.fra-02.braze.eu' }
|
|
36
|
+
],
|
|
37
|
+
default: 'https://rest.iad-01.braze.com',
|
|
38
|
+
required: true
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
testAuthentication: async (request, { settings }) => {
|
|
42
|
+
const syncAudiencesApiClient = new index_1.SyncAudiences(request, settings);
|
|
43
|
+
const cohort_id = 'will_add_in_constant';
|
|
44
|
+
const cohortChanges = [];
|
|
45
|
+
return await syncAudiencesApiClient.batchUpdate(settings, cohort_id, cohortChanges);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
actions: {
|
|
49
|
+
syncAudiences: syncAudiences_1.default
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
exports.default = destination;
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/braze-cohorts/index.ts"],"names":[],"mappings":";;;;;AAGA,uCAA2C;AAC3C,oEAA2C;AAE3C,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE,OAAO;IACb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,aAAa,EAAE;gBACb,KAAK,EAAE,mBAAmB;gBAC1B,WAAW,EAAE,0FAA0F;gBACvG,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,IAAI;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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
external_id?: string;
|
|
3
|
+
user_alias?: {
|
|
4
|
+
alias_name: string;
|
|
5
|
+
alias_label: string;
|
|
6
|
+
};
|
|
7
|
+
device_id?: string;
|
|
8
|
+
cohort_id: string;
|
|
9
|
+
cohort_name: string;
|
|
10
|
+
enable_batching?: boolean;
|
|
11
|
+
personas_audience_key: string;
|
|
12
|
+
event_properties: {
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
time: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/braze-cohorts/syncAudiences/generated-types.ts"],"names":[],"mappings":""}
|