@segment/action-destinations 3.227.2-staging.9 → 3.227.3-staging.1
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/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
- package/dist/destinations/marketo-static-lists/constants.d.ts +1 -1
- package/dist/destinations/marketo-static-lists/index.js +2 -5
- package/dist/destinations/marketo-static-lists/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/destinations/klaviyo/addProfileToList/generated-types.d.ts +0 -5
- package/dist/destinations/klaviyo/addProfileToList/generated-types.js +0 -3
- package/dist/destinations/klaviyo/addProfileToList/generated-types.js.map +0 -1
- package/dist/destinations/klaviyo/addProfileToList/index.d.ts +0 -5
- package/dist/destinations/klaviyo/addProfileToList/index.js +0 -61
- package/dist/destinations/klaviyo/addProfileToList/index.js.map +0 -1
- package/dist/destinations/klaviyo/properties.d.ts +0 -4
- package/dist/destinations/klaviyo/properties.js +0 -21
- package/dist/destinations/klaviyo/properties.js.map +0 -1
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.d.ts +0 -5
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.js +0 -3
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.js.map +0 -1
- package/dist/destinations/klaviyo/removeProfileToList/index.d.ts +0 -5
- package/dist/destinations/klaviyo/removeProfileToList/index.js +0 -62
- package/dist/destinations/klaviyo/removeProfileToList/index.js.map +0 -1
- package/dist/destinations/mixpanel/utils.d.ts +0 -13
- package/dist/destinations/mixpanel/utils.js +0 -117
- package/dist/destinations/mixpanel/utils.js.map +0 -1
- package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.d.ts +0 -4
- package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.js +0 -3
- package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.js.map +0 -1
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.d.ts +0 -5
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.js +0 -33
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.js.map +0 -1
- package/dist/destinations/yahoo-audiences/createSegment/generated-types.d.ts +0 -6
- package/dist/destinations/yahoo-audiences/createSegment/generated-types.js +0 -3
- package/dist/destinations/yahoo-audiences/createSegment/generated-types.js.map +0 -1
- package/dist/destinations/yahoo-audiences/createSegment/index.d.ts +0 -5
- package/dist/destinations/yahoo-audiences/createSegment/index.js +0 -45
- package/dist/destinations/yahoo-audiences/createSegment/index.js.map +0 -1
- package/dist/destinations/yahoo-audiences/utils.d.ts +0 -4
- package/dist/destinations/yahoo-audiences/utils.js +0 -30
- package/dist/destinations/yahoo-audiences/utils.js.map +0 -1
|
@@ -9,7 +9,7 @@ export declare const dateStringToFuzzyDate: (dateString: string | number) => fal
|
|
|
9
9
|
y: string;
|
|
10
10
|
};
|
|
11
11
|
export declare const augmentFieldsWithConstituentFields: (fields: Record<string, InputField>) => Record<string, InputField>;
|
|
12
|
-
export declare const splitConstituentPayload: (payload: CreateOrUpdateIndividualConstituentPayload) => (Partial<
|
|
12
|
+
export declare const splitConstituentPayload: (payload: CreateOrUpdateIndividualConstituentPayload) => (Partial<Address> | Partial<OnlinePresence> | Partial<Phone> | Partial<Constituent>)[];
|
|
13
13
|
export declare const buildConstituentPayloadFromPayload: (payload: StringIndexedObject) => Partial<CreateOrUpdateIndividualConstituentPayload>;
|
|
14
14
|
export declare const buildGiftDataFromPayload: (constituentId: string, payload: CreateGiftPayload) => Partial<Gift>;
|
|
15
15
|
export declare const buildConstituentActionDataFromPayload: (constituentId: string, payload: CreateConstituentAction) => Partial<ConstituentAction>;
|
|
@@ -88,12 +88,9 @@ const destination = {
|
|
|
88
88
|
statsClient?.incr('createAudience.error', 1, statsTags);
|
|
89
89
|
throw new actions_core_1.IntegrationError(`${create_list_response.data.errors[0].message}`, 'INVALID_RESPONSE', 400);
|
|
90
90
|
}
|
|
91
|
-
|
|
92
|
-
if (external_id) {
|
|
93
|
-
statsClient?.incr('createAudience.success', 1, statsTags);
|
|
94
|
-
}
|
|
91
|
+
statsClient?.incr('createAudience.success', 1, statsTags);
|
|
95
92
|
return {
|
|
96
|
-
externalId:
|
|
93
|
+
externalId: create_list_response.data.result[0].id
|
|
97
94
|
};
|
|
98
95
|
},
|
|
99
96
|
async getAudience(request, getAudienceInput) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/marketo-static-lists/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAwD;AAGxD,4DAAmC;AACnC,sEAA6C;AAC7C,2CAA4D;AAE5D,MAAM,WAAW,GAA4C;IAC3D,IAAI,EAAE,gCAAgC;IACtC,IAAI,EAAE,8BAA8B;IACpC,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,UAAU;gBAChB,QAAQ,EAAE,IAAI;aACf;YACD,YAAY,EAAE;gBACZ,KAAK,EAAE,cAAc;gBACrB,WAAW,EAAE,wFAAwF;gBACrG,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,WAAW,EAAE;gBACX,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,qDAAqD;gBAClE,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAClD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAA;QACjE,CAAC;KACF;I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CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,kBAAkB,EAAE,GAAG,CAAC,CAAA;aAC1F;YAED,WAAW,EAAE,IAAI,CAAC,qBAAqB,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;YAEtD,OAAO;gBACL,UAAU,EAAE,OAAO;aACpB,CAAA;QACH,CAAC;KACF;IACD,OAAO,EAAE;QACP,SAAS,EAAT,mBAAS;QACT,cAAc,EAAd,wBAAc;KACf;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.227.
|
|
4
|
+
"version": "3.227.3-staging.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/addProfileToList/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
-
const functions_1 = require("../functions");
|
|
5
|
-
const properties_1 = require("../properties");
|
|
6
|
-
const action = {
|
|
7
|
-
title: 'Add To List',
|
|
8
|
-
description: 'Add to list',
|
|
9
|
-
fields: {
|
|
10
|
-
profile_id: { ...properties_1.profile_id },
|
|
11
|
-
list_id: { ...properties_1.list_id },
|
|
12
|
-
enable_batching: { ...properties_1.enable_batching }
|
|
13
|
-
},
|
|
14
|
-
dynamicFields: {
|
|
15
|
-
list_id: async (request, { settings }) => {
|
|
16
|
-
return functions_1.getListIdDynamicData(request, settings);
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
perform: async (request, { payload }) => {
|
|
20
|
-
const { profile_id, list_id } = payload;
|
|
21
|
-
if (!list_id) {
|
|
22
|
-
throw new actions_core_1.IntegrationError("Insert the ID of the default list that you'd like to subscribe users", 'Missing required fields', 400);
|
|
23
|
-
}
|
|
24
|
-
try {
|
|
25
|
-
const listData = {
|
|
26
|
-
data: [
|
|
27
|
-
{
|
|
28
|
-
type: 'profile',
|
|
29
|
-
id: profile_id
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
};
|
|
33
|
-
const list = await functions_1.executeProfileList(request, 'POST', listData, list_id);
|
|
34
|
-
return list;
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
throw new Error('An error occurred while processing the request');
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
performBatch: async (request, { payload }) => {
|
|
41
|
-
try {
|
|
42
|
-
if (!payload[0].list_id) {
|
|
43
|
-
throw new actions_core_1.IntegrationError("Insert the ID of the default list that you'd like to subscribe users", 'Missing required fields', 400);
|
|
44
|
-
}
|
|
45
|
-
const batch_data = { data: [] };
|
|
46
|
-
payload.forEach((data) => {
|
|
47
|
-
if (!data.list_id) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
batch_data.data.push({ type: 'profile', id: data.profile_id });
|
|
51
|
-
});
|
|
52
|
-
const list = await functions_1.executeProfileList(request, 'POST', batch_data, payload[0].list_id);
|
|
53
|
-
return list;
|
|
54
|
-
}
|
|
55
|
-
catch (error) {
|
|
56
|
-
throw new Error('An error occurred while processing the request');
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
exports.default = action;
|
|
61
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/addProfileToList/index.ts"],"names":[],"mappings":";;AAAA,wDAAgG;AAIhG,4CAA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;aACF;YAED,MAAM,UAAU,GAAa,EAAE,IAAI,EAAE,EAAE,EAAE,CAAA;YACzC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBACvB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;oBACjB,OAAM;iBACP;gBACD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAA;YAChE,CAAC,CAAC,CAAA;YACF,MAAM,IAAI,GAAG,MAAM,8BAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;YACtF,OAAO,IAAI,CAAA;SACZ;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;SAClE;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.profile_id = exports.list_id = exports.enable_batching = void 0;
|
|
4
|
-
exports.enable_batching = {
|
|
5
|
-
label: 'Enable Batching',
|
|
6
|
-
description: 'Enable batching of requests to the Klaviyo.',
|
|
7
|
-
type: 'boolean',
|
|
8
|
-
default: true
|
|
9
|
-
};
|
|
10
|
-
exports.list_id = {
|
|
11
|
-
label: 'List Id',
|
|
12
|
-
description: `'Insert the ID of the default list that you'd like to subscribe users to when you call .identify().'`,
|
|
13
|
-
type: 'string',
|
|
14
|
-
dynamic: true
|
|
15
|
-
};
|
|
16
|
-
exports.profile_id = {
|
|
17
|
-
label: 'Profile Id',
|
|
18
|
-
description: 'Profile Id of User',
|
|
19
|
-
type: 'string'
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=properties.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../src/destinations/klaviyo/properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAe;IACzC,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,6CAA6C;IAC1D,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,IAAI;CACd,CAAA;AAEY,QAAA,OAAO,GAAe;IACjC,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,sGAAsG;IACnH,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,IAAI;CACd,CAAA;AAEY,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,oBAAoB;IACjC,IAAI,EAAE,QAAQ;CACf,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/removeProfileToList/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
-
const functions_1 = require("../functions");
|
|
5
|
-
const properties_1 = require("../properties");
|
|
6
|
-
const action = {
|
|
7
|
-
title: 'Remove profile from list',
|
|
8
|
-
description: 'Remove profile from list',
|
|
9
|
-
fields: {
|
|
10
|
-
profile_id: { ...properties_1.profile_id },
|
|
11
|
-
list_id: { ...properties_1.list_id },
|
|
12
|
-
enable_batching: { ...properties_1.enable_batching }
|
|
13
|
-
},
|
|
14
|
-
dynamicFields: {
|
|
15
|
-
list_id: async (request, { settings }) => {
|
|
16
|
-
return functions_1.getListIdDynamicData(request, settings);
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
perform: async (request, { payload }) => {
|
|
20
|
-
const { profile_id, list_id } = payload;
|
|
21
|
-
if (!list_id) {
|
|
22
|
-
throw new actions_core_1.IntegrationError("Insert the ID of the default list that you'd like to subscribe users", 'Missing required fields', 400);
|
|
23
|
-
}
|
|
24
|
-
try {
|
|
25
|
-
const listData = {
|
|
26
|
-
data: [
|
|
27
|
-
{
|
|
28
|
-
type: 'profile',
|
|
29
|
-
id: profile_id
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
};
|
|
33
|
-
const list = await functions_1.executeProfileList(request, 'DELETE', listData, list_id);
|
|
34
|
-
return list;
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
console.log(error);
|
|
38
|
-
throw new Error('An error occurred while processing the request');
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
performBatch: async (request, { payload }) => {
|
|
42
|
-
try {
|
|
43
|
-
if (!payload[0].list_id) {
|
|
44
|
-
throw new actions_core_1.IntegrationError("Insert the ID of the default list that you'd like to subscribe users", 'Missing required fields', 400);
|
|
45
|
-
}
|
|
46
|
-
const batch_data = { data: [] };
|
|
47
|
-
payload.forEach((data) => {
|
|
48
|
-
if (!data.list_id) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
batch_data.data.push({ type: 'profile', id: data.profile_id });
|
|
52
|
-
});
|
|
53
|
-
const list = await functions_1.executeProfileList(request, 'DELETE', batch_data, payload[0].list_id);
|
|
54
|
-
return list;
|
|
55
|
-
}
|
|
56
|
-
catch (error) {
|
|
57
|
-
throw new Error('An error occurred while processing the request');
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
exports.default = action;
|
|
62
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/removeProfileToList/index.ts"],"names":[],"mappings":";;AAAA,wDAAgG;AAKhG,4CAAuE;AACvE,8CAAoE;AAEpE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,0BAA0B;IACjC,WAAW,EAAE,0BAA0B;IACvC,MAAM,EAAE;QACN,UAAU,EAAE,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CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBACvB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;oBACjB,OAAM;iBACP;gBACD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAA;YAChE,CAAC,CAAC,CAAA;YAEF,MAAM,IAAI,GAAG,MAAM,8BAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;YACxF,OAAO,IAAI,CAAA;SACZ;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;SAClE;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare enum ApiRegions {
|
|
2
|
-
US = "US \uD83C\uDDFA\uD83C\uDDF8",
|
|
3
|
-
EU = "EU \uD83C\uDDEA\uD83C\uDDFA"
|
|
4
|
-
}
|
|
5
|
-
export declare enum StrictMode {
|
|
6
|
-
ON = "1",
|
|
7
|
-
OFF = "0"
|
|
8
|
-
}
|
|
9
|
-
export declare function getConcatenatedName(firstName: unknown, lastName: unknown, name: unknown): unknown;
|
|
10
|
-
export declare function getApiServerUrl(apiRegion: string | undefined): "https://api-eu.mixpanel.com" | "https://api.mixpanel.com";
|
|
11
|
-
export declare function getBrowser(userAgent: string): string;
|
|
12
|
-
export declare function getBrowserVersion(userAgent: string): string | undefined;
|
|
13
|
-
export declare function cheapGuid(maxlen?: number): string;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cheapGuid = exports.getBrowserVersion = exports.getBrowser = exports.getApiServerUrl = exports.getConcatenatedName = exports.StrictMode = exports.ApiRegions = void 0;
|
|
4
|
-
var ApiRegions;
|
|
5
|
-
(function (ApiRegions) {
|
|
6
|
-
ApiRegions["US"] = "US \uD83C\uDDFA\uD83C\uDDF8";
|
|
7
|
-
ApiRegions["EU"] = "EU \uD83C\uDDEA\uD83C\uDDFA";
|
|
8
|
-
})(ApiRegions = exports.ApiRegions || (exports.ApiRegions = {}));
|
|
9
|
-
var StrictMode;
|
|
10
|
-
(function (StrictMode) {
|
|
11
|
-
StrictMode["ON"] = "1";
|
|
12
|
-
StrictMode["OFF"] = "0";
|
|
13
|
-
})(StrictMode = exports.StrictMode || (exports.StrictMode = {}));
|
|
14
|
-
function getConcatenatedName(firstName, lastName, name) {
|
|
15
|
-
return name ?? (firstName && lastName ? `${firstName} ${lastName}` : undefined);
|
|
16
|
-
}
|
|
17
|
-
exports.getConcatenatedName = getConcatenatedName;
|
|
18
|
-
function getApiServerUrl(apiRegion) {
|
|
19
|
-
if (apiRegion == ApiRegions.EU) {
|
|
20
|
-
return 'https://api-eu.mixpanel.com';
|
|
21
|
-
}
|
|
22
|
-
return 'https://api.mixpanel.com';
|
|
23
|
-
}
|
|
24
|
-
exports.getApiServerUrl = getApiServerUrl;
|
|
25
|
-
function getBrowser(userAgent) {
|
|
26
|
-
if (userAgent.includes(' OPR/')) {
|
|
27
|
-
if (userAgent.includes('Mini')) {
|
|
28
|
-
return 'Opera Mini';
|
|
29
|
-
}
|
|
30
|
-
return 'Opera';
|
|
31
|
-
}
|
|
32
|
-
else if (/(BlackBerry|PlayBook|BB10)/i.test(userAgent)) {
|
|
33
|
-
return 'BlackBerry';
|
|
34
|
-
}
|
|
35
|
-
else if (userAgent.includes('IEMobile') || userAgent.includes('WPDesktop')) {
|
|
36
|
-
return 'Internet Explorer Mobile';
|
|
37
|
-
}
|
|
38
|
-
else if (userAgent.includes('SamsungBrowser/')) {
|
|
39
|
-
return 'Samsung Internet';
|
|
40
|
-
}
|
|
41
|
-
else if (userAgent.includes('Edge') || userAgent.includes('Edg/')) {
|
|
42
|
-
return 'Microsoft Edge';
|
|
43
|
-
}
|
|
44
|
-
else if (userAgent.includes('FBIOS')) {
|
|
45
|
-
return 'Facebook Mobile';
|
|
46
|
-
}
|
|
47
|
-
else if (userAgent.includes('Chrome')) {
|
|
48
|
-
return 'Chrome';
|
|
49
|
-
}
|
|
50
|
-
else if (userAgent.includes('CriOS')) {
|
|
51
|
-
return 'Chrome iOS';
|
|
52
|
-
}
|
|
53
|
-
else if (userAgent.includes('UCWEB') || userAgent.includes('UCBrowser')) {
|
|
54
|
-
return 'UC Browser';
|
|
55
|
-
}
|
|
56
|
-
else if (userAgent.includes('FxiOS')) {
|
|
57
|
-
return 'Firefox iOS';
|
|
58
|
-
}
|
|
59
|
-
else if (userAgent.includes('Safari')) {
|
|
60
|
-
return 'Safari';
|
|
61
|
-
}
|
|
62
|
-
else if (userAgent.includes('Android')) {
|
|
63
|
-
return 'Android Mobile';
|
|
64
|
-
}
|
|
65
|
-
else if (userAgent.includes('Konqueror')) {
|
|
66
|
-
return 'Konqueror';
|
|
67
|
-
}
|
|
68
|
-
else if (userAgent.includes('Firefox')) {
|
|
69
|
-
return 'Firefox';
|
|
70
|
-
}
|
|
71
|
-
else if (userAgent.includes('MSIE') || userAgent.includes('Trident/')) {
|
|
72
|
-
return 'Internet Explorer';
|
|
73
|
-
}
|
|
74
|
-
else if (userAgent.includes('Gecko')) {
|
|
75
|
-
return 'Mozilla';
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
return '';
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
exports.getBrowser = getBrowser;
|
|
82
|
-
function getBrowserVersion(userAgent) {
|
|
83
|
-
const browser = getBrowser(userAgent);
|
|
84
|
-
const versionRegexs = {
|
|
85
|
-
'Internet Explorer Mobile': /rv:(\d+(\.\d+)?)/,
|
|
86
|
-
'Microsoft Edge': /Edge?\/(\d+(\.\d+)?)/,
|
|
87
|
-
Chrome: /Chrome\/(\d+(\.\d+)?)/,
|
|
88
|
-
'Chrome iOS': /CriOS\/(\d+(\.\d+)?)/,
|
|
89
|
-
'UC Browser': /(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,
|
|
90
|
-
Safari: /Version\/(\d+(\.\d+)?)/,
|
|
91
|
-
'Mobile Safari': /Version\/(\d+(\.\d+)?)/,
|
|
92
|
-
Opera: /(Opera|OPR)\/(\d+(\.\d+)?)/,
|
|
93
|
-
Firefox: /Firefox\/(\d+(\.\d+)?)/,
|
|
94
|
-
'Firefox iOS': /FxiOS\/(\d+(\.\d+)?)/,
|
|
95
|
-
Konqueror: /Konqueror:(\d+(\.\d+)?)/,
|
|
96
|
-
BlackBerry: /BlackBerry (\d+(\.\d+)?)/,
|
|
97
|
-
'Android Mobile': /android\s(\d+(\.\d+)?)/,
|
|
98
|
-
'Samsung Internet': /SamsungBrowser\/(\d+(\.\d+)?)/,
|
|
99
|
-
'Internet Explorer': /(rv:|MSIE )(\d+(\.\d+)?)/,
|
|
100
|
-
Mozilla: /rv:(\d+(\.\d+)?)/
|
|
101
|
-
};
|
|
102
|
-
const regex = versionRegexs[browser];
|
|
103
|
-
if (!regex)
|
|
104
|
-
return regex;
|
|
105
|
-
const matches = regex.exec(userAgent);
|
|
106
|
-
if (!matches) {
|
|
107
|
-
return undefined;
|
|
108
|
-
}
|
|
109
|
-
return matches[matches.length - 2];
|
|
110
|
-
}
|
|
111
|
-
exports.getBrowserVersion = getBrowserVersion;
|
|
112
|
-
function cheapGuid(maxlen) {
|
|
113
|
-
const guid = Math.random().toString(36).substring(2, 10) + Math.random().toString(36).substring(2, 10);
|
|
114
|
-
return maxlen ? guid.substring(0, maxlen) : guid;
|
|
115
|
-
}
|
|
116
|
-
exports.cheapGuid = cheapGuid;
|
|
117
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/destinations/mixpanel/utils.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAGX;AAHD,WA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,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createCustomerNode/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_tax_1 = require("../utils-tax");
|
|
4
|
-
const utils_tax_2 = require("../utils-tax");
|
|
5
|
-
const action = {
|
|
6
|
-
title: 'Create top-level CUSTOMER node in Yahoo taxonomy',
|
|
7
|
-
defaultSubscription: 'event = "Audience Entered" and event = "Audience Exited"',
|
|
8
|
-
description: '',
|
|
9
|
-
fields: {
|
|
10
|
-
engage_space_id: {
|
|
11
|
-
label: 'Engage Space Id',
|
|
12
|
-
description: 'Provide Engage Space Id found in Unify > Settings > API Access. This maps to the "Id" and "Name" of the top-level Customer node in Yahoo taxonomy',
|
|
13
|
-
type: 'string',
|
|
14
|
-
required: true
|
|
15
|
-
},
|
|
16
|
-
customer_desc: {
|
|
17
|
-
label: 'Customer Description',
|
|
18
|
-
description: 'Provide a description for the Customer node in Yahoo taxonomy. This must be less then 1000 characters',
|
|
19
|
-
type: 'string',
|
|
20
|
-
required: false
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
perform: async (request, { settings, payload }) => {
|
|
24
|
-
const tx_creds = {
|
|
25
|
-
tx_client_key: settings.taxonomy_client_key,
|
|
26
|
-
tx_client_secret: settings.taxonomy_client_secret
|
|
27
|
-
};
|
|
28
|
-
const taxonomy_payload = utils_tax_1.gen_customer_taxonomy_payload(settings, payload);
|
|
29
|
-
return await utils_tax_2.update_taxonomy('', tx_creds, request, taxonomy_payload);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
exports.default = action;
|
|
33
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createCustomerNode/index.ts"],"names":[],"mappings":";;AAGA,4CAA4D;AAC5D,4CAA8C;AAE9C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kDAAkD;IACzD,mBAAmB,EAAE,0DAA0D;IAC/E,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN,eAAe,EAAE;YACf,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,mJAAmJ;YACrJ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,aAAa,EAAE;YACb,KAAK,EAAE,sBAAsB;YAC7B,WAAW,EACT,uGAAuG;YACzG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,MAAM,QAAQ,GAAG;YACf,aAAa,EAAE,QAAQ,CAAC,mBAAmB;YAC3C,gBAAgB,EAAE,QAAQ,CAAC,sBAAsB;SAClD,CAAA;QACD,MAAM,gBAAgB,GAAG,yCAA6B,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QACzE,OAAO,MAAM,2BAAe,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAA;IACvE,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createSegment/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_tax_1 = require("../utils-tax");
|
|
4
|
-
const utils_tax_2 = require("../utils-tax");
|
|
5
|
-
const action = {
|
|
6
|
-
title: 'Create SEGMENT sub-node in Yahoo taxonomy',
|
|
7
|
-
description: 'Use this action to generate SEGMENT sub-node within CUSTOMER node in Yahoo taxonomy',
|
|
8
|
-
defaultSubscription: 'event = "Audience Entered" and event = "Audience Exited"',
|
|
9
|
-
fields: {
|
|
10
|
-
segment_audience_key: {
|
|
11
|
-
label: 'Audience Key',
|
|
12
|
-
description: 'Provide audience key. This maps to the "Name" of the Segment node in Yahoo taxonomy',
|
|
13
|
-
type: 'string',
|
|
14
|
-
required: true
|
|
15
|
-
},
|
|
16
|
-
segment_audience_id: {
|
|
17
|
-
label: 'Audience Id',
|
|
18
|
-
description: 'Provide audience Id (aud_...) from audience URL in Segment Engage. This maps to the "Id" of the Segment node in Yahoo taxonomy',
|
|
19
|
-
type: 'string',
|
|
20
|
-
required: true
|
|
21
|
-
},
|
|
22
|
-
engage_space_id: {
|
|
23
|
-
label: 'Engage Space Id',
|
|
24
|
-
description: 'Provide Engage Space Id found in Unify > Settings > API Access. This maps to the "Id" and "Name" of the top-level Customer node in Yahoo taxonomy and specifies the parent node for your Segment node in Yahoo taxonomy',
|
|
25
|
-
type: 'string',
|
|
26
|
-
required: false
|
|
27
|
-
},
|
|
28
|
-
customer_desc: {
|
|
29
|
-
label: 'Space Description',
|
|
30
|
-
description: 'Provide the description for Segment node in Yahoo taxonomy. This must be less then 1000 characters',
|
|
31
|
-
type: 'string',
|
|
32
|
-
required: false
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
perform: async (request, { payload, settings }) => {
|
|
36
|
-
const tx_creds = {
|
|
37
|
-
tx_client_key: settings.taxonomy_client_key,
|
|
38
|
-
tx_client_secret: settings.taxonomy_client_secret
|
|
39
|
-
};
|
|
40
|
-
const body_form_data = utils_tax_1.gen_segment_subtaxonomy_payload(payload);
|
|
41
|
-
return await utils_tax_2.update_taxonomy(String(payload.engage_space_id), tx_creds, request, body_form_data);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
exports.default = action;
|
|
45
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createSegment/index.ts"],"names":[],"mappings":";;AAIA,4CAA8D;AAC9D,4CAA8C;AAG9C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,2CAA2C;IAClD,WAAW,EAAE,qFAAqF;IAClG,mBAAmB,EAAE,0DAA0D;IAE/E,MAAM,EAAE;QACN,oBAAoB,EAAE;YACpB,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,qFAAqF;YAClG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,mBAAmB,EAAE;YACnB,KAAK,EAAE,aAAa;YACpB,WAAW,EACT,gIAAgI;YAClI,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,eAAe,EAAE;YACf,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,yNAAyN;YAC3N,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;SAChB;QACD,aAAa,EAAE;YACb,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EAAE,oGAAoG;YACjH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAChD,MAAM,QAAQ,GAAG;YACf,aAAa,EAAE,QAAQ,CAAC,mBAAmB;YAC3C,gBAAgB,EAAE,QAAQ,CAAC,sBAAsB;SAClD,CAAA;QAED,MAAM,cAAc,GAAG,2CAA+B,CAAC,OAAO,CAAC,CAAA;QAC/D,OAAO,MAAM,2BAAe,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAA;IAClG,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { RequestClient } from '@segment/actions-core';
|
|
2
|
-
import { CredsObj } from './types';
|
|
3
|
-
export declare function gen_random_id(length: number): string;
|
|
4
|
-
export declare function update_taxonomy(engage_space_id: string, tx_creds: CredsObj, request: RequestClient, body_form_data: string): Promise<any>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.update_taxonomy = exports.gen_random_id = void 0;
|
|
4
|
-
const utils_tax_1 = require("./utils-tax");
|
|
5
|
-
function gen_random_id(length) {
|
|
6
|
-
const pattern = 'abcdefghijklmnopqrstuvwxyz123456789';
|
|
7
|
-
const result = [];
|
|
8
|
-
for (let i = 0; i < length; i++) {
|
|
9
|
-
result.push(pattern[Math.floor(Math.random() * pattern.length)]);
|
|
10
|
-
}
|
|
11
|
-
return result.join('');
|
|
12
|
-
}
|
|
13
|
-
exports.gen_random_id = gen_random_id;
|
|
14
|
-
async function update_taxonomy(engage_space_id, tx_creds, request, body_form_data) {
|
|
15
|
-
const tx_client_secret = tx_creds.tx_client_key;
|
|
16
|
-
const tx_client_key = tx_creds.tx_client_secret;
|
|
17
|
-
const url = `https://datax.yahooapis.com/v1/taxonomy/append${engage_space_id.length > 0 ? '/' + engage_space_id : ''}`;
|
|
18
|
-
const oauth1_auth_string = utils_tax_1.gen_oauth1_signature(tx_client_key, tx_client_secret, 'PUT', url);
|
|
19
|
-
const add_segment_node = await request(url, {
|
|
20
|
-
method: 'PUT',
|
|
21
|
-
body: body_form_data,
|
|
22
|
-
headers: {
|
|
23
|
-
Authorization: oauth1_auth_string,
|
|
24
|
-
'Content-Type': 'multipart/form-data; boundary=SEGMENT-DATA'
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
return await add_segment_node.json();
|
|
28
|
-
}
|
|
29
|
-
exports.update_taxonomy = update_taxonomy;
|
|
30
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/destinations/yahoo-audiences/utils.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