@segment/action-destinations 3.434.0 → 3.436.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-amc/index.js +14 -0
- package/dist/destinations/amazon-amc/index.js.map +1 -1
- package/dist/destinations/amazon-eventbridge/send/functions.js +1 -1
- package/dist/destinations/amazon-eventbridge/send/functions.js.map +1 -1
- package/dist/destinations/amazon-eventbridge/send/hooks.js +5 -5
- package/dist/destinations/amazon-eventbridge/send/hooks.js.map +1 -1
- package/dist/destinations/amazon-eventbridge/send/index.js +1 -1
- package/dist/destinations/amazon-eventbridge/send/index.js.map +1 -1
- package/dist/destinations/amplitude/groupIdentifyUser/index.js +23 -21
- package/dist/destinations/amplitude/groupIdentifyUser/index.js.map +1 -1
- package/dist/destinations/aws-s3/index.js +14 -0
- package/dist/destinations/aws-s3/index.js.map +1 -1
- package/dist/destinations/delivrai-activate/index.js +14 -0
- package/dist/destinations/delivrai-activate/index.js.map +1 -1
- package/dist/destinations/display-video-360/index.js +14 -0
- package/dist/destinations/display-video-360/index.js.map +1 -1
- package/dist/destinations/dynamic-yield-audiences/index.js +14 -0
- package/dist/destinations/dynamic-yield-audiences/index.js.map +1 -1
- package/dist/destinations/facebook-custom-audiences/index.js +14 -0
- package/dist/destinations/facebook-custom-audiences/index.js.map +1 -1
- package/dist/destinations/first-party-dv360/_tests_/index.test.js +134 -19
- package/dist/destinations/first-party-dv360/_tests_/index.test.js.map +1 -1
- package/dist/destinations/first-party-dv360/addToAudContactInfo/_tests_/index.test.js +52 -0
- package/dist/destinations/first-party-dv360/addToAudContactInfo/_tests_/index.test.js.map +1 -1
- package/dist/destinations/first-party-dv360/addToAudContactInfo/index.js +4 -4
- package/dist/destinations/first-party-dv360/addToAudContactInfo/index.js.map +1 -1
- package/dist/destinations/first-party-dv360/addToAudMobileDeviceId/_tests_/index.test.js +60 -0
- package/dist/destinations/first-party-dv360/addToAudMobileDeviceId/_tests_/index.test.js.map +1 -1
- package/dist/destinations/first-party-dv360/addToAudMobileDeviceId/index.js +4 -4
- package/dist/destinations/first-party-dv360/addToAudMobileDeviceId/index.js.map +1 -1
- package/dist/destinations/first-party-dv360/functions.d.ts +7 -4
- package/dist/destinations/first-party-dv360/functions.js +42 -11
- package/dist/destinations/first-party-dv360/functions.js.map +1 -1
- package/dist/destinations/first-party-dv360/index.js +26 -6
- package/dist/destinations/first-party-dv360/index.js.map +1 -1
- package/dist/destinations/first-party-dv360/properties.d.ts +1 -0
- package/dist/destinations/first-party-dv360/properties.js +2 -1
- package/dist/destinations/first-party-dv360/properties.js.map +1 -1
- package/dist/destinations/first-party-dv360/removeFromAudContactInfo/_tests_/index.test.d.ts +7 -1
- package/dist/destinations/first-party-dv360/removeFromAudContactInfo/_tests_/index.test.js +132 -2
- package/dist/destinations/first-party-dv360/removeFromAudContactInfo/_tests_/index.test.js.map +1 -1
- package/dist/destinations/first-party-dv360/removeFromAudContactInfo/index.js +4 -4
- package/dist/destinations/first-party-dv360/removeFromAudContactInfo/index.js.map +1 -1
- package/dist/destinations/first-party-dv360/removeFromAudMobileDeviceId/index.js +4 -4
- package/dist/destinations/first-party-dv360/removeFromAudMobileDeviceId/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/index.js +14 -0
- package/dist/destinations/google-enhanced-conversions/index.js.map +1 -1
- package/dist/destinations/hubspot/errors.d.ts +1 -0
- package/dist/destinations/hubspot/errors.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/client.d.ts +5 -1
- package/dist/destinations/hubspot/upsertObject/client.js +27 -0
- package/dist/destinations/hubspot/upsertObject/client.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/common-fields.js +133 -2
- package/dist/destinations/hubspot/upsertObject/common-fields.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/constants.d.ts +1 -0
- package/dist/destinations/hubspot/upsertObject/constants.js +2 -1
- package/dist/destinations/hubspot/upsertObject/constants.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/functions/cache-functions.d.ts +5 -2
- package/dist/destinations/hubspot/upsertObject/functions/cache-functions.js +30 -5
- package/dist/destinations/hubspot/upsertObject/functions/cache-functions.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/functions/dynamic-field-functions.d.ts +29 -0
- package/dist/destinations/hubspot/upsertObject/functions/dynamic-field-functions.js +103 -1
- package/dist/destinations/hubspot/upsertObject/functions/dynamic-field-functions.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/functions/hubspot-association-functions.d.ts +4 -3
- package/dist/destinations/hubspot/upsertObject/functions/hubspot-association-functions.js +11 -5
- package/dist/destinations/hubspot/upsertObject/functions/hubspot-association-functions.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/functions/hubspot-list-functions.d.ts +9 -0
- package/dist/destinations/hubspot/upsertObject/functions/hubspot-list-functions.js +152 -0
- package/dist/destinations/hubspot/upsertObject/functions/hubspot-list-functions.js.map +1 -0
- package/dist/destinations/hubspot/upsertObject/functions/hubspot-record-functions.js +5 -0
- package/dist/destinations/hubspot/upsertObject/functions/hubspot-record-functions.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/functions/validation-functions.d.ts +1 -1
- package/dist/destinations/hubspot/upsertObject/functions/validation-functions.js +22 -1
- package/dist/destinations/hubspot/upsertObject/functions/validation-functions.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/generated-types.d.ts +18 -0
- package/dist/destinations/hubspot/upsertObject/index.js +46 -36
- package/dist/destinations/hubspot/upsertObject/index.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/types.d.ts +53 -11
- package/dist/destinations/hubspot/upsertObject/types.js.map +1 -1
- package/dist/destinations/iterable-lists/index.js +14 -0
- package/dist/destinations/iterable-lists/index.js.map +1 -1
- package/dist/destinations/kafka/utils.d.ts +1 -0
- package/dist/destinations/kafka/utils.js +28 -8
- package/dist/destinations/kafka/utils.js.map +1 -1
- package/dist/destinations/klaviyo/index.js +14 -0
- package/dist/destinations/klaviyo/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/index.js +14 -0
- package/dist/destinations/marketo-static-lists/index.js.map +1 -1
- package/dist/destinations/ms-bing-capi/index.js +2 -2
- package/dist/destinations/ms-bing-capi/index.js.map +1 -1
- package/dist/destinations/ms-bing-capi/sendEvent/fields.js +1 -1
- package/dist/destinations/ms-bing-capi/sendEvent/fields.js.map +1 -1
- package/dist/destinations/ortto/common-fields.js +0 -21
- package/dist/destinations/ortto/common-fields.js.map +1 -1
- package/dist/destinations/ortto/trackActivity/generated-types.d.ts +2 -2
- package/dist/destinations/ortto/trackActivity/index.js +21 -2
- package/dist/destinations/ortto/trackActivity/index.js.map +1 -1
- package/dist/destinations/ortto/upsertContactProfile/generated-types.d.ts +2 -2
- package/dist/destinations/ortto/upsertContactProfile/index.js +23 -2
- package/dist/destinations/ortto/upsertContactProfile/index.js.map +1 -1
- package/dist/destinations/ortto-audiences/syncAudience/index.js +2 -0
- package/dist/destinations/ortto-audiences/syncAudience/index.js.map +1 -1
- package/dist/destinations/reddit-audiences/index.js +14 -0
- package/dist/destinations/reddit-audiences/index.js.map +1 -1
- package/dist/destinations/s3/{client.d.ts → syncToS3/client.d.ts} +1 -1
- package/dist/destinations/s3/syncToS3/client.js.map +1 -0
- package/dist/destinations/s3/{fields.d.ts → syncToS3/fields.d.ts} +1 -1
- package/dist/destinations/s3/{fields.js → syncToS3/fields.js} +11 -7
- package/dist/destinations/s3/syncToS3/fields.js.map +1 -0
- package/dist/destinations/s3/{functions.d.ts → syncToS3/functions.d.ts} +2 -2
- package/dist/destinations/s3/syncToS3/functions.js.map +1 -0
- package/dist/destinations/s3/syncToS3/index.js +2 -2
- package/dist/destinations/s3/syncToS3/index.js.map +1 -1
- package/dist/destinations/s3/syncToS3/types.js.map +1 -0
- package/dist/destinations/sendgrid-audiences/index.js +14 -0
- package/dist/destinations/sendgrid-audiences/index.js.map +1 -1
- package/dist/destinations/snap-audiences/index.js +14 -0
- package/dist/destinations/snap-audiences/index.js.map +1 -1
- package/dist/destinations/stackadapt-audiences/common-fields.d.ts +2 -0
- package/dist/destinations/stackadapt-audiences/common-fields.js +215 -0
- package/dist/destinations/stackadapt-audiences/common-fields.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/common-functions.d.ts +8 -0
- package/dist/destinations/stackadapt-audiences/common-functions.js +212 -0
- package/dist/destinations/stackadapt-audiences/common-functions.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/constants.d.ts +15 -0
- package/dist/destinations/stackadapt-audiences/constants.js +133 -0
- package/dist/destinations/stackadapt-audiences/constants.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/fields.d.ts +2 -0
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/fields.js +63 -0
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/fields.js.map +1 -0
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/generated-types.d.ts +24 -5
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/index.js +19 -83
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/index.js.map +1 -1
- package/dist/destinations/stackadapt-audiences/forwardProfile/generated-types.d.ts +15 -9
- package/dist/destinations/stackadapt-audiences/forwardProfile/index.js +78 -124
- package/dist/destinations/stackadapt-audiences/forwardProfile/index.js.map +1 -1
- package/dist/destinations/stackadapt-audiences/generated-types.d.ts +1 -0
- package/dist/destinations/stackadapt-audiences/index.js +20 -8
- package/dist/destinations/stackadapt-audiences/index.js.map +1 -1
- package/dist/destinations/stackadapt-audiences/types.d.ts +37 -0
- package/dist/destinations/taboola-actions/index.js +14 -0
- package/dist/destinations/taboola-actions/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/index.js +14 -0
- package/dist/destinations/tiktok-audiences/index.js.map +1 -1
- package/dist/destinations/webhook-audiences/index.js +14 -0
- package/dist/destinations/webhook-audiences/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/index.js +14 -0
- package/dist/destinations/yahoo-audiences/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/destinations/s3/client.js.map +0 -1
- package/dist/destinations/s3/fields.js.map +0 -1
- package/dist/destinations/s3/functions.js.map +0 -1
- package/dist/destinations/s3/types.js.map +0 -1
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/functions.d.ts +0 -3
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/functions.js +0 -83
- package/dist/destinations/stackadapt-audiences/forwardAudienceEvent/functions.js.map +0 -1
- package/dist/destinations/stackadapt-audiences/forwardProfile/functions.d.ts +0 -3
- package/dist/destinations/stackadapt-audiences/forwardProfile/functions.js +0 -131
- package/dist/destinations/stackadapt-audiences/forwardProfile/functions.js.map +0 -1
- package/dist/destinations/stackadapt-audiences/functions.d.ts +0 -7
- package/dist/destinations/stackadapt-audiences/functions.js +0 -62
- package/dist/destinations/stackadapt-audiences/functions.js.map +0 -1
- /package/dist/destinations/s3/{client.js → syncToS3/client.js} +0 -0
- /package/dist/destinations/s3/{functions.js → syncToS3/functions.js} +0 -0
- /package/dist/destinations/s3/{types.d.ts → syncToS3/types.d.ts} +0 -0
- /package/dist/destinations/s3/{types.js → syncToS3/types.js} +0 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MarketingStatus = exports.MAPPING_SCHEMA = exports.PROFILE_DEFAULT_FIELDS = exports.GQL_ENDPOINT = exports.EXTERNAL_PROVIDER = void 0;
|
|
4
|
+
exports.EXTERNAL_PROVIDER = 'segment_io';
|
|
5
|
+
exports.GQL_ENDPOINT = 'https://api.stackadapt.com/graphql';
|
|
6
|
+
exports.PROFILE_DEFAULT_FIELDS = [
|
|
7
|
+
{
|
|
8
|
+
key: 'user_id',
|
|
9
|
+
label: 'User ID',
|
|
10
|
+
type: 'string',
|
|
11
|
+
description: 'The unique identifier for the user',
|
|
12
|
+
isPii: false
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
key: 'email',
|
|
16
|
+
label: 'Email',
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'The email address of the user',
|
|
19
|
+
isPii: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
key: 'first_name',
|
|
23
|
+
label: 'First Name',
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: "The user's first name",
|
|
26
|
+
isPii: true,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
key: 'last_name',
|
|
30
|
+
label: 'Last Name',
|
|
31
|
+
type: 'string',
|
|
32
|
+
description: "The user's last name",
|
|
33
|
+
isPii: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
key: 'phone',
|
|
37
|
+
label: 'Phone',
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'The phone number of the user',
|
|
40
|
+
isPii: true,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
key: 'address',
|
|
44
|
+
label: 'Address',
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'The address of the user',
|
|
47
|
+
isPii: true,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
key: 'city',
|
|
51
|
+
label: 'City',
|
|
52
|
+
type: 'string',
|
|
53
|
+
description: 'The city of the user',
|
|
54
|
+
isPii: false,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
key: 'state',
|
|
58
|
+
label: 'State',
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'The state of the user',
|
|
61
|
+
isPii: false,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
key: 'country',
|
|
65
|
+
label: 'Country',
|
|
66
|
+
type: 'string',
|
|
67
|
+
description: 'The country of the user',
|
|
68
|
+
isPii: false,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: 'postal_code',
|
|
72
|
+
label: 'Postal Code',
|
|
73
|
+
type: 'string',
|
|
74
|
+
description: 'The postal code of the user',
|
|
75
|
+
isPii: false,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
key: 'timezone',
|
|
79
|
+
label: 'Timezone',
|
|
80
|
+
type: 'string',
|
|
81
|
+
description: 'The timezone of the user',
|
|
82
|
+
isPii: false,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
key: 'birth_day',
|
|
86
|
+
label: 'Birth Day',
|
|
87
|
+
type: 'number',
|
|
88
|
+
description: 'The birth day of the user (1-31)',
|
|
89
|
+
isPii: false,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
key: 'birth_month',
|
|
93
|
+
label: 'Birth Month',
|
|
94
|
+
type: 'number',
|
|
95
|
+
description: 'The birth month of the user (1-12)',
|
|
96
|
+
isPii: false,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
key: 'birth_year',
|
|
100
|
+
label: 'Birth Year',
|
|
101
|
+
type: 'number',
|
|
102
|
+
description: 'The birth year of the user (YYYY)',
|
|
103
|
+
isPii: false,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
key: 'birth_date',
|
|
107
|
+
label: 'Birth Date',
|
|
108
|
+
type: 'string',
|
|
109
|
+
description: 'The birth date of the user',
|
|
110
|
+
isPii: true,
|
|
111
|
+
}
|
|
112
|
+
];
|
|
113
|
+
exports.MAPPING_SCHEMA = [
|
|
114
|
+
{
|
|
115
|
+
incomingKey: 'audienceId',
|
|
116
|
+
destinationKey: 'external_id',
|
|
117
|
+
type: 'string',
|
|
118
|
+
label: 'External Audience ID',
|
|
119
|
+
isPii: false
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
incomingKey: 'audienceName',
|
|
123
|
+
destinationKey: 'name',
|
|
124
|
+
type: 'string',
|
|
125
|
+
label: 'External Audience Name',
|
|
126
|
+
isPii: false
|
|
127
|
+
}
|
|
128
|
+
];
|
|
129
|
+
exports.MarketingStatus = {
|
|
130
|
+
OPT_IN: 'Opted-in',
|
|
131
|
+
Indeterminate: 'Indeterminate'
|
|
132
|
+
};
|
|
133
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/destinations/stackadapt-audiences/constants.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.audience_only_fields = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
5
|
+
exports.audience_only_fields = {
|
|
6
|
+
marketing_status: {
|
|
7
|
+
label: 'Marketing Status',
|
|
8
|
+
description: 'In certain jurisdictions, explicit consent may be required to send email marketing communications to imported profiles. Consult independent counsel for further guidance.',
|
|
9
|
+
type: 'string',
|
|
10
|
+
required: true,
|
|
11
|
+
disabledInputMethods: ['literal', 'variable', 'function', 'freeform', 'enrichment'],
|
|
12
|
+
choices: [
|
|
13
|
+
{ label: 'Opted-in (Profiles can receive email marketing)', value: constants_1.MarketingStatus.OPT_IN },
|
|
14
|
+
{ label: 'Indeterminate (Profiles that have not opted-out, but are excluded from email marketing)', value: constants_1.MarketingStatus.Indeterminate }
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
traits_or_props: {
|
|
18
|
+
label: 'Event Properties',
|
|
19
|
+
type: 'object',
|
|
20
|
+
description: 'The properties of the user or event.',
|
|
21
|
+
unsafe_hidden: true,
|
|
22
|
+
required: true,
|
|
23
|
+
default: {
|
|
24
|
+
'@if': {
|
|
25
|
+
exists: { '@path': '$.properties' },
|
|
26
|
+
then: { '@path': '$.properties' },
|
|
27
|
+
else: { '@path': '$.traits' }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
segment_computation_class: {
|
|
32
|
+
label: 'Segment Computation Class',
|
|
33
|
+
required: true,
|
|
34
|
+
description: "Segment computation class used to determine if input event is from an Engage Audience'.",
|
|
35
|
+
type: 'string',
|
|
36
|
+
unsafe_hidden: true,
|
|
37
|
+
default: {
|
|
38
|
+
'@path': '$.context.personas.computation_class'
|
|
39
|
+
},
|
|
40
|
+
choices: [{ label: 'audience', value: 'audience' }, { label: 'journey_step', value: 'journey_step' }]
|
|
41
|
+
},
|
|
42
|
+
segment_computation_id: {
|
|
43
|
+
label: 'Segment Computation ID',
|
|
44
|
+
description: 'For audience enter/exit events, this will be the audience ID.',
|
|
45
|
+
type: 'string',
|
|
46
|
+
required: true,
|
|
47
|
+
unsafe_hidden: true,
|
|
48
|
+
default: {
|
|
49
|
+
'@path': '$.context.personas.computation_id'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
segment_computation_key: {
|
|
53
|
+
label: 'Segment Computation Key',
|
|
54
|
+
description: 'For audience enter/exit events, this will be the audience key.',
|
|
55
|
+
type: 'string',
|
|
56
|
+
unsafe_hidden: true,
|
|
57
|
+
required: true,
|
|
58
|
+
default: {
|
|
59
|
+
'@path': '$.context.personas.computation_key'
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../src/destinations/stackadapt-audiences/forwardAudienceEvent/fields.ts"],"names":[],"mappings":";;;AACA,4CAA8C;AAEjC,QAAA,oBAAoB,GAA+B;IAC5D,gBAAgB,EAAE;QAChB,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,2KAA2K;QACxL,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,oBAAoB,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,CAAC;QACnF,OAAO,EAAE;YACP,EAAE,KAAK,EAAE,iDAAiD,EAAE,KAAK,EAAE,2BAAe,CAAC,MAAM,EAAE;YAC3F,EAAE,KAAK,EAAE,yFAAyF,EAAE,KAAK,EAAE,2BAAe,CAAC,aAAa,EAAE;SAC3I;KACF;IACD,eAAe,EAAE;QACf,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,sCAAsC;QACnD,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE;YACP,KAAK,EAAE;gBACL,MAAM,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;gBACnC,IAAI,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;gBACjC,IAAI,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;aAC9B;SACF;KACF;IACD,yBAAyB,EAAE;QACzB,KAAK,EAAE,2BAA2B;QAClC,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,yFAAyF;QACtG,IAAI,EAAE,QAAQ;QACd,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE;YACP,OAAO,EAAE,sCAAsC;SAChD;QACD,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,EAAC,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;KACrG;IACD,sBAAsB,EAAE;QACtB,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE,+DAA+D;QAC5E,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE;YACP,OAAO,EAAE,mCAAmC;SAC7C;KACF;IACD,uBAAuB,EAAE;QACvB,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,gEAAgE;QAC7E,IAAI,EAAE,QAAQ;QACd,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE;YACP,OAAO,EAAE,oCAAoC;SAC9C;KACF;CACJ,CAAA"}
|
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
|
-
|
|
2
|
+
standard_traits?: {
|
|
3
|
+
first_name?: string;
|
|
4
|
+
last_name?: string;
|
|
5
|
+
phone?: string;
|
|
6
|
+
address?: string;
|
|
7
|
+
city?: string;
|
|
8
|
+
country?: string;
|
|
9
|
+
state?: string;
|
|
10
|
+
timezone?: string;
|
|
11
|
+
postal_code?: string;
|
|
12
|
+
birth_day?: number;
|
|
13
|
+
birth_month?: number;
|
|
14
|
+
birth_year?: number;
|
|
15
|
+
birth_date?: string;
|
|
16
|
+
};
|
|
17
|
+
custom_traits?: {
|
|
3
18
|
[k: string]: unknown;
|
|
4
19
|
};
|
|
5
20
|
user_id?: string;
|
|
6
|
-
event_type
|
|
21
|
+
event_type: string;
|
|
7
22
|
enable_batching: boolean;
|
|
8
|
-
|
|
9
|
-
|
|
23
|
+
marketing_status: string;
|
|
24
|
+
traits_or_props: {
|
|
25
|
+
[k: string]: unknown;
|
|
26
|
+
};
|
|
27
|
+
segment_computation_class: string;
|
|
28
|
+
segment_computation_id: string;
|
|
10
29
|
segment_computation_key: string;
|
|
11
|
-
|
|
30
|
+
email: string;
|
|
12
31
|
}
|
|
@@ -1,99 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const common_functions_1 = require("../common-functions");
|
|
4
|
+
const common_fields_1 = require("../common-fields");
|
|
5
|
+
const fields_1 = require("./fields");
|
|
5
6
|
const action = {
|
|
6
|
-
title: '
|
|
7
|
-
description: '
|
|
7
|
+
title: 'Sync Audience',
|
|
8
|
+
description: 'Sync Segment Engage audience and user profile details to StackAdapt',
|
|
8
9
|
defaultSubscription: 'type = "identify" or type = "track"',
|
|
9
10
|
fields: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
required: true,
|
|
16
|
-
default: {
|
|
17
|
-
'@if': {
|
|
18
|
-
exists: { '@path': '$.properties.audience_key' },
|
|
19
|
-
then: { '@path': '$.properties' },
|
|
20
|
-
else: { '@path': '$.traits' }
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
user_id: {
|
|
25
|
-
label: 'Segment User ID',
|
|
26
|
-
description: 'The ID of the user in Segment',
|
|
11
|
+
...common_fields_1.common_fields,
|
|
12
|
+
...fields_1.audience_only_fields,
|
|
13
|
+
email: {
|
|
14
|
+
label: 'Email',
|
|
15
|
+
description: 'The email address of the user.',
|
|
27
16
|
type: 'string',
|
|
17
|
+
format: 'email',
|
|
18
|
+
required: true,
|
|
28
19
|
default: {
|
|
29
20
|
'@if': {
|
|
30
|
-
exists: { '@path': '$.
|
|
31
|
-
then: { '@path': '$.
|
|
32
|
-
else: { '@path': '$.
|
|
21
|
+
exists: { '@path': '$.traits.email' },
|
|
22
|
+
then: { '@path': '$.traits.email' },
|
|
23
|
+
else: { '@path': '$.properties.email' }
|
|
33
24
|
}
|
|
34
25
|
}
|
|
35
|
-
},
|
|
36
|
-
event_type: {
|
|
37
|
-
label: 'Event Type',
|
|
38
|
-
description: 'The Segment event type (identify, alias, etc.)',
|
|
39
|
-
type: 'string',
|
|
40
|
-
default: {
|
|
41
|
-
'@path': '$.type'
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
enable_batching: {
|
|
45
|
-
type: 'boolean',
|
|
46
|
-
label: 'Batch Profiles',
|
|
47
|
-
unsafe_hidden: true,
|
|
48
|
-
description: 'When enabled, Segment will batch profiles together and send them to StackAdapt in a single request.',
|
|
49
|
-
required: true,
|
|
50
|
-
default: true
|
|
51
|
-
},
|
|
52
|
-
segment_computation_class: {
|
|
53
|
-
label: 'Segment Computation Class',
|
|
54
|
-
description: "Segment computation class used to determine if input event is from an Engage Audience'.",
|
|
55
|
-
type: 'string',
|
|
56
|
-
unsafe_hidden: true,
|
|
57
|
-
default: {
|
|
58
|
-
'@path': '$.context.personas.computation_class'
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
segment_computation_id: {
|
|
62
|
-
label: 'Segment Computation ID',
|
|
63
|
-
description: 'For audience enter/exit events, this will be the audience ID.',
|
|
64
|
-
type: 'string',
|
|
65
|
-
unsafe_hidden: true,
|
|
66
|
-
default: {
|
|
67
|
-
'@path': '$.context.personas.computation_id'
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
segment_computation_key: {
|
|
71
|
-
label: 'Segment Computation Key',
|
|
72
|
-
description: 'For audience enter/exit events, this will be the audience key.',
|
|
73
|
-
type: 'string',
|
|
74
|
-
unsafe_hidden: true,
|
|
75
|
-
required: true,
|
|
76
|
-
default: {
|
|
77
|
-
'@path': '$.context.personas.computation_key'
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
advertiser_id: {
|
|
81
|
-
label: 'Advertiser',
|
|
82
|
-
description: 'The StackAdapt advertiser to add the profile to.',
|
|
83
|
-
type: 'string',
|
|
84
|
-
disabledInputMethods: ['literal', 'variable', 'function', 'freeform', 'enrichment'],
|
|
85
|
-
required: true,
|
|
86
|
-
dynamic: true
|
|
87
26
|
}
|
|
88
27
|
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
perform: async (request, { payload }) => {
|
|
93
|
-
return await (0, functions_1.performForwardAudienceEvents)(request, [payload]);
|
|
28
|
+
perform: async (request, { payload, settings }) => {
|
|
29
|
+
return await (0, common_functions_1.send)(request, [payload], settings, true);
|
|
94
30
|
},
|
|
95
|
-
performBatch: async (request, { payload }) => {
|
|
96
|
-
return await (0,
|
|
31
|
+
performBatch: async (request, { payload, settings }) => {
|
|
32
|
+
return await (0, common_functions_1.send)(request, payload, settings, true);
|
|
97
33
|
}
|
|
98
34
|
};
|
|
99
35
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/stackadapt-audiences/forwardAudienceEvent/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/stackadapt-audiences/forwardAudienceEvent/index.ts"],"names":[],"mappings":";;AAGA,0DAA0C;AAC1C,oDAAgD;AAChD,qCAA+C;AAE/C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,qEAAqE;IAClF,mBAAmB,EAAE,qCAAqC;IAC1D,MAAM,EAAE;QACN,GAAG,6BAAa;QAChB,GAAG,6BAAoB;QACvB,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,gCAAgC;YAC7C,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;oBACrC,IAAI,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;oBACnC,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;iBACxC;aACF;SACF;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAChD,OAAO,MAAM,IAAA,uBAAI,EAAC,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAA;IACvD,CAAC;IACD,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QACrD,OAAO,MAAM,IAAA,uBAAI,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAA;IACrD,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
lastName?: string;
|
|
2
|
+
standard_traits?: {
|
|
3
|
+
first_name?: string;
|
|
4
|
+
last_name?: string;
|
|
6
5
|
phone?: string;
|
|
6
|
+
address?: string;
|
|
7
7
|
city?: string;
|
|
8
8
|
country?: string;
|
|
9
9
|
state?: string;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
timezone?: string;
|
|
11
|
+
postal_code?: string;
|
|
12
|
+
birth_day?: number;
|
|
13
|
+
birth_month?: number;
|
|
14
|
+
birth_year?: number;
|
|
15
|
+
birth_date?: string;
|
|
16
|
+
};
|
|
17
|
+
custom_traits?: {
|
|
12
18
|
[k: string]: unknown;
|
|
13
19
|
};
|
|
14
20
|
user_id?: string;
|
|
15
|
-
|
|
16
|
-
event_type?: string;
|
|
21
|
+
event_type: string;
|
|
17
22
|
enable_batching: boolean;
|
|
18
|
-
|
|
23
|
+
previous_id?: string;
|
|
24
|
+
email?: string;
|
|
19
25
|
}
|
|
@@ -1,82 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const common_functions_1 = require("../common-functions");
|
|
4
|
+
const common_fields_1 = require("../common-fields");
|
|
5
5
|
const action = {
|
|
6
6
|
title: 'Forward Profile',
|
|
7
|
-
description: 'Forward new or updated user
|
|
7
|
+
description: 'Forward new or updated user profiles to StackAdapt',
|
|
8
8
|
defaultSubscription: 'type = "identify" or type = "alias" or type = "track"',
|
|
9
9
|
fields: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
description: "The user's first name."
|
|
27
|
-
},
|
|
28
|
-
lastName: {
|
|
29
|
-
label: 'Last Name',
|
|
30
|
-
type: 'string',
|
|
31
|
-
description: "The user's last name."
|
|
32
|
-
},
|
|
33
|
-
phone: {
|
|
34
|
-
label: 'Phone',
|
|
35
|
-
type: 'string',
|
|
36
|
-
description: 'The phone number of the user.'
|
|
37
|
-
},
|
|
38
|
-
city: {
|
|
39
|
-
label: 'City',
|
|
40
|
-
type: 'string',
|
|
41
|
-
description: 'The city of the user.'
|
|
42
|
-
},
|
|
43
|
-
country: {
|
|
44
|
-
label: 'Country',
|
|
45
|
-
type: 'string',
|
|
46
|
-
description: 'The country of the user.'
|
|
47
|
-
},
|
|
48
|
-
state: {
|
|
49
|
-
label: 'State',
|
|
50
|
-
type: 'string',
|
|
51
|
-
description: 'The state of the user.'
|
|
52
|
-
},
|
|
53
|
-
postalCode: {
|
|
54
|
-
label: 'Postal Code',
|
|
55
|
-
type: 'string',
|
|
56
|
-
description: 'The postal code of the user.'
|
|
57
|
-
},
|
|
58
|
-
birthday: {
|
|
59
|
-
label: 'Birthday',
|
|
60
|
-
type: 'string',
|
|
61
|
-
description: 'The birthday of the user.'
|
|
62
|
-
}
|
|
10
|
+
...common_fields_1.common_fields,
|
|
11
|
+
previous_id: {
|
|
12
|
+
label: 'Previous ID',
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: "The user's previous ID, for alias events",
|
|
15
|
+
default: {
|
|
16
|
+
'@path': '$.previousId'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
email: {
|
|
20
|
+
label: 'Email',
|
|
21
|
+
description: 'The email address of the user.',
|
|
22
|
+
type: 'string',
|
|
23
|
+
format: 'email',
|
|
24
|
+
required: {
|
|
25
|
+
conditions: [{ fieldKey: 'previous_id', operator: 'is', value: undefined }]
|
|
63
26
|
},
|
|
64
27
|
default: {
|
|
65
|
-
|
|
66
|
-
'@
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
28
|
+
'@if': {
|
|
29
|
+
exists: { '@path': '$.traits.email' },
|
|
30
|
+
then: { '@path': '$.traits.email' },
|
|
31
|
+
else: { '@path': '$.context.traits.email' }
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
standard_traits: {
|
|
36
|
+
...common_fields_1.common_fields.standard_traits,
|
|
37
|
+
default: {
|
|
38
|
+
first_name: {
|
|
73
39
|
'@if': {
|
|
74
40
|
exists: { '@path': '$.traits.first_name' },
|
|
75
41
|
then: { '@path': '$.traits.first_name' },
|
|
76
42
|
else: { '@path': '$.context.traits.first_name' }
|
|
77
43
|
}
|
|
78
44
|
},
|
|
79
|
-
|
|
45
|
+
last_name: {
|
|
80
46
|
'@if': {
|
|
81
47
|
exists: { '@path': '$.traits.last_name' },
|
|
82
48
|
then: { '@path': '$.traits.last_name' },
|
|
@@ -90,6 +56,13 @@ const action = {
|
|
|
90
56
|
else: { '@path': '$.context.traits.phone' }
|
|
91
57
|
}
|
|
92
58
|
},
|
|
59
|
+
address: {
|
|
60
|
+
'@if': {
|
|
61
|
+
exists: { '@path': '$.traits.address.street' },
|
|
62
|
+
then: { '@path': '$.traits.address.street' },
|
|
63
|
+
else: { '@path': '$.context.traits.address.street' }
|
|
64
|
+
}
|
|
65
|
+
},
|
|
93
66
|
city: {
|
|
94
67
|
'@if': {
|
|
95
68
|
exists: { '@path': '$.traits.address.city' },
|
|
@@ -111,75 +84,56 @@ const action = {
|
|
|
111
84
|
else: { '@path': '$.context.traits.address.state' }
|
|
112
85
|
}
|
|
113
86
|
},
|
|
114
|
-
|
|
87
|
+
postal_code: {
|
|
115
88
|
'@if': {
|
|
116
|
-
exists: { '@path': '$.traits.address.
|
|
117
|
-
then: { '@path': '$.traits.address.
|
|
118
|
-
else: { '@path': '$.context.traits.address.
|
|
89
|
+
exists: { '@path': '$.traits.address.postal_code' },
|
|
90
|
+
then: { '@path': '$.traits.address.postal_code' },
|
|
91
|
+
else: { '@path': '$.context.traits.address.postal_code' }
|
|
119
92
|
}
|
|
120
93
|
},
|
|
121
|
-
|
|
94
|
+
timezone: {
|
|
122
95
|
'@if': {
|
|
123
|
-
exists: { '@path': '$.traits.
|
|
124
|
-
then: { '@path': '$.traits.
|
|
125
|
-
else: { '@path': '$.context.traits.
|
|
96
|
+
exists: { '@path': '$.traits.timezone' },
|
|
97
|
+
then: { '@path': '$.traits.timezone' },
|
|
98
|
+
else: { '@path': '$.context.traits.timezone' }
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
birth_day: {
|
|
102
|
+
'@if': {
|
|
103
|
+
exists: { '@path': '$.traits.birth_day' },
|
|
104
|
+
then: { '@path': '$.traits.birth_day' },
|
|
105
|
+
else: { '@path': '$.context.traits.birth_day' }
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
birth_month: {
|
|
109
|
+
'@if': {
|
|
110
|
+
exists: { '@path': '$.traits.birth_month' },
|
|
111
|
+
then: { '@path': '$.traits.birth_month' },
|
|
112
|
+
else: { '@path': '$.context.traits.birth_month' }
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
birth_year: {
|
|
116
|
+
'@if': {
|
|
117
|
+
exists: { '@path': '$.traits.birth_year' },
|
|
118
|
+
then: { '@path': '$.traits.birth_year' },
|
|
119
|
+
else: { '@path': '$.context.traits.birth_year' }
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
birth_date: {
|
|
123
|
+
'@if': {
|
|
124
|
+
exists: { '@path': '$.traits.birth_date' },
|
|
125
|
+
then: { '@path': '$.traits.birth_date' },
|
|
126
|
+
else: { '@path': '$.context.traits.birth_date' }
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
|
-
},
|
|
130
|
-
user_id: {
|
|
131
|
-
label: 'Segment User ID',
|
|
132
|
-
description: 'The ID of the user in Segment',
|
|
133
|
-
type: 'string',
|
|
134
|
-
default: {
|
|
135
|
-
'@if': {
|
|
136
|
-
exists: { '@path': '$.userId' },
|
|
137
|
-
then: { '@path': '$.userId' },
|
|
138
|
-
else: { '@path': '$.anonymousId' }
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
previous_id: {
|
|
143
|
-
label: 'Previous ID',
|
|
144
|
-
type: 'string',
|
|
145
|
-
description: "The user's previous ID, for alias events",
|
|
146
|
-
default: {
|
|
147
|
-
'@path': '$.previousId'
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
event_type: {
|
|
151
|
-
label: 'Event Type',
|
|
152
|
-
description: 'The Segment event type (identify, alias, etc.)',
|
|
153
|
-
type: 'string',
|
|
154
|
-
default: {
|
|
155
|
-
'@path': '$.type'
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
enable_batching: {
|
|
159
|
-
type: 'boolean',
|
|
160
|
-
label: 'Batch Profiles',
|
|
161
|
-
unsafe_hidden: true,
|
|
162
|
-
description: 'When enabled, Segment will batch profiles together and send them to StackAdapt in a single request.',
|
|
163
|
-
required: true,
|
|
164
|
-
default: true
|
|
165
|
-
},
|
|
166
|
-
advertiser_id: {
|
|
167
|
-
label: 'Advertiser',
|
|
168
|
-
description: 'The StackAdapt advertiser to add the profile to.',
|
|
169
|
-
type: 'string',
|
|
170
|
-
disabledInputMethods: ['literal', 'variable', 'function', 'freeform', 'enrichment'],
|
|
171
|
-
required: true,
|
|
172
|
-
dynamic: true
|
|
173
130
|
}
|
|
174
131
|
},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
},
|
|
178
|
-
perform: async (request, { payload }) => {
|
|
179
|
-
return await (0, functions_1.performForwardProfiles)(request, [payload]);
|
|
132
|
+
perform: async (request, { settings, payload }) => {
|
|
133
|
+
return await (0, common_functions_1.send)(request, [payload], settings, false);
|
|
180
134
|
},
|
|
181
|
-
performBatch: async (request, { payload }) => {
|
|
182
|
-
return await (0,
|
|
135
|
+
performBatch: async (request, { settings, payload }) => {
|
|
136
|
+
return await (0, common_functions_1.send)(request, payload, settings, false);
|
|
183
137
|
}
|
|
184
138
|
};
|
|
185
139
|
exports.default = action;
|