@segment/action-destinations 3.487.0 → 3.489.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/amazon-conversions-api/index.js +3 -2
- package/dist/destinations/amazon-conversions-api/index.js.map +1 -1
- package/dist/destinations/amazon-conversions-api/trackConversion/utils.js +6 -3
- package/dist/destinations/amazon-conversions-api/trackConversion/utils.js.map +1 -1
- package/dist/destinations/amazon-conversions-api/versioning-info.d.ts +2 -0
- package/dist/destinations/amazon-conversions-api/versioning-info.js +6 -0
- package/dist/destinations/amazon-conversions-api/versioning-info.js.map +1 -0
- package/dist/destinations/amplitude-cohorts/index.js +0 -1
- package/dist/destinations/amplitude-cohorts/index.js.map +1 -1
- package/dist/destinations/avo/sendSchemaToInspector/index.js +2 -1
- package/dist/destinations/avo/sendSchemaToInspector/index.js.map +1 -1
- package/dist/destinations/avo/versioning-info.d.ts +1 -0
- package/dist/destinations/avo/versioning-info.js +5 -0
- package/dist/destinations/avo/versioning-info.js.map +1 -0
- package/dist/destinations/criteo-audiences/criteo-audiences.js +2 -1
- package/dist/destinations/criteo-audiences/criteo-audiences.js.map +1 -1
- package/dist/destinations/criteo-audiences/versioning-info.d.ts +1 -0
- package/dist/destinations/criteo-audiences/versioning-info.js +5 -0
- package/dist/destinations/criteo-audiences/versioning-info.js.map +1 -0
- package/dist/destinations/dotdigital/addContactToList/generated-types.d.ts +11 -1
- package/dist/destinations/dotdigital/addContactToList/index.js +161 -5
- package/dist/destinations/dotdigital/addContactToList/index.js.map +1 -1
- package/dist/destinations/dotdigital/enrolContact/index.js +3 -1
- package/dist/destinations/dotdigital/enrolContact/index.js.map +1 -1
- package/dist/destinations/dotdigital/input-fields/contact-identifier.d.ts +4 -2
- package/dist/destinations/dotdigital/input-fields/contact-identifier.js +4 -9
- package/dist/destinations/dotdigital/input-fields/contact-identifier.js.map +1 -1
- package/dist/destinations/dotdigital/input-fields/index.d.ts +1 -1
- package/dist/destinations/dotdigital/input-fields/index.js +4 -2
- package/dist/destinations/dotdigital/input-fields/index.js.map +1 -1
- package/dist/destinations/dotdigital/removeContactFromList/index.js +3 -1
- package/dist/destinations/dotdigital/removeContactFromList/index.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/index.js +2 -1
- package/dist/destinations/engage-messaging-sendgrid/index.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js +2 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/versioning-info.d.ts +1 -0
- package/dist/destinations/engage-messaging-sendgrid/versioning-info.js +5 -0
- package/dist/destinations/engage-messaging-sendgrid/versioning-info.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/addToCart/index.js +7 -37
- package/dist/destinations/facebook-conversions-api/addToCart/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/addToCart2/index.js +7 -37
- package/dist/destinations/facebook-conversions-api/addToCart2/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/constants.d.ts +1 -5
- package/dist/destinations/facebook-conversions-api/constants.js +6 -484
- package/dist/destinations/facebook-conversions-api/constants.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/custom/index.js +7 -22
- package/dist/destinations/facebook-conversions-api/custom/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/custom2/index.js +7 -22
- package/dist/destinations/facebook-conversions-api/custom2/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js +7 -40
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.js +7 -40
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/pageView/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/pageView2/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/purchase/index.js +7 -43
- package/dist/destinations/facebook-conversions-api/purchase/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/purchase2/index.js +59 -4
- package/dist/destinations/facebook-conversions-api/purchase2/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/search/index.js +7 -44
- package/dist/destinations/facebook-conversions-api/search/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/search2/index.js +7 -44
- package/dist/destinations/facebook-conversions-api/search2/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/shared/constants.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/shared/functions.js +3 -0
- package/dist/destinations/facebook-conversions-api/shared/functions.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/viewContent/index.js +7 -38
- package/dist/destinations/facebook-conversions-api/viewContent/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/viewContent2/index.js +7 -38
- package/dist/destinations/facebook-conversions-api/viewContent2/index.js.map +1 -1
- package/dist/destinations/facebook-custom-audiences/constants.js +3 -2
- package/dist/destinations/facebook-custom-audiences/constants.js.map +1 -1
- package/dist/destinations/facebook-custom-audiences/versioning-info.d.ts +2 -0
- package/dist/destinations/facebook-custom-audiences/versioning-info.js +6 -0
- package/dist/destinations/facebook-custom-audiences/versioning-info.js.map +1 -0
- package/dist/destinations/first-party-dv360/functions.js +3 -2
- package/dist/destinations/first-party-dv360/functions.js.map +1 -1
- package/dist/destinations/first-party-dv360/versioning-info.d.ts +2 -0
- package/dist/destinations/first-party-dv360/versioning-info.js +6 -0
- package/dist/destinations/first-party-dv360/versioning-info.js.map +1 -0
- package/dist/destinations/google-sheets/googleapis/index.js +4 -4
- package/dist/destinations/google-sheets/googleapis/index.js.map +1 -1
- package/dist/destinations/google-sheets/versioning-info.d.ts +1 -0
- package/dist/destinations/google-sheets/versioning-info.js +5 -0
- package/dist/destinations/google-sheets/versioning-info.js.map +1 -0
- package/dist/destinations/index.js +1 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/klaviyo/config.js +2 -1
- package/dist/destinations/klaviyo/config.js.map +1 -1
- package/dist/destinations/klaviyo/versioning-info.d.ts +1 -0
- package/dist/destinations/klaviyo/versioning-info.js +5 -0
- package/dist/destinations/klaviyo/versioning-info.js.map +1 -0
- package/dist/destinations/launchdarkly-audiences/constants.js +2 -1
- package/dist/destinations/launchdarkly-audiences/constants.js.map +1 -1
- package/dist/destinations/launchdarkly-audiences/versioning-info.d.ts +1 -0
- package/dist/destinations/launchdarkly-audiences/versioning-info.js +5 -0
- package/dist/destinations/launchdarkly-audiences/versioning-info.js.map +1 -0
- package/dist/destinations/linkedin-conversions/constants.d.ts +4 -0
- package/dist/destinations/linkedin-conversions/constants.js +7 -1
- package/dist/destinations/linkedin-conversions/constants.js.map +1 -1
- package/dist/destinations/linkedin-conversions/index.js +2 -2
- package/dist/destinations/linkedin-conversions/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/versioning-info.d.ts +1 -0
- package/dist/destinations/linkedin-conversions/versioning-info.js +2 -1
- package/dist/destinations/linkedin-conversions/versioning-info.js.map +1 -1
- package/dist/destinations/liveramp-audiences/audienceEnteredS3/index.js +2 -11
- package/dist/destinations/liveramp-audiences/audienceEnteredS3/index.js.map +1 -1
- package/dist/destinations/liveramp-audiences/audienceEnteredSftp/index.js +2 -11
- package/dist/destinations/liveramp-audiences/audienceEnteredSftp/index.js.map +1 -1
- package/dist/destinations/liveramp-audiences/operations.d.ts +1 -2
- package/dist/destinations/liveramp-audiences/operations.js +3 -4
- package/dist/destinations/liveramp-audiences/operations.js.map +1 -1
- package/dist/destinations/liveramp-audiences/properties.d.ts +0 -2
- package/dist/destinations/liveramp-audiences/properties.js +1 -3
- package/dist/destinations/liveramp-audiences/properties.js.map +1 -1
- package/dist/destinations/moengage/identifyUser/index.js +2 -1
- package/dist/destinations/moengage/identifyUser/index.js.map +1 -1
- package/dist/destinations/moengage/index.js +2 -1
- package/dist/destinations/moengage/index.js.map +1 -1
- package/dist/destinations/moengage/trackEvent/index.js +3 -2
- package/dist/destinations/moengage/trackEvent/index.js.map +1 -1
- package/dist/destinations/moengage/versioning-info.d.ts +1 -0
- package/dist/destinations/moengage/versioning-info.js +5 -0
- package/dist/destinations/moengage/versioning-info.js.map +1 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/index.js +2 -1
- package/dist/destinations/optimizely-feature-experimentation-actions/index.js.map +1 -1
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/index.js +2 -1
- package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/index.js.map +1 -1
- package/dist/destinations/optimizely-feature-experimentation-actions/versioning-info.d.ts +2 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/versioning-info.js +6 -0
- package/dist/destinations/optimizely-feature-experimentation-actions/versioning-info.js.map +1 -0
- package/dist/destinations/rokt-audiences/constants.js +2 -1
- package/dist/destinations/rokt-audiences/constants.js.map +1 -1
- package/dist/destinations/rokt-audiences/versioning-info.d.ts +1 -0
- package/dist/destinations/rokt-audiences/versioning-info.js +5 -0
- package/dist/destinations/rokt-audiences/versioning-info.js.map +1 -0
- package/dist/destinations/segment-profiles/properties.js +7 -6
- package/dist/destinations/segment-profiles/properties.js.map +1 -1
- package/dist/destinations/segment-profiles/versioning-info.d.ts +1 -0
- package/dist/destinations/segment-profiles/versioning-info.js +5 -0
- package/dist/destinations/segment-profiles/versioning-info.js.map +1 -0
- package/dist/destinations/taboola-actions/index.js +2 -1
- package/dist/destinations/taboola-actions/index.js.map +1 -1
- package/dist/destinations/taboola-actions/syncAudience/client.js +2 -1
- package/dist/destinations/taboola-actions/syncAudience/client.js.map +1 -1
- package/dist/destinations/taboola-actions/versioning-info.d.ts +1 -0
- package/dist/destinations/taboola-actions/versioning-info.js +5 -0
- package/dist/destinations/taboola-actions/versioning-info.js.map +1 -0
- package/dist/destinations/talon-one/trackEventV2/index.js +2 -1
- package/dist/destinations/talon-one/trackEventV2/index.js.map +1 -1
- package/dist/destinations/talon-one/updateCustomerProfileV3/index.js +2 -1
- package/dist/destinations/talon-one/updateCustomerProfileV3/index.js.map +1 -1
- package/dist/destinations/talon-one/updateCustomerSessionV2/index.js +2 -1
- package/dist/destinations/talon-one/updateCustomerSessionV2/index.js.map +1 -1
- package/dist/destinations/talon-one/versioning-info.d.ts +1 -0
- package/dist/destinations/talon-one/versioning-info.js +5 -0
- package/dist/destinations/talon-one/versioning-info.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions/index.js +2 -1
- package/dist/destinations/tiktok-offline-conversions/index.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/utils.js +2 -1
- package/dist/destinations/tiktok-offline-conversions/utils.js.map +1 -1
- package/dist/destinations/tiktok-offline-conversions/versioning-info.d.ts +1 -0
- package/dist/destinations/tiktok-offline-conversions/versioning-info.js +5 -0
- package/dist/destinations/tiktok-offline-conversions/versioning-info.js.map +1 -0
- package/dist/destinations/voiceops/constants.d.ts +4 -0
- package/dist/destinations/voiceops/constants.js +8 -0
- package/dist/destinations/voiceops/constants.js.map +1 -0
- package/dist/destinations/voiceops/generated-types.d.ts +3 -0
- package/dist/destinations/{dotdigital/input-fields/types.js → voiceops/generated-types.js} +1 -1
- package/dist/destinations/voiceops/generated-types.js.map +1 -0
- package/dist/destinations/voiceops/index.d.ts +4 -0
- package/dist/destinations/voiceops/index.js +65 -0
- package/dist/destinations/voiceops/index.js.map +1 -0
- package/dist/destinations/voiceops/sendCallCompleted/generated-types.d.ts +26 -0
- package/dist/destinations/voiceops/sendCallCompleted/generated-types.js +3 -0
- package/dist/destinations/voiceops/sendCallCompleted/generated-types.js.map +1 -0
- package/dist/destinations/voiceops/sendCallCompleted/index.d.ts +5 -0
- package/dist/destinations/voiceops/sendCallCompleted/index.js +249 -0
- package/dist/destinations/voiceops/sendCallCompleted/index.js.map +1 -0
- package/dist/destinations/yahoo-audiences/utils-rt.js +2 -1
- package/dist/destinations/yahoo-audiences/utils-rt.js.map +1 -1
- package/dist/destinations/yahoo-audiences/utils-tax.js +4 -3
- package/dist/destinations/yahoo-audiences/utils-tax.js.map +1 -1
- package/dist/destinations/yahoo-audiences/versioning-info.d.ts +1 -0
- package/dist/destinations/yahoo-audiences/versioning-info.js +5 -0
- package/dist/destinations/yahoo-audiences/versioning-info.js.map +1 -0
- package/package.json +3 -3
- package/dist/destinations/dotdigital/input-fields/types.d.ts +0 -6
- package/dist/destinations/dotdigital/input-fields/types.js.map +0 -1
- package/dist/destinations/facebook-conversions-api/purchase2/fields.d.ts +0 -2
- package/dist/destinations/facebook-conversions-api/purchase2/fields.js +0 -50
- package/dist/destinations/facebook-conversions-api/purchase2/fields.js.map +0 -1
- package/dist/destinations/facebook-conversions-api/purchase2/functions.d.ts +0 -4
- package/dist/destinations/facebook-conversions-api/purchase2/functions.js +0 -59
- package/dist/destinations/facebook-conversions-api/purchase2/functions.js.map +0 -1
|
@@ -0,0 +1,249 @@
|
|
|
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 HANDLING_AGENT_TYPE = 'HANDLING_AGENT';
|
|
6
|
+
const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
7
|
+
const UNIX_SECONDS_PATTERN = /^\d{10}$/;
|
|
8
|
+
function validateSegmentPayload(payload) {
|
|
9
|
+
if (!UNIX_SECONDS_PATTERN.test(payload.call_started_at)) {
|
|
10
|
+
throw new actions_core_1.PayloadValidationError('call_started_at must be a 10-digit Unix timestamp in seconds.');
|
|
11
|
+
}
|
|
12
|
+
if (payload.channels && payload.agentLegs) {
|
|
13
|
+
throw new actions_core_1.PayloadValidationError('Provide only one of channels or agentLegs.');
|
|
14
|
+
}
|
|
15
|
+
for (const channel of payload.channels ?? []) {
|
|
16
|
+
const identifier = channel.identifier;
|
|
17
|
+
const trimmedIdentifier = identifier?.trim();
|
|
18
|
+
if (!trimmedIdentifier) {
|
|
19
|
+
throw new actions_core_1.PayloadValidationError('channels.identifier is required for every channel entry.');
|
|
20
|
+
}
|
|
21
|
+
if (channel.type === HANDLING_AGENT_TYPE && !EMAIL_REGEX.test(identifier)) {
|
|
22
|
+
throw new actions_core_1.PayloadValidationError('channels.identifier must be a valid email address when channels.type is HANDLING_AGENT.');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
for (const agentLeg of payload.agentLegs ?? []) {
|
|
26
|
+
if (!agentLeg.first_name?.trim()) {
|
|
27
|
+
throw new actions_core_1.PayloadValidationError('agentLegs.first_name is required for every agent leg entry.');
|
|
28
|
+
}
|
|
29
|
+
if (!agentLeg.last_name?.trim()) {
|
|
30
|
+
throw new actions_core_1.PayloadValidationError('agentLegs.last_name is required for every agent leg entry.');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const action = {
|
|
35
|
+
title: 'Send Call Completed',
|
|
36
|
+
description: 'Send a completed call event to Voiceops using the canonical Voiceops call payload.',
|
|
37
|
+
defaultSubscription: 'type = "track" and event = "Call Completed"',
|
|
38
|
+
fields: {
|
|
39
|
+
call_id: {
|
|
40
|
+
label: 'Call ID',
|
|
41
|
+
description: 'The external call identifier used by Voiceops.',
|
|
42
|
+
type: 'string',
|
|
43
|
+
required: true,
|
|
44
|
+
default: {
|
|
45
|
+
'@path': '$.properties.call_id'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
call_started_at: {
|
|
49
|
+
label: 'Call Started At',
|
|
50
|
+
description: 'The call start time as a Unix timestamp in seconds, for example `1712683200`.',
|
|
51
|
+
type: 'string',
|
|
52
|
+
required: true,
|
|
53
|
+
default: {
|
|
54
|
+
'@path': '$.properties.call_started_at'
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
agent_email: {
|
|
58
|
+
label: 'Agent Email',
|
|
59
|
+
description: 'The email address for the primary handling agent.',
|
|
60
|
+
type: 'string',
|
|
61
|
+
format: 'email',
|
|
62
|
+
required: true,
|
|
63
|
+
default: {
|
|
64
|
+
'@path': '$.properties.agent_email'
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
recording_url: {
|
|
68
|
+
label: 'Recording URL',
|
|
69
|
+
description: 'A direct URI to the call recording file, for example `https://example.com/audio.wav`.',
|
|
70
|
+
type: 'string',
|
|
71
|
+
format: 'uri',
|
|
72
|
+
required: true,
|
|
73
|
+
default: {
|
|
74
|
+
'@path': '$.properties.recording_url'
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
first_name: {
|
|
78
|
+
label: 'First Name',
|
|
79
|
+
description: 'The first name for the primary handling agent.',
|
|
80
|
+
type: 'string',
|
|
81
|
+
default: {
|
|
82
|
+
'@path': '$.properties.first_name'
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
last_name: {
|
|
86
|
+
label: 'Last Name',
|
|
87
|
+
description: 'The last name for the primary handling agent.',
|
|
88
|
+
type: 'string',
|
|
89
|
+
default: {
|
|
90
|
+
'@path': '$.properties.last_name'
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
channels: {
|
|
94
|
+
label: 'Channels',
|
|
95
|
+
description: 'Optional channel metadata for multi-channel audio-aware integrations. Use this when you can provide precise channel-based conference bridge data.',
|
|
96
|
+
type: 'object',
|
|
97
|
+
multiple: true,
|
|
98
|
+
defaultObjectUI: 'arrayeditor',
|
|
99
|
+
properties: {
|
|
100
|
+
channel: {
|
|
101
|
+
label: 'Channel',
|
|
102
|
+
description: 'The audio channel number.',
|
|
103
|
+
type: 'integer',
|
|
104
|
+
required: true
|
|
105
|
+
},
|
|
106
|
+
type: {
|
|
107
|
+
label: 'Type',
|
|
108
|
+
description: 'The participant role for the channel. Supported values are CONTACT, HANDLING_AGENT, and TRANSFER_AGENT.',
|
|
109
|
+
type: 'string',
|
|
110
|
+
required: true,
|
|
111
|
+
choices: [
|
|
112
|
+
{ label: 'Contact', value: 'CONTACT' },
|
|
113
|
+
{ label: 'Handling Agent', value: 'HANDLING_AGENT' },
|
|
114
|
+
{ label: 'Transfer Agent', value: 'TRANSFER_AGENT' }
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
recording_start_time: {
|
|
118
|
+
label: 'Recording Start Time',
|
|
119
|
+
description: 'The participant start time as an ISO 8601 / RFC3339 timestamp, for example `2025-12-08T13:32:47.000Z`.',
|
|
120
|
+
type: 'string',
|
|
121
|
+
format: 'date-time',
|
|
122
|
+
required: true
|
|
123
|
+
},
|
|
124
|
+
identifier: {
|
|
125
|
+
label: 'Identifier',
|
|
126
|
+
description: 'The participant identifier. HANDLING_AGENT entries must use an email address, while CONTACT and TRANSFER_AGENT entries can use any non-empty string.',
|
|
127
|
+
type: 'string',
|
|
128
|
+
required: true
|
|
129
|
+
},
|
|
130
|
+
first_name: {
|
|
131
|
+
label: 'First Name',
|
|
132
|
+
description: 'The participant first name when available.',
|
|
133
|
+
type: 'string'
|
|
134
|
+
},
|
|
135
|
+
last_name: {
|
|
136
|
+
label: 'Last Name',
|
|
137
|
+
description: 'The participant last name when available.',
|
|
138
|
+
type: 'string'
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
default: {
|
|
142
|
+
'@arrayPath': [
|
|
143
|
+
'$.properties.channels',
|
|
144
|
+
{
|
|
145
|
+
channel: {
|
|
146
|
+
'@path': '$.channel'
|
|
147
|
+
},
|
|
148
|
+
type: {
|
|
149
|
+
'@path': '$.type'
|
|
150
|
+
},
|
|
151
|
+
recording_start_time: {
|
|
152
|
+
'@path': '$.recording_start_time'
|
|
153
|
+
},
|
|
154
|
+
identifier: {
|
|
155
|
+
'@path': '$.identifier'
|
|
156
|
+
},
|
|
157
|
+
first_name: {
|
|
158
|
+
'@path': '$.first_name'
|
|
159
|
+
},
|
|
160
|
+
last_name: {
|
|
161
|
+
'@path': '$.last_name'
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
agentLegs: {
|
|
168
|
+
label: 'Agent Legs',
|
|
169
|
+
description: 'Optional warm-transfer metadata for agent handoff windows. Use this when you cannot provide channel-based multi-channel recording data.',
|
|
170
|
+
type: 'object',
|
|
171
|
+
multiple: true,
|
|
172
|
+
defaultObjectUI: 'arrayeditor',
|
|
173
|
+
properties: {
|
|
174
|
+
agent_email: {
|
|
175
|
+
label: 'Agent Email',
|
|
176
|
+
description: 'The email address for the agent handling this leg of the call.',
|
|
177
|
+
type: 'string',
|
|
178
|
+
format: 'email',
|
|
179
|
+
required: true
|
|
180
|
+
},
|
|
181
|
+
started_at: {
|
|
182
|
+
label: 'Started At',
|
|
183
|
+
description: 'When this agent began handling the call as an ISO 8601 / RFC3339 timestamp, for example `2025-12-08T13:32:47.000Z`.',
|
|
184
|
+
type: 'string',
|
|
185
|
+
format: 'date-time',
|
|
186
|
+
required: true
|
|
187
|
+
},
|
|
188
|
+
ended_at: {
|
|
189
|
+
label: 'Ended At',
|
|
190
|
+
description: 'When this agent stopped handling the call as an ISO 8601 / RFC3339 timestamp, for example `2025-12-08T13:37:47.000Z`.',
|
|
191
|
+
type: 'string',
|
|
192
|
+
format: 'date-time'
|
|
193
|
+
},
|
|
194
|
+
first_name: {
|
|
195
|
+
label: 'First Name',
|
|
196
|
+
description: 'The first name of the agent for this call leg.',
|
|
197
|
+
type: 'string',
|
|
198
|
+
required: true
|
|
199
|
+
},
|
|
200
|
+
last_name: {
|
|
201
|
+
label: 'Last Name',
|
|
202
|
+
description: 'The last name of the agent for this call leg.',
|
|
203
|
+
type: 'string',
|
|
204
|
+
required: true
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
default: {
|
|
208
|
+
'@arrayPath': [
|
|
209
|
+
'$.properties.agentLegs',
|
|
210
|
+
{
|
|
211
|
+
agent_email: {
|
|
212
|
+
'@path': '$.agent_email'
|
|
213
|
+
},
|
|
214
|
+
started_at: {
|
|
215
|
+
'@path': '$.started_at'
|
|
216
|
+
},
|
|
217
|
+
ended_at: {
|
|
218
|
+
'@path': '$.ended_at'
|
|
219
|
+
},
|
|
220
|
+
first_name: {
|
|
221
|
+
'@path': '$.first_name'
|
|
222
|
+
},
|
|
223
|
+
last_name: {
|
|
224
|
+
'@path': '$.last_name'
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
extraMetadata: {
|
|
231
|
+
label: 'Extra Metadata',
|
|
232
|
+
description: 'Additional call metadata to forward to Voiceops unchanged.',
|
|
233
|
+
type: 'object',
|
|
234
|
+
additionalProperties: true,
|
|
235
|
+
default: {
|
|
236
|
+
'@path': '$.properties.extraMetadata'
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
perform: (request, data) => {
|
|
241
|
+
validateSegmentPayload(data.payload);
|
|
242
|
+
return request(constants_1.VOICEOPS_CALLS_ENDPOINT, {
|
|
243
|
+
method: 'post',
|
|
244
|
+
json: data.payload
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
exports.default = action;
|
|
249
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/voiceops/sendCallCompleted/index.ts"],"names":[],"mappings":";;AAAA,wDAA8D;AAI9D,4CAAsD;AAEtD,MAAM,mBAAmB,GAAG,gBAAgB,CAAA;AAC5C,MAAM,WAAW,GAAG,4BAA4B,CAAA;AAChD,MAAM,oBAAoB,GAAG,UAAU,CAAA;AAEvC,SAAS,sBAAsB,CAAC,OAAgB;IAC9C,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;QACxD,MAAM,IAAI,qCAAsB,CAAC,+DAA+D,CAAC,CAAA;IACnG,CAAC;IAED,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QAC1C,MAAM,IAAI,qCAAsB,CAAC,4CAA4C,CAAC,CAAA;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C,IAAI,CAAC,OAAO,CAAC,CAAA;QAEpC,OAAO,OAAO,CAAC,mCAAuB,EAAE;YACtC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,OAAO;SACnB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -7,6 +7,7 @@ exports.gen_update_segment_payload = gen_update_segment_payload;
|
|
|
7
7
|
const crypto_1 = require("crypto");
|
|
8
8
|
const utils_tax_1 = require("./utils-tax");
|
|
9
9
|
const hashing_utils_1 = require("../../lib/hashing-utils");
|
|
10
|
+
const versioning_info_1 = require("./versioning-info");
|
|
10
11
|
function create_hash(input) {
|
|
11
12
|
if (input === undefined)
|
|
12
13
|
return;
|
|
@@ -15,7 +16,7 @@ function create_hash(input) {
|
|
|
15
16
|
function generate_jwt(client_id, client_secret) {
|
|
16
17
|
const random_id = (0, utils_tax_1.gen_random_id)(24);
|
|
17
18
|
const current_time = Math.floor(new Date().getTime() / 1000);
|
|
18
|
-
const url =
|
|
19
|
+
const url = `https://id.b2b.yahooincapis.com/zts/${versioning_info_1.YAHOO_AUDIENCES_TAXONOMY_API_VERSION}`;
|
|
19
20
|
const jwt_payload = {
|
|
20
21
|
iss: client_id,
|
|
21
22
|
sub: client_id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-rt.js","sourceRoot":"","sources":["../../../src/destinations/yahoo-audiences/utils-rt.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"utils-rt.js","sourceRoot":"","sources":["../../../src/destinations/yahoo-audiences/utils-rt.ts"],"names":[],"mappings":";;AAYA,kCAGC;AAQD,oCA0BC;AAQD,wCAaC;AAQD,gEAgGC;AA9KD,mCAAmC;AAGnC,2CAA2C;AAC3C,2DAAwD;AACxD,uDAAwE;AAOxE,SAAgB,WAAW,CAAC,KAAyB;IACnD,IAAI,KAAK,KAAK,SAAS;QAAE,OAAM;IAC/B,OAAO,IAAA,8BA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AAC;IAED,OAAO,aAAa,CAAA;AACtB,CAAC"}
|
|
@@ -7,9 +7,10 @@ exports.get_taxonomy_access_token = get_taxonomy_access_token;
|
|
|
7
7
|
exports.update_taxonomy = update_taxonomy;
|
|
8
8
|
const actions_core_1 = require("@segment/actions-core");
|
|
9
9
|
const utils_rt_1 = require("./utils-rt");
|
|
10
|
+
const versioning_info_1 = require("./versioning-info");
|
|
10
11
|
const TAXONOMY_CLIENT_KEY_PREFIX = 'idb2b.dsp.datax';
|
|
11
|
-
const TAXONOMY_TOKEN_ENDPOINT =
|
|
12
|
-
const TAXONOMY_AUDIENCE_URL =
|
|
12
|
+
const TAXONOMY_TOKEN_ENDPOINT = `https://id.b2b.yahooincapis.com/zts/${versioning_info_1.YAHOO_AUDIENCES_TAXONOMY_API_VERSION}/oauth2/token`;
|
|
13
|
+
const TAXONOMY_AUDIENCE_URL = `https://id.b2b.yahooincapis.com/zts/${versioning_info_1.YAHOO_AUDIENCES_TAXONOMY_API_VERSION}`;
|
|
13
14
|
const TAXONOMY_SCOPE = 'idb2b.dsp.datax:role.online.writer';
|
|
14
15
|
function gen_customer_taxonomy_payload(settings) {
|
|
15
16
|
const data = {
|
|
@@ -61,7 +62,7 @@ async function get_taxonomy_access_token(request, tx_client_key, tx_client_secre
|
|
|
61
62
|
async function update_taxonomy(engage_space_id, tx_creds, request, body_form_data, statsClient, statsTags) {
|
|
62
63
|
const tx_client_secret = tx_creds.tx_client_secret;
|
|
63
64
|
const tx_client_key = tx_creds.tx_client_key;
|
|
64
|
-
const url = `https://datax.yahooapis.com/
|
|
65
|
+
const url = `https://datax.yahooapis.com/${versioning_info_1.YAHOO_AUDIENCES_TAXONOMY_API_VERSION}/taxonomy/append${engage_space_id.length > 0 ? '/' + engage_space_id : ''}`;
|
|
65
66
|
console.info('[update_taxonomy] Starting taxonomy update request', `engage_space_id: ${engage_space_id}`, `url: ${url}`, `tx_client_key: ${tx_client_key ? 'present' : 'missing'}`);
|
|
66
67
|
const access_token = await get_taxonomy_access_token(request, tx_client_key, tx_client_secret);
|
|
67
68
|
console.info('[update_taxonomy] Access token obtained successfully');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-tax.js","sourceRoot":"","sources":["../../../src/destinations/yahoo-audiences/utils-tax.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"utils-tax.js","sourceRoot":"","sources":["../../../src/destinations/yahoo-audiences/utils-tax.ts"],"names":[],"mappings":";;AAcA,sEAgBC;AAED,0EAYC;AAED,sCAOC;AAUD,8DA+BC;AAED,0CAkFC;AA/KD,wDAAuE;AAEvE,yCAAyC;AAGzC,uDAAwE;AACxE,MAAM,0BAA0B,GAAG,iBAAiB,CAAA;AACpD,MAAM,uBAAuB,GAAG,uCAAuC,sDAAoC,eAAe,CAAA;AAC1H,MAAM,qBAAqB,GAAG,uCAAuC,sDAAoC,EAAE,CAAA;AAC3G,MAAM,cAAc,GAAG,oCAAoC,CAAA;AAE3D,SAAgB,6BAA6B,CAAC,QAAkB;IAC9D,MAAM,IAAI,GAAG;QACX,EAAE,EAAE,QAAQ,CAAC,eAAe;QAC5B,IAAI,EAAE,QAAQ,CAAC,eAAe;QAC9B,WAAW,EAAE,QAAQ,CAAC,aAAa;QACnC,KAAK,EAAE;YACL,OAAO,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;SAC3B;KACF,CAAA;IAED,MAAM,aAAa,GAAG,+IACpB,QAAQ,CAAC,aACX,+HAA+H,IAAI,CAAC,SAAS,CAC3I,IAAI,CACL,sBAAsB,CAAA;IACvB,OAAO,aAAa,CAAA;AACtB,CAAC;AAED,SAAgB,+BAA+B,CAAC,OAAyB;IACvE,MAAM,IAAI,GAAG;QACX,EAAE,EAAE,OAAO,CAAC,mBAAmB;QAC/B,IAAI,EAAE,OAAO,CAAC,oBAAoB;QAClC,IAAI,EAAE,SAAS;KAChB,CAAA;IACD,MAAM,aAAa,GAAG,8JACpB,IAAI,CAAC,EACP,+HAA+H,IAAI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,GAAG,MAAM,gBAAgB,CAAC,IAAI,EAAE,CAAA;QAElD,OAAO,CAAC,IAAI,CACV,yDAAyD,EACzD,iBAAiB,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,CAChD,CAAA;QAED,OAAO,YAAY,CAAA;IACrB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,MAAM,GAAG,KAAwD,CAAA;QAEvE,OAAO,CAAC,IAAI,CACV,yDAAyD,EACzD,WAAW,MAAM,CAAC,QAAQ,EAAE,MAAM,IAAI,SAAS,EAAE,EACjD,iBAAiB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,IAAI,EAAE,CAAC,EAAE,CAC/D,CAAA;QAED,IAAI,WAAW,IAAI,SAAS,EAAE,CAAC;YAC7B,WAAW,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;QACzD,CAAC;QAGD,IAAI,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;YAC5C,MAAM,IAAI,+BAAgB,CACxB,kCAAkC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IACpE,MAAM,CAAC,QAAQ,CAAC,MAClB,8BAA8B,EAC9B,6BAA6B,EAC7B,GAAG,CACJ,CAAA;QACH,CAAC;aAAM,CAAC;YACN,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const YAHOO_AUDIENCES_TAXONOMY_API_VERSION = "v1";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versioning-info.js","sourceRoot":"","sources":["../../../src/destinations/yahoo-audiences/versioning-info.ts"],"names":[],"mappings":";;;AAIa,QAAA,oCAAoC,GAAG,IAAI,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.
|
|
4
|
+
"version": "3.489.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@bufbuild/protobuf": "^2.2.3",
|
|
49
49
|
"@segment/a1-notation": "^2.1.4",
|
|
50
50
|
"@segment/actions-core": "^3.167.0",
|
|
51
|
-
"@segment/actions-shared": "^1.
|
|
51
|
+
"@segment/actions-shared": "^1.152.0",
|
|
52
52
|
"@types/node": "^22.13.1",
|
|
53
53
|
"ajv-formats": "^2.1.1",
|
|
54
54
|
"aws4": "^1.12.0",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"__tests__/__helpers__/"
|
|
93
93
|
]
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "0528c943d7d890bbf88a072699e71afcc16e8b7e"
|
|
96
96
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/destinations/dotdigital/input-fields/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fields = void 0;
|
|
4
|
-
const fb_capi_properties_1 = require("../fb-capi-properties");
|
|
5
|
-
const fb_capi_user_data_1 = require("../fb-capi-user-data");
|
|
6
|
-
const fb_capi_app_data_1 = require("../fb-capi-app-data");
|
|
7
|
-
exports.fields = {
|
|
8
|
-
action_source: { ...fb_capi_properties_1.action_source, required: true },
|
|
9
|
-
currency: { ...fb_capi_properties_1.currency, required: true },
|
|
10
|
-
event_time: { ...fb_capi_properties_1.event_time, required: true },
|
|
11
|
-
user_data: fb_capi_user_data_1.user_data_field,
|
|
12
|
-
app_data_field: fb_capi_app_data_1.app_data_field,
|
|
13
|
-
value: {
|
|
14
|
-
...fb_capi_properties_1.value,
|
|
15
|
-
required: true,
|
|
16
|
-
default: { '@path': '$.properties.revenue' }
|
|
17
|
-
},
|
|
18
|
-
net_revenue: fb_capi_properties_1.net_revenue,
|
|
19
|
-
content_ids: fb_capi_properties_1.content_ids,
|
|
20
|
-
content_name: fb_capi_properties_1.content_name,
|
|
21
|
-
content_type: fb_capi_properties_1.content_type,
|
|
22
|
-
contents: {
|
|
23
|
-
...fb_capi_properties_1.contents,
|
|
24
|
-
default: {
|
|
25
|
-
'@arrayPath': [
|
|
26
|
-
'$.properties.products',
|
|
27
|
-
{
|
|
28
|
-
id: {
|
|
29
|
-
'@path': '$.product_id'
|
|
30
|
-
},
|
|
31
|
-
quantity: {
|
|
32
|
-
'@path': '$.quantity'
|
|
33
|
-
},
|
|
34
|
-
item_price: {
|
|
35
|
-
'@path': '$.price'
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
event_id: fb_capi_properties_1.event_id,
|
|
42
|
-
event_source_url: fb_capi_properties_1.event_source_url,
|
|
43
|
-
num_items: fb_capi_properties_1.num_items,
|
|
44
|
-
custom_data: fb_capi_properties_1.custom_data,
|
|
45
|
-
data_processing_options: fb_capi_properties_1.data_processing_options,
|
|
46
|
-
data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
|
|
47
|
-
data_processing_options_state: fb_capi_properties_1.data_processing_options_state,
|
|
48
|
-
test_event_code: fb_capi_properties_1.test_event_code
|
|
49
|
-
};
|
|
50
|
-
//# sourceMappingURL=fields.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/purchase2/fields.ts"],"names":[],"mappings":";;;AACA,8DAkB8B;AAC9B,4DAAsD;AACtD,0DAAoD;AAEvC,QAAA,MAAM,GAAgC;IAC/C,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;IACnD,QAAQ,EAAE,EAAE,GAAG,6BAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;IACzC,UAAU,EAAE,EAAE,GAAG,+BAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC7C,SAAS,EAAE,mCAAe;IAC1B,cAAc,EAAE,iCAAc;IAC9B,KAAK,EAAE;QACL,GAAG,0BAAK;QACR,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE;KAC7C;IACD,WAAW,EAAE,gCAAW;IACxB,WAAW,EAAE,gCAAW;IACxB,YAAY,EAAE,iCAAY;IAC1B,YAAY,EAAE,iCAAY;IAC1B,QAAQ,EAAE;QAER,GAAG,6BAAQ;QACX,OAAO,EAAE;YACP,YAAY,EAAE;gBACZ,uBAAuB;gBACvB;oBACE,EAAE,EAAE;wBACF,OAAO,EAAE,cAAc;qBACxB;oBACD,QAAQ,EAAE;wBACR,OAAO,EAAE,YAAY;qBACtB;oBACD,UAAU,EAAE;wBACV,OAAO,EAAE,SAAS;qBACnB;iBACF;aACF;SACF;KACF;IACD,QAAQ,EAAE,6BAAQ;IAClB,gBAAgB,EAAE,qCAAgB;IAClC,SAAS,EAAE,8BAAS;IACpB,WAAW,EAAE,gCAAW;IACxB,uBAAuB,EAAE,4CAAuB;IAChD,+BAA+B,EAAE,oDAA+B;IAChE,6BAA6B,EAAE,kDAA6B;IAC5D,eAAe,EAAE,oCAAe;CACnC,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { RequestClient, Features, StatsContext } from '@segment/actions-core';
|
|
2
|
-
import type { Settings } from '../generated-types';
|
|
3
|
-
import type { Payload } from './generated-types';
|
|
4
|
-
export declare function send(request: RequestClient, payload: Payload, settings: Settings, features?: Features, statsContext?: StatsContext): Promise<import("@segment/actions-core/src").ModifiedResponse<unknown>>;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.send = send;
|
|
4
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
5
|
-
const constants_1 = require("../constants");
|
|
6
|
-
const utils_1 = require("../utils");
|
|
7
|
-
const fb_capi_properties_1 = require("../fb-capi-properties");
|
|
8
|
-
const fb_capi_user_data_1 = require("../fb-capi-user-data");
|
|
9
|
-
const fb_capi_app_data_1 = require("../fb-capi-app-data");
|
|
10
|
-
function send(request, payload, settings, features, statsContext) {
|
|
11
|
-
if (!constants_1.CURRENCY_ISO_CODES.has(payload.currency)) {
|
|
12
|
-
throw new actions_core_1.IntegrationError(`${payload.currency} is not a valid currency code.`, actions_core_1.ErrorCodes.INVALID_CURRENCY_CODE, 400);
|
|
13
|
-
}
|
|
14
|
-
if (!payload.user_data) {
|
|
15
|
-
throw new actions_core_1.PayloadValidationError('Must include at least one user data property');
|
|
16
|
-
}
|
|
17
|
-
if (payload.action_source === 'website' && payload.user_data.client_user_agent === undefined) {
|
|
18
|
-
throw new actions_core_1.PayloadValidationError('If action source is "Website" then client_user_agent must be defined');
|
|
19
|
-
}
|
|
20
|
-
if (payload.contents) {
|
|
21
|
-
const err = (0, fb_capi_properties_1.validateContents)(payload.contents);
|
|
22
|
-
if (err)
|
|
23
|
-
throw err;
|
|
24
|
-
}
|
|
25
|
-
const [data_options, country_code, state_code] = (0, fb_capi_properties_1.dataProcessingOptions)(payload.data_processing_options, payload.data_processing_options_country, payload.data_processing_options_state);
|
|
26
|
-
const testEventCode = payload.test_event_code || settings.testEventCode;
|
|
27
|
-
return request(`https://graph.facebook.com/v${(0, utils_1.get_api_version)(features, statsContext)}/${settings.pixelId}/events`, {
|
|
28
|
-
method: 'POST',
|
|
29
|
-
json: {
|
|
30
|
-
data: [
|
|
31
|
-
{
|
|
32
|
-
event_name: 'Purchase',
|
|
33
|
-
event_time: payload.event_time,
|
|
34
|
-
action_source: payload.action_source,
|
|
35
|
-
event_source_url: payload.event_source_url,
|
|
36
|
-
event_id: payload.event_id,
|
|
37
|
-
user_data: (0, fb_capi_user_data_1.hash_user_data)({ user_data: payload.user_data }),
|
|
38
|
-
custom_data: {
|
|
39
|
-
...payload.custom_data,
|
|
40
|
-
currency: payload.currency,
|
|
41
|
-
value: payload.value,
|
|
42
|
-
net_revenue: payload.net_revenue,
|
|
43
|
-
content_ids: payload.content_ids,
|
|
44
|
-
content_name: payload.content_name,
|
|
45
|
-
content_type: payload.content_type,
|
|
46
|
-
contents: payload.contents,
|
|
47
|
-
num_items: payload.num_items
|
|
48
|
-
},
|
|
49
|
-
app_data: (0, fb_capi_app_data_1.generate_app_data)(payload.app_data_field),
|
|
50
|
-
data_processing_options: data_options,
|
|
51
|
-
data_processing_options_country: country_code,
|
|
52
|
-
data_processing_options_state: state_code
|
|
53
|
-
}
|
|
54
|
-
],
|
|
55
|
-
...(testEventCode && { test_event_code: testEventCode })
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=functions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/purchase2/functions.ts"],"names":[],"mappings":";;AASA,oBAgEC;AAzED,wDAAoI;AAGpI,4CAAiD;AACjD,oCAA0C;AAC1C,8DAA+E;AAC/E,4DAAqD;AACrD,0DAAuD;AAEvD,SAAgB,IAAI,CAAC,OAAsB,EAAE,OAAgB,EAAE,QAAkB,EAAE,QAAmB,EAAE,YAA2B;IAC/H,IAAI,CAAC,8BAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,+BAAgB,CACtB,GAAG,OAAO,CAAC,QAAQ,gCAAgC,EACnD,yBAAU,CAAC,qBAAqB,EAChC,GAAG,CACN,CAAA;IACL,CAAC;IAED,IAAI,CAAC,OA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