@segment/action-destinations 3.30.2-alpha.6 → 3.31.1-alpha.2
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/amplitude/generated-types.d.ts +1 -0
- package/dist/destinations/amplitude/groupIdentifyUser/index.js +5 -4
- package/dist/destinations/amplitude/groupIdentifyUser/index.js.map +1 -1
- package/dist/destinations/amplitude/identifyUser/index.js +15 -14
- package/dist/destinations/amplitude/identifyUser/index.js.map +1 -1
- package/dist/destinations/amplitude/index.js +21 -2
- package/dist/destinations/amplitude/index.js.map +1 -1
- package/dist/destinations/amplitude/logEvent/index.js +2 -3
- package/dist/destinations/amplitude/logEvent/index.js.map +1 -1
- package/dist/destinations/amplitude/mapUser/index.js +5 -4
- package/dist/destinations/amplitude/mapUser/index.js.map +1 -1
- package/dist/destinations/amplitude/regional-endpoints.d.ts +32 -0
- package/dist/destinations/amplitude/regional-endpoints.js +39 -0
- package/dist/destinations/amplitude/regional-endpoints.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/custom/generated-types.d.ts +2 -2
- package/dist/destinations/facebook-conversions-api/custom/index.js +4 -5
- package/dist/destinations/facebook-conversions-api/custom/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/viewContent/generated-types.d.ts +5 -5
- package/dist/destinations/facebook-conversions-api/viewContent/index.js +5 -5
- package/dist/destinations/facebook-conversions-api/viewContent/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addPaymentInfo/generated-types.d.ts +1 -1
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js +8 -138
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToCart/generated-types.d.ts +1 -1
- package/dist/destinations/google-analytics-4/addToCart/index.js +6 -127
- package/dist/destinations/google-analytics-4/addToCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToWishlist/generated-types.d.ts +1 -1
- package/dist/destinations/google-analytics-4/addToWishlist/index.js +6 -125
- package/dist/destinations/google-analytics-4/addToWishlist/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/beginCheckout/generated-types.d.ts +1 -1
- package/dist/destinations/google-analytics-4/beginCheckout/index.js +7 -138
- package/dist/destinations/google-analytics-4/beginCheckout/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/customEvent/index.js +2 -13
- package/dist/destinations/google-analytics-4/customEvent/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-properties.d.ts +17 -0
- package/dist/destinations/google-analytics-4/ga4-properties.js +276 -0
- package/dist/destinations/google-analytics-4/ga4-properties.js.map +1 -0
- package/dist/destinations/google-analytics-4/generateLead/index.js +4 -23
- package/dist/destinations/google-analytics-4/generateLead/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/login/index.js +2 -13
- package/dist/destinations/google-analytics-4/login/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/pageView/index.js +2 -13
- package/dist/destinations/google-analytics-4/pageView/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/purchase/generated-types.d.ts +1 -1
- package/dist/destinations/google-analytics-4/purchase/index.js +11 -172
- package/dist/destinations/google-analytics-4/purchase/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/refund/index.js +9 -148
- package/dist/destinations/google-analytics-4/refund/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/removeFromCart/index.js +6 -125
- package/dist/destinations/google-analytics-4/removeFromCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/search/index.js +2 -13
- package/dist/destinations/google-analytics-4/search/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectItem/generated-types.d.ts +1 -1
- package/dist/destinations/google-analytics-4/selectItem/index.js +4 -114
- package/dist/destinations/google-analytics-4/selectItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectPromotion/generated-types.d.ts +4 -4
- package/dist/destinations/google-analytics-4/selectPromotion/index.js +13 -145
- package/dist/destinations/google-analytics-4/selectPromotion/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/signUp/index.js +2 -13
- package/dist/destinations/google-analytics-4/signUp/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewCart/index.js +6 -125
- package/dist/destinations/google-analytics-4/viewCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItem/generated-types.d.ts +1 -1
- package/dist/destinations/google-analytics-4/viewItem/index.js +6 -130
- package/dist/destinations/google-analytics-4/viewItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItemList/index.js +4 -115
- package/dist/destinations/google-analytics-4/viewItemList/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewPromotion/generated-types.d.ts +4 -4
- package/dist/destinations/google-analytics-4/viewPromotion/index.js +13 -154
- package/dist/destinations/google-analytics-4/viewPromotion/index.js.map +1 -1
- package/dist/destinations/slack/postToChannel/index.js +5 -5
- package/dist/destinations/slack/postToChannel/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const dayjs_1 = __importDefault(require("../../../lib/dayjs"));
|
|
7
|
+
const regional_endpoints_1 = require("../regional-endpoints");
|
|
7
8
|
const action = {
|
|
8
9
|
title: 'Group Identify User',
|
|
9
10
|
description: 'Set or update properties of particular groups. Note that these updates will only affect events going forward.',
|
|
@@ -54,13 +55,13 @@ const action = {
|
|
|
54
55
|
group_type: {
|
|
55
56
|
label: 'Group Type',
|
|
56
57
|
type: 'string',
|
|
57
|
-
description: '
|
|
58
|
+
description: 'The type of the group',
|
|
58
59
|
required: true
|
|
59
60
|
},
|
|
60
61
|
group_value: {
|
|
61
62
|
label: 'Group Value',
|
|
62
63
|
type: 'string',
|
|
63
|
-
description: '
|
|
64
|
+
description: 'The value of the group',
|
|
64
65
|
required: true
|
|
65
66
|
},
|
|
66
67
|
min_id_length: {
|
|
@@ -77,7 +78,7 @@ const action = {
|
|
|
77
78
|
if (min_id_length && min_id_length > 0) {
|
|
78
79
|
options = JSON.stringify({ min_id_length });
|
|
79
80
|
}
|
|
80
|
-
await request('
|
|
81
|
+
await request(regional_endpoints_1.getEndpointByRegion('identify', settings.endpoint), {
|
|
81
82
|
method: 'post',
|
|
82
83
|
body: new URLSearchParams({
|
|
83
84
|
api_key: settings.apiKey,
|
|
@@ -95,7 +96,7 @@ const action = {
|
|
|
95
96
|
options
|
|
96
97
|
})
|
|
97
98
|
});
|
|
98
|
-
return request('
|
|
99
|
+
return request(regional_endpoints_1.getEndpointByRegion('groupidentify', settings.endpoint), {
|
|
99
100
|
method: 'post',
|
|
100
101
|
body: new URLSearchParams({
|
|
101
102
|
api_key: settings.apiKey,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/amplitude/groupIdentifyUser/index.ts"],"names":[],"mappings":";;;;;AAGA,+DAAsC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/amplitude/groupIdentifyUser/index.ts"],"names":[],"mappings":";;;;;AAGA,+DAAsC;AACtC,8DAA2D;AAE3D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EACT,+GAA+G;IACjH,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EACT,uPAAuP;YACzP,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,oHAAoH;YACtH,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;oBAC1C,IAAI,EAAE,EAAE,OAAO,EAA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AM,OAAO,CAAC,wCAAmB,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE;YAChE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,eAAe,CAAC;gBACxB,OAAO,EAAE,QAAQ,CAAC,MAAM;gBACxB,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;oBAC7B;wBACE,SAAS,EAAE,OAAO,CAAC,SAAS;wBAC5B,MAAM,EAAE,gBAAgB;wBACxB,SAAS,EAAE,OAAO,CAAC,SAAS;wBAC5B,OAAO,EAAE,SAAS;wBAClB,IAAI,EAAE,eAAK,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE;wBACvC,OAAO,EAAE,OAAO,CAAC,OAAO;wBACxB,eAAe,EAAE,gBAAgB;qBAClC;iBACF,CAAC;gBACF,OAAO;aACkB,CAAC;SAC7B,CAAC,CAAA;QAGF,OAAO,OAAO,CAAC,wCAAmB,CAAC,eAAe,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACtE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,eAAe,CAAC;gBACxB,OAAO,EAAE,QAAQ,CAAC,MAAM;gBACxB,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;oBAC7B;wBACE,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;wBAC1C,WAAW,EAAE,OAAO,CAAC,WAAW;wBAChC,UAAU,EAAE,OAAO,CAAC,UAAU;wBAC9B,OAAO,EAAE,SAAS;qBACnB;iBACF,CAAC;gBACF,OAAO;aACkB,CAAC;SAC7B,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -5,6 +5,7 @@ const utm_1 = require("../utm");
|
|
|
5
5
|
const referrer_1 = require("../referrer");
|
|
6
6
|
const user_agent_1 = require("../user-agent");
|
|
7
7
|
const merge_user_properties_1 = require("../merge-user-properties");
|
|
8
|
+
const regional_endpoints_1 = require("../regional-endpoints");
|
|
8
9
|
const action = {
|
|
9
10
|
title: 'Identify User',
|
|
10
11
|
description: 'Set the user ID for a particular device ID or update user properties without sending an event to Amplitude.',
|
|
@@ -55,7 +56,7 @@ const action = {
|
|
|
55
56
|
platform: {
|
|
56
57
|
label: 'Platform',
|
|
57
58
|
type: 'string',
|
|
58
|
-
description:
|
|
59
|
+
description: "The platform of the user's device.",
|
|
59
60
|
default: {
|
|
60
61
|
'@path': '$.context.device.type'
|
|
61
62
|
}
|
|
@@ -63,7 +64,7 @@ const action = {
|
|
|
63
64
|
os_name: {
|
|
64
65
|
label: 'OS Name',
|
|
65
66
|
type: 'string',
|
|
66
|
-
description:
|
|
67
|
+
description: "The mobile operating system or browser of the user's device.",
|
|
67
68
|
default: {
|
|
68
69
|
'@path': '$.context.os.name'
|
|
69
70
|
}
|
|
@@ -71,7 +72,7 @@ const action = {
|
|
|
71
72
|
os_version: {
|
|
72
73
|
label: 'OS Version',
|
|
73
74
|
type: 'string',
|
|
74
|
-
description:
|
|
75
|
+
description: "The version of the mobile operating system or browser of the user's device.",
|
|
75
76
|
default: {
|
|
76
77
|
'@path': '$.context.os.version'
|
|
77
78
|
}
|
|
@@ -79,7 +80,7 @@ const action = {
|
|
|
79
80
|
device_brand: {
|
|
80
81
|
label: 'Device Brand',
|
|
81
82
|
type: 'string',
|
|
82
|
-
description:
|
|
83
|
+
description: "The brand of user's the device.",
|
|
83
84
|
default: {
|
|
84
85
|
'@path': '$.context.device.brand'
|
|
85
86
|
}
|
|
@@ -87,7 +88,7 @@ const action = {
|
|
|
87
88
|
device_manufacturer: {
|
|
88
89
|
label: 'Device Manufacturer',
|
|
89
90
|
type: 'string',
|
|
90
|
-
description:
|
|
91
|
+
description: "The manufacturer of the user's device.",
|
|
91
92
|
default: {
|
|
92
93
|
'@path': '$.context.device.manufacturer'
|
|
93
94
|
}
|
|
@@ -95,7 +96,7 @@ const action = {
|
|
|
95
96
|
device_model: {
|
|
96
97
|
label: 'Device Model',
|
|
97
98
|
type: 'string',
|
|
98
|
-
description:
|
|
99
|
+
description: "The model of the user's device.",
|
|
99
100
|
default: {
|
|
100
101
|
'@path': '$.context.device.model'
|
|
101
102
|
}
|
|
@@ -103,7 +104,7 @@ const action = {
|
|
|
103
104
|
carrier: {
|
|
104
105
|
label: 'Carrier',
|
|
105
106
|
type: 'string',
|
|
106
|
-
description: '
|
|
107
|
+
description: "The user's mobile carrier.",
|
|
107
108
|
default: {
|
|
108
109
|
'@path': '$.context.network.carrier'
|
|
109
110
|
}
|
|
@@ -111,7 +112,7 @@ const action = {
|
|
|
111
112
|
country: {
|
|
112
113
|
label: 'Country',
|
|
113
114
|
type: 'string',
|
|
114
|
-
description: '
|
|
115
|
+
description: 'The country in which the user is located.',
|
|
115
116
|
default: {
|
|
116
117
|
'@path': '$.context.location.country'
|
|
117
118
|
}
|
|
@@ -119,7 +120,7 @@ const action = {
|
|
|
119
120
|
region: {
|
|
120
121
|
label: 'Region',
|
|
121
122
|
type: 'string',
|
|
122
|
-
description: '
|
|
123
|
+
description: 'The geographical region in which the user is located.',
|
|
123
124
|
default: {
|
|
124
125
|
'@path': '$.context.location.region'
|
|
125
126
|
}
|
|
@@ -127,7 +128,7 @@ const action = {
|
|
|
127
128
|
city: {
|
|
128
129
|
label: 'City',
|
|
129
130
|
type: 'string',
|
|
130
|
-
description: '
|
|
131
|
+
description: 'The city in which the user is located.',
|
|
131
132
|
default: {
|
|
132
133
|
'@path': '$.context.location.city'
|
|
133
134
|
}
|
|
@@ -135,12 +136,12 @@ const action = {
|
|
|
135
136
|
dma: {
|
|
136
137
|
label: 'Designated Market Area',
|
|
137
138
|
type: 'string',
|
|
138
|
-
description: 'The Designated Market Area
|
|
139
|
+
description: 'The Designated Market Area in which the user is located.'
|
|
139
140
|
},
|
|
140
141
|
language: {
|
|
141
142
|
label: 'Language',
|
|
142
143
|
type: 'string',
|
|
143
|
-
description: 'Language the user has set.',
|
|
144
|
+
description: 'Language the user has set on their device or browser.',
|
|
144
145
|
default: {
|
|
145
146
|
'@path': '$.context.locale'
|
|
146
147
|
}
|
|
@@ -153,7 +154,7 @@ const action = {
|
|
|
153
154
|
start_version: {
|
|
154
155
|
label: 'Initial Version',
|
|
155
156
|
type: 'string',
|
|
156
|
-
description: '
|
|
157
|
+
description: 'The version of the app the user was first on.'
|
|
157
158
|
},
|
|
158
159
|
insert_id: {
|
|
159
160
|
label: 'Insert ID',
|
|
@@ -252,7 +253,7 @@ const action = {
|
|
|
252
253
|
...actions_core_1.removeUndefined(properties),
|
|
253
254
|
library: 'segment'
|
|
254
255
|
});
|
|
255
|
-
return request('
|
|
256
|
+
return request(regional_endpoints_1.getEndpointByRegion('identify', settings.endpoint), {
|
|
256
257
|
method: 'post',
|
|
257
258
|
body: new URLSearchParams({
|
|
258
259
|
api_key: settings.apiKey,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/amplitude/identifyUser/index.ts"],"names":[],"mappings":";;AAAA,wDAA+E;AAG/E,gCAA6C;AAC7C,0CAAqD;AACrD,8CAAwD;AACxD,oEAA8D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/amplitude/identifyUser/index.ts"],"names":[],"mappings":";;AAAA,wDAA+E;AAG/E,gCAA6C;AAC7C,0CAAqD;AACrD,8CAAwD;AACxD,oEAA8D;AAE9D,8DAA2D;AAE3D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EACT,6GAA6G;IAC/G,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EACT,uPAAuP;YACzP,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,QAAQ;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C,CACjC,CAAA;SACF;QAED,IAAI,aAAa,IAAI,aAAa,GAAG,CAAC,EAAE;YACtC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC,CAAA;SAC5C;QAED,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC;YAEpC,GAAG,CAAC,gBAAgB,IAAI,qCAAwB,CAAC,SAAS,CAAC,CAAC;YAE5D,GAAG,8BAAe,CAAC,UAAU,CAAC;YAC9B,OAAO,EAAE,SAAS;SACnB,CAAC,CAAA;QAEF,OAAO,OAAO,CAAC,wCAAmB,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACjE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,eAAe,CAAC;gBACxB,OAAO,EAAE,QAAQ,CAAC,MAAM;gBACxB,cAAc;gBACd,OAAO;aACkB,CAAC;SAC7B,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -8,6 +8,7 @@ const identifyUser_1 = __importDefault(require("./identifyUser"));
|
|
|
8
8
|
const logEvent_1 = __importDefault(require("./logEvent"));
|
|
9
9
|
const mapUser_1 = __importDefault(require("./mapUser"));
|
|
10
10
|
const groupIdentifyUser_1 = __importDefault(require("./groupIdentifyUser"));
|
|
11
|
+
const regional_endpoints_1 = require("./regional-endpoints");
|
|
11
12
|
const presets = [
|
|
12
13
|
{
|
|
13
14
|
name: 'Track Calls',
|
|
@@ -67,17 +68,35 @@ const destination = {
|
|
|
67
68
|
description: 'Amplitude project secret key. You can find this key in the "General" tab of your Amplitude project.',
|
|
68
69
|
type: 'string',
|
|
69
70
|
required: true
|
|
71
|
+
},
|
|
72
|
+
endpoint: {
|
|
73
|
+
label: 'Endpoint Region',
|
|
74
|
+
description: 'The region to send your data.',
|
|
75
|
+
type: 'string',
|
|
76
|
+
format: 'text',
|
|
77
|
+
choices: [
|
|
78
|
+
{
|
|
79
|
+
label: 'North America',
|
|
80
|
+
value: 'north_america'
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
label: 'Europe',
|
|
84
|
+
value: 'europe'
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
default: 'north_america'
|
|
70
88
|
}
|
|
71
89
|
},
|
|
72
90
|
testAuthentication: (request, { settings }) => {
|
|
73
|
-
|
|
91
|
+
const endpoint = regional_endpoints_1.getEndpointByRegion('usersearch', settings.endpoint);
|
|
92
|
+
return request(`${endpoint}?user=testUser@example.com`, {
|
|
74
93
|
username: settings.apiKey,
|
|
75
94
|
password: settings.secretKey
|
|
76
95
|
});
|
|
77
96
|
}
|
|
78
97
|
},
|
|
79
98
|
onDelete: async (request, { settings, payload }) => {
|
|
80
|
-
return request('
|
|
99
|
+
return request(regional_endpoints_1.getEndpointByRegion('deletions', settings.endpoint), {
|
|
81
100
|
username: settings.apiKey,
|
|
82
101
|
password: settings.secretKey,
|
|
83
102
|
method: 'post',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/amplitude/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAqD;AACrD,kEAAyC;AACzC,0DAAiC;AACjC,wDAA+B;AAC/B,4EAAmD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/amplitude/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAqD;AACrD,kEAAyC;AACzC,0DAAiC;AACjC,wDAA+B;AAC/B,4EAAmD;AAEnD,6DAA0D;AAG1D,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,UAAU;QACzB,OAAO,EAAE,4BAAa,CAAC,kBAAQ,CAAC,MAAM,CAAC;KACxC;IACD;QACE,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE,eAAe;QAC1B,aAAa,EAAE,UAAU;QACzB,OAAO,EAAE;YACP,GAA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B;iBACF;gBACD,OAAO,EAAE,eAAe;aACzB;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAG5C,MAAM,QAAQ,GAAG,wCAAmB,CAAC,YAAY,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;YACrE,OAAO,OAAO,CAAC,GAAG,QAAQ,4BAA4B,EAAE;gBACtD,QAAQ,EAAE,QAAQ,CAAC,MAAM;gBACzB,QAAQ,EAAE,QAAQ,CAAC,SAAS;aAC7B,CAAC,CAAA;QACJ,CAAC;KACF;IACD,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QACjD,OAAO,OAAO,CAAC,wCAAmB,CAAC,WAAW,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE;YAClE,QAAQ,EAAE,QAAQ,CAAC,MAAM;YACzB,QAAQ,EAAE,QAAQ,CAAC,SAAS;YAC5B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;gBAC1B,SAAS,EAAE,SAAS;aACrB;SACF,CAAC,CAAA;IACJ,CAAC;IACD,OAAO;IACP,OAAO,EAAE;QACP,QAAQ,EAAR,kBAAQ;QACR,YAAY,EAAZ,sBAAY;QACZ,OAAO,EAAP,iBAAO;QACP,iBAAiB,EAAjB,2BAAiB;KAClB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -10,6 +10,7 @@ const utm_1 = require("../utm");
|
|
|
10
10
|
const referrer_1 = require("../referrer");
|
|
11
11
|
const merge_user_properties_1 = require("../merge-user-properties");
|
|
12
12
|
const user_agent_1 = require("../user-agent");
|
|
13
|
+
const regional_endpoints_1 = require("../regional-endpoints");
|
|
13
14
|
const revenueKeys = ['revenue', 'price', 'productId', 'quantity', 'revenueType'];
|
|
14
15
|
function getRevenueProperties(payload) {
|
|
15
16
|
if (typeof payload.revenue !== 'number') {
|
|
@@ -181,9 +182,7 @@ const action = {
|
|
|
181
182
|
library: 'segment'
|
|
182
183
|
});
|
|
183
184
|
}
|
|
184
|
-
const endpoint = payload.use_batch_endpoint
|
|
185
|
-
? 'https://api2.amplitude.com/batch'
|
|
186
|
-
: 'https://api2.amplitude.com/2/httpapi';
|
|
185
|
+
const endpoint = regional_endpoints_1.getEndpointByRegion(payload.use_batch_endpoint ? 'batch' : 'httpapi', settings.endpoint);
|
|
187
186
|
return request(endpoint, {
|
|
188
187
|
method: 'post',
|
|
189
188
|
json: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/amplitude/logEvent/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA6D;AAC7D,+DAAsC;AACtC,kDAA6C;AAI7C,gCAA6C;AAC7C,0CAAqD;AACrD,oEAA8D;AAC9D,8CAAwD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/amplitude/logEvent/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA6D;AAC7D,+DAAsC;AACtC,kDAA6C;AAI7C,gCAA6C;AAC7C,0CAAqD;AACrD,oEAA8D;AAC9D,8CAAwD;AACxD,8DAA2D;AAW3D,MAAM,WAAW,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,CAAC,CAAA;AAUhF,SAAS,oBAAoB,CAAC,OAAqB;IACjD,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,EAAE;QACvC,OAAO,EAAE,CAAA;KACV;IAED,OAAO;QACL,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,UAAU;QAC9C,QAAQ,EAAE,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CA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AE;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,OAAO,EAAE,QAAQ,CAAC,MAAM;gBACxB,MAAM;gBACN,OAAO;aACR;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const regional_endpoints_1 = require("../regional-endpoints");
|
|
3
4
|
const action = {
|
|
4
5
|
title: 'Map User',
|
|
5
6
|
description: 'Merge two users together that would otherwise have different User IDs tracked in Amplitude.',
|
|
@@ -8,7 +9,7 @@ const action = {
|
|
|
8
9
|
user_id: {
|
|
9
10
|
label: 'User ID',
|
|
10
11
|
type: 'string',
|
|
11
|
-
description: 'The User ID to be associated',
|
|
12
|
+
description: 'The User ID to be associated.',
|
|
12
13
|
default: {
|
|
13
14
|
'@path': '$.previousId'
|
|
14
15
|
}
|
|
@@ -16,14 +17,14 @@ const action = {
|
|
|
16
17
|
global_user_id: {
|
|
17
18
|
label: 'Global User ID',
|
|
18
19
|
type: 'string',
|
|
19
|
-
description: 'The
|
|
20
|
+
description: 'The Global User ID to associate with the User ID.',
|
|
20
21
|
default: {
|
|
21
22
|
'@path': '$.userId'
|
|
22
23
|
}
|
|
23
24
|
},
|
|
24
25
|
min_id_length: {
|
|
25
26
|
label: 'Minimum ID Length',
|
|
26
|
-
description: 'Amplitude has a default minimum id
|
|
27
|
+
description: 'Amplitude has a default minimum id length of 5 characters for user_id and device_id fields. This field allows the minimum to be overridden to allow shorter id lengths.',
|
|
27
28
|
allowNull: true,
|
|
28
29
|
type: 'integer'
|
|
29
30
|
}
|
|
@@ -31,7 +32,7 @@ const action = {
|
|
|
31
32
|
perform: (request, { payload, settings }) => {
|
|
32
33
|
const { min_id_length } = payload;
|
|
33
34
|
const options = min_id_length && min_id_length > 0 ? JSON.stringify({ min_id_length }) : undefined;
|
|
34
|
-
return request('
|
|
35
|
+
return request(regional_endpoints_1.getEndpointByRegion('usermap', settings.endpoint), {
|
|
35
36
|
method: 'post',
|
|
36
37
|
body: new URLSearchParams({
|
|
37
38
|
api_key: settings.apiKey,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/amplitude/mapUser/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/amplitude/mapUser/index.ts"],"names":[],"mappings":";;AACA,8DAA2D;AAI3D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,6FAA6F;IAC1G,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,+BAA+B;YAC5C,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;aACxB;SACF;QACD,cAAc,EAAE;YACd,KAAK,EAAE,gBAAgB;YACvB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,mDAAmD;YAChE,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,aAAa,EAAE;YACb,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EACT,yKAAyK;YAC3K,SAAS,EAAE,IAAI;YACf,IAAI,EAAE,SAAS;SAChB;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAA;QACjC,MAAM,OAAO,GAAG,aAAa,IAAI,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;QAClG,OAAO,OAAO,CAAC,wCAAmB,CAAC,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE;YAChE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,eAAe,CAAC;gBACxB,OAAO,EAAE,QAAQ,CAAC,MAAM;gBACxB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC;gBAClC,GAAG,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,CAAC;aAC5B,CAAC;SACH,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const endpoints: {
|
|
2
|
+
batch: {
|
|
3
|
+
north_america: string;
|
|
4
|
+
europe: string;
|
|
5
|
+
};
|
|
6
|
+
deletions: {
|
|
7
|
+
north_america: string;
|
|
8
|
+
europe: string;
|
|
9
|
+
};
|
|
10
|
+
httpapi: {
|
|
11
|
+
north_america: string;
|
|
12
|
+
europe: string;
|
|
13
|
+
};
|
|
14
|
+
identify: {
|
|
15
|
+
north_america: string;
|
|
16
|
+
europe: string;
|
|
17
|
+
};
|
|
18
|
+
groupidentify: {
|
|
19
|
+
north_america: string;
|
|
20
|
+
europe: string;
|
|
21
|
+
};
|
|
22
|
+
usermap: {
|
|
23
|
+
north_america: string;
|
|
24
|
+
europe: string;
|
|
25
|
+
};
|
|
26
|
+
usersearch: {
|
|
27
|
+
north_america: string;
|
|
28
|
+
europe: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export declare function getEndpointByRegion(endpoint: keyof typeof endpoints, region?: string): string;
|
|
32
|
+
export default endpoints;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEndpointByRegion = exports.endpoints = void 0;
|
|
4
|
+
exports.endpoints = {
|
|
5
|
+
batch: {
|
|
6
|
+
north_america: 'https://api2.amplitude.com/batch',
|
|
7
|
+
europe: 'https://api.eu.amplitude.com/batch'
|
|
8
|
+
},
|
|
9
|
+
deletions: {
|
|
10
|
+
north_america: 'https://amplitude.com/api/2/deletions/users',
|
|
11
|
+
europe: 'https://analytics.eu.amplitude.com/api/2/deletions/users'
|
|
12
|
+
},
|
|
13
|
+
httpapi: {
|
|
14
|
+
north_america: 'https://api2.amplitude.com/2/httpapi',
|
|
15
|
+
europe: 'https://api.eu.amplitude.com/2/httpapi'
|
|
16
|
+
},
|
|
17
|
+
identify: {
|
|
18
|
+
north_america: 'https://api2.amplitude.com/identify',
|
|
19
|
+
europe: 'https://api.eu.amplitude.com/identify'
|
|
20
|
+
},
|
|
21
|
+
groupidentify: {
|
|
22
|
+
north_america: 'https://api2.amplitude.com/groupidentify',
|
|
23
|
+
europe: 'https://api.eu.amplitude.com/groupidentify'
|
|
24
|
+
},
|
|
25
|
+
usermap: {
|
|
26
|
+
north_america: 'https://api.amplitude.com/usermap',
|
|
27
|
+
europe: 'https://api.eu.amplitude.com/usermap'
|
|
28
|
+
},
|
|
29
|
+
usersearch: {
|
|
30
|
+
north_america: 'https://amplitude.com/api/2/usersearch',
|
|
31
|
+
europe: 'https://analytics.eu.amplitude.com/api/2/usersearch'
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
function getEndpointByRegion(endpoint, region) {
|
|
35
|
+
return exports.endpoints[endpoint][region] ?? exports.endpoints[endpoint]['north_america'];
|
|
36
|
+
}
|
|
37
|
+
exports.getEndpointByRegion = getEndpointByRegion;
|
|
38
|
+
exports.default = exports.endpoints;
|
|
39
|
+
//# sourceMappingURL=regional-endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regional-endpoints.js","sourceRoot":"","sources":["../../../src/destinations/amplitude/regional-endpoints.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG;IACvB,KAAK,EAAE;QACL,aAAa,EAAE,kCAAkC;QACjD,MAAM,EAAE,oCAAoC;KAC7C;IACD,SAAS,EAAE;QACT,aAAa,EAAE,6CAA6C;QAC5D,MAAM,EAAE,0DAA0D;KACnE;IACD,OAAO,EAAE;QACP,aAAa,EAAE,sCAAsC;QACrD,MAAM,EAAE,wCAAwC;KACjD;IACD,QAAQ,EAAE;QACR,aAAa,EAAE,qCAAqC;QACpD,MAAM,EAAE,uCAAuC;KAChD;IACD,aAAa,EAAE;QACb,aAAa,EAAE,0CAA0C;QACzD,MAAM,EAAE,4CAA4C;KACrD;IACD,OAAO,EAAE;QACP,aAAa,EAAE,mCAAmC;QAClD,MAAM,EAAE,sCAAsC;KAC/C;IACD,UAAU,EAAE;QACV,aAAa,EAAE,wCAAwC;QACvD,MAAM,EAAE,qDAAqD;KAC9D;CACF,CAAA;AAYD,SAAgB,mBAAmB,CAAC,QAAgC,EAAE,MAAe;IACnF,OAAO,iBAAS,CAAC,QAAQ,CAAC,CAAC,MAAgB,CAAC,IAAI,iBAAS,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,CAAA;AACtF,CAAC;AAFD,kDAEC;AAED,kBAAe,iBAAS,CAAA"}
|
|
@@ -20,20 +20,19 @@ const action = {
|
|
|
20
20
|
},
|
|
21
21
|
event_time: { ...fb_capi_properties_1.event_time, required: true },
|
|
22
22
|
user_data: fb_capi_user_data_1.user_data_field,
|
|
23
|
-
event_id: fb_capi_properties_1.event_id,
|
|
24
|
-
event_source_url: fb_capi_properties_1.event_source_url,
|
|
25
23
|
custom_data: {
|
|
26
24
|
label: 'Custom Data',
|
|
27
25
|
description: 'The custom data object which can be used to pass custom properties. See [here](https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data) for more information',
|
|
28
26
|
type: 'object'
|
|
29
|
-
}
|
|
27
|
+
},
|
|
28
|
+
event_id: fb_capi_properties_1.event_id,
|
|
29
|
+
event_source_url: fb_capi_properties_1.event_source_url
|
|
30
30
|
},
|
|
31
31
|
perform: (request, { payload, settings }) => {
|
|
32
32
|
if (!payload.user_data) {
|
|
33
33
|
throw new actions_core_1.IntegrationError('Must include at least one user data property', 'Misconfigured required field', 400);
|
|
34
34
|
}
|
|
35
|
-
if (!['email', 'website', 'phone_call', 'chat', 'physical_store', 'system_generated', 'other']
|
|
36
|
-
.includes(payload.action_source)) {
|
|
35
|
+
if (!['email', 'website', 'phone_call', 'chat', 'physical_store', 'system_generated', 'other'].includes(payload.action_source)) {
|
|
37
36
|
throw new actions_core_1.IntegrationError('Provide a valid value for the action source parameter, such as "website"', 'Misconfigured required field', 400);
|
|
38
37
|
}
|
|
39
38
|
return request(`https://graph.facebook.com/v${constants_1.API_VERSION}/${settings.pixelId}/events`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/custom/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,8DAA6F;AAC7F,4DAAsE;AAGtE,4CAA0C;AAC1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,+BAA+B;IAC5C,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/custom/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,8DAA6F;AAC7F,4DAAsE;AAGtE,4CAA0C;AAC1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,+BAA+B;IAC5C,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnD,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,uBAAuB;YACpC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,UAAU,EAAE,EAAE,GAAG,+BAAU,EAAE,QAAQ,EAAE,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interface Payload {
|
|
2
|
+
action_source: string;
|
|
3
|
+
event_time: string;
|
|
2
4
|
user_data: {
|
|
3
5
|
externalId?: string;
|
|
4
6
|
email?: string;
|
|
@@ -19,12 +21,8 @@ export interface Payload {
|
|
|
19
21
|
leadID?: number;
|
|
20
22
|
fbLoginID?: number;
|
|
21
23
|
};
|
|
22
|
-
event_time: string;
|
|
23
|
-
action_source: string;
|
|
24
|
-
event_id?: string;
|
|
25
|
-
event_source_url?: string;
|
|
26
|
-
content_ids?: string[];
|
|
27
24
|
content_category?: string;
|
|
25
|
+
content_ids?: string[];
|
|
28
26
|
content_name?: string;
|
|
29
27
|
content_type?: string;
|
|
30
28
|
contents?: {
|
|
@@ -34,5 +32,7 @@ export interface Payload {
|
|
|
34
32
|
delivery_category?: string;
|
|
35
33
|
}[];
|
|
36
34
|
currency?: string;
|
|
35
|
+
event_id?: string;
|
|
36
|
+
event_source_url?: string;
|
|
37
37
|
value?: number;
|
|
38
38
|
}
|
|
@@ -9,13 +9,11 @@ const action = {
|
|
|
9
9
|
description: 'Send event when a user views content or a product',
|
|
10
10
|
defaultSubscription: 'type = "track" and event = "Product Viewed"',
|
|
11
11
|
fields: {
|
|
12
|
-
user_data: fb_capi_user_data_1.user_data_field,
|
|
13
|
-
event_time: { ...fb_capi_properties_1.event_time, required: true },
|
|
14
12
|
action_source: { ...fb_capi_properties_1.action_source, required: true },
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
content_ids: { ...fb_capi_properties_1.content_ids, default: { '@path': '$.properties.product_id' } },
|
|
13
|
+
event_time: { ...fb_capi_properties_1.event_time, required: true },
|
|
14
|
+
user_data: fb_capi_user_data_1.user_data_field,
|
|
18
15
|
content_category: fb_capi_properties_1.content_category,
|
|
16
|
+
content_ids: { ...fb_capi_properties_1.content_ids, default: { '@path': '$.properties.product_id' } },
|
|
19
17
|
content_name: fb_capi_properties_1.content_name,
|
|
20
18
|
content_type: fb_capi_properties_1.content_type,
|
|
21
19
|
contents: {
|
|
@@ -38,6 +36,8 @@ const action = {
|
|
|
38
36
|
}
|
|
39
37
|
},
|
|
40
38
|
currency: fb_capi_properties_1.currency,
|
|
39
|
+
event_id: fb_capi_properties_1.event_id,
|
|
40
|
+
event_source_url: fb_capi_properties_1.event_source_url,
|
|
41
41
|
value: { ...fb_capi_properties_1.value, default: { '@path': '$.properties.price' } }
|
|
42
42
|
},
|
|
43
43
|
perform: (request, { payload, settings }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/viewContent/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,8DAY8B;AAC9B,4DAAsE;AAGtE,4CAA8D;AAE9D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,mDAAmD;IAChE,mBAAmB,EAAE,6CAA6C;IAClE,MAAM,EAAE;QACN,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/viewContent/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,8DAY8B;AAC9B,4DAAsE;AAGtE,4CAA8D;AAE9D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,mDAAmD;IAChE,mBAAmB,EAAE,6CAA6C;IAClE,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnD,UAAU,EAAE,EAAE,GAAG,+BAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7C,SAAS,EAAE,mCAAe;QAC1B,gBAAgB,EAAE,qCAAgB;QAClC,WAAW,EAAE,EAAE,GAAG,gCAAW,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAE,EAAE;QAChF,YAAY,EAAE,iCAAY;QAC1B,YAAY,EAAE,iCAAY;QAC1B,QAAQ,EAAE;YACR,GAAG,6BAA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