@segment/action-destinations 3.150.0 → 3.152.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/destinations/acoustic/Utility/eventprocessing.d.ts +3 -2
- package/dist/destinations/acoustic/Utility/eventprocessing.js +13 -4
- package/dist/destinations/acoustic/Utility/eventprocessing.js.map +1 -1
- package/dist/destinations/acoustic/Utility/tablemaintutilities.d.ts +4 -3
- package/dist/destinations/acoustic/Utility/tablemaintutilities.js +30 -6
- package/dist/destinations/acoustic/Utility/tablemaintutilities.js.map +1 -1
- package/dist/destinations/acoustic/index.js +5 -13
- package/dist/destinations/acoustic/index.js.map +1 -1
- package/dist/destinations/acoustic/receiveEvents/index.js +4 -4
- package/dist/destinations/acoustic/receiveEvents/index.js.map +1 -1
- package/dist/destinations/braze/trackPurchase/generated-types.d.ts +1 -0
- package/dist/destinations/braze/trackPurchase/index.js +1 -0
- package/dist/destinations/braze/trackPurchase/index.js.map +1 -1
- package/dist/destinations/braze/utils.js +14 -9
- package/dist/destinations/braze/utils.js.map +1 -1
- package/dist/destinations/encharge/index.js +9 -9
- package/dist/destinations/encharge/index.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/generated-types.d.ts +1 -0
- package/dist/destinations/engage-messaging-sendgrid/index.js +11 -0
- package/dist/destinations/engage-messaging-sendgrid/index.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +32 -17
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/generated-types.d.ts +1 -0
- package/dist/destinations/engage-messaging-twilio/index.js +11 -0
- package/dist/destinations/engage-messaging-twilio/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js +5 -2
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.d.ts +2 -2
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js +6 -4
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js +5 -2
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.d.ts +2 -2
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js +1 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.d.ts +2 -2
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js +1 -1
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/constants.d.ts +1 -1
- package/dist/destinations/facebook-conversions-api/constants.js +1 -1
- package/dist/destinations/google-analytics-4/ga4-functions.js +2 -0
- package/dist/destinations/google-analytics-4/ga4-functions.js.map +1 -1
- package/dist/destinations/index.js +3 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/optimizely-feature-experimentation-actions/generated-types.d.ts +5 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/generated-types.js +3 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/generated-types.js.map +1 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/index.d.ts +4 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/index.js +60 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/index.js.map +1 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/functions.d.ts +20 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/functions.js +63 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/functions.js.map +1 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/generated-types.d.ts +14 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/generated-types.js +3 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/generated-types.js.map +1 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/index.d.ts +5 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/index.js +156 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/index.js.map +1 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/mock-dataFile.d.ts +80 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/mock-dataFile.js +125 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/mock-dataFile.js.map +1 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/mock-payload.d.ts +53 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/mock-payload.js +75 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/mock-payload.js.map +1 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/types.d.ts +38 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/types.js +3 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/types.js.map +1 -0
- package/dist/destinations/pinterest-conversions/index.js +1 -1
- package/dist/destinations/pinterest-conversions/index.js.map +1 -1
- package/dist/destinations/pinterest-conversions/reportConversionEvent/index.js +1 -1
- package/dist/destinations/pinterest-conversions/reportConversionEvent/index.js.map +1 -1
- package/dist/destinations/podscribe/generated-types.d.ts +3 -0
- package/dist/destinations/podscribe/generated-types.js +3 -0
- package/dist/destinations/podscribe/generated-types.js.map +1 -0
- package/dist/destinations/podscribe/index.d.ts +4 -0
- package/dist/destinations/podscribe/index.js +57 -0
- package/dist/destinations/podscribe/index.js.map +1 -0
- package/dist/destinations/podscribe/page/generated-types.d.ts +8 -0
- package/dist/destinations/podscribe/page/generated-types.js +3 -0
- package/dist/destinations/podscribe/page/generated-types.js.map +1 -0
- package/dist/destinations/podscribe/page/index.d.ts +5 -0
- package/dist/destinations/podscribe/page/index.js +84 -0
- package/dist/destinations/podscribe/page/index.js.map +1 -0
- package/dist/destinations/podscribe/track/generated-types.d.ts +20 -0
- package/dist/destinations/podscribe/track/generated-types.js +3 -0
- package/dist/destinations/podscribe/track/generated-types.js.map +1 -0
- package/dist/destinations/podscribe/track/index.d.ts +5 -0
- package/dist/destinations/podscribe/track/index.js +165 -0
- package/dist/destinations/podscribe/track/index.js.map +1 -0
- package/dist/destinations/podscribe/utils.d.ts +1 -0
- package/dist/destinations/podscribe/utils.js +21 -0
- package/dist/destinations/podscribe/utils.js.map +1 -0
- package/dist/destinations/rokt-audiences/constants.js +1 -1
- package/dist/destinations/rokt-audiences/constants.js.map +1 -1
- package/dist/destinations/rokt-audiences/index.js +2 -5
- package/dist/destinations/rokt-audiences/index.js.map +1 -1
- package/dist/destinations/usermaven/common-definitions.d.ts +3 -0
- package/dist/destinations/usermaven/common-definitions.js +172 -0
- package/dist/destinations/usermaven/common-definitions.js.map +1 -0
- package/dist/destinations/usermaven/generated-types.d.ts +3 -0
- package/dist/destinations/usermaven/generated-types.js +3 -0
- package/dist/destinations/usermaven/generated-types.js.map +1 -0
- package/dist/destinations/usermaven/group/generated-types.d.ts +34 -0
- package/dist/destinations/usermaven/group/generated-types.js +3 -0
- package/dist/destinations/usermaven/group/generated-types.js.map +1 -0
- package/dist/destinations/usermaven/group/index.d.ts +5 -0
- package/dist/destinations/usermaven/group/index.js +53 -0
- package/dist/destinations/usermaven/group/index.js.map +1 -0
- package/dist/destinations/usermaven/identify/generated-types.d.ts +35 -0
- package/dist/destinations/usermaven/identify/generated-types.js +3 -0
- package/dist/destinations/usermaven/identify/generated-types.js.map +1 -0
- package/dist/destinations/usermaven/identify/index.d.ts +5 -0
- package/dist/destinations/usermaven/identify/index.js +81 -0
- package/dist/destinations/usermaven/identify/index.js.map +1 -0
- package/dist/destinations/usermaven/index.d.ts +4 -0
- package/dist/destinations/usermaven/index.js +58 -0
- package/dist/destinations/usermaven/index.js.map +1 -0
- package/dist/destinations/usermaven/request-params.d.ts +9 -0
- package/dist/destinations/usermaven/request-params.js +98 -0
- package/dist/destinations/usermaven/request-params.js.map +1 -0
- package/dist/destinations/usermaven/track/generated-types.d.ts +34 -0
- package/dist/destinations/usermaven/track/generated-types.js +3 -0
- package/dist/destinations/usermaven/track/generated-types.js.map +1 -0
- package/dist/destinations/usermaven/track/index.d.ts +5 -0
- package/dist/destinations/usermaven/track/index.js +65 -0
- package/dist/destinations/usermaven/track/index.js.map +1 -0
- package/dist/destinations/usermaven/vars.d.ts +1 -0
- package/dist/destinations/usermaven/vars.js +6 -0
- package/dist/destinations/usermaven/vars.js.map +1 -0
- package/package.json +4 -4
|
@@ -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
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
7
|
+
const track_1 = __importDefault(require("./track"));
|
|
8
|
+
const page_1 = __importDefault(require("./page"));
|
|
9
|
+
const presets = [
|
|
10
|
+
{
|
|
11
|
+
name: 'Order Completed Calls',
|
|
12
|
+
subscribe: 'type = "track" and event = "Order Completed"',
|
|
13
|
+
partnerAction: 'track',
|
|
14
|
+
mapping: {
|
|
15
|
+
...actions_core_1.defaultValues(track_1.default.fields),
|
|
16
|
+
podscribeEvent: 'purchase'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'Signed Up Calls',
|
|
21
|
+
subscribe: 'type = "track" and event = "Signed Up"',
|
|
22
|
+
partnerAction: 'track',
|
|
23
|
+
mapping: {
|
|
24
|
+
...actions_core_1.defaultValues(track_1.default.fields),
|
|
25
|
+
podscribeEvent: 'signup'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Page Calls',
|
|
30
|
+
subscribe: 'type = "page"',
|
|
31
|
+
partnerAction: 'page',
|
|
32
|
+
mapping: actions_core_1.defaultValues(page_1.default.fields)
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
const destination = {
|
|
36
|
+
name: 'Podscribe (Actions)',
|
|
37
|
+
slug: 'actions-podscribe',
|
|
38
|
+
mode: 'cloud',
|
|
39
|
+
authentication: {
|
|
40
|
+
scheme: 'custom',
|
|
41
|
+
fields: {
|
|
42
|
+
advertiser: {
|
|
43
|
+
label: 'Advertiser',
|
|
44
|
+
description: 'Podscribe advertiser lookup key',
|
|
45
|
+
type: 'string',
|
|
46
|
+
required: true
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
presets,
|
|
51
|
+
actions: {
|
|
52
|
+
track: track_1.default,
|
|
53
|
+
page: page_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/podscribe/index.ts"],"names":[],"mappings":";;;;;AACA,wDAA4E;AAE5E,oDAA2B;AAC3B,kDAAyB;AAEzB,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,uBAAuB;QAC7B,SAAS,EAAE,8CAA8C;QACzD,aAAa,EAAE,OAAO;QACtB,OAAO,EAAE;YACP,GAAG,4BAAa,CAAC,eAAK,CAAC,MAAM,CAAC;YAC9B,cAAc,EAAE,UAAU;SAC3B;KACF;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,SAAS,EAAE,wCAAwC;QACnD,aAAa,EAAE,OAAO;QACtB,OAAO,EAAE;YACP,GAAG,4BAAa,CAAC,eAAK,CAAC,MAAM,CAAC;YAC9B,cAAc,EAAE,QAAQ;SACzB;KACF;IACD;QACE,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE,eAAe;QAC1B,aAAa,EAAE,MAAM;QACrB,OAAO,EAAE,4BAAa,CAAC,cAAI,CAAC,MAAM,CAAC;KACpC;CACF,CAAA;AAED,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,UAAU,EAAE;gBACV,KAAK,EAAE,YAAY;gBACnB,WAAW,EAAE,iCAAiC;gBAC9C,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,OAAO;IACP,OAAO,EAAE;QACP,KAAK,EAAL,eAAK;QACL,IAAI,EAAJ,cAAI;KACL;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/podscribe/page/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("../utils");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Page',
|
|
6
|
+
description: 'Register page view in Podscribe',
|
|
7
|
+
defaultSubscription: 'type = "page"',
|
|
8
|
+
fields: {
|
|
9
|
+
anonymousId: {
|
|
10
|
+
type: 'string',
|
|
11
|
+
allowNull: true,
|
|
12
|
+
description: 'The anonymous ID associated with the user',
|
|
13
|
+
label: 'Anonymous ID',
|
|
14
|
+
default: { '@path': '$.anonymousId' }
|
|
15
|
+
},
|
|
16
|
+
timestamp: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
format: 'date-time',
|
|
19
|
+
required: true,
|
|
20
|
+
description: 'The timestamp of the event',
|
|
21
|
+
label: 'Timestamp',
|
|
22
|
+
default: { '@path': '$.timestamp' }
|
|
23
|
+
},
|
|
24
|
+
referrer: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
allowNull: true,
|
|
27
|
+
description: 'The page referrer',
|
|
28
|
+
label: 'Page Referrer',
|
|
29
|
+
default: {
|
|
30
|
+
'@if': {
|
|
31
|
+
exists: { '@path': '$.context.page.referrer' },
|
|
32
|
+
then: { '@path': '$.context.page.referrer' },
|
|
33
|
+
else: { '@path': '$.properties.referrer' }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
url: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
format: 'uri',
|
|
40
|
+
allowNull: true,
|
|
41
|
+
description: 'The page URL',
|
|
42
|
+
label: 'Page URL',
|
|
43
|
+
default: {
|
|
44
|
+
'@if': {
|
|
45
|
+
exists: { '@path': '$.context.page.url' },
|
|
46
|
+
then: { '@path': '$.context.page.url' },
|
|
47
|
+
else: { '@path': '$.properties.url' }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
ip: {
|
|
52
|
+
label: 'User IP address',
|
|
53
|
+
type: 'string',
|
|
54
|
+
required: true,
|
|
55
|
+
description: 'The IP address of the device sending the event.',
|
|
56
|
+
default: {
|
|
57
|
+
'@path': '$.context.ip'
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
userAgent: {
|
|
61
|
+
label: 'User Agent',
|
|
62
|
+
type: 'string',
|
|
63
|
+
description: 'The user agent of the device sending the event.',
|
|
64
|
+
default: {
|
|
65
|
+
'@path': '$.context.userAgent'
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
perform: (request, { settings, payload }) => {
|
|
70
|
+
const params = utils_1.serializeParams({
|
|
71
|
+
action: 'view',
|
|
72
|
+
advertiser: settings.advertiser,
|
|
73
|
+
timestamp: payload.timestamp,
|
|
74
|
+
device_id: payload.anonymousId,
|
|
75
|
+
referrer: payload.referrer,
|
|
76
|
+
url: payload.url,
|
|
77
|
+
ip: payload.ip,
|
|
78
|
+
user_agent: payload.userAgent
|
|
79
|
+
});
|
|
80
|
+
return request(`https://verifi.podscribe.com/tag?${params}`);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
exports.default = action;
|
|
84
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/podscribe/page/index.ts"],"names":[],"mappings":";;AAGA,oCAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,iCAAiC;IAC9C,mBAAmB,EAAE,eAAe;IACpC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,2CAA2C;YACxD,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;SACtC;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,4BAA4B;YACzC,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;SACpC;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,mBAAmB;YAChC,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAE;oBAC9C,IAAI,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAE;oBAC5C,IAAI,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE;iBAC3C;aACF;SACF;QACD,GAAG,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,KAAK;YACb,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,cAAc;YAC3B,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;oBACzC,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;oBACvC,IAAI,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE;iBACtC;aACF;SACF;QACD,EAAE,EAAE;YACF,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,iDAAiD;YAC9D,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;aACxB;SACF;QACD,SAAS,EAAE;YACT,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iDAAiD;YAC9D,OAAO,EAAE;gBACP,OAAO,EAAE,qBAAqB;aAC/B;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,MAAM,MAAM,GAAG,uBAAe,CAAC;YAC7B,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,QAAQ,CAAC,UAAU;YAC/B,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,SAAS,EAAE,OAAO,CAAC,WAAW;YAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B,CAAC,CAAA;QAEF,OAAO,OAAO,CAAC,oCAAoC,MAAM,EAAE,CAAC,CAAA;IAC9D,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
anonymousId?: string | null;
|
|
3
|
+
timestamp: string;
|
|
4
|
+
referrer?: string | null;
|
|
5
|
+
url?: string | null;
|
|
6
|
+
ip: string;
|
|
7
|
+
userAgent?: string;
|
|
8
|
+
email?: string | null;
|
|
9
|
+
properties?: {
|
|
10
|
+
total?: number;
|
|
11
|
+
order_id?: string;
|
|
12
|
+
currency?: string;
|
|
13
|
+
coupon?: string;
|
|
14
|
+
num_items_purchased?: number;
|
|
15
|
+
is_new_customer?: boolean;
|
|
16
|
+
is_subscription?: boolean;
|
|
17
|
+
[k: string]: unknown;
|
|
18
|
+
};
|
|
19
|
+
podscribeEvent: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/podscribe/track/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("../utils");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Track',
|
|
6
|
+
description: 'Send user events to Podscribe',
|
|
7
|
+
defaultSubscription: 'type = "track"',
|
|
8
|
+
fields: {
|
|
9
|
+
anonymousId: {
|
|
10
|
+
type: 'string',
|
|
11
|
+
allowNull: true,
|
|
12
|
+
description: 'The anonymous ID associated with the user',
|
|
13
|
+
label: 'Anonymous ID',
|
|
14
|
+
default: { '@path': '$.anonymousId' }
|
|
15
|
+
},
|
|
16
|
+
timestamp: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
format: 'date-time',
|
|
19
|
+
required: true,
|
|
20
|
+
description: 'The timestamp of the event',
|
|
21
|
+
label: 'Timestamp',
|
|
22
|
+
default: { '@path': '$.timestamp' }
|
|
23
|
+
},
|
|
24
|
+
referrer: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
allowNull: true,
|
|
27
|
+
description: 'The page referrer',
|
|
28
|
+
label: 'Page Referrer',
|
|
29
|
+
default: {
|
|
30
|
+
'@if': {
|
|
31
|
+
exists: { '@path': '$.context.page.referrer' },
|
|
32
|
+
then: { '@path': '$.context.page.referrer' },
|
|
33
|
+
else: { '@path': '$.properties.referrer' }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
url: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
format: 'uri',
|
|
40
|
+
allowNull: true,
|
|
41
|
+
description: 'The page URL',
|
|
42
|
+
label: 'Page URL',
|
|
43
|
+
default: {
|
|
44
|
+
'@if': {
|
|
45
|
+
exists: { '@path': '$.context.page.url' },
|
|
46
|
+
then: { '@path': '$.context.page.url' },
|
|
47
|
+
else: { '@path': '$.properties.url' }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
ip: {
|
|
52
|
+
label: 'User IP address',
|
|
53
|
+
type: 'string',
|
|
54
|
+
required: true,
|
|
55
|
+
description: 'The IP address of the device sending the event.',
|
|
56
|
+
default: {
|
|
57
|
+
'@path': '$.context.ip'
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
userAgent: {
|
|
61
|
+
label: 'User Agent',
|
|
62
|
+
type: 'string',
|
|
63
|
+
description: 'The user agent of the device sending the event.',
|
|
64
|
+
default: {
|
|
65
|
+
'@path': '$.context.userAgent'
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
email: {
|
|
69
|
+
type: 'string',
|
|
70
|
+
format: 'email',
|
|
71
|
+
allowNull: true,
|
|
72
|
+
description: 'Email address of the user',
|
|
73
|
+
label: 'Email address',
|
|
74
|
+
default: {
|
|
75
|
+
'@if': {
|
|
76
|
+
exists: { '@path': '$.context.traits.email' },
|
|
77
|
+
then: { '@path': '$.context.traits.email' },
|
|
78
|
+
else: { '@path': '$.properties.email' }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
properties: {
|
|
83
|
+
label: 'Event properties',
|
|
84
|
+
description: 'Properties to send with the event',
|
|
85
|
+
type: 'object',
|
|
86
|
+
additionalProperties: true,
|
|
87
|
+
properties: {
|
|
88
|
+
total: {
|
|
89
|
+
label: 'Total Value',
|
|
90
|
+
type: 'number',
|
|
91
|
+
description: 'The total value of the order'
|
|
92
|
+
},
|
|
93
|
+
order_id: {
|
|
94
|
+
label: 'Order id',
|
|
95
|
+
type: 'string',
|
|
96
|
+
description: 'The order ID. A unique identifier for the order'
|
|
97
|
+
},
|
|
98
|
+
currency: {
|
|
99
|
+
label: 'Currency',
|
|
100
|
+
type: 'string',
|
|
101
|
+
description: 'Currency code. e.g. USD for US dollar, EUR for Euro'
|
|
102
|
+
},
|
|
103
|
+
coupon: {
|
|
104
|
+
label: 'Coupon',
|
|
105
|
+
type: 'string',
|
|
106
|
+
description: 'Coupon Code. A Discount code for the purchase'
|
|
107
|
+
},
|
|
108
|
+
num_items_purchased: {
|
|
109
|
+
label: 'Number of Items Purchased',
|
|
110
|
+
type: 'integer',
|
|
111
|
+
description: 'The number of items purchased in this order'
|
|
112
|
+
},
|
|
113
|
+
is_new_customer: {
|
|
114
|
+
label: 'Is New Customer',
|
|
115
|
+
type: 'boolean',
|
|
116
|
+
description: 'true value indicates if the user is a new customer'
|
|
117
|
+
},
|
|
118
|
+
is_subscription: {
|
|
119
|
+
label: 'Is Subscription',
|
|
120
|
+
type: 'boolean',
|
|
121
|
+
description: 'true value indicates a subscription'
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
default: {
|
|
125
|
+
total: { '@path': '$.properties.total' },
|
|
126
|
+
order_id: { '@path': '$.properties.order_id' },
|
|
127
|
+
currency: { '@path': '$.properties.currency' },
|
|
128
|
+
coupon: { '@path': '$.properties.coupon' },
|
|
129
|
+
num_items_purchased: { '@path': '$.properties.num_items_purchased' },
|
|
130
|
+
is_new_customer: { '@path': '$.properties.is_new_customer' },
|
|
131
|
+
is_subscription: { '@path': '$.properties.is_subscription' }
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
podscribeEvent: {
|
|
135
|
+
type: 'string',
|
|
136
|
+
required: true,
|
|
137
|
+
description: 'Podscribe type of event to send',
|
|
138
|
+
label: 'Podscribe event type',
|
|
139
|
+
default: { '@path': '$.properties.podscribeEvent' }
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
perform: (request, { settings, payload }) => {
|
|
143
|
+
const params = utils_1.serializeParams({
|
|
144
|
+
action: payload.podscribeEvent,
|
|
145
|
+
advertiser: settings.advertiser,
|
|
146
|
+
timestamp: payload.timestamp,
|
|
147
|
+
device_id: payload.anonymousId,
|
|
148
|
+
referrer: payload.referrer,
|
|
149
|
+
url: payload.url,
|
|
150
|
+
ip: payload.ip,
|
|
151
|
+
user_agent: payload.userAgent,
|
|
152
|
+
order_value: payload.properties?.total,
|
|
153
|
+
order_number: payload.properties?.order_id,
|
|
154
|
+
currency: payload.properties?.currency,
|
|
155
|
+
discount_code: payload.properties?.coupon,
|
|
156
|
+
hashed_email: payload?.email,
|
|
157
|
+
num_items_purchased: payload.properties?.num_items_purchased,
|
|
158
|
+
is_new_customer: payload.properties?.is_new_customer,
|
|
159
|
+
is_subscription: payload.properties?.is_subscription
|
|
160
|
+
});
|
|
161
|
+
return request(`https://verifi.podscribe.com/tag?${params}`);
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
exports.default = action;
|
|
165
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/podscribe/track/index.ts"],"names":[],"mappings":";;AAEA,oCAA0C;AAG1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,+BAA+B;IAC5C,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,2CAA2C;YACxD,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;SACtC;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,4BAA4B;YACzC,KAAK,EA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oC,MAAM,EAAE,CAAC,CAAA;IAC9D,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const serializeParams: (params: any) => string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.serializeParams = void 0;
|
|
4
|
+
const serializeParams = (params) => {
|
|
5
|
+
return Object.entries(params)
|
|
6
|
+
.reduce((acc, [k, v]) => {
|
|
7
|
+
if (Array.isArray(v)) {
|
|
8
|
+
for (const val of v) {
|
|
9
|
+
acc.append(k, val);
|
|
10
|
+
}
|
|
11
|
+
return acc;
|
|
12
|
+
}
|
|
13
|
+
if (v) {
|
|
14
|
+
acc.append(k, v);
|
|
15
|
+
}
|
|
16
|
+
return acc;
|
|
17
|
+
}, new URLSearchParams())
|
|
18
|
+
.toString();
|
|
19
|
+
};
|
|
20
|
+
exports.serializeParams = serializeParams;
|
|
21
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/destinations/podscribe/utils.ts"],"names":[],"mappings":";;;AAAO,MAAM,eAAe,GAAG,CAAC,MAAW,EAAE,EAAE;IAC7C,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;SAC1B,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAQ,EAAE,EAAE;QAC7B,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACpB,KAAK,MAAM,GAAG,IAAI,CAAC,EAAE;gBACnB,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;aACnB;YACD,OAAO,GAAG,CAAA;SACX;QACD,IAAI,CAAC,EAAE;YACL,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;SACjB;QACD,OAAO,GAAG,CAAA;IACZ,CAAC,EAAE,IAAI,eAAe,EAAE,CAAC;SACxB,QAAQ,EAAE,CAAA;AACf,CAAC,CAAA;AAfY,QAAA,eAAe,mBAe3B"}
|
|
@@ -4,7 +4,7 @@ exports.CONSTANTS = void 0;
|
|
|
4
4
|
exports.CONSTANTS = {
|
|
5
5
|
INCLUDE: 'include',
|
|
6
6
|
EXCLUDE: 'exclude',
|
|
7
|
-
ROKT_API_BASE_URL: 'https://data.
|
|
7
|
+
ROKT_API_BASE_URL: 'https://data.rokt.com/api/1.0',
|
|
8
8
|
ROKT_API_CUSTOM_AUDIENCE_ENDPOINT: '/import/suppression',
|
|
9
9
|
ROKT_API_AUTH_ENDPOINT: '/auth-check',
|
|
10
10
|
SUPPORTED_SEGMENT_COMPUTATION_ACTION: 'audience'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/destinations/rokt-audiences/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG;IAEvB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,iBAAiB,EAAE
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/destinations/rokt-audiences/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG;IAEvB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,iBAAiB,EAAE,+BAA+B;IAClD,iCAAiC,EAAE,qBAAqB;IACxD,sBAAsB,EAAE,aAAa;IAGrC,oCAAoC,EAAE,UAAU;CACjD,CAAA"}
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const actions_core_1 = require("@segment/actions-core");
|
|
7
|
-
const actions_core_2 = require("@segment/actions-core");
|
|
8
7
|
const upsertCustomAudiences_1 = __importDefault(require("./upsertCustomAudiences"));
|
|
9
8
|
const constants_1 = require("./constants");
|
|
10
9
|
const destination = {
|
|
@@ -27,14 +26,12 @@ const destination = {
|
|
|
27
26
|
}
|
|
28
27
|
},
|
|
29
28
|
testAuthentication: async (request, { settings }) => {
|
|
30
|
-
|
|
29
|
+
return request(constants_1.CONSTANTS.ROKT_API_BASE_URL + constants_1.CONSTANTS.ROKT_API_AUTH_ENDPOINT, {
|
|
31
30
|
method: 'GET',
|
|
32
31
|
headers: {
|
|
33
32
|
Authorization: `${settings.apiKey}`
|
|
34
33
|
}
|
|
35
34
|
});
|
|
36
|
-
if (res.status !== 200)
|
|
37
|
-
throw new actions_core_1.InvalidAuthenticationError('Authentication using Rokt ApiKey failed');
|
|
38
35
|
}
|
|
39
36
|
},
|
|
40
37
|
extendRequest({ settings }) {
|
|
@@ -50,7 +47,7 @@ const destination = {
|
|
|
50
47
|
name: 'Sync Engage Audience to Rokt',
|
|
51
48
|
subscribe: 'type = "track" or type = "identify"',
|
|
52
49
|
partnerAction: 'upsertCustomAudiences',
|
|
53
|
-
mapping:
|
|
50
|
+
mapping: actions_core_1.defaultValues(upsertCustomAudiences_1.default.fields)
|
|
54
51
|
}
|
|
55
52
|
]
|
|
56
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/rokt-audiences/index.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/rokt-audiences/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAG5E,oFAA2D;AAC3D,2CAAuC;AAEvC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,wBAAwB;IAC9B,IAAI,EAAE,OAAO;IACb,WAAW,EAAE;;;;GAIZ;IACD,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,sCAAsC;gBAC7C,WAAW,EAAE,6EAA6E;gBAC1F,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,IAAI;aACf;SACF;QAED,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAClD,OAAO,OAAO,CAAC,qBAAS,CAAC,iBAAiB,GAAG,qBAAS,CAAC,sBAAsB,EAAE;gBAC7E,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE;oBACP,aAAa,EAAE,GAAG,QAAQ,CAAC,MAAM,EAAE;iBACpC;aACF,CAAC,CAAA;QACJ,CAAC;KACF;IAED,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO;YACL,OAAO,EAAE,EAAE,aAAa,EAAE,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE;SACjD,CAAA;IACH,CAAC;IACD,OAAO,EAAE;QACP,qBAAqB,EAArB,+BAAqB;KACtB;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,8BAA8B;YACpC,SAAS,EAAE,qCAAqC;YAChD,aAAa,EAAE,uBAAuB;YACtC,OAAO,EAAE,4BAAa,CAAC,+BAAqB,CAAC,MAAM,CAAC;SACrD;KACF;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commonFields = void 0;
|
|
4
|
+
exports.commonFields = {
|
|
5
|
+
user_anonymous_Id: {
|
|
6
|
+
type: 'string',
|
|
7
|
+
allowNull: true,
|
|
8
|
+
required: false,
|
|
9
|
+
description: 'User Anonymous id',
|
|
10
|
+
label: 'Anonymous ID',
|
|
11
|
+
default: { '@path': '$.anonymousId' }
|
|
12
|
+
},
|
|
13
|
+
event_id: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
required: false,
|
|
16
|
+
description: 'The ID of the event.',
|
|
17
|
+
label: 'Event ID',
|
|
18
|
+
default: { '@path': '$.messageId' }
|
|
19
|
+
},
|
|
20
|
+
doc_path: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
required: false,
|
|
23
|
+
description: 'The path of the document.',
|
|
24
|
+
label: 'Document Path',
|
|
25
|
+
default: { '@path': '$.context.page.path' }
|
|
26
|
+
},
|
|
27
|
+
doc_search: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
required: false,
|
|
30
|
+
description: 'The search query of the document.',
|
|
31
|
+
label: 'Document Search',
|
|
32
|
+
default: { '@path': '$.context.page.search' }
|
|
33
|
+
},
|
|
34
|
+
event_type: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
required: false,
|
|
37
|
+
description: 'The type of the event.',
|
|
38
|
+
label: 'Event Type',
|
|
39
|
+
default: { '@path': '$.type' }
|
|
40
|
+
},
|
|
41
|
+
page_title: {
|
|
42
|
+
type: 'string',
|
|
43
|
+
required: false,
|
|
44
|
+
description: 'The title of the page where the event occurred.',
|
|
45
|
+
label: 'Page Title',
|
|
46
|
+
default: { '@path': '$.context.page.title' }
|
|
47
|
+
},
|
|
48
|
+
referer: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
required: false,
|
|
51
|
+
description: 'The referrer of the page where the event occurred.',
|
|
52
|
+
label: 'Referrer',
|
|
53
|
+
default: { '@path': '$.context.page.referrer' }
|
|
54
|
+
},
|
|
55
|
+
url: {
|
|
56
|
+
type: 'string',
|
|
57
|
+
required: false,
|
|
58
|
+
description: 'The URL of the page where the event occurred.',
|
|
59
|
+
label: 'URL',
|
|
60
|
+
default: { '@path': '$.context.page.url' }
|
|
61
|
+
},
|
|
62
|
+
user_agent: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
required: false,
|
|
65
|
+
description: 'The user agent of the browser.',
|
|
66
|
+
label: 'User Agent',
|
|
67
|
+
default: { '@path': '$.context.userAgent' }
|
|
68
|
+
},
|
|
69
|
+
user_language: {
|
|
70
|
+
type: 'string',
|
|
71
|
+
required: false,
|
|
72
|
+
description: 'The language of the browser.',
|
|
73
|
+
label: 'User Language',
|
|
74
|
+
default: { '@path': '$.context.locale' }
|
|
75
|
+
},
|
|
76
|
+
utc_time: {
|
|
77
|
+
type: 'string',
|
|
78
|
+
required: false,
|
|
79
|
+
description: 'The time of the event in UTC.',
|
|
80
|
+
label: 'UTC Time',
|
|
81
|
+
default: { '@path': '$.timestamp' }
|
|
82
|
+
},
|
|
83
|
+
utm: {
|
|
84
|
+
type: 'object',
|
|
85
|
+
required: false,
|
|
86
|
+
description: 'Information about the UTM parameters.',
|
|
87
|
+
label: 'UTM',
|
|
88
|
+
properties: {
|
|
89
|
+
source: {
|
|
90
|
+
label: 'Source',
|
|
91
|
+
description: 'The source of the campaign.',
|
|
92
|
+
type: 'string'
|
|
93
|
+
},
|
|
94
|
+
medium: {
|
|
95
|
+
label: 'Medium',
|
|
96
|
+
description: 'The medium of the campaign.',
|
|
97
|
+
type: 'string'
|
|
98
|
+
},
|
|
99
|
+
name: {
|
|
100
|
+
label: 'Name',
|
|
101
|
+
description: 'The name of the campaign.',
|
|
102
|
+
type: 'string'
|
|
103
|
+
},
|
|
104
|
+
term: {
|
|
105
|
+
label: 'Term',
|
|
106
|
+
description: 'The term of the campaign.',
|
|
107
|
+
type: 'string'
|
|
108
|
+
},
|
|
109
|
+
content: {
|
|
110
|
+
label: 'Content',
|
|
111
|
+
description: 'The content of the campaign.',
|
|
112
|
+
type: 'string'
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
default: {
|
|
116
|
+
source: { '@path': '$.context.campaign.source' },
|
|
117
|
+
medium: { '@path': '$.context.campaign.medium' },
|
|
118
|
+
name: { '@path': '$.context.campaign.name' },
|
|
119
|
+
term: { '@path': '$.context.campaign.term' },
|
|
120
|
+
content: { '@path': '$.context.campaign.content' }
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
screen: {
|
|
124
|
+
type: 'object',
|
|
125
|
+
required: false,
|
|
126
|
+
description: 'Information about the screen.',
|
|
127
|
+
label: 'Screen',
|
|
128
|
+
properties: {
|
|
129
|
+
height: {
|
|
130
|
+
label: 'Height',
|
|
131
|
+
description: 'The height of the screen.',
|
|
132
|
+
type: 'integer'
|
|
133
|
+
},
|
|
134
|
+
width: {
|
|
135
|
+
label: 'Width',
|
|
136
|
+
description: 'The width of the screen.',
|
|
137
|
+
type: 'integer'
|
|
138
|
+
},
|
|
139
|
+
density: {
|
|
140
|
+
label: 'Density',
|
|
141
|
+
description: 'The density of the screen.',
|
|
142
|
+
type: 'number'
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
default: {
|
|
146
|
+
height: { '@path': '$.context.screen.height' },
|
|
147
|
+
width: { '@path': '$.context.screen.width' },
|
|
148
|
+
density: { '@path': '$.context.screen.density' }
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
timezone: {
|
|
152
|
+
type: 'string',
|
|
153
|
+
required: false,
|
|
154
|
+
description: 'The timezone of the browser.',
|
|
155
|
+
label: 'Timezone',
|
|
156
|
+
default: {
|
|
157
|
+
'@if': {
|
|
158
|
+
exists: { '@path': '$.properties.timezone' },
|
|
159
|
+
then: { '@path': '$.properties.timezone' },
|
|
160
|
+
else: { '@path': '$.traits.timezone' }
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
ip: {
|
|
165
|
+
type: 'string',
|
|
166
|
+
required: false,
|
|
167
|
+
description: 'The IP address of the user.',
|
|
168
|
+
label: 'IP Address',
|
|
169
|
+
default: { '@path': '$.context.ip' }
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
//# sourceMappingURL=common-definitions.js.map
|