@segment/action-destinations 3.116.1-staging.9 → 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.
Files changed (77) hide show
  1. package/dist/destinations/actable-predictive/generated-types.d.ts +4 -0
  2. package/dist/destinations/actable-predictive/generated-types.js +3 -0
  3. package/dist/destinations/actable-predictive/generated-types.js.map +1 -0
  4. package/dist/destinations/actable-predictive/index.d.ts +6 -0
  5. package/dist/destinations/actable-predictive/index.js +57 -0
  6. package/dist/destinations/actable-predictive/index.js.map +1 -0
  7. package/dist/destinations/actable-predictive/sendCustomEvent/generated-types.d.ts +8 -0
  8. package/dist/destinations/actable-predictive/sendCustomEvent/generated-types.js +3 -0
  9. package/dist/destinations/actable-predictive/sendCustomEvent/generated-types.js.map +1 -0
  10. package/dist/destinations/actable-predictive/sendCustomEvent/index.d.ts +5 -0
  11. package/dist/destinations/actable-predictive/sendCustomEvent/index.js +62 -0
  12. package/dist/destinations/actable-predictive/sendCustomEvent/index.js.map +1 -0
  13. package/dist/destinations/actable-predictive/sendEmailEvent/generated-types.d.ts +9 -0
  14. package/dist/destinations/actable-predictive/sendEmailEvent/generated-types.js +3 -0
  15. package/dist/destinations/actable-predictive/sendEmailEvent/generated-types.js.map +1 -0
  16. package/dist/destinations/actable-predictive/sendEmailEvent/index.d.ts +5 -0
  17. package/dist/destinations/actable-predictive/sendEmailEvent/index.js +85 -0
  18. package/dist/destinations/actable-predictive/sendEmailEvent/index.js.map +1 -0
  19. package/dist/destinations/actable-predictive/sendTransactionEvent/generated-types.d.ts +11 -0
  20. package/dist/destinations/actable-predictive/sendTransactionEvent/generated-types.js +3 -0
  21. package/dist/destinations/actable-predictive/sendTransactionEvent/generated-types.js.map +1 -0
  22. package/dist/destinations/actable-predictive/sendTransactionEvent/index.d.ts +5 -0
  23. package/dist/destinations/actable-predictive/sendTransactionEvent/index.js +113 -0
  24. package/dist/destinations/actable-predictive/sendTransactionEvent/index.js.map +1 -0
  25. package/dist/destinations/actable-predictive/sendWebEvent/generated-types.d.ts +9 -0
  26. package/dist/destinations/actable-predictive/sendWebEvent/generated-types.js +3 -0
  27. package/dist/destinations/actable-predictive/sendWebEvent/generated-types.js.map +1 -0
  28. package/dist/destinations/actable-predictive/sendWebEvent/index.d.ts +5 -0
  29. package/dist/destinations/actable-predictive/sendWebEvent/index.js +84 -0
  30. package/dist/destinations/actable-predictive/sendWebEvent/index.js.map +1 -0
  31. package/dist/destinations/clevertap/userDelete/index.js +1 -1
  32. package/dist/destinations/clevertap/userDelete/index.js.map +1 -1
  33. package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.d.ts +0 -1
  34. package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +0 -12
  35. package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +1 -1
  36. package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +1 -1
  37. package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
  38. package/dist/destinations/hubspot/upsertContact/index.js +1 -1
  39. package/dist/destinations/hubspot/upsertContact/index.js.map +1 -1
  40. package/dist/destinations/index.js +1 -0
  41. package/dist/destinations/index.js.map +1 -1
  42. package/dist/destinations/intercom/generated-types.d.ts +0 -1
  43. package/dist/destinations/intercom/groupIdentifyContact/index.js +8 -11
  44. package/dist/destinations/intercom/groupIdentifyContact/index.js.map +1 -1
  45. package/dist/destinations/intercom/identifyContact/index.js +8 -11
  46. package/dist/destinations/intercom/identifyContact/index.js.map +1 -1
  47. package/dist/destinations/intercom/index.js +6 -31
  48. package/dist/destinations/intercom/index.js.map +1 -1
  49. package/dist/destinations/intercom/trackEvent/index.js +3 -5
  50. package/dist/destinations/intercom/trackEvent/index.js.map +1 -1
  51. package/dist/destinations/intercom/util.d.ts +1 -2
  52. package/dist/destinations/intercom/util.js +2 -4
  53. package/dist/destinations/intercom/util.js.map +1 -1
  54. package/dist/destinations/mixpanel/mixpanel-properties.js +24 -0
  55. package/dist/destinations/mixpanel/mixpanel-properties.js.map +1 -1
  56. package/dist/destinations/mixpanel/mixpanel-types.d.ts +1 -1
  57. package/dist/destinations/mixpanel/trackEvent/functions.js +9 -3
  58. package/dist/destinations/mixpanel/trackEvent/functions.js.map +1 -1
  59. package/dist/destinations/mixpanel/trackEvent/generated-types.d.ts +4 -1
  60. package/dist/destinations/mixpanel/trackEvent/index.js +2 -75
  61. package/dist/destinations/mixpanel/trackEvent/index.js.map +1 -1
  62. package/dist/destinations/mixpanel/trackPurchase/generated-types.d.ts +5 -0
  63. package/dist/destinations/mixpanel/trackPurchase/index.js +1 -1
  64. package/dist/destinations/mixpanel/trackPurchase/index.js.map +1 -1
  65. package/dist/destinations/moengage/index.js +4 -0
  66. package/dist/destinations/moengage/index.js.map +1 -1
  67. package/dist/destinations/moengage/regional-endpoints.d.ts +1 -0
  68. package/dist/destinations/moengage/regional-endpoints.js +2 -1
  69. package/dist/destinations/moengage/regional-endpoints.js.map +1 -1
  70. package/dist/destinations/segment/segment-properties.js +9 -9
  71. package/dist/destinations/segment/segment-properties.js.map +1 -1
  72. package/dist/lib/test-data.js +2 -2
  73. package/dist/lib/test-data.js.map +1 -1
  74. package/package.json +4 -4
  75. package/dist/destinations/intercom/regional-endpoints.d.ts +0 -6
  76. package/dist/destinations/intercom/regional-endpoints.js +0 -13
  77. package/dist/destinations/intercom/regional-endpoints.js.map +0 -1
