@segment/action-destinations 3.218.0 → 3.220.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/braze/updateUserProfile/index.js +6 -1
- package/dist/destinations/braze/updateUserProfile/index.js.map +1 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +8 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +0 -1
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +1 -2
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +1 -1
- package/dist/destinations/fullstory/identifyUserV2/generated-types.d.ts +1 -1
- package/dist/destinations/fullstory/identifyUserV2/index.js +1 -1
- package/dist/destinations/fullstory/identifyUserV2/index.js.map +1 -1
- package/dist/destinations/fullstory/index.js +1 -1
- package/dist/destinations/fullstory/index.js.map +1 -1
- package/dist/destinations/fullstory/request-params.d.ts +2 -2
- package/dist/destinations/fullstory/request-params.js +6 -6
- package/dist/destinations/fullstory/request-params.js.map +1 -1
- package/dist/destinations/fullstory/trackEventV2/generated-types.d.ts +1 -1
- package/dist/destinations/fullstory/trackEventV2/index.js +1 -1
- package/dist/destinations/fullstory/trackEventV2/index.js.map +1 -1
- package/dist/destinations/hyperengage/commonFields.d.ts +3 -0
- package/dist/destinations/hyperengage/commonFields.js +165 -0
- package/dist/destinations/hyperengage/commonFields.js.map +1 -0
- package/dist/destinations/hyperengage/generated-types.d.ts +4 -0
- package/dist/destinations/hyperengage/generated-types.js +3 -0
- package/dist/destinations/hyperengage/generated-types.js.map +1 -0
- package/dist/destinations/hyperengage/group/generated-types.d.ts +35 -0
- package/dist/destinations/hyperengage/group/generated-types.js +3 -0
- package/dist/destinations/hyperengage/group/generated-types.js.map +1 -0
- package/dist/destinations/hyperengage/group/index.d.ts +5 -0
- package/dist/destinations/hyperengage/group/index.js +81 -0
- package/dist/destinations/hyperengage/group/index.js.map +1 -0
- package/dist/destinations/hyperengage/identify/generated-types.d.ts +36 -0
- package/dist/destinations/hyperengage/identify/generated-types.js +3 -0
- package/dist/destinations/hyperengage/identify/generated-types.js.map +1 -0
- package/dist/destinations/hyperengage/identify/index.d.ts +5 -0
- package/dist/destinations/hyperengage/identify/index.js +110 -0
- package/dist/destinations/hyperengage/identify/index.js.map +1 -0
- package/dist/destinations/hyperengage/index.d.ts +4 -0
- package/dist/destinations/hyperengage/index.js +72 -0
- package/dist/destinations/hyperengage/index.js.map +1 -0
- package/dist/destinations/hyperengage/track/generated-types.d.ts +32 -0
- package/dist/destinations/hyperengage/track/generated-types.js +3 -0
- package/dist/destinations/hyperengage/track/generated-types.js.map +1 -0
- package/dist/destinations/hyperengage/track/index.d.ts +5 -0
- package/dist/destinations/hyperengage/track/index.js +54 -0
- package/dist/destinations/hyperengage/track/index.js.map +1 -0
- package/dist/destinations/hyperengage/validateInput.d.ts +2 -0
- package/dist/destinations/hyperengage/validateInput.js +90 -0
- package/dist/destinations/hyperengage/validateInput.js.map +1 -0
- package/dist/destinations/index.js +2 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/pinterest-conversions/pinterest-capi-custom-data.js +1 -1
- package/dist/destinations/pinterest-conversions/pinterest-capi-custom-data.js.map +1 -1
- package/dist/destinations/pinterest-conversions/reportConversionEvent/generated-types.d.ts +1 -1
- package/dist/destinations/the-trade-desk-crm/awsClient.d.ts +0 -1
- package/dist/destinations/the-trade-desk-crm/awsClient.js +0 -1
- package/dist/destinations/the-trade-desk-crm/awsClient.js.map +1 -1
- package/dist/destinations/the-trade-desk-crm/functions.js +7 -50
- package/dist/destinations/the-trade-desk-crm/functions.js.map +1 -1
- package/dist/destinations/the-trade-desk-crm/generated-types.d.ts +1 -1
- package/dist/destinations/the-trade-desk-crm/index.js +2 -1
- package/dist/destinations/the-trade-desk-crm/index.js.map +1 -1
- package/dist/destinations/the-trade-desk-crm/properties.d.ts +0 -2
- package/dist/destinations/the-trade-desk-crm/properties.js +1 -18
- package/dist/destinations/the-trade-desk-crm/properties.js.map +1 -1
- package/dist/destinations/the-trade-desk-crm/syncAudience/generated-types.d.ts +0 -2
- package/dist/destinations/the-trade-desk-crm/syncAudience/index.js +0 -2
- package/dist/destinations/the-trade-desk-crm/syncAudience/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/addToAudience/index.js +2 -9
- package/dist/destinations/tiktok-audiences/addToAudience/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/addUser/index.js +2 -9
- package/dist/destinations/tiktok-audiences/addUser/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/constants.d.ts +1 -1
- package/dist/destinations/tiktok-audiences/constants.js +1 -1
- package/dist/destinations/tiktok-audiences/constants.js.map +1 -1
- package/dist/destinations/tiktok-audiences/removeFromAudience/index.js +2 -9
- package/dist/destinations/tiktok-audiences/removeFromAudience/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/removeUser/index.js +2 -9
- package/dist/destinations/tiktok-audiences/removeUser/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/constants.d.ts +2 -0
- package/dist/destinations/yahoo-audiences/constants.js +6 -0
- package/dist/destinations/yahoo-audiences/constants.js.map +1 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.d.ts +4 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.js +3 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.js.map +1 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.d.ts +5 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.js +33 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.js.map +1 -0
- package/dist/destinations/yahoo-audiences/createSegment/generated-types.d.ts +6 -0
- package/dist/destinations/yahoo-audiences/createSegment/generated-types.js +3 -0
- package/dist/destinations/yahoo-audiences/createSegment/generated-types.js.map +1 -0
- package/dist/destinations/yahoo-audiences/createSegment/index.d.ts +5 -0
- package/dist/destinations/yahoo-audiences/createSegment/index.js +45 -0
- package/dist/destinations/yahoo-audiences/createSegment/index.js.map +1 -0
- package/dist/destinations/yahoo-audiences/generated-types.d.ts +12 -0
- package/dist/destinations/yahoo-audiences/generated-types.js +3 -0
- package/dist/destinations/yahoo-audiences/generated-types.js.map +1 -0
- package/dist/destinations/yahoo-audiences/index.d.ts +4 -0
- package/dist/destinations/yahoo-audiences/index.js +155 -0
- package/dist/destinations/yahoo-audiences/index.js.map +1 -0
- package/dist/destinations/yahoo-audiences/types.d.ts +25 -0
- package/dist/destinations/yahoo-audiences/types.js +3 -0
- package/dist/destinations/yahoo-audiences/types.js.map +1 -0
- package/dist/destinations/yahoo-audiences/updateSegment/generated-types.d.ts +16 -0
- package/dist/destinations/yahoo-audiences/updateSegment/generated-types.js +3 -0
- package/dist/destinations/yahoo-audiences/updateSegment/generated-types.js.map +1 -0
- package/dist/destinations/yahoo-audiences/updateSegment/index.d.ts +5 -0
- package/dist/destinations/yahoo-audiences/updateSegment/index.js +163 -0
- package/dist/destinations/yahoo-audiences/updateSegment/index.js.map +1 -0
- package/dist/destinations/yahoo-audiences/utils-rt.d.ts +10 -0
- package/dist/destinations/yahoo-audiences/utils-rt.js +103 -0
- package/dist/destinations/yahoo-audiences/utils-rt.js.map +1 -0
- package/dist/destinations/yahoo-audiences/utils-tax.d.ts +10 -0
- package/dist/destinations/yahoo-audiences/utils-tax.js +78 -0
- package/dist/destinations/yahoo-audiences/utils-tax.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
7
|
+
const utils_rt_1 = require("./utils-rt");
|
|
8
|
+
const updateSegment_1 = __importDefault(require("./updateSegment"));
|
|
9
|
+
const createSegment_1 = __importDefault(require("./createSegment"));
|
|
10
|
+
const createCustomerNode_1 = __importDefault(require("./createCustomerNode"));
|
|
11
|
+
const utils_tax_1 = require("./utils-tax");
|
|
12
|
+
const destination = {
|
|
13
|
+
name: 'Yahoo Audiences',
|
|
14
|
+
slug: 'actions-yahoo-audiences',
|
|
15
|
+
mode: 'cloud',
|
|
16
|
+
description: 'Sync Segment Engage Audiences to Yahoo Ads',
|
|
17
|
+
authentication: {
|
|
18
|
+
scheme: 'oauth2',
|
|
19
|
+
fields: {
|
|
20
|
+
mdm_id: {
|
|
21
|
+
label: 'MDM ID',
|
|
22
|
+
description: 'Yahoo MDM ID provided by Yahoo representative',
|
|
23
|
+
type: 'string',
|
|
24
|
+
required: true
|
|
25
|
+
},
|
|
26
|
+
taxonomy_client_key: {
|
|
27
|
+
label: 'Yahoo Taxonomy API client Id',
|
|
28
|
+
description: 'Taxonomy API client Id. Required to update Yahoo taxonomy',
|
|
29
|
+
type: 'string',
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
taxonomy_client_secret: {
|
|
33
|
+
label: 'Yahoo Taxonomy API client secret',
|
|
34
|
+
description: 'Taxonomy API client secret. Required to update Yahoo taxonomy',
|
|
35
|
+
type: 'password',
|
|
36
|
+
required: true
|
|
37
|
+
},
|
|
38
|
+
engage_space_id: {
|
|
39
|
+
label: 'Engage Space Id',
|
|
40
|
+
description: 'Engage Space Id found in Unify > Settings > API Access',
|
|
41
|
+
type: 'string',
|
|
42
|
+
required: true
|
|
43
|
+
},
|
|
44
|
+
customer_desc: {
|
|
45
|
+
label: 'Customer Description',
|
|
46
|
+
description: 'Engage space name and description',
|
|
47
|
+
type: 'string',
|
|
48
|
+
required: false
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
testAuthentication: async (request, { settings }) => {
|
|
52
|
+
const tx_creds = {
|
|
53
|
+
tx_client_key: settings.taxonomy_client_key,
|
|
54
|
+
tx_client_secret: settings.taxonomy_client_secret
|
|
55
|
+
};
|
|
56
|
+
const data = {
|
|
57
|
+
engage_space_id: settings.engage_space_id,
|
|
58
|
+
customer_desc: settings.customer_desc
|
|
59
|
+
};
|
|
60
|
+
const body_form_data = utils_tax_1.gen_customer_taxonomy_payload(settings, data);
|
|
61
|
+
await utils_tax_1.update_taxonomy('', tx_creds, request, body_form_data);
|
|
62
|
+
},
|
|
63
|
+
refreshAccessToken: async (request, { auth }) => {
|
|
64
|
+
const rt_client_key = JSON.parse(auth.clientId)['rt_api'];
|
|
65
|
+
const rt_client_secret = JSON.parse(auth.clientSecret)['rt_api'];
|
|
66
|
+
const jwt = utils_rt_1.generate_jwt(rt_client_key, rt_client_secret);
|
|
67
|
+
const res = await request('https://id.b2b.yahooinc.com/identity/oauth2/access_token', {
|
|
68
|
+
method: 'POST',
|
|
69
|
+
body: new URLSearchParams({
|
|
70
|
+
client_assertion: jwt,
|
|
71
|
+
client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',
|
|
72
|
+
grant_type: 'client_credentials',
|
|
73
|
+
scope: 'audience',
|
|
74
|
+
realm: 'dataxonline'
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
const rt_access_token = res.data.access_token;
|
|
78
|
+
return { accessToken: rt_access_token };
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
audienceFields: {
|
|
82
|
+
audience_id: {
|
|
83
|
+
type: 'string',
|
|
84
|
+
label: 'Audience Id',
|
|
85
|
+
description: 'Segment Audience Id (aud_...)',
|
|
86
|
+
required: true
|
|
87
|
+
},
|
|
88
|
+
audience_key: {
|
|
89
|
+
label: 'Audience key',
|
|
90
|
+
description: 'Segment Audience Key',
|
|
91
|
+
type: 'string',
|
|
92
|
+
required: true
|
|
93
|
+
},
|
|
94
|
+
identifier: {
|
|
95
|
+
label: 'User Identifier',
|
|
96
|
+
description: 'Specify the identifier(s) to send to Yahoo',
|
|
97
|
+
type: 'string',
|
|
98
|
+
required: true,
|
|
99
|
+
default: 'email',
|
|
100
|
+
choices: [
|
|
101
|
+
{ value: 'email', label: 'Send email' },
|
|
102
|
+
{ value: 'maid', label: 'Send MAID' },
|
|
103
|
+
{ value: 'email_maid', label: 'Send email and/or MAID' }
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
audienceConfig: {
|
|
108
|
+
mode: {
|
|
109
|
+
type: 'synced',
|
|
110
|
+
full_audience_sync: false
|
|
111
|
+
},
|
|
112
|
+
async createAudience(request, createAudienceInput) {
|
|
113
|
+
const audience_id = createAudienceInput.audienceSettings?.audience_id;
|
|
114
|
+
const audience_key = createAudienceInput.audienceSettings?.audience_key;
|
|
115
|
+
const engage_space_id = createAudienceInput.settings?.engage_space_id;
|
|
116
|
+
const identifier = createAudienceInput.audienceSettings?.identifier;
|
|
117
|
+
if (!audience_id) {
|
|
118
|
+
throw new actions_core_1.IntegrationError('Create Audience: missing audience Id value', 'MISSING_REQUIRED_FIELD', 400);
|
|
119
|
+
}
|
|
120
|
+
if (!audience_key) {
|
|
121
|
+
throw new actions_core_1.IntegrationError('Create Audience: missing audience key value', 'MISSING_REQUIRED_FIELD', 400);
|
|
122
|
+
}
|
|
123
|
+
if (!engage_space_id) {
|
|
124
|
+
throw new actions_core_1.IntegrationError('Create Audience: missing Engage space Id type value', 'MISSING_REQUIRED_FIELD', 400);
|
|
125
|
+
}
|
|
126
|
+
const input = {
|
|
127
|
+
segment_audience_id: audience_id,
|
|
128
|
+
segment_audience_key: audience_key,
|
|
129
|
+
engage_space_id: engage_space_id,
|
|
130
|
+
identifier: identifier
|
|
131
|
+
};
|
|
132
|
+
const body_form_data = utils_tax_1.gen_segment_subtaxonomy_payload(input);
|
|
133
|
+
const tx_creds = {
|
|
134
|
+
tx_client_key: createAudienceInput.settings.taxonomy_client_key,
|
|
135
|
+
tx_client_secret: createAudienceInput.settings.taxonomy_client_secret
|
|
136
|
+
};
|
|
137
|
+
await utils_tax_1.update_taxonomy(engage_space_id, tx_creds, request, body_form_data);
|
|
138
|
+
return { externalId: audience_id };
|
|
139
|
+
},
|
|
140
|
+
async getAudience(_, getAudienceInput) {
|
|
141
|
+
const audience_id = getAudienceInput.audienceSettings?.audience_id;
|
|
142
|
+
if (!audience_id) {
|
|
143
|
+
throw new actions_core_1.IntegrationError('Missing audience_id value', 'MISSING_REQUIRED_FIELD', 400);
|
|
144
|
+
}
|
|
145
|
+
return { externalId: audience_id };
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
actions: {
|
|
149
|
+
updateSegment: updateSegment_1.default,
|
|
150
|
+
createSegment: createSegment_1.default,
|
|
151
|
+
createCustomerNode: createCustomerNode_1.default
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
exports.default = destination;
|
|
155
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/yahoo-audiences/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAwD;AAExD,yCAAyC;AACzC,oEAA2C;AAC3C,oEAA2C;AAC3C,8EAAqD;AACrD,2CAA6G;AAM7G,MAAM,WAAW,GAA8D;IAC7E,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,4CAA4C;IACzD,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,+CAA+C;gBAC5D,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,mBAAmB,EAAE;gBACnB,KAAK,EAAE,8BAA8B;gBACrC,WAAW,EAAE,2DAA2D;gBACxE,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,sBAAs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F;YACD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,CAAA;QACpC,CAAC;KACF;IAED,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;QACb,aAAa,EAAb,uBAAa;QACb,kBAAkB,EAAlB,4BAAkB;KACnB;CACF,CAAA;AACD,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface CredsObj {
|
|
2
|
+
tx_client_key: string;
|
|
3
|
+
tx_client_secret: string;
|
|
4
|
+
}
|
|
5
|
+
export interface TaxonomyObject {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
users: {
|
|
10
|
+
include: [string];
|
|
11
|
+
};
|
|
12
|
+
subTaxonomy: [
|
|
13
|
+
{
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
type: string;
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
export interface YahooPayload {
|
|
21
|
+
schema: Array<string>;
|
|
22
|
+
data: Array<unknown>;
|
|
23
|
+
gdpr: boolean;
|
|
24
|
+
gdpr_euconsent?: string | undefined;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/yahoo-audiences/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
segment_audience_id: string;
|
|
3
|
+
segment_audience_key: string;
|
|
4
|
+
event_attributes: {
|
|
5
|
+
[k: string]: unknown;
|
|
6
|
+
};
|
|
7
|
+
segment_computation_action: string;
|
|
8
|
+
enable_batching?: boolean;
|
|
9
|
+
batch_size?: number;
|
|
10
|
+
email?: string;
|
|
11
|
+
advertising_id?: string;
|
|
12
|
+
device_type?: string;
|
|
13
|
+
identifier: string;
|
|
14
|
+
gdpr_flag: boolean;
|
|
15
|
+
gdpr_euconsent?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/updateSegment/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ActionDefinition } from '@segment/actions-core';
|
|
2
|
+
import type { Settings, AudienceSettings } from '../generated-types';
|
|
3
|
+
import type { Payload } from './generated-types';
|
|
4
|
+
declare const action: ActionDefinition<Settings, Payload, AudienceSettings>;
|
|
5
|
+
export default action;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
+
const utils_rt_1 = require("../utils-rt");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Sync To Yahoo Ads Segment',
|
|
7
|
+
description: 'Sync Segment Audience to Yahoo Ads Segment',
|
|
8
|
+
defaultSubscription: 'type = "identify"',
|
|
9
|
+
fields: {
|
|
10
|
+
segment_audience_id: {
|
|
11
|
+
label: 'Segment Audience Id',
|
|
12
|
+
description: 'Segment Audience Id (aud_...). Maps to "Id" of a Segment node in Yahoo taxonomy',
|
|
13
|
+
type: 'hidden',
|
|
14
|
+
required: true,
|
|
15
|
+
default: {
|
|
16
|
+
'@path': '$.context.personas.computation_id'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
segment_audience_key: {
|
|
20
|
+
label: 'Segment Audience Key',
|
|
21
|
+
description: 'Segment Audience Key. Maps to the "Name" of the Segment node in Yahoo taxonomy',
|
|
22
|
+
type: 'hidden',
|
|
23
|
+
required: true,
|
|
24
|
+
default: {
|
|
25
|
+
'@path': '$.context.personas.computation_key'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
event_attributes: {
|
|
29
|
+
label: 'Event traits or properties. Do not modify this setting',
|
|
30
|
+
description: 'Event traits or properties. Do not modify this setting',
|
|
31
|
+
type: 'object',
|
|
32
|
+
readOnly: true,
|
|
33
|
+
required: true,
|
|
34
|
+
default: {
|
|
35
|
+
'@if': {
|
|
36
|
+
exists: { '@path': '$.properties' },
|
|
37
|
+
then: { '@path': '$.properties' },
|
|
38
|
+
else: { '@path': '$.traits' }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
segment_computation_action: {
|
|
43
|
+
label: 'Segment Computation Action',
|
|
44
|
+
description: "Segment computation class used to determine if input event is from an Engage Audience'. Value must be = 'audience'.",
|
|
45
|
+
type: 'hidden',
|
|
46
|
+
required: true,
|
|
47
|
+
default: {
|
|
48
|
+
'@path': '$.context.personas.computation_class'
|
|
49
|
+
},
|
|
50
|
+
choices: [{ label: 'audience', value: 'audience' }]
|
|
51
|
+
},
|
|
52
|
+
enable_batching: {
|
|
53
|
+
label: 'Enable Batching',
|
|
54
|
+
description: 'Enable batching of requests',
|
|
55
|
+
type: 'boolean',
|
|
56
|
+
default: true,
|
|
57
|
+
unsafe_hidden: true
|
|
58
|
+
},
|
|
59
|
+
batch_size: {
|
|
60
|
+
label: 'Batch Size',
|
|
61
|
+
description: 'Maximum number of events to include in each batch. Actual batch sizes may be lower.',
|
|
62
|
+
type: 'number',
|
|
63
|
+
unsafe_hidden: true,
|
|
64
|
+
default: 1000
|
|
65
|
+
},
|
|
66
|
+
email: {
|
|
67
|
+
label: 'User Email',
|
|
68
|
+
description: 'Email address of a user',
|
|
69
|
+
type: 'hidden',
|
|
70
|
+
required: false,
|
|
71
|
+
default: {
|
|
72
|
+
'@if': {
|
|
73
|
+
exists: { '@path': '$.traits.email' },
|
|
74
|
+
then: { '@path': '$.traits.email' },
|
|
75
|
+
else: { '@path': '$.properties.email' }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
advertising_id: {
|
|
80
|
+
label: 'User Mobile Advertising ID',
|
|
81
|
+
description: "User's mobile advertising Id",
|
|
82
|
+
type: 'hidden',
|
|
83
|
+
default: {
|
|
84
|
+
'@path': '$.context.device.advertisingId'
|
|
85
|
+
},
|
|
86
|
+
required: false
|
|
87
|
+
},
|
|
88
|
+
device_type: {
|
|
89
|
+
label: 'User Mobile Device Type',
|
|
90
|
+
description: "User's mobile device type",
|
|
91
|
+
type: 'hidden',
|
|
92
|
+
default: {
|
|
93
|
+
'@path': '$.context.device.type'
|
|
94
|
+
},
|
|
95
|
+
required: false
|
|
96
|
+
},
|
|
97
|
+
identifier: {
|
|
98
|
+
label: 'User Identifier',
|
|
99
|
+
description: 'Specify the identifier(s) to send to Yahoo',
|
|
100
|
+
type: 'string',
|
|
101
|
+
required: true,
|
|
102
|
+
default: 'email',
|
|
103
|
+
choices: [
|
|
104
|
+
{ value: 'email', label: 'Send email' },
|
|
105
|
+
{ value: 'maid', label: 'Send MAID' },
|
|
106
|
+
{ value: 'email_maid', label: 'Send email and/or MAID' }
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
gdpr_flag: {
|
|
110
|
+
label: 'GDPR Flag',
|
|
111
|
+
description: 'Set to true to indicate that audience data is subject to GDPR regulations',
|
|
112
|
+
type: 'boolean',
|
|
113
|
+
required: true,
|
|
114
|
+
default: false
|
|
115
|
+
},
|
|
116
|
+
gdpr_euconsent: {
|
|
117
|
+
label: 'GDPR Consent Attributes',
|
|
118
|
+
description: 'Required if GDPR flag is set to "true". Using IAB Purpose bit descriptions specify the following user consent attributes: "Storage and Access of Information", "Personalization"',
|
|
119
|
+
type: 'string',
|
|
120
|
+
required: false
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
perform: (request, { payload, auth, audienceSettings }) => {
|
|
124
|
+
const rt_access_token = auth?.accessToken;
|
|
125
|
+
if (!audienceSettings) {
|
|
126
|
+
throw new actions_core_1.IntegrationError('Bad Request: no audienceSettings found.', 'INVALID_REQUEST_DATA', 400);
|
|
127
|
+
}
|
|
128
|
+
const body = utils_rt_1.gen_update_segment_payload([payload], audienceSettings);
|
|
129
|
+
if (body.data.length > 0) {
|
|
130
|
+
return request('https://dataxonline.yahoo.com/online/audience/', {
|
|
131
|
+
method: 'POST',
|
|
132
|
+
json: body,
|
|
133
|
+
headers: {
|
|
134
|
+
Authorization: `Bearer ${rt_access_token}`
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
throw new actions_core_1.PayloadValidationError('Email and / or Advertising Id not available in the profile(s)');
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
performBatch: (request, { payload, audienceSettings, auth }) => {
|
|
143
|
+
const rt_access_token = auth?.accessToken;
|
|
144
|
+
if (!audienceSettings) {
|
|
145
|
+
throw new actions_core_1.IntegrationError('Bad Request: no audienceSettings found.', 'INVALID_REQUEST_DATA', 400);
|
|
146
|
+
}
|
|
147
|
+
const body = utils_rt_1.gen_update_segment_payload(payload, audienceSettings);
|
|
148
|
+
if (body.data.length > 0) {
|
|
149
|
+
return request('https://dataxonline.yahoo.com/online/audience/', {
|
|
150
|
+
method: 'POST',
|
|
151
|
+
json: body,
|
|
152
|
+
headers: {
|
|
153
|
+
Authorization: `Bearer ${rt_access_token}`
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
throw new actions_core_1.PayloadValidationError('Email and / or Advertising Id not available in the profile(s)');
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
exports.default = action;
|
|
163
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/updateSegment/index.ts"],"names":[],"mappings":";;AACA,wDAAgF;AAGhF,0CAAwD;AAExD,MAAM,MAAM,GAA0D;IACpE,KAAK,EAAE,2BAA2B;IAClC,WAAW,EAAE,4CAA4C;IACzD,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,mBAAmB,EAAE;YACnB,KAAK,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AE;iBAC3C;aACF,CAAC,CAAA;SACH;aAAM;YACL,MAAM,IAAI,qCAAsB,CAAC,+DAA+D,CAAC,CAAA;SAClG;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Payload } from './updateSegment/generated-types';
|
|
2
|
+
import { YahooPayload } from './types';
|
|
3
|
+
import { AudienceSettings } from './generated-types';
|
|
4
|
+
export declare function create_hash(input: string | undefined): string | undefined;
|
|
5
|
+
export declare function generate_jwt(client_id: string, client_secret: string): string;
|
|
6
|
+
export declare function get_id_schema(payload: Payload, audienceSettings: AudienceSettings): {
|
|
7
|
+
maid: boolean;
|
|
8
|
+
email: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function gen_update_segment_payload(payloads: Payload[], audienceSettings: AudienceSettings): YahooPayload;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gen_update_segment_payload = exports.get_id_schema = exports.generate_jwt = exports.create_hash = void 0;
|
|
4
|
+
const crypto_1 = require("crypto");
|
|
5
|
+
const utils_tax_1 = require("./utils-tax");
|
|
6
|
+
function create_hash(input) {
|
|
7
|
+
if (input === undefined)
|
|
8
|
+
return;
|
|
9
|
+
return crypto_1.createHash('sha256').update(input).digest('hex');
|
|
10
|
+
}
|
|
11
|
+
exports.create_hash = create_hash;
|
|
12
|
+
function generate_jwt(client_id, client_secret) {
|
|
13
|
+
const random_id = utils_tax_1.gen_random_id(24);
|
|
14
|
+
const current_time = Math.floor(new Date().getTime() / 1000);
|
|
15
|
+
const url = 'https://id.b2b.yahooinc.com/identity/oauth2/access_token';
|
|
16
|
+
const jwt_payload = {
|
|
17
|
+
iss: client_id,
|
|
18
|
+
sub: client_id,
|
|
19
|
+
aud: url + '?realm=dataxonline',
|
|
20
|
+
jti: random_id,
|
|
21
|
+
exp: current_time + 3600,
|
|
22
|
+
iat: current_time
|
|
23
|
+
};
|
|
24
|
+
const jwt_header = {
|
|
25
|
+
alg: 'HS256',
|
|
26
|
+
typ: 'JWT'
|
|
27
|
+
};
|
|
28
|
+
const jwt_header_encoded = Buffer.from(JSON.stringify(jwt_header)).toString('base64');
|
|
29
|
+
const jwt_payload_encoded = Buffer.from(JSON.stringify(jwt_payload)).toString('base64');
|
|
30
|
+
const jwt_head_payload = jwt_header_encoded + '.' + jwt_payload_encoded;
|
|
31
|
+
const hash = crypto_1.createHmac('sha256', client_secret);
|
|
32
|
+
const signature = hash.update(jwt_head_payload).digest('base64');
|
|
33
|
+
const jwt = jwt_head_payload + '.' + signature;
|
|
34
|
+
return jwt;
|
|
35
|
+
}
|
|
36
|
+
exports.generate_jwt = generate_jwt;
|
|
37
|
+
function get_id_schema(payload, audienceSettings) {
|
|
38
|
+
const schema = {
|
|
39
|
+
email: false,
|
|
40
|
+
maid: false
|
|
41
|
+
};
|
|
42
|
+
let id_type;
|
|
43
|
+
audienceSettings.identifier ? (id_type = audienceSettings.identifier) : (id_type = payload.identifier);
|
|
44
|
+
if (id_type == 'email') {
|
|
45
|
+
schema.email = true;
|
|
46
|
+
}
|
|
47
|
+
if (id_type == 'maid') {
|
|
48
|
+
schema.maid = true;
|
|
49
|
+
}
|
|
50
|
+
if (id_type == 'email_maid') {
|
|
51
|
+
schema.maid = true;
|
|
52
|
+
schema.email = true;
|
|
53
|
+
}
|
|
54
|
+
return schema;
|
|
55
|
+
}
|
|
56
|
+
exports.get_id_schema = get_id_schema;
|
|
57
|
+
function gen_update_segment_payload(payloads, audienceSettings) {
|
|
58
|
+
const schema = get_id_schema(payloads[0], audienceSettings);
|
|
59
|
+
const data = [];
|
|
60
|
+
for (const event of payloads) {
|
|
61
|
+
let hashed_email = '';
|
|
62
|
+
if (schema.email === true && event.email) {
|
|
63
|
+
hashed_email = create_hash(event.email);
|
|
64
|
+
}
|
|
65
|
+
let idfa = '';
|
|
66
|
+
let gpsaid = '';
|
|
67
|
+
if (schema.maid === true && event.advertising_id) {
|
|
68
|
+
switch (event.device_type) {
|
|
69
|
+
case 'ios':
|
|
70
|
+
idfa = event.advertising_id;
|
|
71
|
+
break;
|
|
72
|
+
case 'android':
|
|
73
|
+
gpsaid = event.advertising_id;
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (hashed_email == '' && idfa == '' && gpsaid == '') {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const ts = Math.floor(new Date().getTime() / 1000);
|
|
81
|
+
const seg_key = event.segment_audience_key;
|
|
82
|
+
let exp;
|
|
83
|
+
if (event.event_attributes[seg_key] === true) {
|
|
84
|
+
exp = ts + 90 * 24 * 60 * 60;
|
|
85
|
+
}
|
|
86
|
+
if (event.event_attributes[seg_key] === false) {
|
|
87
|
+
exp = 0;
|
|
88
|
+
}
|
|
89
|
+
const seg_id = event.segment_audience_id;
|
|
90
|
+
data.push([hashed_email, idfa, gpsaid, 'exp=' + exp + '&seg_id=' + seg_id + '&ts=' + ts]);
|
|
91
|
+
}
|
|
92
|
+
const yahoo_payload = {
|
|
93
|
+
schema: ['SHA256EMAIL', 'IDFA', 'GPADVID', 'SEGMENTS'],
|
|
94
|
+
data: data,
|
|
95
|
+
gdpr: payloads[0].gdpr_flag
|
|
96
|
+
};
|
|
97
|
+
if (payloads[0].gdpr_flag) {
|
|
98
|
+
yahoo_payload.gdpr_euconsent = payloads[0].gdpr_euconsent;
|
|
99
|
+
}
|
|
100
|
+
return yahoo_payload;
|
|
101
|
+
}
|
|
102
|
+
exports.gen_update_segment_payload = gen_update_segment_payload;
|
|
103
|
+
//# sourceMappingURL=utils-rt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-rt.js","sourceRoot":"","sources":["../../../src/destinations/yahoo-audiences/utils-rt.ts"],"names":[],"mappings":";;;AAAA,mCAA+C;AAG/C,2CAA2C;AAQ3C,SAAgB,WAAW,CAAC,KAAyB;I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SAAS,EAAE;QACzB,aAAa,CAAC,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,CAAA;KAC1D;IAED,OAAO,aAAa,CAAA;AACtB,CAAC;AAnDD,gEAmDC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Payload as SegmentNodePayload } from './createSegment/generated-types';
|
|
2
|
+
import { Payload as CustomerNodePayload } from './createCustomerNode/generated-types';
|
|
3
|
+
import type { Settings } from './generated-types';
|
|
4
|
+
import { CredsObj } from './types';
|
|
5
|
+
import { RequestClient } from '@segment/actions-core';
|
|
6
|
+
export declare function gen_customer_taxonomy_payload(settings: Settings, payload: CustomerNodePayload): string;
|
|
7
|
+
export declare function gen_segment_subtaxonomy_payload(payload: SegmentNodePayload): string;
|
|
8
|
+
export declare function gen_random_id(length: number): string;
|
|
9
|
+
export declare function gen_oauth1_signature(client_key: string, client_secret: string, method: string, url: string): string;
|
|
10
|
+
export declare function update_taxonomy(engage_space_id: string, tx_creds: CredsObj, request: RequestClient, body_form_data: string): Promise<any>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.update_taxonomy = exports.gen_oauth1_signature = exports.gen_random_id = exports.gen_segment_subtaxonomy_payload = exports.gen_customer_taxonomy_payload = void 0;
|
|
4
|
+
const crypto_1 = require("crypto");
|
|
5
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
6
|
+
function gen_customer_taxonomy_payload(settings, payload) {
|
|
7
|
+
const data = {
|
|
8
|
+
id: payload.engage_space_id,
|
|
9
|
+
name: payload.engage_space_id,
|
|
10
|
+
description: payload.customer_desc,
|
|
11
|
+
users: {
|
|
12
|
+
include: [settings.mdm_id]
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const req_body_form = `--SEGMENT-DATA\r\nContent-Disposition: form-data; name="metadata"\r\nContent-Type: application/json;charset=UTF-8\r\n\r\n{ "description" : "${payload.customer_desc}" }\r\n--SEGMENT-DATA\r\nContent-Disposition: form-data; name="data"\r\nContent-Type: application/json;charset=UTF-8\r\n\r\n${JSON.stringify(data)}\r\n--SEGMENT-DATA--`;
|
|
16
|
+
return req_body_form;
|
|
17
|
+
}
|
|
18
|
+
exports.gen_customer_taxonomy_payload = gen_customer_taxonomy_payload;
|
|
19
|
+
function gen_segment_subtaxonomy_payload(payload) {
|
|
20
|
+
const data = {
|
|
21
|
+
id: payload.segment_audience_id,
|
|
22
|
+
name: payload.segment_audience_key,
|
|
23
|
+
type: 'SEGMENT'
|
|
24
|
+
};
|
|
25
|
+
const req_body_form = `--SEGMENT-DATA\r\nContent-Disposition: form-data; name="metadata"\r\nContent-Type: application/json;charset=UTF-8\r\n\r\n{ "description" : "${payload.customer_desc}" }\r\n--SEGMENT-DATA\r\nContent-Disposition: form-data; name="data"\r\nContent-Type: application/json;charset=UTF-8\r\n\r\n${JSON.stringify(data)}\r\n--SEGMENT-DATA--`;
|
|
26
|
+
return req_body_form;
|
|
27
|
+
}
|
|
28
|
+
exports.gen_segment_subtaxonomy_payload = gen_segment_subtaxonomy_payload;
|
|
29
|
+
function gen_random_id(length) {
|
|
30
|
+
const pattern = 'abcdefghijklmnopqrstuvwxyz123456789';
|
|
31
|
+
const random_id = [];
|
|
32
|
+
for (let i = 0; i < length; i++) {
|
|
33
|
+
random_id.push(pattern[Math.floor(Math.random() * pattern.length)]);
|
|
34
|
+
}
|
|
35
|
+
return random_id.join('');
|
|
36
|
+
}
|
|
37
|
+
exports.gen_random_id = gen_random_id;
|
|
38
|
+
function gen_oauth1_signature(client_key, client_secret, method, url) {
|
|
39
|
+
const timestamp = Math.floor(new Date().getTime() / 1000);
|
|
40
|
+
const nonce = gen_random_id(15);
|
|
41
|
+
const param_string = `oauth_consumer_key=${encodeURIComponent(client_key)}&oauth_nonce=${encodeURIComponent(nonce)}&oauth_signature_method=${encodeURIComponent('HMAC-SHA1')}&oauth_timestamp=${encodeURIComponent(timestamp)}&oauth_version=${encodeURIComponent('1.0')}`;
|
|
42
|
+
const base_string = `${method.toUpperCase()}&${encodeURIComponent(url)}&${encodeURIComponent(param_string)}`;
|
|
43
|
+
const encoded_client_secret = encodeURIComponent(client_secret);
|
|
44
|
+
const signature = encodeURIComponent(crypto_1.createHmac('sha1', encoded_client_secret + '&')
|
|
45
|
+
.update(base_string)
|
|
46
|
+
.digest('base64'));
|
|
47
|
+
const oauth1_auth_string = `OAuth oauth_consumer_key="${client_key}", oauth_nonce="${nonce}", oauth_signature="${signature}", oauth_signature_method="HMAC-SHA1", oauth_timestamp="${timestamp}", oauth_version="1.0"`;
|
|
48
|
+
return oauth1_auth_string;
|
|
49
|
+
}
|
|
50
|
+
exports.gen_oauth1_signature = gen_oauth1_signature;
|
|
51
|
+
async function update_taxonomy(engage_space_id, tx_creds, request, body_form_data) {
|
|
52
|
+
const tx_client_secret = tx_creds.tx_client_secret;
|
|
53
|
+
const tx_client_key = tx_creds.tx_client_key;
|
|
54
|
+
const url = `https://datax.yahooapis.com/v1/taxonomy/append${engage_space_id.length > 0 ? '/' + engage_space_id : ''}`;
|
|
55
|
+
const oauth1_auth_string = gen_oauth1_signature(tx_client_key, tx_client_secret, 'PUT', url);
|
|
56
|
+
try {
|
|
57
|
+
const add_segment_node = await request(url, {
|
|
58
|
+
method: 'PUT',
|
|
59
|
+
body: body_form_data,
|
|
60
|
+
headers: {
|
|
61
|
+
Authorization: oauth1_auth_string,
|
|
62
|
+
'Content-Type': 'multipart/form-data; boundary=SEGMENT-DATA'
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
return await add_segment_node.json();
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
const _error = error;
|
|
69
|
+
if (parseInt(_error.response.status) == 401) {
|
|
70
|
+
throw new actions_core_1.IntegrationError(`Error while updating taxonomy: ${JSON.stringify(_error.response.data)} ${_error.response.status}. Validate Yahoo credentials`, 'YAHOO_TAXONOMY_API_AUTH_ERR', 400);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
throw error;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.update_taxonomy = update_taxonomy;
|
|
78
|
+
//# sourceMappingURL=utils-tax.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-tax.js","sourceRoot":"","sources":["../../../src/destinations/yahoo-audiences/utils-tax.ts"],"names":[],"mappings":";;;AAGA,mCAAmC;AAEnC,wDAAuE;AAEvE,SAAgB,6BAA6B,CAAC,QAAkB,EAAE,OAA4B;IAC5F,MAAM,IAAI,GAAG;QACX,EAAE,EAAE,OAAO,CAAC,eAAe;QAC3B,IAAI,EAAE,OAAO,CAAC,eAAe;QAC7B,WAAW,EAAE,OAAO,CAAC,aAAa;QAClC,KAAK,EAAE;YACL,OAAO,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;SAC3B;KACF,CAAA;IAED,MAAM,aAAa,GAAG,+IACpB,OAAO,CAAC,aACV,+HAA+H,IAAI,CAAC,SAAS,CAC3I,IAAI,CACL,sBAAsB,CAAA;IACvB,OAAO,aAAa,CAAA;AACtB,CAAC;AAhBD,sEAgBC;AAED,SAAgB,+BAA+B,CAAC,OAA2B;IACzE,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,+IACpB,OAAO,CAAC,aACV,+HAA+H,IAAI,CAAC,SAAS,CAC3I,IAAI,CACL,sBAAsB,CAAA;IACvB,OAAO,aAAa,CAAA;AACtB,CAAC;AAZD,0EAYC;AAED,SAAgB,aAAa,CAAC,MAAc;IAC1C,MAAM,OAAO,GAAG,qCAAqC,CAAA;IACrD,MAAM,SAAS,GAAa,EAAE,CAAA;IAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG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Ae,CACnC,eAAuB,EACvB,QAAkB,EAClB,OAAsB,EACtB,cAAsB;IAEtB,MAAM,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAA;IAClD,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAA;IAC5C,MAAM,GAAG,GAAG,iDAAiD,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAA;IACtH,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,aAAa,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,CAAC,CAAA;IAC5F,IAAI;QACF,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,GAAG,EAAE;YAC1C,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE;gBACP,aAAa,EAAE,kBAAkB;gBACjC,cAAc,EAAE,4CAA4C;aAC7D;SACF,CAAC,CAAA;QACF,OAAO,MAAM,gBAAgB,CAAC,IAAI,EAAE,CAAA;KACrC;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,MAAM,GAAG,KAAwD,CAAA;QAGvE,IAAI,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,GAAG,EAAE;YAC3C,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;SACF;aAAM;YACL,MAAM,KAAK,CAAA;SACZ;KACF;AACH,CAAC;AApCD,0CAoCC"}
|
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.220.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"__tests__/__helpers__/"
|
|
78
78
|
]
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "fa3afde967611b4b689a4120ec6927404d373485"
|
|
81
81
|
}
|