@segment/action-destinations 3.312.1-staging-a4ef6836a.0 → 3.313.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/actions-pardot/prospects/index.js +2 -1
- package/dist/destinations/actions-pardot/prospects/index.js.map +1 -1
- package/dist/destinations/amazon-amc/syncAudiencesToDSP/index.js +29 -49
- package/dist/destinations/amazon-amc/syncAudiencesToDSP/index.js.map +1 -1
- package/dist/destinations/braze/index.js +2 -1
- package/dist/destinations/braze/index.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.d.ts +3 -3
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.js +9 -9
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.d.ts +1 -2
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js +3 -11
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/index.js +1 -15
- package/dist/destinations/facebook-conversions-api/index.js.map +1 -1
- package/dist/destinations/google-sheets/constants.d.ts +0 -1
- package/dist/destinations/google-sheets/constants.js +1 -2
- package/dist/destinations/google-sheets/constants.js.map +1 -1
- package/dist/destinations/google-sheets/postSheet/generated-types.d.ts +0 -1
- package/dist/destinations/google-sheets/postSheet/index.js +9 -25
- package/dist/destinations/google-sheets/postSheet/index.js.map +1 -1
- package/dist/destinations/google-sheets/postSheet/operations.d.ts +1 -3
- package/dist/destinations/google-sheets/postSheet/operations.js +4 -5
- package/dist/destinations/google-sheets/postSheet/operations.js.map +1 -1
- package/dist/destinations/google-sheets/postSheet2/index.js +4 -20
- package/dist/destinations/google-sheets/postSheet2/index.js.map +1 -1
- package/dist/destinations/google-sheets/postSheet2/operations2.d.ts +1 -3
- package/dist/destinations/google-sheets/postSheet2/operations2.js +5 -6
- package/dist/destinations/google-sheets/postSheet2/operations2.js.map +1 -1
- package/dist/destinations/iterable/updateUser/index.js +1 -1
- package/dist/destinations/iterable/updateUser/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/index.js +0 -18
- package/dist/destinations/linkedin-conversions/index.js.map +1 -1
- package/dist/destinations/salesforce/index.js +1 -3
- package/dist/destinations/salesforce/index.js.map +1 -1
- package/dist/destinations/salesforce/sf-operations.d.ts +0 -1
- package/dist/destinations/salesforce/sf-operations.js +0 -20
- package/dist/destinations/salesforce/sf-operations.js.map +1 -1
- package/dist/destinations/salesforce/sf-properties.d.ts +0 -1
- package/dist/destinations/salesforce/sf-properties.js +6 -40
- package/dist/destinations/salesforce/sf-properties.js.map +1 -1
- package/dist/destinations/webhook-extensible/generated-types.d.ts +0 -4
- package/dist/destinations/webhook-extensible/index.js +4 -49
- package/dist/destinations/webhook-extensible/index.js.map +1 -1
- package/dist/destinations/webhook-extensible/send/index.js +2 -2
- package/dist/destinations/webhook-extensible/send/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/destinations/facebook-conversions-api/addToCart2/generated-types.d.ts +0 -67
- package/dist/destinations/facebook-conversions-api/addToCart2/generated-types.js +0 -3
- package/dist/destinations/facebook-conversions-api/addToCart2/generated-types.js.map +0 -1
- package/dist/destinations/facebook-conversions-api/addToCart2/index.d.ts +0 -5
- package/dist/destinations/facebook-conversions-api/addToCart2/index.js +0 -108
- package/dist/destinations/facebook-conversions-api/addToCart2/index.js.map +0 -1
- package/dist/destinations/facebook-conversions-api/custom2/generated-types.d.ts +0 -57
- package/dist/destinations/facebook-conversions-api/custom2/generated-types.js +0 -3
- package/dist/destinations/facebook-conversions-api/custom2/generated-types.js.map +0 -1
- package/dist/destinations/facebook-conversions-api/custom2/index.d.ts +0 -5
- package/dist/destinations/facebook-conversions-api/custom2/index.js +0 -72
- package/dist/destinations/facebook-conversions-api/custom2/index.js.map +0 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/generated-types.d.ts +0 -67
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/generated-types.js +0 -3
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/generated-types.js.map +0 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.d.ts +0 -5
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.js +0 -111
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.js.map +0 -1
- package/dist/destinations/facebook-conversions-api/pageView2/generated-types.d.ts +0 -56
- package/dist/destinations/facebook-conversions-api/pageView2/generated-types.js +0 -3
- package/dist/destinations/facebook-conversions-api/pageView2/generated-types.js.map +0 -1
- package/dist/destinations/facebook-conversions-api/pageView2/index.d.ts +0 -5
- package/dist/destinations/facebook-conversions-api/pageView2/index.js +0 -66
- package/dist/destinations/facebook-conversions-api/pageView2/index.js.map +0 -1
- package/dist/destinations/facebook-conversions-api/purchase2/generated-types.d.ts +0 -68
- package/dist/destinations/facebook-conversions-api/purchase2/generated-types.js +0 -3
- package/dist/destinations/facebook-conversions-api/purchase2/generated-types.js.map +0 -1
- package/dist/destinations/facebook-conversions-api/purchase2/index.d.ts +0 -5
- package/dist/destinations/facebook-conversions-api/purchase2/index.js +0 -114
- package/dist/destinations/facebook-conversions-api/purchase2/index.js.map +0 -1
- package/dist/destinations/facebook-conversions-api/search2/generated-types.d.ts +0 -67
- package/dist/destinations/facebook-conversions-api/search2/generated-types.js +0 -3
- package/dist/destinations/facebook-conversions-api/search2/generated-types.js.map +0 -1
- package/dist/destinations/facebook-conversions-api/search2/index.d.ts +0 -5
- package/dist/destinations/facebook-conversions-api/search2/index.js +0 -115
- package/dist/destinations/facebook-conversions-api/search2/index.js.map +0 -1
- package/dist/destinations/facebook-conversions-api/viewContent2/generated-types.d.ts +0 -68
- package/dist/destinations/facebook-conversions-api/viewContent2/generated-types.js +0 -3
- package/dist/destinations/facebook-conversions-api/viewContent2/generated-types.js.map +0 -1
- package/dist/destinations/facebook-conversions-api/viewContent2/index.d.ts +0 -5
- package/dist/destinations/facebook-conversions-api/viewContent2/index.js +0 -110
- package/dist/destinations/facebook-conversions-api/viewContent2/index.js.map +0 -1
- package/dist/destinations/salesforce/lead2/generated-types.d.ts +0 -25
- package/dist/destinations/salesforce/lead2/generated-types.js +0 -3
- package/dist/destinations/salesforce/lead2/generated-types.js.map +0 -1
- package/dist/destinations/salesforce/lead2/index.d.ts +0 -5
- package/dist/destinations/salesforce/lead2/index.js +0 -200
- package/dist/destinations/salesforce/lead2/index.js.map +0 -1
- package/dist/destinations/webhook-extensible/types.d.ts +0 -6
- package/dist/destinations/webhook-extensible/types.js +0 -3
- package/dist/destinations/webhook-extensible/types.js.map +0 -1
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
-
const fb_capi_properties_1 = require("../fb-capi-properties");
|
|
5
|
-
const fb_capi_user_data_1 = require("../fb-capi-user-data");
|
|
6
|
-
const utils_1 = require("../utils");
|
|
7
|
-
const fb_capi_app_data_1 = require("../fb-capi-app-data");
|
|
8
|
-
const action = {
|
|
9
|
-
title: 'Page View V2',
|
|
10
|
-
description: 'Send a page view event when a user lands on a page',
|
|
11
|
-
defaultSubscription: 'type = "page"',
|
|
12
|
-
syncMode: {
|
|
13
|
-
description: 'Define how the records from your destination will be synced.',
|
|
14
|
-
label: 'How to sync records',
|
|
15
|
-
default: 'add',
|
|
16
|
-
choices: [{ label: 'Insert Records', value: 'add' }]
|
|
17
|
-
},
|
|
18
|
-
fields: {
|
|
19
|
-
action_source: { ...fb_capi_properties_1.action_source, required: true },
|
|
20
|
-
event_time: { ...fb_capi_properties_1.event_time, required: true },
|
|
21
|
-
user_data: fb_capi_user_data_1.user_data_field,
|
|
22
|
-
app_data_field: fb_capi_app_data_1.app_data_field,
|
|
23
|
-
event_id: fb_capi_properties_1.event_id,
|
|
24
|
-
event_source_url: fb_capi_properties_1.event_source_url,
|
|
25
|
-
custom_data: fb_capi_properties_1.custom_data,
|
|
26
|
-
data_processing_options: fb_capi_properties_1.data_processing_options,
|
|
27
|
-
data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
|
|
28
|
-
data_processing_options_state: fb_capi_properties_1.data_processing_options_state
|
|
29
|
-
},
|
|
30
|
-
perform: (request, { payload, settings, features, statsContext, syncMode }) => {
|
|
31
|
-
if (syncMode === 'add') {
|
|
32
|
-
if (!payload.user_data) {
|
|
33
|
-
throw new actions_core_1.IntegrationError('Must include at least one user data property', 'Misconfigured required field', 400);
|
|
34
|
-
}
|
|
35
|
-
if (payload.action_source === 'website' && payload.user_data.client_user_agent === undefined) {
|
|
36
|
-
throw new actions_core_1.IntegrationError('If action source is "Website" then client_user_agent must be defined', 'Misconfigured required field', 400);
|
|
37
|
-
}
|
|
38
|
-
const [data_options, country_code, state_code] = fb_capi_properties_1.dataProcessingOptions(payload.data_processing_options, payload.data_processing_options_country, payload.data_processing_options_state);
|
|
39
|
-
return request(`https://graph.facebook.com/v${utils_1.get_api_version(features, statsContext)}/${settings.pixelId}/events`, {
|
|
40
|
-
method: 'POST',
|
|
41
|
-
json: {
|
|
42
|
-
data: [
|
|
43
|
-
{
|
|
44
|
-
event_name: 'PageView',
|
|
45
|
-
event_time: payload.event_time,
|
|
46
|
-
action_source: payload.action_source,
|
|
47
|
-
event_source_url: payload.event_source_url,
|
|
48
|
-
event_id: payload.event_id,
|
|
49
|
-
user_data: fb_capi_user_data_1.hash_user_data({ user_data: payload.user_data }),
|
|
50
|
-
app_data: fb_capi_app_data_1.generate_app_data(payload.app_data_field),
|
|
51
|
-
data_processing_options: data_options,
|
|
52
|
-
data_processing_options_country: country_code,
|
|
53
|
-
data_processing_options_state: state_code
|
|
54
|
-
}
|
|
55
|
-
],
|
|
56
|
-
...(settings.testEventCode && { test_event_code: settings.testEventCode })
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
throw new actions_core_1.IntegrationError(`Sync mode ${syncMode} is not supported`, 'Misconfigured sync mode', 400);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
exports.default = action;
|
|
66
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/pageView2/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,8DAU8B;AAC9B,4DAAsE;AAGtE,oCAA0C;AAC1C,0DAAuE;AAEvE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,oDAAoD;IACjE,mBAAmB,EAAE,eAAe;IACpC,QAAQ,EAAE;QACR,WAAW,EAAE,8DAA8D;QAC3E,KAAK,EAAE,qBAAqB;QAC5B,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;KACrD;IACD,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnD,UAAU,EAAE,EAAE,GAAG,+BAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7C,SAAS,EAAE,mCAAe;QAC1B,cAAc,EAAE,iCAAc;QAC9B,QAAQ,EAAE,6BAAQ;QAClB,gBAAgB,EAAE,qCAAgB;QAClC,WAAW,EAAE,gCAAW;QACxB,uBAAuB,EAAE,4CAAuB;QAChD,+BAA+B,EAAE,oDAA+B;QAChE,6BAA6B,EAAE,kDAA6B;KAC7D;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC5E,IAAI,QAAQ,KAAK,KAAK,EAAE;YACtB,IAAI,CAAC,OAA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EAAE,yBAAyB,EAAE,GAAG,CAAC,CAAA;SACrG;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
export interface Payload {
|
|
2
|
-
action_source: string;
|
|
3
|
-
currency: string;
|
|
4
|
-
event_time: string;
|
|
5
|
-
user_data: {
|
|
6
|
-
externalId?: string[];
|
|
7
|
-
email?: string;
|
|
8
|
-
phone?: string;
|
|
9
|
-
gender?: string;
|
|
10
|
-
dateOfBirth?: string;
|
|
11
|
-
lastName?: string;
|
|
12
|
-
firstName?: string;
|
|
13
|
-
city?: string;
|
|
14
|
-
state?: string;
|
|
15
|
-
zip?: string;
|
|
16
|
-
country?: string;
|
|
17
|
-
client_ip_address?: string;
|
|
18
|
-
client_user_agent?: string;
|
|
19
|
-
fbc?: string;
|
|
20
|
-
fbp?: string;
|
|
21
|
-
subscriptionID?: string;
|
|
22
|
-
leadID?: number;
|
|
23
|
-
fbLoginID?: number;
|
|
24
|
-
anonId?: string;
|
|
25
|
-
partner_id?: string;
|
|
26
|
-
partner_name?: string;
|
|
27
|
-
};
|
|
28
|
-
app_data_field?: {
|
|
29
|
-
use_app_data?: boolean;
|
|
30
|
-
advertiser_tracking_enabled?: boolean;
|
|
31
|
-
application_tracking_enabled?: boolean;
|
|
32
|
-
version?: string;
|
|
33
|
-
packageName?: string;
|
|
34
|
-
shortVersion?: string;
|
|
35
|
-
longVersion?: string;
|
|
36
|
-
osVersion?: string;
|
|
37
|
-
deviceName?: string;
|
|
38
|
-
locale?: string;
|
|
39
|
-
timezone?: string;
|
|
40
|
-
carrier?: string;
|
|
41
|
-
width?: string;
|
|
42
|
-
height?: string;
|
|
43
|
-
density?: string;
|
|
44
|
-
cpuCores?: string;
|
|
45
|
-
storageSize?: string;
|
|
46
|
-
freeStorage?: string;
|
|
47
|
-
deviceTimezone?: string;
|
|
48
|
-
};
|
|
49
|
-
value: number;
|
|
50
|
-
content_ids?: string[];
|
|
51
|
-
content_name?: string;
|
|
52
|
-
content_type?: string;
|
|
53
|
-
contents?: {
|
|
54
|
-
id?: string;
|
|
55
|
-
quantity?: number;
|
|
56
|
-
item_price?: number;
|
|
57
|
-
delivery_category?: string;
|
|
58
|
-
}[];
|
|
59
|
-
event_id?: string;
|
|
60
|
-
event_source_url?: string;
|
|
61
|
-
num_items?: number;
|
|
62
|
-
custom_data?: {
|
|
63
|
-
[k: string]: unknown;
|
|
64
|
-
};
|
|
65
|
-
data_processing_options?: boolean;
|
|
66
|
-
data_processing_options_country?: number;
|
|
67
|
-
data_processing_options_state?: number;
|
|
68
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/purchase2/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
-
const constants_1 = require("../constants");
|
|
5
|
-
const utils_1 = require("../utils");
|
|
6
|
-
const fb_capi_properties_1 = require("../fb-capi-properties");
|
|
7
|
-
const fb_capi_user_data_1 = require("../fb-capi-user-data");
|
|
8
|
-
const fb_capi_app_data_1 = require("../fb-capi-app-data");
|
|
9
|
-
const action = {
|
|
10
|
-
title: 'Purchase V2',
|
|
11
|
-
description: 'Send event when a user completes a purchase',
|
|
12
|
-
defaultSubscription: 'type = "track" and event = "Order Completed"',
|
|
13
|
-
syncMode: {
|
|
14
|
-
description: 'Define how the records from your destination will be synced.',
|
|
15
|
-
label: 'How to sync records',
|
|
16
|
-
default: 'add',
|
|
17
|
-
choices: [{ label: 'Insert Records', value: 'add' }]
|
|
18
|
-
},
|
|
19
|
-
fields: {
|
|
20
|
-
action_source: { ...fb_capi_properties_1.action_source, required: true },
|
|
21
|
-
currency: { ...fb_capi_properties_1.currency, required: true },
|
|
22
|
-
event_time: { ...fb_capi_properties_1.event_time, required: true },
|
|
23
|
-
user_data: fb_capi_user_data_1.user_data_field,
|
|
24
|
-
app_data_field: fb_capi_app_data_1.app_data_field,
|
|
25
|
-
value: {
|
|
26
|
-
...fb_capi_properties_1.value,
|
|
27
|
-
required: true,
|
|
28
|
-
default: { '@path': '$.properties.revenue' }
|
|
29
|
-
},
|
|
30
|
-
content_ids: fb_capi_properties_1.content_ids,
|
|
31
|
-
content_name: fb_capi_properties_1.content_name,
|
|
32
|
-
content_type: fb_capi_properties_1.content_type,
|
|
33
|
-
contents: {
|
|
34
|
-
...fb_capi_properties_1.contents,
|
|
35
|
-
default: {
|
|
36
|
-
'@arrayPath': [
|
|
37
|
-
'$.properties.products',
|
|
38
|
-
{
|
|
39
|
-
id: {
|
|
40
|
-
'@path': '$.product_id'
|
|
41
|
-
},
|
|
42
|
-
quantity: {
|
|
43
|
-
'@path': '$.quantity'
|
|
44
|
-
},
|
|
45
|
-
item_price: {
|
|
46
|
-
'@path': '$.price'
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
event_id: fb_capi_properties_1.event_id,
|
|
53
|
-
event_source_url: fb_capi_properties_1.event_source_url,
|
|
54
|
-
num_items: fb_capi_properties_1.num_items,
|
|
55
|
-
custom_data: fb_capi_properties_1.custom_data,
|
|
56
|
-
data_processing_options: fb_capi_properties_1.data_processing_options,
|
|
57
|
-
data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
|
|
58
|
-
data_processing_options_state: fb_capi_properties_1.data_processing_options_state
|
|
59
|
-
},
|
|
60
|
-
perform: (request, { payload, settings, features, statsContext, syncMode }) => {
|
|
61
|
-
if (syncMode === 'add') {
|
|
62
|
-
if (!constants_1.CURRENCY_ISO_CODES.has(payload.currency)) {
|
|
63
|
-
throw new actions_core_1.IntegrationError(`${payload.currency} is not a valid currency code.`, actions_core_1.ErrorCodes.INVALID_CURRENCY_CODE, 400);
|
|
64
|
-
}
|
|
65
|
-
if (!payload.user_data) {
|
|
66
|
-
throw new actions_core_1.PayloadValidationError('Must include at least one user data property');
|
|
67
|
-
}
|
|
68
|
-
if (payload.action_source === 'website' && payload.user_data.client_user_agent === undefined) {
|
|
69
|
-
throw new actions_core_1.PayloadValidationError('If action source is "Website" then client_user_agent must be defined');
|
|
70
|
-
}
|
|
71
|
-
if (payload.contents) {
|
|
72
|
-
const err = fb_capi_properties_1.validateContents(payload.contents);
|
|
73
|
-
if (err)
|
|
74
|
-
throw err;
|
|
75
|
-
}
|
|
76
|
-
const [data_options, country_code, state_code] = fb_capi_properties_1.dataProcessingOptions(payload.data_processing_options, payload.data_processing_options_country, payload.data_processing_options_state);
|
|
77
|
-
return request(`https://graph.facebook.com/v${utils_1.get_api_version(features, statsContext)}/${settings.pixelId}/events`, {
|
|
78
|
-
method: 'POST',
|
|
79
|
-
json: {
|
|
80
|
-
data: [
|
|
81
|
-
{
|
|
82
|
-
event_name: 'Purchase',
|
|
83
|
-
event_time: payload.event_time,
|
|
84
|
-
action_source: payload.action_source,
|
|
85
|
-
event_source_url: payload.event_source_url,
|
|
86
|
-
event_id: payload.event_id,
|
|
87
|
-
user_data: fb_capi_user_data_1.hash_user_data({ user_data: payload.user_data }),
|
|
88
|
-
custom_data: {
|
|
89
|
-
...payload.custom_data,
|
|
90
|
-
currency: payload.currency,
|
|
91
|
-
value: payload.value,
|
|
92
|
-
content_ids: payload.content_ids,
|
|
93
|
-
content_name: payload.content_name,
|
|
94
|
-
content_type: payload.content_type,
|
|
95
|
-
contents: payload.contents,
|
|
96
|
-
num_items: payload.num_items
|
|
97
|
-
},
|
|
98
|
-
app_data: fb_capi_app_data_1.generate_app_data(payload.app_data_field),
|
|
99
|
-
data_processing_options: data_options,
|
|
100
|
-
data_processing_options_country: country_code,
|
|
101
|
-
data_processing_options_state: state_code
|
|
102
|
-
}
|
|
103
|
-
],
|
|
104
|
-
...(settings.testEventCode && { test_event_code: settings.testEventCode })
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
throw new actions_core_1.IntegrationError(`Sync mode ${syncMode} is not supported`, 'Misconfigured sync mode', 400);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
exports.default = action;
|
|
114
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/purchase2/index.ts"],"names":[],"mappings":";;AAAA,wDAA8G;AAG9G,4CAAiD;AACjD,oCAA0C;AAC1C,8DAkB8B;AAC9B,4DAAsE;AACtE,0DAAuE;AAEvE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,6CAA6C;IAC1D,mBAAmB,EAAE,8CAA8C;IACnE,QAAQ,EAAE;QACR,WAAW,EAAE,8DAA8D;QAC3E,KAAK,EAAE,qBAAqB;QAC5B,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;KACrD;IACD,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnD,QAAQ,EAAE,EAAE,GAAG,6BAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACzC,UAAU,EAAE,EAAE,GAAG,+BAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7C,SAAS,EAAE,mCAAe;QAC1B,cAAc,EAAE,iCAAc;QAC9B,KAAK,EAAE;YACL,GAAG,0BAAK;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE;SAC7C;QACD,WAAW,EAAE,gCAAW;QACxB,YAAY,EAAE,iCAAY;QAC1B,YAAY,EAAE,iCAAY;QAC1B,QAAQ,EAAE;YAER,GAAG,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Q,mBAAmB,EAAE,yBAAyB,EAAE,GAAG,CAAC,CAAA;SACrG;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
export interface Payload {
|
|
2
|
-
action_source: string;
|
|
3
|
-
event_time: string;
|
|
4
|
-
user_data: {
|
|
5
|
-
externalId?: string[];
|
|
6
|
-
email?: string;
|
|
7
|
-
phone?: string;
|
|
8
|
-
gender?: string;
|
|
9
|
-
dateOfBirth?: string;
|
|
10
|
-
lastName?: string;
|
|
11
|
-
firstName?: string;
|
|
12
|
-
city?: string;
|
|
13
|
-
state?: string;
|
|
14
|
-
zip?: string;
|
|
15
|
-
country?: string;
|
|
16
|
-
client_ip_address?: string;
|
|
17
|
-
client_user_agent?: string;
|
|
18
|
-
fbc?: string;
|
|
19
|
-
fbp?: string;
|
|
20
|
-
subscriptionID?: string;
|
|
21
|
-
leadID?: number;
|
|
22
|
-
fbLoginID?: number;
|
|
23
|
-
anonId?: string;
|
|
24
|
-
partner_id?: string;
|
|
25
|
-
partner_name?: string;
|
|
26
|
-
};
|
|
27
|
-
app_data_field?: {
|
|
28
|
-
use_app_data?: boolean;
|
|
29
|
-
advertiser_tracking_enabled?: boolean;
|
|
30
|
-
application_tracking_enabled?: boolean;
|
|
31
|
-
version?: string;
|
|
32
|
-
packageName?: string;
|
|
33
|
-
shortVersion?: string;
|
|
34
|
-
longVersion?: string;
|
|
35
|
-
osVersion?: string;
|
|
36
|
-
deviceName?: string;
|
|
37
|
-
locale?: string;
|
|
38
|
-
timezone?: string;
|
|
39
|
-
carrier?: string;
|
|
40
|
-
width?: string;
|
|
41
|
-
height?: string;
|
|
42
|
-
density?: string;
|
|
43
|
-
cpuCores?: string;
|
|
44
|
-
storageSize?: string;
|
|
45
|
-
freeStorage?: string;
|
|
46
|
-
deviceTimezone?: string;
|
|
47
|
-
};
|
|
48
|
-
content_category?: string;
|
|
49
|
-
content_ids?: string[];
|
|
50
|
-
contents?: {
|
|
51
|
-
id?: string;
|
|
52
|
-
quantity?: number;
|
|
53
|
-
item_price?: number;
|
|
54
|
-
delivery_category?: string;
|
|
55
|
-
}[];
|
|
56
|
-
currency?: string;
|
|
57
|
-
event_id?: string;
|
|
58
|
-
event_source_url?: string;
|
|
59
|
-
search_string?: string;
|
|
60
|
-
value?: number;
|
|
61
|
-
custom_data?: {
|
|
62
|
-
[k: string]: unknown;
|
|
63
|
-
};
|
|
64
|
-
data_processing_options?: boolean;
|
|
65
|
-
data_processing_options_country?: number;
|
|
66
|
-
data_processing_options_state?: number;
|
|
67
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/search2/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
-
const constants_1 = require("../constants");
|
|
5
|
-
const utils_1 = require("../utils");
|
|
6
|
-
const fb_capi_properties_1 = require("../fb-capi-properties");
|
|
7
|
-
const fb_capi_user_data_1 = require("../fb-capi-user-data");
|
|
8
|
-
const fb_capi_app_data_1 = require("../fb-capi-app-data");
|
|
9
|
-
const action = {
|
|
10
|
-
title: 'Search V2',
|
|
11
|
-
description: 'Send event when a user searches content or products',
|
|
12
|
-
defaultSubscription: 'type = "track" and event = "Products Searched"',
|
|
13
|
-
syncMode: {
|
|
14
|
-
description: 'Define how the records from your destination will be synced.',
|
|
15
|
-
label: 'How to sync records',
|
|
16
|
-
default: 'add',
|
|
17
|
-
choices: [{ label: 'Insert Records', value: 'add' }]
|
|
18
|
-
},
|
|
19
|
-
fields: {
|
|
20
|
-
action_source: { ...fb_capi_properties_1.action_source, required: true },
|
|
21
|
-
event_time: { ...fb_capi_properties_1.event_time, required: true },
|
|
22
|
-
user_data: fb_capi_user_data_1.user_data_field,
|
|
23
|
-
app_data_field: fb_capi_app_data_1.app_data_field,
|
|
24
|
-
content_category: fb_capi_properties_1.content_category,
|
|
25
|
-
content_ids: fb_capi_properties_1.content_ids,
|
|
26
|
-
contents: {
|
|
27
|
-
...fb_capi_properties_1.contents,
|
|
28
|
-
default: {
|
|
29
|
-
'@arrayPath': [
|
|
30
|
-
'$.properties',
|
|
31
|
-
{
|
|
32
|
-
id: {
|
|
33
|
-
'@path': '$.product_id'
|
|
34
|
-
},
|
|
35
|
-
quantity: {
|
|
36
|
-
'@path': '$.quantity'
|
|
37
|
-
},
|
|
38
|
-
item_price: {
|
|
39
|
-
'@path': '$.price'
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
currency: fb_capi_properties_1.currency,
|
|
46
|
-
event_id: fb_capi_properties_1.event_id,
|
|
47
|
-
event_source_url: fb_capi_properties_1.event_source_url,
|
|
48
|
-
search_string: {
|
|
49
|
-
label: 'Search String',
|
|
50
|
-
description: 'A search query made by a user. This must be a string.',
|
|
51
|
-
type: 'string',
|
|
52
|
-
default: {
|
|
53
|
-
'@path': '$.properties.query'
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
value: fb_capi_properties_1.value,
|
|
57
|
-
custom_data: fb_capi_properties_1.custom_data,
|
|
58
|
-
data_processing_options: fb_capi_properties_1.data_processing_options,
|
|
59
|
-
data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
|
|
60
|
-
data_processing_options_state: fb_capi_properties_1.data_processing_options_state
|
|
61
|
-
},
|
|
62
|
-
perform: (request, { payload, settings, features, statsContext, syncMode }) => {
|
|
63
|
-
if (syncMode === 'add') {
|
|
64
|
-
if (payload.currency && !constants_1.CURRENCY_ISO_CODES.has(payload.currency)) {
|
|
65
|
-
throw new actions_core_1.IntegrationError(`${payload.currency} is not a valid currency code.`, 'Misconfigured required field', 400);
|
|
66
|
-
}
|
|
67
|
-
if (!payload.user_data) {
|
|
68
|
-
throw new actions_core_1.IntegrationError('Must include at least one user data property', 'Misconfigured required field', 400);
|
|
69
|
-
}
|
|
70
|
-
if (payload.action_source === 'website' && payload.user_data.client_user_agent === undefined) {
|
|
71
|
-
throw new actions_core_1.IntegrationError('If action source is "Website" then client_user_agent must be defined', 'Misconfigured required field', 400);
|
|
72
|
-
}
|
|
73
|
-
if (payload.contents) {
|
|
74
|
-
const err = fb_capi_properties_1.validateContents(payload.contents);
|
|
75
|
-
if (err)
|
|
76
|
-
throw err;
|
|
77
|
-
}
|
|
78
|
-
const [data_options, country_code, state_code] = fb_capi_properties_1.dataProcessingOptions(payload.data_processing_options, payload.data_processing_options_country, payload.data_processing_options_state);
|
|
79
|
-
return request(`https://graph.facebook.com/v${utils_1.get_api_version(features, statsContext)}/${settings.pixelId}/events`, {
|
|
80
|
-
method: 'POST',
|
|
81
|
-
json: {
|
|
82
|
-
data: [
|
|
83
|
-
{
|
|
84
|
-
event_name: 'Search',
|
|
85
|
-
event_time: payload.event_time,
|
|
86
|
-
action_source: payload.action_source,
|
|
87
|
-
event_id: payload.event_id,
|
|
88
|
-
event_source_url: payload.event_source_url,
|
|
89
|
-
user_data: fb_capi_user_data_1.hash_user_data({ user_data: payload.user_data }),
|
|
90
|
-
custom_data: {
|
|
91
|
-
...payload.custom_data,
|
|
92
|
-
currency: payload.currency,
|
|
93
|
-
content_ids: payload.content_ids,
|
|
94
|
-
contents: payload.contents,
|
|
95
|
-
content_category: payload.content_category,
|
|
96
|
-
value: payload.value,
|
|
97
|
-
search_string: payload.search_string
|
|
98
|
-
},
|
|
99
|
-
app_data: fb_capi_app_data_1.generate_app_data(payload.app_data_field),
|
|
100
|
-
data_processing_options: data_options,
|
|
101
|
-
data_processing_options_country: country_code,
|
|
102
|
-
data_processing_options_state: state_code
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
...(settings.testEventCode && { test_event_code: settings.testEventCode })
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
throw new actions_core_1.IntegrationError(`Sync mode ${syncMode} is not supported`, 'Misconfigured sync mode', 400);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
exports.default = action;
|
|
115
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/search2/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAG1E,4CAAiD;AACjD,oCAA0C;AAC1C,8DAgB8B;AAC9B,4DAAsE;AACtE,0DAAuE;AAEvE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,qDAAqD;IAClE,mBAAmB,EAAE,gDAAgD;IACrE,QAAQ,EAAE;QACR,WAAW,EAAE,8DAA8D;QAC3E,KAAK,EAAE,qBAAqB;QAC5B,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;KACrD;IACD,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnD,UAAU,EAAE,EAAE,GAAG,+BAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7C,SAAS,EAAE,mCAAe;QAC1B,cAAc,EAAE,iCAAc;QAC9B,gBAAgB,EAAE,qCAAgB;QAClC,WAAW,EAAE,gCAAW;QACxB,QAAQ,EAAE;YACR,GAAG,6BAAQ;YACX,OAAO,EAAE;gBAEP,YAAY,EAAE;oBACZ,cAAc;oBACd;wBACE,EAAE,EAAE;4BACF,OAAO,EAAE,cAAc;yBACxB;wBACD,QAAQ,EAAE;4BACR,OAAO,EAAE,YAAY;yBACtB;wBACD,UAAU,EAAE;4BACV,OAAO,EAAE,SAAS;yBACnB;qBACF;iBACF;aACF;SACF;QACD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GAAG,CAAC,CAAA;SACrG;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
export interface Payload {
|
|
2
|
-
action_source: string;
|
|
3
|
-
event_time: string;
|
|
4
|
-
user_data: {
|
|
5
|
-
externalId?: string[];
|
|
6
|
-
email?: string;
|
|
7
|
-
phone?: string;
|
|
8
|
-
gender?: string;
|
|
9
|
-
dateOfBirth?: string;
|
|
10
|
-
lastName?: string;
|
|
11
|
-
firstName?: string;
|
|
12
|
-
city?: string;
|
|
13
|
-
state?: string;
|
|
14
|
-
zip?: string;
|
|
15
|
-
country?: string;
|
|
16
|
-
client_ip_address?: string;
|
|
17
|
-
client_user_agent?: string;
|
|
18
|
-
fbc?: string;
|
|
19
|
-
fbp?: string;
|
|
20
|
-
subscriptionID?: string;
|
|
21
|
-
leadID?: number;
|
|
22
|
-
fbLoginID?: number;
|
|
23
|
-
anonId?: string;
|
|
24
|
-
partner_id?: string;
|
|
25
|
-
partner_name?: string;
|
|
26
|
-
};
|
|
27
|
-
app_data_field?: {
|
|
28
|
-
use_app_data?: boolean;
|
|
29
|
-
advertiser_tracking_enabled?: boolean;
|
|
30
|
-
application_tracking_enabled?: boolean;
|
|
31
|
-
version?: string;
|
|
32
|
-
packageName?: string;
|
|
33
|
-
shortVersion?: string;
|
|
34
|
-
longVersion?: string;
|
|
35
|
-
osVersion?: string;
|
|
36
|
-
deviceName?: string;
|
|
37
|
-
locale?: string;
|
|
38
|
-
timezone?: string;
|
|
39
|
-
carrier?: string;
|
|
40
|
-
width?: string;
|
|
41
|
-
height?: string;
|
|
42
|
-
density?: string;
|
|
43
|
-
cpuCores?: string;
|
|
44
|
-
storageSize?: string;
|
|
45
|
-
freeStorage?: string;
|
|
46
|
-
deviceTimezone?: string;
|
|
47
|
-
};
|
|
48
|
-
content_category?: string;
|
|
49
|
-
content_ids?: string[];
|
|
50
|
-
content_name?: string;
|
|
51
|
-
content_type?: string;
|
|
52
|
-
contents?: {
|
|
53
|
-
id?: string;
|
|
54
|
-
quantity?: number;
|
|
55
|
-
item_price?: number;
|
|
56
|
-
delivery_category?: string;
|
|
57
|
-
}[];
|
|
58
|
-
currency?: string;
|
|
59
|
-
event_id?: string;
|
|
60
|
-
event_source_url?: string;
|
|
61
|
-
value?: number;
|
|
62
|
-
custom_data?: {
|
|
63
|
-
[k: string]: unknown;
|
|
64
|
-
};
|
|
65
|
-
data_processing_options?: boolean;
|
|
66
|
-
data_processing_options_country?: number;
|
|
67
|
-
data_processing_options_state?: number;
|
|
68
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/viewContent2/generated-types.ts"],"names":[],"mappings":""}
|