@segment/action-destinations 3.63.1 → 3.63.2-alpha.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/launchdarkly/index.d.ts +1 -1
- package/dist/destinations/launchdarkly/index.js +16 -0
- package/dist/destinations/launchdarkly/index.js.map +1 -1
- package/dist/destinations/salesforce/index.js +3 -2
- package/dist/destinations/salesforce/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { DestinationDefinition } from '@segment/actions-core';
|
|
2
2
|
import type { Settings } from './generated-types';
|
|
3
3
|
declare const destination: DestinationDefinition<Settings>;
|
|
4
4
|
export default destination;
|
|
@@ -3,8 +3,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
6
7
|
const aliasUser_1 = __importDefault(require("./aliasUser"));
|
|
7
8
|
const trackEvent_1 = __importDefault(require("./trackEvent"));
|
|
9
|
+
const presets = [
|
|
10
|
+
{
|
|
11
|
+
name: 'Track Event',
|
|
12
|
+
subscribe: 'type = "track"',
|
|
13
|
+
partnerAction: 'trackEvent',
|
|
14
|
+
mapping: actions_core_1.defaultValues(trackEvent_1.default.fields)
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'Alias User',
|
|
18
|
+
subscribe: 'type = "identify" or type = "alias"',
|
|
19
|
+
partnerAction: 'aliasUser',
|
|
20
|
+
mapping: actions_core_1.defaultValues(aliasUser_1.default.fields)
|
|
21
|
+
}
|
|
22
|
+
];
|
|
8
23
|
const destination = {
|
|
9
24
|
name: 'LaunchDarkly',
|
|
10
25
|
slug: 'actions-launchdarkly',
|
|
@@ -29,6 +44,7 @@ const destination = {
|
|
|
29
44
|
headers: { 'User-Agent': 'SegmentDestination/2.0.0', 'Content-Type': 'application/json' }
|
|
30
45
|
};
|
|
31
46
|
},
|
|
47
|
+
presets,
|
|
32
48
|
actions: {
|
|
33
49
|
aliasUser: aliasUser_1.default,
|
|
34
50
|
trackEvent: trackEvent_1.default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/launchdarkly/index.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/launchdarkly/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA0F;AAG1F,4DAAmC;AACnC,8DAAqC;AAErC,MAAM,OAAO,GAAmB;IAC9B;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,YAAY;QAC3B,OAAO,EAAE,4BAAa,CAAC,oBAAU,CAAC,MAAM,CAAC;KAC1C;IACD;QACE,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE,qCAAqC;QAChD,aAAa,EAAE,WAAW;QAC1B,OAAO,EAAE,4BAAa,CAAC,mBAAS,CAAC,MAAM,CAAC;KACzC;CACF,CAAA;AAED,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,OAAO;IACb,WAAW,EACT,+JAA+J;IAEjK,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,SAAS,EAAE;gBACT,KAAK,EAAE,6BAA6B;gBACpC,WAAW,EAAE,6EAA6E;gBAC1F,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAE5C,OAAO,OAAO,CAAC,gDAAgD,QAAQ,CAAC,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;QAC1G,CAAC;KACF;IAED,aAAa,EAAE,GAAG,EAAE;QAClB,OAAO;YACL,OAAO,EAAE,EAAE,YAAY,EAAE,0BAA0B,EAAE,cAAc,EAAE,kBAAkB,EAAE;SAC1F,CAAA;IACH,CAAC;IACD,OAAO;IACP,OAAO,EAAE;QACP,SAAS,EAAT,mBAAS;QACT,UAAU,EAAV,oBAAU;KACX;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -28,8 +28,9 @@ const destination = {
|
|
|
28
28
|
type: 'boolean'
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
|
-
refreshAccessToken: async (request, { auth }) => {
|
|
32
|
-
const
|
|
31
|
+
refreshAccessToken: async (request, { auth, settings }) => {
|
|
32
|
+
const baseUrl = settings.isSandbox ? 'https://test.salesforce.com' : 'https://login.salesforce.com';
|
|
33
|
+
const res = await request(`${baseUrl}/services/oauth2/token`, {
|
|
33
34
|
method: 'POST',
|
|
34
35
|
body: new URLSearchParams({
|
|
35
36
|
refresh_token: auth.refreshToken,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/salesforce/index.ts"],"names":[],"mappings":";;;;;AAGA,oDAA2B;AAC3B,kDAAyB;AACzB,gEAAuC;AACvC,kEAAyC;AACzC,wDAA+B;AAC/B,wDAA+B;AAM/B,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,WAAW,EAAE;gBACX,KAAK,EAAE,cAAc;gBACrB,WAAW,EACT,2HAA2H;gBAC7H,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,SAAS,EAAE;gBACT,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EACT,mYAAmY;gBACrY,IAAI,EA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/C,CAAC;KACF;IACD,aAAa,CAAC,EAAE,IAAI,EAAE;QACpB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,EAAE,WAAW,EAAE;aAC7C;SACF,CAAA;IACH,CAAC;IAED,OAAO,EAAE;QACP,IAAI,EAAJ,cAAI;QACJ,YAAY,EAAZ,sBAAY;QACZ,KAAK,EAAL,eAAK;QACL,OAAO,EAAP,iBAAO;QACP,WAAW,EAAX,qBAAW;QACX,OAAO,EAAP,iBAAO;KACR;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segment/action-destinations",
|
|
3
3
|
"description": "Destination Actions engine and definitions.",
|
|
4
|
-
"version": "3.63.
|
|
4
|
+
"version": "3.63.2-alpha.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"<rootDir>/test/setup-after-env.ts"
|
|
63
63
|
]
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "8d96d51bc9d4a4f1b076c8885d46ce42e010f478"
|
|
66
66
|
}
|