@segment/action-destinations 3.46.1-alpha.3 → 3.46.1-alpha.4
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/facebook-conversions-api/constants.d.ts +1 -1
- package/dist/destinations/facebook-conversions-api/constants.js +3 -3
- package/dist/destinations/index.js +0 -1
- package/dist/destinations/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/destinations/adobe-target/adobeTarget_operations.d.ts +0 -10
- package/dist/destinations/adobe-target/adobeTarget_operations.js +0 -46
- package/dist/destinations/adobe-target/adobeTarget_operations.js.map +0 -1
- package/dist/destinations/adobe-target/generated-types.d.ts +0 -3
- package/dist/destinations/adobe-target/generated-types.js +0 -3
- package/dist/destinations/adobe-target/generated-types.js.map +0 -1
- package/dist/destinations/adobe-target/index.d.ts +0 -4
- package/dist/destinations/adobe-target/index.js +0 -27
- package/dist/destinations/adobe-target/index.js.map +0 -1
- package/dist/destinations/adobe-target/updateProfile/generated-types.d.ts +0 -6
- package/dist/destinations/adobe-target/updateProfile/generated-types.js +0 -3
- package/dist/destinations/adobe-target/updateProfile/generated-types.js.map +0 -1
- package/dist/destinations/adobe-target/updateProfile/index.d.ts +0 -5
- package/dist/destinations/adobe-target/updateProfile/index.js +0 -41
- package/dist/destinations/adobe-target/updateProfile/index.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.COUNTRY_CODES = exports.US_STATE_CODES = exports.CURRENCY_ISO_CODES = exports.API_VERSION = void 0;
|
|
4
|
-
exports.API_VERSION = '
|
|
4
|
+
exports.API_VERSION = '12.0';
|
|
5
5
|
exports.CURRENCY_ISO_CODES = new Set([
|
|
6
6
|
'AED',
|
|
7
7
|
'AFN',
|
|
@@ -233,7 +233,7 @@ exports.US_STATE_CODES = new Map([
|
|
|
233
233
|
['washington', 'wa'],
|
|
234
234
|
['westvirginia', 'wv'],
|
|
235
235
|
['wisconsin', 'wi'],
|
|
236
|
-
['wyoming', 'wy']
|
|
236
|
+
['wyoming', 'wy']
|
|
237
237
|
]);
|
|
238
238
|
exports.COUNTRY_CODES = new Map([
|
|
239
239
|
['afghanistan', 'af'],
|
|
@@ -480,6 +480,6 @@ exports.COUNTRY_CODES = new Map([
|
|
|
480
480
|
['westernsahara', 'eh'],
|
|
481
481
|
['yemen', 'ye'],
|
|
482
482
|
['zambia', 'zm'],
|
|
483
|
-
['zimbabwe', 'zw']
|
|
483
|
+
['zimbabwe', 'zw']
|
|
484
484
|
]);
|
|
485
485
|
//# sourceMappingURL=constants.js.map
|
|
@@ -50,7 +50,6 @@ register('615cae349d109d6b7496a131', './tiktok-conversions');
|
|
|
50
50
|
register('602efa1f249b9a5e2bf8a813', './twilio');
|
|
51
51
|
register('614a3c7d791c91c41bae7599', './webhook');
|
|
52
52
|
register('61dc4e96894a6d7954cc6e45', './voyage');
|
|
53
|
-
register('61aa712b857e8c85c3b5a849', './adobe-target');
|
|
54
53
|
function register(id, destinationPath) {
|
|
55
54
|
const definition = require(destinationPath).default;
|
|
56
55
|
const resolvedPath = require.resolve(destinationPath);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/destinations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,wDAAmD;AACnD,gDAAuB;AAWV,QAAA,YAAY,GAA0C,EAAE,CAAA;AACxD,QAAA,QAAQ,GAAsC,EAAE,CAAA;AAU7D,QAAQ,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAAA;AAChD,QAAQ,CAAC,0BAA0B,EAAE,4BAA4B,CAAC,CAAA;AAClE,QAAQ,CAAC,0BAA0B,EAAE,aAAa,CAAC,CAAA;AACnD,QAAQ,CAAC,0BAA0B,EAAE,SAAS,CAAC,CAAA;AAC/C,QAAQ,CAAC,0BAA0B,EAAE,aAAa,CAAC,CAAA;AAC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UAAU,uBAAuB,CAAC,WAAmB;IAC/D,OAAO,kBAAkB,CAAC,WAAW,CAAC,IAAI,uBAAuB,CAAC,WAAW,CAAC,CAAA;AAChF,CAAC;AAFD,0DAEC"}
|
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.46.1-alpha.
|
|
4
|
+
"version": "3.46.1-alpha.4",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@amplitude/ua-parser-js": "^0.7.25",
|
|
41
41
|
"@segment/actions-core": "^3.21.1",
|
|
42
|
-
"@segment/actions-shared": "^1.2.
|
|
42
|
+
"@segment/actions-shared": "^1.2.0",
|
|
43
43
|
"cheerio": "^1.0.0-rc.10",
|
|
44
44
|
"dayjs": "^1.10.7",
|
|
45
45
|
"escape-goat": "^3",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"<rootDir>/test/setup-after-env.ts"
|
|
63
63
|
]
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "9c40b58afe7146daf88d18668e7b203f89171b68"
|
|
66
66
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { RequestClient } from '@segment/actions-core';
|
|
2
|
-
export default class adobeTarget {
|
|
3
|
-
userId: string;
|
|
4
|
-
clientCode: string;
|
|
5
|
-
traits: object;
|
|
6
|
-
request: RequestClient;
|
|
7
|
-
constructor(userId: string, clientCode: string, traits: object, request: RequestClient);
|
|
8
|
-
updateProfile: () => Promise<import("@segment/actions-core").ModifiedResponse<unknown> | undefined>;
|
|
9
|
-
private lookupProfile;
|
|
10
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const attributes = {};
|
|
4
|
-
function getnestedObjects(obj, objectPath = '') {
|
|
5
|
-
if (obj.traits) {
|
|
6
|
-
obj = obj.traits;
|
|
7
|
-
}
|
|
8
|
-
Object.keys(obj).forEach((key) => {
|
|
9
|
-
const currObjectPath = objectPath ? `${objectPath}.${key}` : key;
|
|
10
|
-
if (typeof obj[key] !== 'object' && obj[key]) {
|
|
11
|
-
attributes[currObjectPath] = obj[key].toString();
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
getnestedObjects(obj[key], currObjectPath);
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
return attributes;
|
|
18
|
-
}
|
|
19
|
-
const objectToQueryString = (object) => Object.keys(object)
|
|
20
|
-
.map((key) => `profile.${key}=${object[key].toString()}`)
|
|
21
|
-
.join('&');
|
|
22
|
-
class adobeTarget {
|
|
23
|
-
constructor(userId, clientCode, traits, request) {
|
|
24
|
-
this.updateProfile = async () => {
|
|
25
|
-
const err = await this.lookupProfile(this.userId, this.clientCode);
|
|
26
|
-
if (err) {
|
|
27
|
-
const traits = getnestedObjects(this.traits);
|
|
28
|
-
const requestUrl = `https://${this.clientCode}.tt.omtrdc.net/m2/${this.clientCode}/profile/update?mbox3rdPartyId=${this.userId}&${objectToQueryString(traits)}`;
|
|
29
|
-
return await this.request(requestUrl, {
|
|
30
|
-
method: 'POST'
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
return;
|
|
34
|
-
};
|
|
35
|
-
this.lookupProfile = async (userId, clientCode) => {
|
|
36
|
-
const response = await this.request(`http://segmentexchangepartn.tt.omtrdc.net/rest/v1/profiles/thirdPartyId/${userId}?client=${clientCode}`, { method: 'get' });
|
|
37
|
-
return response;
|
|
38
|
-
};
|
|
39
|
-
this.userId = userId;
|
|
40
|
-
this.clientCode = clientCode;
|
|
41
|
-
this.traits = traits;
|
|
42
|
-
this.request = request;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.default = adobeTarget;
|
|
46
|
-
//# sourceMappingURL=adobeTarget_operations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adobeTarget_operations.js","sourceRoot":"","sources":["../../../src/destinations/adobe-target/adobeTarget_operations.ts"],"names":[],"mappings":";;AAEA,MAAM,UAAU,GAA4B,EAAE,CAAA;AAC9C,SAAS,gBAAgB,CAAC,GAAyB,EAAE,UAAU,GAAG,EAAE;IAClE,IAAI,GAAG,CAAC,MAAM,EAAE;QACd,GAAG,GAAG,GAAG,CAAC,MAAM,CAAA;KACjB;IACD,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC/B,MAAM,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;QAChE,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,EAAE;YAC5C,UAAU,CAAC,cAAc,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAA;SACjD;aAAM;YACL,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC,CAAA;SAC3C;IACH,CAAC,CAAC,CAAA;IACF,OAAO,UAAU,CAAA;AACnB,CAAC;AACD,MAAM,mBAAmB,GAAG,CAAC,MAAmD,EAAE,EAAE,CAClF,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;KAChB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,WAAW,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;KACxD,IAAI,CAAC,GAAG,CAAC,CAAA;AAEd,MAAqB,WAAW;IAM9B,YAAY,MAAc,EAAE,UAAkB,EAAE,MAAc,EAAE,OAAsB;QAOtF,kBAAa,GAAG,KAAK,IAAI,EAAE;YACzB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAA;YAClE,IAAI,GAAG,EAAE;gBACP,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;gBAC5C,MAAM,UAAU,GAAG,WAAW,IAAI,CAAC,UAAU,qBAC3C,IAAI,CAAC,UACP,kCAAkC,IAAI,CAAC,MAAM,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAA;gBAE9E,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;oBACpC,MAAM,EAAE,MAAM;iBACf,CAAC,CAAA;aACH;YAED,OAAM;QACR,CAAC,CAAA;QAEO,kBAAa,GAAG,KAAK,EAAE,MAAc,EAAE,UAAkB,EAAE,EAAE;YACnE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CACjC,2EAA2E,MAAM,WAAW,UAAU,EAAE,EACxG,EAAE,MAAM,EAAE,KAAK,EAAE,CAClB,CAAA;YACD,OAAO,QAAQ,CAAA;QACjB,CAAC,CAAA;QA5BC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;CAyBF;AApCD,8BAoCC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/adobe-target/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,27 +0,0 @@
|
|
|
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 updateProfile_1 = __importDefault(require("./updateProfile"));
|
|
7
|
-
const destination = {
|
|
8
|
-
name: 'Adobe Target Cloud Mode',
|
|
9
|
-
slug: 'actions-adobe-target-cloud',
|
|
10
|
-
mode: 'cloud',
|
|
11
|
-
authentication: {
|
|
12
|
-
scheme: 'custom',
|
|
13
|
-
fields: {
|
|
14
|
-
client_code: {
|
|
15
|
-
label: 'Client Code',
|
|
16
|
-
description: 'Your Adobe Target client code. To find your client code in Adobe Target, navigate to **Administration > Implementation**. The client code is shown at the top under Account Details.',
|
|
17
|
-
type: 'string',
|
|
18
|
-
required: true
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
actions: {
|
|
23
|
-
updateProfile: updateProfile_1.default
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
exports.default = destination;
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/adobe-target/index.ts"],"names":[],"mappings":";;;;;AAGA,oEAA2C;AAE3C,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,WAAW,EAAE;gBACX,KAAK,EAAE,aAAa;gBACpB,WAAW,EACT,sLAAsL;gBACxL,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;KACd;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/adobe-target/updateProfile/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,41 +0,0 @@
|
|
|
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 adobeTarget_operations_1 = __importDefault(require("../adobeTarget_operations"));
|
|
7
|
-
const action = {
|
|
8
|
-
title: 'Update Profile',
|
|
9
|
-
description: 'Update an existing user profile in Adobe Target.',
|
|
10
|
-
defaultSubscription: 'type = "identify"',
|
|
11
|
-
fields: {
|
|
12
|
-
user_id: {
|
|
13
|
-
label: 'Mbox 3rd Party ID',
|
|
14
|
-
description: "A user's unique visitor ID. This field is used to fetch a matching profile in Adobe Target to make an update on. For more information, please see our Adobe Target Destination documentation.",
|
|
15
|
-
type: 'string',
|
|
16
|
-
required: true,
|
|
17
|
-
default: {
|
|
18
|
-
'@if': {
|
|
19
|
-
exists: { '@path': '$.userId' },
|
|
20
|
-
then: { '@path': '$.userId' },
|
|
21
|
-
else: { '@path': '$.anonymousId' }
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
traits: {
|
|
26
|
-
label: 'Profile Attributes',
|
|
27
|
-
description: 'Profile parameters specific to a user.',
|
|
28
|
-
type: 'object',
|
|
29
|
-
required: true,
|
|
30
|
-
default: {
|
|
31
|
-
'@path': '$.traits'
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
perform: async (request, data) => {
|
|
36
|
-
const at = new adobeTarget_operations_1.default(data.payload.user_id, data.settings.client_code, data.payload.traits, request);
|
|
37
|
-
return at.updateProfile();
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
exports.default = action;
|
|
41
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/adobe-target/updateProfile/index.ts"],"names":[],"mappings":";;;;;AAEA,uFAAmD;AAGnD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,kDAAkD;IAC/D,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EACT,+LAA+L;YACjM,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC7B,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;iBACnC;aACF;SACF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,wCAAwC;YACrD,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;KACF;IAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC/B,MAAM,EAAE,GAAgB,IAAI,gCAAW,CACrC,IAAI,CAAC,OAAO,CAAC,OAAO,EACpB,IAAI,CAAC,QAAQ,CAAC,WAAW,EACzB,IAAI,CAAC,OAAO,CAAC,MAAM,EACnB,OAAO,CACR,CAAA;QACD,OAAO,EAAE,CAAC,aAAa,EAAE,CAAA;IAC3B,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|