@@ -0,0 +1,4 @@
1
+ export interface Settings {
2
+ client_id: string;
3
+ client_secret: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/actable-predictive/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import type { DestinationDefinition } from '@segment/actions-core';
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;
5
+ declare const destination: DestinationDefinition<Settings>;
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"}
@@ -0,0 +1,8 @@
1
+ export interface Payload {
2
+ customer_id: string;
3
+ timestamp: string | number;
4
+ properties: {
5
+ [k: string]: unknown;
6
+ }[];
7
+ stream_key: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendCustomEvent/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -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"}
@@ -0,0 +1,9 @@
1
+ export interface Payload {
2
+ customer_id: string;
3
+ date_email_sent: string | number;
4
+ campaign_name?: string;
5
+ clicked_flag?: number;
6
+ opened_flag?: number;
7
+ unsub_flag?: number;
8
+ stream_key: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -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,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -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"}
@@ -0,0 +1,11 @@
1
+ export interface Payload {
2
+ customer_id: string;
3
+ discount_code?: string;
4
+ transaction_id?: string;
5
+ spend?: number;
6
+ products: {
7
+ [k: string]: unknown;
8
+ }[];
9
+ purchase_datetime: string | number;
10
+ stream_key: string;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/actable-predictive/sendTransactionEvent/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -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":"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"}
@@ -0,0 +1,9 @@
1
+ export interface Payload {
2
+ customer_id: string;
3
+ datetime: string | number;
4
+ interaction_type: string;
5
+ utm_campaign?: string;
6
+ utm_medium?: string;
7
+ utm_source?: string;
8
+ stream_key: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -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,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -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,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;SAEhC;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,+CAA+C;YAC5D,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAE;SAChD;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE;SAClD;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,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"}
@@ -7,7 +7,7 @@ const action = {
7
7
  identity: {
8
8
  label: 'Identity',
9
9
  type: 'string',
10
- description: 'The ID used to uniquely identify a person in CleverTap',
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,wDAAwD;YACrE,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"}
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"}
@@ -32,5 +32,4 @@ export interface Payload {
32
32
  traits?: {
33
33
  [k: string]: unknown;
34
34
  };
35
- eventOccurredTS?: number;
36
35
  }
@@ -262,15 +262,6 @@ const action = {
262
262
  type: 'object',
263
263
  required: false,
264
264
  default: { '@path': '$.properties' }
265
- },
266
- eventOccurredTS: {
267
- label: 'Event Timestamp',
268
- description: 'Time of when the actual event happened.',
269
- type: 'number',
270
- required: false,
271
- default: {
272
- '@path': '$.timestamp'
273
- }
274
265
  }
275
266
  },
276
267
  perform: async (request, { settings, payload, statsContext }) => {
@@ -401,9 +392,6 @@ const action = {
401
392
  });
402
393
  tags?.push(`sendgrid_status_code:${response.status}`);
403
394
  statsClient?.incr('actions-personas-messaging-sendgrid.response', 1, tags);
404
- if (payload?.eventOccurredTS != undefined) {
405
- statsClient?.histogram('actions-personas-messaging-sendgrid.eventDeliveryTS', Date.now() - payload?.eventOccurredTS, tags);
406
- }
407
395
  return response;
408
396
  }
409
397
  else {