@segment/action-destinations 3.227.5-staging.0 → 3.227.6-staging.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
- package/dist/destinations/klaviyo/properties.js +4 -1
- package/dist/destinations/klaviyo/properties.js.map +1 -1
- package/dist/destinations/klaviyo/removeProfileToList/index.js +4 -2
- package/dist/destinations/klaviyo/removeProfileToList/index.js.map +1 -1
- package/dist/destinations/linkedin-conversions/api/api.test.d.ts +1 -0
- package/dist/destinations/linkedin-conversions/api/api.test.js +220 -0
- package/dist/destinations/linkedin-conversions/api/api.test.js.map +1 -0
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.js +2 -9
- package/dist/destinations/yahoo-audiences/createCustomerNode/index.js.map +1 -1
- package/dist/destinations/yahoo-audiences/createSegment/index.js +2 -9
- package/dist/destinations/yahoo-audiences/createSegment/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/destinations/movable-ink/categoryView/generated-types.d.ts +0 -22
- package/dist/destinations/movable-ink/categoryView/generated-types.js +0 -3
- package/dist/destinations/movable-ink/categoryView/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/categoryView/index.d.ts +0 -5
- package/dist/destinations/movable-ink/categoryView/index.js +0 -43
- package/dist/destinations/movable-ink/categoryView/index.js.map +0 -1
- package/dist/destinations/movable-ink/conversion/generated-types.d.ts +0 -20
- package/dist/destinations/movable-ink/conversion/generated-types.js +0 -3
- package/dist/destinations/movable-ink/conversion/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/conversion/index.d.ts +0 -5
- package/dist/destinations/movable-ink/conversion/index.js +0 -45
- package/dist/destinations/movable-ink/conversion/index.js.map +0 -1
- package/dist/destinations/movable-ink/fields.d.ts +0 -21
- package/dist/destinations/movable-ink/fields.js +0 -236
- package/dist/destinations/movable-ink/fields.js.map +0 -1
- package/dist/destinations/movable-ink/identify/generated-types.d.ts +0 -7
- package/dist/destinations/movable-ink/identify/generated-types.js +0 -3
- package/dist/destinations/movable-ink/identify/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/identify/index.d.ts +0 -5
- package/dist/destinations/movable-ink/identify/index.js +0 -32
- package/dist/destinations/movable-ink/identify/index.js.map +0 -1
- package/dist/destinations/movable-ink/productAdded/generated-types.d.ts +0 -22
- package/dist/destinations/movable-ink/productAdded/generated-types.js +0 -3
- package/dist/destinations/movable-ink/productAdded/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/productAdded/index.d.ts +0 -5
- package/dist/destinations/movable-ink/productAdded/index.js +0 -43
- package/dist/destinations/movable-ink/productAdded/index.js.map +0 -1
- package/dist/destinations/movable-ink/productViewed/generated-types.d.ts +0 -21
- package/dist/destinations/movable-ink/productViewed/generated-types.js +0 -3
- package/dist/destinations/movable-ink/productViewed/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/productViewed/index.d.ts +0 -5
- package/dist/destinations/movable-ink/productViewed/index.js +0 -43
- package/dist/destinations/movable-ink/productViewed/index.js.map +0 -1
- package/dist/destinations/movable-ink/search/generated-types.d.ts +0 -12
- package/dist/destinations/movable-ink/search/generated-types.js +0 -3
- package/dist/destinations/movable-ink/search/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/search/index.d.ts +0 -5
- package/dist/destinations/movable-ink/search/index.js +0 -43
- package/dist/destinations/movable-ink/search/index.js.map +0 -1
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.d.ts +0 -25
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js +0 -3
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js.map +0 -1
- package/dist/destinations/movable-ink/sendCustomEvent/index.d.ts +0 -5
- package/dist/destinations/movable-ink/sendCustomEvent/index.js +0 -48
- package/dist/destinations/movable-ink/sendCustomEvent/index.js.map +0 -1
|
@@ -9,7 +9,7 @@ export declare const dateStringToFuzzyDate: (dateString: string | number) => fal
|
|
|
9
9
|
y: string;
|
|
10
10
|
};
|
|
11
11
|
export declare const augmentFieldsWithConstituentFields: (fields: Record<string, InputField>) => Record<string, InputField>;
|
|
12
|
-
export declare const splitConstituentPayload: (payload: CreateOrUpdateIndividualConstituentPayload) => (Partial<
|
|
12
|
+
export declare const splitConstituentPayload: (payload: CreateOrUpdateIndividualConstituentPayload) => (Partial<Address> | Partial<OnlinePresence> | Partial<Phone> | Partial<Constituent>)[];
|
|
13
13
|
export declare const buildConstituentPayloadFromPayload: (payload: StringIndexedObject) => Partial<CreateOrUpdateIndividualConstituentPayload>;
|
|
14
14
|
export declare const buildGiftDataFromPayload: (constituentId: string, payload: CreateGiftPayload) => Partial<Gift>;
|
|
15
15
|
export declare const buildConstituentActionDataFromPayload: (constituentId: string, payload: CreateConstituentAction) => Partial<ConstituentAction>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../src/destinations/klaviyo/properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,WAAW,GAAe;IACrC,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,sGAAsG;IACnH,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE;QACP,OAAO,EAAE,gCAAgC;KAC1C;IACD,aAAa,EAAE,IAAI;CACpB,CAAA;AAEY,QAAA,KAAK,GAAe;IAC/B,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,eAAe;IAC5B,IAAI,EAAE,QAAQ;
|
|
1
|
+
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../src/destinations/klaviyo/properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,WAAW,GAAe;IACrC,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,sGAAsG;IACnH,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE;QACP,OAAO,EAAE,gCAAgC;KAC1C;IACD,aAAa,EAAE,IAAI;CACpB,CAAA;AAEY,QAAA,KAAK,GAAe;IAC/B,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,eAAe;IAC5B,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE;QACP,OAAO,EAAE,gBAAgB;KAC1B;CACF,CAAA"}
|
|
@@ -18,12 +18,13 @@ const action = {
|
|
|
18
18
|
try {
|
|
19
19
|
const profileData = await functions_1.getProfile(request, email);
|
|
20
20
|
const v = JSON.parse(profileData.content);
|
|
21
|
-
if (
|
|
21
|
+
if (Object.keys(v).length !== 0) {
|
|
22
|
+
console.log(v);
|
|
22
23
|
const listData = {
|
|
23
24
|
data: [
|
|
24
25
|
{
|
|
25
26
|
type: 'profile',
|
|
26
|
-
id: v.id
|
|
27
|
+
id: v.data[0].id
|
|
27
28
|
}
|
|
28
29
|
]
|
|
29
30
|
};
|
|
@@ -33,6 +34,7 @@ const action = {
|
|
|
33
34
|
return;
|
|
34
35
|
}
|
|
35
36
|
catch (error) {
|
|
37
|
+
console.log(error);
|
|
36
38
|
throw new Error('An error occurred while processing the request');
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/removeProfileToList/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAK1E,4CAA6D;AAC7D,8CAAkD;AAElD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,0BAA0B;IACjC,WAAW,EAAE,0BAA0B;IACvC,MAAM,EAAE;QACN,KAAK,EAAE,EAAE,GAAG,kBAAK,EAAE;QACnB,OAAO,EAAE,EAAE,GAAG,wBAAW,EAAE;KAC5B;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACtC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,CAAA;QAClC,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO,EAAE;YACtB,MAAM,IAAI,+BAAgB,CACxB,sEAAsE,EACtE,yBAAyB,EACzB,GAAG,CACJ,CAAA;SACF;QACD,IAAI;YACF,MAAM,WAAW,GAA2B,MAAM,sBAAU,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;YAC5E,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;YACzC,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/klaviyo/removeProfileToList/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAK1E,4CAA6D;AAC7D,8CAAkD;AAElD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,0BAA0B;IACjC,WAAW,EAAE,0BAA0B;IACvC,MAAM,EAAE;QACN,KAAK,EAAE,EAAE,GAAG,kBAAK,EAAE;QACnB,OAAO,EAAE,EAAE,GAAG,wBAAW,EAAE;KAC5B;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACtC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,CAAA;QAClC,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO,EAAE;YACtB,MAAM,IAAI,+BAAgB,CACxB,sEAAsE,EACtE,yBAAyB,EACzB,GAAG,CACJ,CAAA;SACF;QACD,IAAI;YACF,MAAM,WAAW,GAA2B,MAAM,sBAAU,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;YAC5E,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;YACzC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC/B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;gBACd,MAAM,QAAQ,GAAa;oBACzB,IAAI,EAAE;wBACJ;4BACE,IAAI,EAAE,SAAS;4BACf,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;yBACjB;qBACF;iBACF,CAAA;gBAED,MAAM,IAAI,GAAG,MAAM,8BAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;gBAC3E,OAAO,IAAI,CAAA;aACZ;YACD,OAAM;SACP;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YAClB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;SAClE;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,220 @@
|
|
|
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 nock_1 = __importDefault(require("nock"));
|
|
7
|
+
const create_request_client_1 = __importDefault(require("../../../../../core/src/create-request-client"));
|
|
8
|
+
const api_1 = require("../api");
|
|
9
|
+
const constants_1 = require("../constants");
|
|
10
|
+
const requestClient = create_request_client_1.default();
|
|
11
|
+
describe('LinkedIn Conversions', () => {
|
|
12
|
+
describe('dynamicFields', () => {
|
|
13
|
+
const linkedIn = new api_1.LinkedInConversions(requestClient);
|
|
14
|
+
it('should fetch a list of ad accounts, with their names', async () => {
|
|
15
|
+
nock_1.default(`${constants_1.BASE_URL}`)
|
|
16
|
+
.get(`/adAccountUsers`)
|
|
17
|
+
.query({ q: 'authenticatedUser' })
|
|
18
|
+
.reply(200, {
|
|
19
|
+
elements: [
|
|
20
|
+
{
|
|
21
|
+
account: 'urn:li:sponsoredAccount:516413367',
|
|
22
|
+
changeAuditStamps: {
|
|
23
|
+
created: {
|
|
24
|
+
actor: 'urn:li:unknown:0',
|
|
25
|
+
time: 1500331577000
|
|
26
|
+
},
|
|
27
|
+
lastModified: {
|
|
28
|
+
actor: 'urn:li:unknown:0',
|
|
29
|
+
time: 1505328748000
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
role: 'ACCOUNT_BILLING_ADMIN',
|
|
33
|
+
user: 'urn:li:person:K1RwyVNukt',
|
|
34
|
+
version: {
|
|
35
|
+
versionTag: '89'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
account: 'urn:li:sponsoredAccount:516880883',
|
|
40
|
+
changeAuditStamps: {
|
|
41
|
+
created: {
|
|
42
|
+
actor: 'urn:li:unknown:0',
|
|
43
|
+
time: 1505326590000
|
|
44
|
+
},
|
|
45
|
+
lastModified: {
|
|
46
|
+
actor: 'urn:li:unknown:0',
|
|
47
|
+
time: 1505326615000
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
role: 'ACCOUNT_BILLING_ADMIN',
|
|
51
|
+
user: 'urn:li:person:K1RwyVNukt',
|
|
52
|
+
version: {
|
|
53
|
+
versionTag: '3'
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
paging: {
|
|
58
|
+
count: 2,
|
|
59
|
+
links: [],
|
|
60
|
+
start: 0,
|
|
61
|
+
total: 2
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
const getAdAccountsRes = await linkedIn.getAdAccounts();
|
|
65
|
+
expect(getAdAccountsRes).toEqual({
|
|
66
|
+
choices: [
|
|
67
|
+
{
|
|
68
|
+
label: 'ACCOUNT_BILLING_ADMIN',
|
|
69
|
+
value: 'urn:li:sponsoredAccount:516413367'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: 'ACCOUNT_BILLING_ADMIN',
|
|
73
|
+
value: 'urn:li:sponsoredAccount:516880883'
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
it('should fetch a list of conversion rules', async () => {
|
|
79
|
+
const payload = {
|
|
80
|
+
adAccountId: '123456'
|
|
81
|
+
};
|
|
82
|
+
nock_1.default(`${constants_1.BASE_URL}`)
|
|
83
|
+
.get(`/conversions`)
|
|
84
|
+
.query({ q: 'account', account: payload.adAccountId })
|
|
85
|
+
.reply(200, {
|
|
86
|
+
elements: [
|
|
87
|
+
{
|
|
88
|
+
postClickAttributionWindowSize: 30,
|
|
89
|
+
viewThroughAttributionWindowSize: 7,
|
|
90
|
+
created: 1563230311551,
|
|
91
|
+
type: 'LEAD',
|
|
92
|
+
enabled: true,
|
|
93
|
+
name: 'Conversion API Segment 2',
|
|
94
|
+
lastModified: 1563230311551,
|
|
95
|
+
id: 104012,
|
|
96
|
+
attributionType: 'LAST_TOUCH_BY_CAMPAIGN',
|
|
97
|
+
conversionMethod: 'CONVERSIONS_API',
|
|
98
|
+
account: 'urn:li:sponsoredAccount:51234560'
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
postClickAttributionWindowSize: 30,
|
|
102
|
+
viewThroughAttributionWindowSize: 7,
|
|
103
|
+
created: 1563230255308,
|
|
104
|
+
type: 'PURCHASE',
|
|
105
|
+
enabled: true,
|
|
106
|
+
name: 'Conversion API Segment 3',
|
|
107
|
+
lastModified: 1563230265652,
|
|
108
|
+
id: 104004,
|
|
109
|
+
attributionType: 'LAST_TOUCH_BY_CAMPAIGN',
|
|
110
|
+
conversionMethod: 'CONVERSIONS_API',
|
|
111
|
+
account: 'urn:li:sponsoredAccount:51234560'
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
});
|
|
115
|
+
const getConversionRulesListRes = await linkedIn.getConversionRulesList(payload.adAccountId);
|
|
116
|
+
expect(getConversionRulesListRes).toEqual({
|
|
117
|
+
choices: [
|
|
118
|
+
{
|
|
119
|
+
label: 'Conversion API Segment 2',
|
|
120
|
+
value: 104012
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
label: 'Conversion API Segment 3',
|
|
124
|
+
value: 104004
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
it('should fetch a list of campaigns', async () => {
|
|
130
|
+
const payload = {
|
|
131
|
+
adAccountId: '123456'
|
|
132
|
+
};
|
|
133
|
+
nock_1.default(`${constants_1.BASE_URL}`)
|
|
134
|
+
.get(`/adAccounts/${payload.adAccountId}/adCampaigns?q=search&search=(status:(values:List(ACTIVE)))`)
|
|
135
|
+
.reply(200, {
|
|
136
|
+
paging: {
|
|
137
|
+
start: 0,
|
|
138
|
+
count: 10,
|
|
139
|
+
links: [],
|
|
140
|
+
total: 1
|
|
141
|
+
},
|
|
142
|
+
elements: [
|
|
143
|
+
{
|
|
144
|
+
test: false,
|
|
145
|
+
storyDeliveryEnabled: false,
|
|
146
|
+
format: 'TEXT_AD',
|
|
147
|
+
targetingCriteria: {
|
|
148
|
+
include: {
|
|
149
|
+
and: [
|
|
150
|
+
{
|
|
151
|
+
or: {
|
|
152
|
+
'urn:li:adTargetingFacet:locations': ['urn:li:geo:90000084']
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
or: {
|
|
157
|
+
'urn:li:adTargetingFacet:interfaceLocales': ['urn:li:locale:en_US']
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
servingStatuses: ['ACCOUNT_SERVING_HOLD'],
|
|
164
|
+
locale: {
|
|
165
|
+
country: 'US',
|
|
166
|
+
language: 'en'
|
|
167
|
+
},
|
|
168
|
+
type: 'TEXT_AD',
|
|
169
|
+
version: {
|
|
170
|
+
versionTag: '11'
|
|
171
|
+
},
|
|
172
|
+
objectiveType: 'WEBSITE_TRAFFIC',
|
|
173
|
+
associatedEntity: 'urn:li:organization:2425698',
|
|
174
|
+
optimizationTargetType: 'NONE',
|
|
175
|
+
runSchedule: {
|
|
176
|
+
start: 1498178362345
|
|
177
|
+
},
|
|
178
|
+
changeAuditStamps: {
|
|
179
|
+
created: {
|
|
180
|
+
actor: 'urn:li:unknown:0',
|
|
181
|
+
time: 1498178304000
|
|
182
|
+
},
|
|
183
|
+
lastModified: {
|
|
184
|
+
actor: 'urn:li:unknown:0',
|
|
185
|
+
time: 1698494362000
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
campaignGroup: 'urn:li:sponsoredCampaignGroup:600360846',
|
|
189
|
+
dailyBudget: {
|
|
190
|
+
currencyCode: 'USD',
|
|
191
|
+
amount: '25'
|
|
192
|
+
},
|
|
193
|
+
costType: 'CPC',
|
|
194
|
+
creativeSelection: 'OPTIMIZED',
|
|
195
|
+
unitCost: {
|
|
196
|
+
currencyCode: 'USD',
|
|
197
|
+
amount: '8.19'
|
|
198
|
+
},
|
|
199
|
+
name: 'Test',
|
|
200
|
+
offsiteDeliveryEnabled: false,
|
|
201
|
+
id: 125868226,
|
|
202
|
+
audienceExpansionEnabled: true,
|
|
203
|
+
account: 'urn:li:sponsoredAccount:507525021',
|
|
204
|
+
status: 'ACTIVE'
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
});
|
|
208
|
+
const getCampaignsListRes = await linkedIn.getCampaignsList(payload.adAccountId);
|
|
209
|
+
expect(getCampaignsListRes).toEqual({
|
|
210
|
+
choices: [
|
|
211
|
+
{
|
|
212
|
+
label: 'Test',
|
|
213
|
+
value: 125868226
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
//# sourceMappingURL=api.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.test.js","sourceRoot":"","sources":["../../../../src/destinations/linkedin-conversions/api/api.test.ts"],"names":[],"mappings":";;;;;AAAA,gDAAuB;AACvB,0GAA+E;AAC/E,gCAA4C;AAC5C,4CAAuC;AAEvC,MAAM,aAAa,GAAG,+BAAmB,EAAE,CAAA;AAE3C,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC7B,MAAM,QAAQ,GA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EAAE;4BACX,KAAK,EAAE,aAAa;yBACrB;wBACD,iBAAiB,EAAE;4BACjB,OAAO,EAAE;gCACP,KAAK,EAAE,kBAAkB;gCACzB,IAAI,EAAE,aAAa;6BACpB;4BACD,YAAY,EAAE;gCACZ,KAAK,EAAE,kBAAkB;gCACzB,IAAI,EAAE,aAAa;6BACpB;yBACF;wBACD,aAAa,EAAE,yCAAyC;wBACxD,WAAW,EAAE;4BACX,YAAY,EAAE,KAAK;4BACnB,MAAM,EAAE,IAAI;yBACb;wBACD,QAAQ,EAAE,KAAK;wBACf,iBAAiB,EAAE,WAAW;wBAC9B,QAAQ,EAAE;4BACR,YAAY,EAAE,KAAK;4BACnB,MAAM,EAAE,MAAM;yBACf;wBACD,IAAI,EAAE,MAAM;wBACZ,sBAAsB,EAAE,KAAK;wBAC7B,EAAE,EAAE,SAAS;wBACb,wBAAwB,EAAE,IAAI;wBAC9B,OAAO,EAAE,mCAAmC;wBAC5C,MAAM,EAAE,QAAQ;qBACjB;iBACF;aACF,CAAC,CAAA;YAEJ,MAAM,mBAAmB,GAAG,MAAM,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;YAChF,MAAM,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC;gBAClC,OAAO,EAAE;oBACP;wBACE,KAAK,EAAE,MAAM;wBACb,KAAK,EAAE,SAAS;qBACjB;iBACF;aACF,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_tax_1 = require("../utils-tax");
|
|
4
|
-
const utils_tax_2 = require("../utils-tax");
|
|
5
3
|
const action = {
|
|
6
4
|
title: 'Create top-level CUSTOMER node in Yahoo taxonomy',
|
|
7
5
|
defaultSubscription: 'event = "Audience Entered" and event = "Audience Exited"',
|
|
@@ -20,13 +18,8 @@ const action = {
|
|
|
20
18
|
required: false
|
|
21
19
|
}
|
|
22
20
|
},
|
|
23
|
-
perform:
|
|
24
|
-
|
|
25
|
-
tx_client_key: settings.taxonomy_client_key,
|
|
26
|
-
tx_client_secret: settings.taxonomy_client_secret
|
|
27
|
-
};
|
|
28
|
-
const taxonomy_payload = utils_tax_1.gen_customer_taxonomy_payload(settings, payload);
|
|
29
|
-
return await utils_tax_2.update_taxonomy('', tx_creds, request, taxonomy_payload);
|
|
21
|
+
perform: () => {
|
|
22
|
+
return;
|
|
30
23
|
}
|
|
31
24
|
};
|
|
32
25
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createCustomerNode/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createCustomerNode/index.ts"],"names":[],"mappings":";;AAMA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kDAAkD;IACzD,mBAAmB,EAAE,0DAA0D;IAC/E,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN,eAAe,EAAE;YACf,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,mJAAmJ;YACrJ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,aAAa,EAAE;YACb,KAAK,EAAE,sBAAsB;YAC7B,WAAW,EACT,uGAAuG;YACzG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;SAChB;KACF;IASD,OAAO,EAAE,GAAG,EAAE;QACZ,OAAM;IACR,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_tax_1 = require("../utils-tax");
|
|
4
|
-
const utils_tax_2 = require("../utils-tax");
|
|
5
3
|
const action = {
|
|
6
4
|
title: 'Create SEGMENT sub-node in Yahoo taxonomy',
|
|
7
5
|
description: 'Use this action to generate SEGMENT sub-node within CUSTOMER node in Yahoo taxonomy',
|
|
@@ -32,13 +30,8 @@ const action = {
|
|
|
32
30
|
required: false
|
|
33
31
|
}
|
|
34
32
|
},
|
|
35
|
-
perform:
|
|
36
|
-
|
|
37
|
-
tx_client_key: settings.taxonomy_client_key,
|
|
38
|
-
tx_client_secret: settings.taxonomy_client_secret
|
|
39
|
-
};
|
|
40
|
-
const body_form_data = utils_tax_1.gen_segment_subtaxonomy_payload(payload);
|
|
41
|
-
return await utils_tax_2.update_taxonomy(String(payload.engage_space_id), tx_creds, request, body_form_data);
|
|
33
|
+
perform: () => {
|
|
34
|
+
return;
|
|
42
35
|
}
|
|
43
36
|
};
|
|
44
37
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createSegment/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/yahoo-audiences/createSegment/index.ts"],"names":[],"mappings":";;AAQA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,2CAA2C;IAClD,WAAW,EAAE,qFAAqF;IAClG,mBAAmB,EAAE,0DAA0D;IAE/E,MAAM,EAAE;QACN,oBAAoB,EAAE;YACpB,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,qFAAqF;YAClG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,mBAAmB,EAAE;YACnB,KAAK,EAAE,aAAa;YACpB,WAAW,EACT,gIAAgI;YAClI,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,eAAe,EAAE;YACf,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,yNAAyN;YAC3N,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;SAChB;QACD,aAAa,EAAE;YACb,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EAAE,oGAAoG;YACjH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;SAChB;KACF;IAUD,OAAO,EAAE,GAAG,EAAE;QACZ,OAAM;IACR,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segment/action-destinations",
|
|
3
3
|
"description": "Destination Actions engine and definitions.",
|
|
4
|
-
"version": "3.227.
|
|
4
|
+
"version": "3.227.6-staging.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface Payload {
|
|
2
|
-
movable_ink_url?: string;
|
|
3
|
-
user_id?: string;
|
|
4
|
-
anonymous_id?: string;
|
|
5
|
-
timestamp: string | number;
|
|
6
|
-
timezone?: string;
|
|
7
|
-
products_required_false?: {
|
|
8
|
-
id: string;
|
|
9
|
-
title?: string;
|
|
10
|
-
price?: number;
|
|
11
|
-
url?: string;
|
|
12
|
-
quantity?: number;
|
|
13
|
-
[k: string]: unknown;
|
|
14
|
-
}[];
|
|
15
|
-
categories: {
|
|
16
|
-
id: string;
|
|
17
|
-
url?: string;
|
|
18
|
-
}[];
|
|
19
|
-
meta?: {
|
|
20
|
-
[k: string]: unknown;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/categoryView/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,43 +0,0 @@
|
|
|
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 fields_1 = require("../fields");
|
|
8
|
-
const omit_1 = __importDefault(require("lodash/omit"));
|
|
9
|
-
const action = {
|
|
10
|
-
title: 'Category View',
|
|
11
|
-
description: 'Send a "Category View" event to Movable Ink',
|
|
12
|
-
defaultSubscription: 'type = "track" and event = "Category Viewed"',
|
|
13
|
-
fields: {
|
|
14
|
-
movable_ink_url: fields_1.movable_ink_url,
|
|
15
|
-
user_id: fields_1.user_id,
|
|
16
|
-
anonymous_id: fields_1.anonymous_id,
|
|
17
|
-
timestamp: fields_1.timestamp,
|
|
18
|
-
timezone: fields_1.timezone,
|
|
19
|
-
products_required_false: fields_1.products_required_false,
|
|
20
|
-
categories: fields_1.categories,
|
|
21
|
-
meta: fields_1.meta
|
|
22
|
-
},
|
|
23
|
-
perform: (request, { settings, payload }) => {
|
|
24
|
-
const url = payload?.movable_ink_url ?? settings?.movable_ink_url;
|
|
25
|
-
if (!url)
|
|
26
|
-
throw new actions_core_1.IntegrationError('"Movable Ink URL" setting or "Movable Ink URL" field must be populated', 'MISSING_DESTINATION_URL', 400);
|
|
27
|
-
return request(url, {
|
|
28
|
-
method: 'POST',
|
|
29
|
-
json: {
|
|
30
|
-
event_name: 'Category View',
|
|
31
|
-
user_id: payload.user_id,
|
|
32
|
-
anonymous_id: payload.anonymous_id,
|
|
33
|
-
timestamp: payload.timestamp,
|
|
34
|
-
timezone: payload.timezone,
|
|
35
|
-
product: payload.products_required_false,
|
|
36
|
-
categories: payload.categories,
|
|
37
|
-
metadata: { ...omit_1.default(payload.meta, ['products_required_false', 'categories']) }
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
exports.default = action;
|
|
43
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.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1,20 +0,0 @@
|
|
|
1
|
-
export interface Payload {
|
|
2
|
-
movable_ink_url?: string;
|
|
3
|
-
user_id?: string;
|
|
4
|
-
anonymous_id?: string;
|
|
5
|
-
timestamp: string | number;
|
|
6
|
-
timezone?: string;
|
|
7
|
-
products: {
|
|
8
|
-
id: string;
|
|
9
|
-
title?: string;
|
|
10
|
-
price?: number;
|
|
11
|
-
url?: string;
|
|
12
|
-
quantity?: number;
|
|
13
|
-
[k: string]: unknown;
|
|
14
|
-
}[];
|
|
15
|
-
order_id: string;
|
|
16
|
-
revenue: number;
|
|
17
|
-
meta?: {
|
|
18
|
-
[k: string]: unknown;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/conversion/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,45 +0,0 @@
|
|
|
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 fields_1 = require("../fields");
|
|
8
|
-
const omit_1 = __importDefault(require("lodash/omit"));
|
|
9
|
-
const action = {
|
|
10
|
-
title: 'Conversion',
|
|
11
|
-
description: 'Send a Conversion event Movable Ink',
|
|
12
|
-
defaultSubscription: 'type = "track" and event = "Order Completed"',
|
|
13
|
-
fields: {
|
|
14
|
-
movable_ink_url: fields_1.movable_ink_url,
|
|
15
|
-
user_id: fields_1.user_id,
|
|
16
|
-
anonymous_id: fields_1.anonymous_id,
|
|
17
|
-
timestamp: fields_1.timestamp,
|
|
18
|
-
timezone: fields_1.timezone,
|
|
19
|
-
products: fields_1.products,
|
|
20
|
-
order_id: fields_1.order_id,
|
|
21
|
-
revenue: fields_1.revenue,
|
|
22
|
-
meta: fields_1.meta
|
|
23
|
-
},
|
|
24
|
-
perform: (request, { settings, payload }) => {
|
|
25
|
-
const url = payload?.movable_ink_url ?? settings?.movable_ink_url;
|
|
26
|
-
if (!url)
|
|
27
|
-
throw new actions_core_1.IntegrationError('"Movable Ink URL" setting or "Movable Ink URL" field must be populated', 'MISSING_DESTINATION_URL', 400);
|
|
28
|
-
return request(url, {
|
|
29
|
-
method: 'POST',
|
|
30
|
-
json: {
|
|
31
|
-
event_name: 'Conversion',
|
|
32
|
-
user_id: payload.user_id,
|
|
33
|
-
anonymous_id: payload.anonymous_id,
|
|
34
|
-
timestamp: payload.timestamp,
|
|
35
|
-
timezone: payload.timezone,
|
|
36
|
-
products: payload.products,
|
|
37
|
-
order_id: payload.order_id,
|
|
38
|
-
revenue: payload.revenue,
|
|
39
|
-
metadata: { ...omit_1.default(payload.meta, ['products', 'order_id', 'revenue']) }
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
exports.default = action;
|
|
45
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/movable-ink/conversion/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA0E;AAG1E,sCAUkB;AAClB,uDAA8B;AAE9B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,qCAAqC;IAClD,mBAAmB,EAAE,8CAA8C;IACnE,MAAM,EAAE;QACN,eAAe,EAAf,wBAAe;QACf,OAAO,EAAP,gBAAO;QACP,YAAY,EAAZ,qBAAY;QACZ,SAAS,EAAT,kBAAS;QACT,QAAQ,EAAR,iBAAQ;QACR,QAAQ,EAAR,iBAAQ;QACR,QAAQ,EAAR,iBAAQ;QACR,OAAO,EAAP,gBAAO;QACP,IAAI,EAAJ,aAAI;KACL;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,MAAM,GAAG,GAAG,OAAO,EAAE,eAAe,IAAI,QAAQ,EAAE,eAAe,CAAA;QACjE,IAAI,CAAC,GAAG;YACN,MAAM,IAAI,+BAAgB,CACxB,wEAAwE,EACxE,yBAAyB,EACzB,GAAG,CACJ,CAAA;QAEH,OAAO,OAAO,CAAC,GAAG,EAAE;YAClB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,UAAU,EAAE,YAAY;gBACxB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,QAAQ,EAAE,EAAE,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,EAAE;aACzE;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { InputField } from '@segment/actions-core/destination-kit/types';
|
|
2
|
-
export declare const movable_ink_url: InputField;
|
|
3
|
-
export declare const timestamp: InputField;
|
|
4
|
-
export declare const timezone: InputField;
|
|
5
|
-
export declare const event_name: InputField;
|
|
6
|
-
export declare const user_id: InputField;
|
|
7
|
-
export declare const anonymous_id: InputField;
|
|
8
|
-
export declare const meta: InputField;
|
|
9
|
-
export declare const query_url: InputField;
|
|
10
|
-
export declare const revenue: InputField;
|
|
11
|
-
export declare const revenue_required_false: InputField;
|
|
12
|
-
export declare const query: InputField;
|
|
13
|
-
export declare const order_id: InputField;
|
|
14
|
-
export declare const order_id_required_false: InputField;
|
|
15
|
-
export declare const product_quantity: InputField;
|
|
16
|
-
export declare const product: InputField;
|
|
17
|
-
export declare const product_with_quantity: InputField;
|
|
18
|
-
export declare const products: InputField;
|
|
19
|
-
export declare const products_required_false: InputField;
|
|
20
|
-
export declare const categories: InputField;
|
|
21
|
-
export declare const categories_required_false: InputField;
|