@segment/action-destinations 3.145.0 → 3.148.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/README.md +1 -0
- package/dist/destinations/acoustic/index.js +8 -12
- package/dist/destinations/acoustic/index.js.map +1 -1
- package/dist/destinations/blend-ai/generated-types.d.ts +3 -0
- package/dist/destinations/blend-ai/generated-types.js +3 -0
- package/dist/destinations/blend-ai/generated-types.js.map +1 -0
- package/dist/destinations/blend-ai/index.d.ts +4 -0
- package/dist/destinations/blend-ai/index.js +54 -0
- package/dist/destinations/blend-ai/index.js.map +1 -0
- package/dist/destinations/blend-ai/sendData/generated-types.d.ts +2 -0
- package/dist/destinations/blend-ai/sendData/generated-types.js +3 -0
- package/dist/destinations/blend-ai/sendData/generated-types.js.map +1 -0
- package/dist/destinations/blend-ai/sendData/index.d.ts +5 -0
- package/dist/destinations/blend-ai/sendData/index.js +16 -0
- package/dist/destinations/blend-ai/sendData/index.js.map +1 -0
- package/dist/destinations/encharge/addTag/generated-types.d.ts +6 -0
- package/dist/destinations/encharge/addTag/generated-types.js +3 -0
- package/dist/destinations/encharge/addTag/generated-types.js.map +1 -0
- package/dist/destinations/encharge/addTag/index.d.ts +5 -0
- package/dist/destinations/encharge/addTag/index.js +37 -0
- package/dist/destinations/encharge/addTag/index.js.map +1 -0
- package/dist/destinations/encharge/aliasUser/generated-types.d.ts +6 -0
- package/dist/destinations/encharge/aliasUser/generated-types.js +3 -0
- package/dist/destinations/encharge/aliasUser/generated-types.js.map +1 -0
- package/dist/destinations/encharge/aliasUser/index.d.ts +5 -0
- package/dist/destinations/encharge/aliasUser/index.js +42 -0
- package/dist/destinations/encharge/aliasUser/index.js.map +1 -0
- package/dist/destinations/encharge/common-definitions.d.ts +5 -0
- package/dist/destinations/encharge/common-definitions.js +206 -0
- package/dist/destinations/encharge/common-definitions.js.map +1 -0
- package/dist/destinations/encharge/createUpdateObject/generated-types.d.ts +10 -0
- package/dist/destinations/encharge/createUpdateObject/generated-types.js +3 -0
- package/dist/destinations/encharge/createUpdateObject/generated-types.js.map +1 -0
- package/dist/destinations/encharge/createUpdateObject/getCustomObjects.d.ts +2 -0
- package/dist/destinations/encharge/createUpdateObject/getCustomObjects.js +29 -0
- package/dist/destinations/encharge/createUpdateObject/getCustomObjects.js.map +1 -0
- package/dist/destinations/encharge/createUpdateObject/index.d.ts +5 -0
- package/dist/destinations/encharge/createUpdateObject/index.js +75 -0
- package/dist/destinations/encharge/createUpdateObject/index.js.map +1 -0
- package/dist/destinations/encharge/deleteUser.d.ts +3 -0
- package/dist/destinations/encharge/deleteUser.js +23 -0
- package/dist/destinations/encharge/deleteUser.js.map +1 -0
- package/dist/destinations/encharge/generated-types.d.ts +3 -0
- package/dist/destinations/encharge/generated-types.js +3 -0
- package/dist/destinations/encharge/generated-types.js.map +1 -0
- package/dist/destinations/encharge/identifyUser/generated-types.d.ts +33 -0
- package/dist/destinations/encharge/identifyUser/generated-types.js +3 -0
- package/dist/destinations/encharge/identifyUser/generated-types.js.map +1 -0
- package/dist/destinations/encharge/identifyUser/index.d.ts +5 -0
- package/dist/destinations/encharge/identifyUser/index.js +42 -0
- package/dist/destinations/encharge/identifyUser/index.js.map +1 -0
- package/dist/destinations/encharge/index.d.ts +4 -0
- package/dist/destinations/encharge/index.js +88 -0
- package/dist/destinations/encharge/index.js.map +1 -0
- package/dist/destinations/encharge/removeTag/generated-types.d.ts +6 -0
- package/dist/destinations/encharge/removeTag/generated-types.js +3 -0
- package/dist/destinations/encharge/removeTag/generated-types.js.map +1 -0
- package/dist/destinations/encharge/removeTag/index.d.ts +5 -0
- package/dist/destinations/encharge/removeTag/index.js +37 -0
- package/dist/destinations/encharge/removeTag/index.js.map +1 -0
- package/dist/destinations/encharge/trackEvent/generated-types.d.ts +37 -0
- package/dist/destinations/encharge/trackEvent/generated-types.js +3 -0
- package/dist/destinations/encharge/trackEvent/generated-types.js.map +1 -0
- package/dist/destinations/encharge/trackEvent/index.d.ts +5 -0
- package/dist/destinations/encharge/trackEvent/index.js +44 -0
- package/dist/destinations/encharge/trackEvent/index.js.map +1 -0
- package/dist/destinations/encharge/trackPageView/generated-types.d.ts +36 -0
- package/dist/destinations/encharge/trackPageView/generated-types.js +3 -0
- package/dist/destinations/encharge/trackPageView/generated-types.js.map +1 -0
- package/dist/destinations/encharge/trackPageView/index.d.ts +5 -0
- package/dist/destinations/encharge/trackPageView/index.js +41 -0
- package/dist/destinations/encharge/trackPageView/index.js.map +1 -0
- package/dist/destinations/encharge/utils.d.ts +3 -0
- package/dist/destinations/encharge/utils.js +7 -0
- package/dist/destinations/encharge/utils.js.map +1 -0
- package/dist/destinations/index.js +2 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/june/index.js +9 -4
- package/dist/destinations/june/index.js.map +1 -1
- package/dist/destinations/launchdarkly/aliasUser/index.js +1 -1
- package/dist/destinations/launchdarkly/aliasUser/index.js.map +1 -1
- package/dist/destinations/launchdarkly/index.js +2 -2
- package/dist/destinations/launchdarkly/trackEvent/generated-types.d.ts +4 -0
- package/dist/destinations/launchdarkly/trackEvent/index.js +33 -8
- package/dist/destinations/launchdarkly/trackEvent/index.js.map +1 -1
- package/dist/destinations/mixpanel/identifyUser/index.js +12 -2
- package/dist/destinations/mixpanel/identifyUser/index.js.map +1 -1
- package/dist/destinations/mixpanel/mixpanel-types.d.ts +17 -0
- package/dist/destinations/pinterest-conversions/constants.d.ts +14 -0
- package/dist/destinations/pinterest-conversions/constants.js +18 -0
- package/dist/destinations/pinterest-conversions/constants.js.map +1 -0
- package/dist/destinations/pinterest-conversions/index.d.ts +1 -1
- package/dist/destinations/pinterest-conversions/index.js +98 -1
- package/dist/destinations/pinterest-conversions/index.js.map +1 -1
- package/dist/destinations/pinterest-conversions/pinterest-capi-custom-data.d.ts +2 -0
- package/dist/destinations/pinterest-conversions/pinterest-capi-custom-data.js +83 -0
- package/dist/destinations/pinterest-conversions/pinterest-capi-custom-data.js.map +1 -0
- package/dist/destinations/pinterest-conversions/pinterset-capi-user-data.d.ts +7 -0
- package/dist/destinations/pinterest-conversions/pinterset-capi-user-data.js +195 -0
- package/dist/destinations/pinterest-conversions/pinterset-capi-user-data.js.map +1 -0
- package/dist/destinations/pinterest-conversions/reportConversionEvent/generated-types.d.ts +45 -0
- package/dist/destinations/pinterest-conversions/reportConversionEvent/index.js +202 -2
- package/dist/destinations/pinterest-conversions/reportConversionEvent/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/addUser/generated-types.d.ts +1 -2
- package/dist/destinations/tiktok-audiences/addUser/index.js +2 -3
- package/dist/destinations/tiktok-audiences/addUser/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/api/index.d.ts +1 -3
- package/dist/destinations/tiktok-audiences/api/index.js +0 -10
- package/dist/destinations/tiktok-audiences/api/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/functions.d.ts +1 -5
- package/dist/destinations/tiktok-audiences/functions.js +8 -44
- package/dist/destinations/tiktok-audiences/functions.js.map +1 -1
- package/dist/destinations/tiktok-audiences/properties.d.ts +2 -2
- package/dist/destinations/tiktok-audiences/properties.js +16 -12
- package/dist/destinations/tiktok-audiences/properties.js.map +1 -1
- package/dist/destinations/tiktok-audiences/removeUser/generated-types.d.ts +1 -2
- package/dist/destinations/tiktok-audiences/removeUser/index.js +2 -3
- package/dist/destinations/tiktok-audiences/removeUser/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/types.d.ts +0 -5
- package/dist/destinations/webhook/send/generated-types.d.ts +1 -0
- package/dist/destinations/webhook/send/index.js +7 -0
- package/dist/destinations/webhook/send/index.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -8,6 +8,7 @@ MIT License
|
|
|
8
8
|
|
|
9
9
|
Copyright (c) 2023 Segment
|
|
10
10
|
|
|
11
|
+
|
|
11
12
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
13
|
of this software and associated documentation files (the "Software"), to deal
|
|
13
14
|
in the Software without restriction, including without limitation the rights
|
|
@@ -13,12 +13,10 @@ const presets = [
|
|
|
13
13
|
mapping: {
|
|
14
14
|
...actions_core_1.defaultValues(receiveEvents_1.default.fields),
|
|
15
15
|
email: {
|
|
16
|
-
|
|
17
|
-
'@
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
else: { '@path': '$.context.traits.email' }
|
|
21
|
-
}
|
|
16
|
+
'@if': {
|
|
17
|
+
exists: { '@path': '$.properties.email' },
|
|
18
|
+
then: { '@path': '$.properties.email' },
|
|
19
|
+
else: { '@path': '$.context.traits.email' }
|
|
22
20
|
}
|
|
23
21
|
}
|
|
24
22
|
}
|
|
@@ -30,12 +28,10 @@ const presets = [
|
|
|
30
28
|
mapping: {
|
|
31
29
|
...actions_core_1.defaultValues(receiveEvents_1.default.fields),
|
|
32
30
|
email: {
|
|
33
|
-
|
|
34
|
-
'@
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
else: { '@path': '$.context.traits.email' }
|
|
38
|
-
}
|
|
31
|
+
'@if': {
|
|
32
|
+
exists: { '@path': '$.traits.email' },
|
|
33
|
+
then: { '@path': '$.traits.email' },
|
|
34
|
+
else: { '@path': '$.context.traits.email' }
|
|
39
35
|
}
|
|
40
36
|
}
|
|
41
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/acoustic/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAE5E,oEAA2C;AAU3C,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,eAAe;QAC9B,OAAO,EAAE;YACP,GAAG,4BAAa,CAAC,uBAAa,CAAC,MAAM,CAAC;YACtC,KAAK,EAAE;gBACL,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/acoustic/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAE5E,oEAA2C;A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,OAAO,EAAE;gBAEP,cAAc,EAAE,UAAU;gBAC1B,YAAY,EAAE,8BAA8B,QAAQ,CAAC,KAAK,IAAI,IAAI,EAAE,WAAW,GAAG;gBAClF,UAAU,EAAE,YAAY;gBACxB,iBAAiB,EAAE,mBAAmB;gBACtC,MAAM,EAAE,KAAK;aACd;SACF,CAAA;IACH,CAAC;IACD,OAAO;IACP,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;KACd;CACF,CAAA;AACD,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/blend-ai/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 sendData_1 = __importDefault(require("./sendData"));
|
|
7
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
8
|
+
const baseUrl = 'https://segment-api.blnd.ai/';
|
|
9
|
+
const destination = {
|
|
10
|
+
name: 'Blend Ai',
|
|
11
|
+
slug: 'actions-blend-ai',
|
|
12
|
+
mode: 'cloud',
|
|
13
|
+
authentication: {
|
|
14
|
+
scheme: 'custom',
|
|
15
|
+
fields: {
|
|
16
|
+
apiKey: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
label: 'API Key',
|
|
19
|
+
description: 'Blend API key - found on integration page.',
|
|
20
|
+
required: true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
testAuthentication: (request) => {
|
|
24
|
+
return request(baseUrl + 'authenticate');
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
onDelete: async (request, { payload }) => {
|
|
28
|
+
return request(baseUrl + 'delete', {
|
|
29
|
+
method: 'post',
|
|
30
|
+
json: {
|
|
31
|
+
external_ids: [payload.userId]
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
extendRequest: ({ settings }) => {
|
|
36
|
+
return {
|
|
37
|
+
method: 'POST',
|
|
38
|
+
json: { apiKey: settings.apiKey }
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
presets: [
|
|
42
|
+
{
|
|
43
|
+
name: 'Send Data to Blend',
|
|
44
|
+
subscribe: 'type = "identify" or type = "page" or type = "screen" or type = "track"',
|
|
45
|
+
partnerAction: 'sendData',
|
|
46
|
+
mapping: actions_core_1.defaultValues(sendData_1.default.fields)
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
actions: {
|
|
50
|
+
sendData: sendData_1.default
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
exports.default = destination;
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/blend-ai/index.ts"],"names":[],"mappings":";;;;;AAEA,0DAAiC;AACjC,wDAAqD;AAErD,MAAM,OAAO,GAAG,8BAA8B,CAAA;AAE9C,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,OAAO;IACb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,4CAA4C;gBACzD,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;YAC9B,OAAO,OAAO,CAAC,OAAO,GAAG,cAAc,CAAC,CAAA;QAC1C,CAAC;KACF;IACD,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACvC,OAAO,OAAO,CAAC,OAAO,GAAG,QAAQ,EAAE;YACjC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,YAAY,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;aAC/B;SACF,CAAC,CAAA;IACJ,CAAC;IACD,aAAa,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC9B,OAAO;YACL,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE;SAClC,CAAA;IACH,CAAC;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,oBAAoB;YAC1B,SAAS,EAAE,yEAAyE;YACpF,aAAa,EAAE,UAAU;YACzB,OAAO,EAAE,4BAAa,CAAC,kBAAQ,CAAC,MAAM,CAAC;SACxC;KACF;IACD,OAAO,EAAE;QACP,QAAQ,EAAR,kBAAQ;KACT;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/blend-ai/sendData/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const baseUrl = 'https://segment-api.blnd.ai/';
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Send Data',
|
|
6
|
+
description: 'Send data to Blend AI for product usage insights',
|
|
7
|
+
fields: {},
|
|
8
|
+
defaultSubscription: 'type = "identify" or type = "page" or type = "screen" or type = "track"',
|
|
9
|
+
perform: (request, payload) => {
|
|
10
|
+
return request(baseUrl + 'sendData', {
|
|
11
|
+
json: { payload: payload }
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
exports.default = action;
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/blend-ai/sendData/index.ts"],"names":[],"mappings":";;AAIA,MAAM,OAAO,GAAG,8BAA8B,CAAA;AAE9C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,kDAAkD;IAC/D,MAAM,EAAE,EAAE;IACV,mBAAmB,EAAE,yEAAyE;IAC9F,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;QAC5B,OAAO,OAAO,CAAC,OAAO,GAAG,UAAU,EAAE;YACnC,IAAI,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;SAC3B,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/encharge/addTag/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 pick_1 = __importDefault(require("lodash/pick"));
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
const common_definitions_1 = require("../common-definitions");
|
|
10
|
+
const action = {
|
|
11
|
+
title: 'Tag User',
|
|
12
|
+
description: 'Add a tag to a user in Encharge.',
|
|
13
|
+
fields: {
|
|
14
|
+
tag: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
required: true,
|
|
17
|
+
description: 'The tags to add, separated by commas.',
|
|
18
|
+
label: 'Tag',
|
|
19
|
+
default: { '@path': '$.traits.tag' }
|
|
20
|
+
},
|
|
21
|
+
...pick_1.default(common_definitions_1.commonFields, ['email', 'userId', 'segmentAnonymousId'])
|
|
22
|
+
},
|
|
23
|
+
perform: (request, data) => {
|
|
24
|
+
if (!data.payload.email && !data.payload.userId && !data.payload.segmentAnonymousId) {
|
|
25
|
+
throw new actions_core_1.PayloadValidationError('No user ID, email, or anonymous ID provided.');
|
|
26
|
+
}
|
|
27
|
+
if (!data.payload.tag?.length) {
|
|
28
|
+
throw new actions_core_1.PayloadValidationError('Missing tag.');
|
|
29
|
+
}
|
|
30
|
+
return request(`${utils_1.enchargeRestAPIBase}/v1/tags`, {
|
|
31
|
+
method: 'post',
|
|
32
|
+
json: data.payload
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.default = action;
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/encharge/addTag/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAgF;AAIhF,uDAA8B;AAC9B,oCAA8C;AAC9C,8DAAoD;AAEpD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,kCAAkC;IAC/C,MAAM,EAAE;QACN,GAAG,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,uCAAuC;YACpD,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;SACrC;QACD,GAAG,cAAI,CAAC,iCAAY,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,oBAAoB,CAAC,CAAC;KACjE;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE;YACnF,MAAM,IAAI,qCAAsB,CAAC,8CAA8C,CAAC,CAAA;SACjF;QACD,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE;YAC7B,MAAM,IAAI,qCAAsB,CAAC,cAAc,CAAC,CAAA;SACjD;QACD,OAAO,OAAO,CAAC,GAAG,2BAAmB,UAAU,EAAE;YAC/C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,OAAO;SACnB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/encharge/aliasUser/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 pick_1 = __importDefault(require("lodash/pick"));
|
|
7
|
+
const utils_1 = require("../utils");
|
|
8
|
+
const common_definitions_1 = require("../common-definitions");
|
|
9
|
+
const action = {
|
|
10
|
+
title: 'Alias User',
|
|
11
|
+
description: 'Change the User ID of an user.',
|
|
12
|
+
defaultSubscription: 'type = "alias"',
|
|
13
|
+
fields: {
|
|
14
|
+
userId: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
required: true,
|
|
17
|
+
description: 'The new User ID to associate with the user in Encharge.',
|
|
18
|
+
label: 'User ID',
|
|
19
|
+
default: { '@path': '$.userId' }
|
|
20
|
+
},
|
|
21
|
+
previousUserId: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
required: true,
|
|
24
|
+
description: 'The previous User ID associated with the user in Encharge.',
|
|
25
|
+
label: 'Previous User ID',
|
|
26
|
+
default: { '@path': '$.previousId' }
|
|
27
|
+
},
|
|
28
|
+
...pick_1.default(common_definitions_1.commonFields, ['timestamp', 'messageId'])
|
|
29
|
+
},
|
|
30
|
+
perform: (request, data) => {
|
|
31
|
+
const payload = {
|
|
32
|
+
...data.payload,
|
|
33
|
+
type: 'alias'
|
|
34
|
+
};
|
|
35
|
+
return request(utils_1.enchargeIngestAPIURL, {
|
|
36
|
+
method: 'post',
|
|
37
|
+
json: payload
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
exports.default = action;
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/encharge/aliasUser/index.ts"],"names":[],"mappings":";;;;;AAGA,uDAA8B;AAC9B,oCAA+C;AAC/C,8DAAoD;AAEpD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,gCAAgC;IAC7C,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,yDAAyD;YACtE,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;QACD,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,4DAA4D;YACzE,KAAK,EAAE,kBAAkB;YACzB,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;SACrC;QACD,GAAG,cAAI,CAAC,iCAAY,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;KAClD;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,MAAM,OAAO,GAAG;YACd,GAAG,IAAI,CAAC,OAAO;YACf,IAAI,EAAE,OAAO;SACd,CAAA;QACD,OAAO,OAAO,CAAC,4BAAoB,EAAE;YACnC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO;SACd,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ActionDefinition } from '@segment/actions-core';
|
|
2
|
+
import type { Settings } from './generated-types';
|
|
3
|
+
export declare const commonFields: ActionDefinition<Settings>['fields'];
|
|
4
|
+
export declare const userFieldsDefinition: ActionDefinition<Settings>['fields'];
|
|
5
|
+
export declare const propertiesDefinition: ActionDefinition<Settings>['fields'];
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.propertiesDefinition = exports.userFieldsDefinition = exports.commonFields = void 0;
|
|
4
|
+
exports.commonFields = {
|
|
5
|
+
type: {
|
|
6
|
+
type: 'string',
|
|
7
|
+
required: true,
|
|
8
|
+
description: 'The type of event.',
|
|
9
|
+
label: 'Type',
|
|
10
|
+
default: { '@path': '$.type' }
|
|
11
|
+
},
|
|
12
|
+
email: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
required: false,
|
|
15
|
+
description: 'The email address of the user.',
|
|
16
|
+
label: 'Email',
|
|
17
|
+
default: { '@path': '$.email' }
|
|
18
|
+
},
|
|
19
|
+
segmentAnonymousId: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: 'An anonymous identifier for this user.',
|
|
22
|
+
label: 'Anonymous ID',
|
|
23
|
+
default: { '@path': '$.anonymousId' }
|
|
24
|
+
},
|
|
25
|
+
userId: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'The User ID associated with the user in Encharge.',
|
|
28
|
+
label: 'User ID',
|
|
29
|
+
default: { '@path': '$.userId' }
|
|
30
|
+
},
|
|
31
|
+
groupId: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'An ID associating the event with a group.',
|
|
34
|
+
label: 'Group ID',
|
|
35
|
+
default: { '@path': '$.context.groupId' }
|
|
36
|
+
},
|
|
37
|
+
timestamp: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
format: 'date-time',
|
|
40
|
+
required: false,
|
|
41
|
+
description: 'The timestamp of the event',
|
|
42
|
+
label: 'Timestamp',
|
|
43
|
+
default: { '@path': '$.timestamp' }
|
|
44
|
+
},
|
|
45
|
+
messageId: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
required: false,
|
|
48
|
+
description: 'The Segment messageId',
|
|
49
|
+
label: 'MessageId',
|
|
50
|
+
default: { '@path': '$.messageId' }
|
|
51
|
+
},
|
|
52
|
+
ip: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
required: false,
|
|
55
|
+
description: 'The IP address of the user.',
|
|
56
|
+
label: 'IP Address',
|
|
57
|
+
default: { '@path': '$.context.ip' }
|
|
58
|
+
},
|
|
59
|
+
userAgent: {
|
|
60
|
+
type: 'string',
|
|
61
|
+
required: false,
|
|
62
|
+
description: 'The user agent of the user. Used to determine the device, browser and operating system.',
|
|
63
|
+
label: 'User Agent',
|
|
64
|
+
default: { '@path': '$.context.userAgent' }
|
|
65
|
+
},
|
|
66
|
+
campaign: {
|
|
67
|
+
type: 'object',
|
|
68
|
+
required: false,
|
|
69
|
+
description: 'UTM campaign information.',
|
|
70
|
+
label: 'Campaign',
|
|
71
|
+
default: {
|
|
72
|
+
name: { '@path': '$.context.campaign.name' },
|
|
73
|
+
source: { '@path': '$.context.campaign.source' },
|
|
74
|
+
medium: { '@path': '$.context.campaign.medium' },
|
|
75
|
+
term: { '@path': '$.context.campaign.term' },
|
|
76
|
+
content: { '@path': '$.context.campaign.content' }
|
|
77
|
+
},
|
|
78
|
+
properties: {
|
|
79
|
+
name: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
required: false,
|
|
82
|
+
description: 'The name of the campaign.',
|
|
83
|
+
label: 'Name'
|
|
84
|
+
},
|
|
85
|
+
source: {
|
|
86
|
+
type: 'string',
|
|
87
|
+
required: false,
|
|
88
|
+
description: 'The source of the campaign.',
|
|
89
|
+
label: 'Source'
|
|
90
|
+
},
|
|
91
|
+
medium: {
|
|
92
|
+
type: 'string',
|
|
93
|
+
required: false,
|
|
94
|
+
description: 'The medium of the campaign.',
|
|
95
|
+
label: 'Medium'
|
|
96
|
+
},
|
|
97
|
+
term: {
|
|
98
|
+
type: 'string',
|
|
99
|
+
required: false,
|
|
100
|
+
description: 'The term of the campaign.',
|
|
101
|
+
label: 'Term'
|
|
102
|
+
},
|
|
103
|
+
content: {
|
|
104
|
+
type: 'string',
|
|
105
|
+
required: false,
|
|
106
|
+
description: 'The content of the campaign.',
|
|
107
|
+
label: 'Content'
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
page: {
|
|
112
|
+
type: 'object',
|
|
113
|
+
required: false,
|
|
114
|
+
description: 'Information about the page where the event occurred.',
|
|
115
|
+
label: 'Page',
|
|
116
|
+
default: {
|
|
117
|
+
url: { '@path': '$.context.page.url' },
|
|
118
|
+
title: { '@path': '$.context.page.title' },
|
|
119
|
+
referrer: { '@path': '$.context.page.referrer' },
|
|
120
|
+
path: { '@path': '$.context.page.path' },
|
|
121
|
+
search: { '@path': '$.context.page.search' }
|
|
122
|
+
},
|
|
123
|
+
properties: {
|
|
124
|
+
url: {
|
|
125
|
+
type: 'string',
|
|
126
|
+
required: false,
|
|
127
|
+
description: 'The URL of the page where the event occurred.',
|
|
128
|
+
label: 'URL'
|
|
129
|
+
},
|
|
130
|
+
title: {
|
|
131
|
+
type: 'string',
|
|
132
|
+
required: false,
|
|
133
|
+
description: 'The title of the page where the event occurred.',
|
|
134
|
+
label: 'Title'
|
|
135
|
+
},
|
|
136
|
+
referrer: {
|
|
137
|
+
type: 'string',
|
|
138
|
+
required: false,
|
|
139
|
+
description: 'The referrer of the page where the event occurred.',
|
|
140
|
+
label: 'Referrer'
|
|
141
|
+
},
|
|
142
|
+
path: {
|
|
143
|
+
type: 'string',
|
|
144
|
+
required: false,
|
|
145
|
+
description: 'The path of the page where the event occurred.',
|
|
146
|
+
label: 'Path'
|
|
147
|
+
},
|
|
148
|
+
search: {
|
|
149
|
+
type: 'string',
|
|
150
|
+
required: false,
|
|
151
|
+
description: 'The search query of the page where the event occurred.',
|
|
152
|
+
label: 'Search'
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
location: {
|
|
157
|
+
type: 'object',
|
|
158
|
+
required: false,
|
|
159
|
+
description: 'Information about the location of the user.',
|
|
160
|
+
label: 'Location',
|
|
161
|
+
default: {
|
|
162
|
+
city: { '@path': '$.context.location.city' },
|
|
163
|
+
region: { '@path': '$.context.location.region' },
|
|
164
|
+
country: { '@path': '$.context.location.country' }
|
|
165
|
+
},
|
|
166
|
+
properties: {
|
|
167
|
+
city: {
|
|
168
|
+
type: 'string',
|
|
169
|
+
required: false,
|
|
170
|
+
description: 'The city of the user.',
|
|
171
|
+
label: 'City'
|
|
172
|
+
},
|
|
173
|
+
region: {
|
|
174
|
+
type: 'string',
|
|
175
|
+
required: false,
|
|
176
|
+
description: 'The region of the user.',
|
|
177
|
+
label: 'Region'
|
|
178
|
+
},
|
|
179
|
+
country: {
|
|
180
|
+
type: 'string',
|
|
181
|
+
required: false,
|
|
182
|
+
description: 'The country of the user.',
|
|
183
|
+
label: 'Country'
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
exports.userFieldsDefinition = {
|
|
189
|
+
userFields: {
|
|
190
|
+
label: 'User Fields',
|
|
191
|
+
description: `Any default or custom field of the user. On the left-hand side, input the API name of the field as seen in your Encharge account. On the right-hand side, map the Segment field that contains the value. Any properties that don't exist will be created automatically. See more information in [Encharge's documentation](https://help.encharge.io/article/206-create-and-manage-custom-fields).`,
|
|
192
|
+
type: 'object',
|
|
193
|
+
defaultObjectUI: 'keyvalue',
|
|
194
|
+
allowNull: false,
|
|
195
|
+
default: { '@path': '$.context.traits' }
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
exports.propertiesDefinition = {
|
|
199
|
+
properties: {
|
|
200
|
+
type: 'object',
|
|
201
|
+
description: 'The properties of the event.',
|
|
202
|
+
label: 'Event Properties',
|
|
203
|
+
default: { '@path': '$.properties' }
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
//# sourceMappingURL=common-definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-definitions.js","sourceRoot":"","sources":["../../../src/destinations/encharge/common-definitions.ts"],"names":[],"mappings":";;;AAGa,QAAA,YAAY,GAAyC;IAChE,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,oBAAoB;QACjC,KAAK,EAAE,MAAM;QACb,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;KAC/B;IACD,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,gCAAgC;QAC7C,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KAChC;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,wCAAwC;QACrD,KAAK,EAAE,cAAc;QACrB,OAAO,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;KACtC;IACD,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,mDAAmD;QAChE,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;KACjC;IACD,OAAO,EAAE;QACP,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,2CAA2C;QACxD,KAAK,EAAE,UAAU;QACjB,OAAO,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE;KAC1C;IACD,SAAS,EAAE;QACT,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,4BAA4B;QACzC,KAAK,EAAE,WAAW;QAClB,OAAO,EAAE,EAAE,OAAO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AAkB;QACzB,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;KACrC;CACF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/encharge/createUpdateObject/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCustomObjects = void 0;
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
const getCustomObjects = async (request) => {
|
|
6
|
+
try {
|
|
7
|
+
const response = await request(`${utils_1.enchargeRestAPIBase}/schemas`, {
|
|
8
|
+
method: 'GET'
|
|
9
|
+
});
|
|
10
|
+
const choices = response?.data?.objects.map((object) => ({
|
|
11
|
+
label: object.displayNameSingular,
|
|
12
|
+
value: object.name
|
|
13
|
+
}));
|
|
14
|
+
return {
|
|
15
|
+
choices
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
return {
|
|
20
|
+
choices: [],
|
|
21
|
+
error: {
|
|
22
|
+
message: err?.message,
|
|
23
|
+
code: err?.name
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.getCustomObjects = getCustomObjects;
|
|
29
|
+
//# sourceMappingURL=getCustomObjects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCustomObjects.js","sourceRoot":"","sources":["../../../../src/destinations/encharge/createUpdateObject/getCustomObjects.ts"],"names":[],"mappings":";;;AAAA,oCAA8C;AAGvC,MAAM,gBAAgB,GAAG,KAAK,EAAE,OAAsB,EAAiC,EAAE;IAC9F,IAAI;QAKF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAwB,GAAG,2BAAmB,UAAU,EAAE;YACtF,MAAM,EAAE,KAAK;SACd,CAAC,CAAA;QAEF,MAAM,OAAO,GAAG,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YACvD,KAAK,EAAE,MAAM,CAAC,mBAAmB;YACjC,KAAK,EAAE,MAAM,CAAC,IAAI;SACnB,CAAC,CAAC,CAAA;QACH,OAAO;YACL,OAAO;SACR,CAAA;KACF;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO;YACL,OAAO,EAAE,EAAE;YACX,KAAK,EAAE;gBACL,OAAO,EAAG,GAAa,EAAE,OAAO;gBAChC,IAAI,EAAG,GAAa,EAAE,IAAI;aAC3B;SACF,CAAA;KACF;AACH,CAAC,CAAA;AA1BY,QAAA,gBAAgB,oBA0B5B"}
|