@segment/action-destinations 3.43.0 → 3.46.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/close/createUpdateContactAndLead/generated-types.d.ts +12 -0
- package/dist/destinations/close/createUpdateContactAndLead/generated-types.js +3 -0
- package/dist/destinations/close/createUpdateContactAndLead/generated-types.js.map +1 -0
- package/dist/destinations/close/createUpdateContactAndLead/index.d.ts +5 -0
- package/dist/destinations/close/createUpdateContactAndLead/index.js +89 -0
- package/dist/destinations/close/createUpdateContactAndLead/index.js.map +1 -0
- package/dist/destinations/close/generated-types.d.ts +4 -0
- package/dist/destinations/close/generated-types.js +3 -0
- package/dist/destinations/close/generated-types.js.map +1 -0
- package/dist/destinations/close/index.d.ts +4 -0
- package/dist/destinations/close/index.js +49 -0
- package/dist/destinations/close/index.js.map +1 -0
- package/dist/destinations/cordial/addContactToList/generated-types.d.ts +6 -0
- package/dist/destinations/cordial/addContactToList/generated-types.js +3 -0
- package/dist/destinations/cordial/addContactToList/generated-types.js.map +1 -0
- package/dist/destinations/cordial/addContactToList/index.d.ts +5 -0
- package/dist/destinations/cordial/addContactToList/index.js +45 -0
- package/dist/destinations/cordial/addContactToList/index.js.map +1 -0
- package/dist/destinations/cordial/common-fields.d.ts +2 -0
- package/dist/destinations/cordial/common-fields.js +21 -0
- package/dist/destinations/cordial/common-fields.js.map +1 -0
- package/dist/destinations/cordial/cordial-client.d.ts +36 -0
- package/dist/destinations/cordial/cordial-client.js +121 -0
- package/dist/destinations/cordial/cordial-client.js.map +1 -0
- package/dist/destinations/cordial/createContactactivity/generated-types.d.ts +9 -0
- package/dist/destinations/cordial/createContactactivity/generated-types.js +3 -0
- package/dist/destinations/cordial/createContactactivity/generated-types.js.map +1 -0
- package/dist/destinations/cordial/createContactactivity/index.d.ts +5 -0
- package/dist/destinations/cordial/createContactactivity/index.js +46 -0
- package/dist/destinations/cordial/createContactactivity/index.js.map +1 -0
- package/dist/destinations/cordial/generated-types.d.ts +4 -0
- package/dist/destinations/cordial/generated-types.js +3 -0
- package/dist/destinations/cordial/generated-types.js.map +1 -0
- package/dist/destinations/cordial/index.d.ts +4 -0
- package/dist/destinations/cordial/index.js +53 -0
- package/dist/destinations/cordial/index.js.map +1 -0
- package/dist/destinations/cordial/removeContactFromList/generated-types.d.ts +6 -0
- package/dist/destinations/cordial/removeContactFromList/generated-types.js +3 -0
- package/dist/destinations/cordial/removeContactFromList/generated-types.js.map +1 -0
- package/dist/destinations/cordial/removeContactFromList/index.d.ts +5 -0
- package/dist/destinations/cordial/removeContactFromList/index.js +47 -0
- package/dist/destinations/cordial/removeContactFromList/index.js.map +1 -0
- package/dist/destinations/cordial/upsertContact/generated-types.d.ts +7 -0
- package/dist/destinations/cordial/upsertContact/generated-types.js +3 -0
- package/dist/destinations/cordial/upsertContact/generated-types.js.map +1 -0
- package/dist/destinations/cordial/upsertContact/index.d.ts +5 -0
- package/dist/destinations/cordial/upsertContact/index.js +33 -0
- package/dist/destinations/cordial/upsertContact/index.js.map +1 -0
- package/dist/destinations/cordial/user-identifier.d.ts +5 -0
- package/dist/destinations/cordial/user-identifier.js +11 -0
- package/dist/destinations/cordial/user-identifier.js.map +1 -0
- package/dist/destinations/customerio/utils.js +1 -1
- package/dist/destinations/customerio/utils.js.map +1 -1
- package/dist/destinations/friendbuy/cloudUtil.d.ts +4 -4
- package/dist/destinations/friendbuy/cloudUtil.js +31 -15
- package/dist/destinations/friendbuy/cloudUtil.js.map +1 -1
- package/dist/destinations/friendbuy/index.js +2 -2
- package/dist/destinations/friendbuy/index.js.map +1 -1
- package/dist/destinations/friendbuy/trackCustomEvent/generated-types.d.ts +1 -0
- package/dist/destinations/friendbuy/trackCustomEvent/index.js +8 -5
- package/dist/destinations/friendbuy/trackCustomEvent/index.js.map +1 -1
- package/dist/destinations/friendbuy/trackCustomer/index.js +4 -3
- package/dist/destinations/friendbuy/trackCustomer/index.js.map +1 -1
- package/dist/destinations/friendbuy/trackPurchase/generated-types.d.ts +2 -0
- package/dist/destinations/friendbuy/trackPurchase/index.js +29 -29
- package/dist/destinations/friendbuy/trackPurchase/index.js.map +1 -1
- package/dist/destinations/friendbuy/trackSignUp/generated-types.d.ts +3 -0
- package/dist/destinations/friendbuy/trackSignUp/index.js +7 -3
- package/dist/destinations/friendbuy/trackSignUp/index.js.map +1 -1
- package/dist/destinations/gainsight-px-cloud-action/common-fields.d.ts +2 -0
- package/dist/destinations/gainsight-px-cloud-action/common-fields.js +277 -0
- package/dist/destinations/gainsight-px-cloud-action/common-fields.js.map +1 -0
- package/dist/destinations/gainsight-px-cloud-action/generated-types.d.ts +4 -0
- package/dist/destinations/gainsight-px-cloud-action/generated-types.js +3 -0
- package/dist/destinations/gainsight-px-cloud-action/generated-types.js.map +1 -0
- package/dist/destinations/gainsight-px-cloud-action/groupIdentify/generated-types.d.ts +60 -0
- package/dist/destinations/gainsight-px-cloud-action/groupIdentify/generated-types.js +3 -0
- package/dist/destinations/gainsight-px-cloud-action/groupIdentify/generated-types.js.map +1 -0
- package/dist/destinations/gainsight-px-cloud-action/groupIdentify/index.d.ts +5 -0
- package/dist/destinations/gainsight-px-cloud-action/groupIdentify/index.js +38 -0
- package/dist/destinations/gainsight-px-cloud-action/groupIdentify/index.js.map +1 -0
- package/dist/destinations/gainsight-px-cloud-action/identifyUser/generated-types.d.ts +59 -0
- package/dist/destinations/gainsight-px-cloud-action/identifyUser/generated-types.js +3 -0
- package/dist/destinations/gainsight-px-cloud-action/identifyUser/generated-types.js.map +1 -0
- package/dist/destinations/gainsight-px-cloud-action/identifyUser/index.d.ts +5 -0
- package/dist/destinations/gainsight-px-cloud-action/identifyUser/index.js +29 -0
- package/dist/destinations/gainsight-px-cloud-action/identifyUser/index.js.map +1 -0
- package/dist/destinations/gainsight-px-cloud-action/index.d.ts +4 -0
- package/dist/destinations/gainsight-px-cloud-action/index.js +100 -0
- package/dist/destinations/gainsight-px-cloud-action/index.js.map +1 -0
- package/dist/destinations/gainsight-px-cloud-action/regional-endpoints.d.ts +12 -0
- package/dist/destinations/gainsight-px-cloud-action/regional-endpoints.js +19 -0
- package/dist/destinations/gainsight-px-cloud-action/regional-endpoints.js.map +1 -0
- package/dist/destinations/gainsight-px-cloud-action/trackEvent/generated-types.d.ts +60 -0
- package/dist/destinations/gainsight-px-cloud-action/trackEvent/generated-types.js +3 -0
- package/dist/destinations/gainsight-px-cloud-action/trackEvent/generated-types.js.map +1 -0
- package/dist/destinations/gainsight-px-cloud-action/trackEvent/index.d.ts +5 -0
- package/dist/destinations/gainsight-px-cloud-action/trackEvent/index.js +37 -0
- package/dist/destinations/gainsight-px-cloud-action/trackEvent/index.js.map +1 -0
- package/dist/destinations/gainsight-px-cloud-action/trackPageView/generated-types.d.ts +63 -0
- package/dist/destinations/gainsight-px-cloud-action/trackPageView/generated-types.js +3 -0
- package/dist/destinations/gainsight-px-cloud-action/trackPageView/generated-types.js.map +1 -0
- package/dist/destinations/gainsight-px-cloud-action/trackPageView/index.d.ts +5 -0
- package/dist/destinations/gainsight-px-cloud-action/trackPageView/index.js +60 -0
- package/dist/destinations/gainsight-px-cloud-action/trackPageView/index.js.map +1 -0
- package/dist/destinations/index.js +3 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/salesforce/index.js +1 -1
- package/dist/destinations/salesforce/index.js.map +1 -1
- package/package.json +4 -5
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commonFields = void 0;
|
|
4
|
+
exports.commonFields = {
|
|
5
|
+
anonymousId: {
|
|
6
|
+
label: 'Anonymous ID',
|
|
7
|
+
type: 'string',
|
|
8
|
+
allowNull: true,
|
|
9
|
+
description: 'The generated anonymous ID for the user',
|
|
10
|
+
default: {
|
|
11
|
+
'@path': '$.anonymousId'
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
context: {
|
|
15
|
+
label: 'Event Context',
|
|
16
|
+
type: 'object',
|
|
17
|
+
description: 'Segment context with ip and userAgent',
|
|
18
|
+
required: true,
|
|
19
|
+
default: { '@path': '$.context' },
|
|
20
|
+
properties: {
|
|
21
|
+
campaign: {
|
|
22
|
+
label: 'UTM Properties',
|
|
23
|
+
type: 'object',
|
|
24
|
+
description: 'UTM Tracking Properties',
|
|
25
|
+
properties: {
|
|
26
|
+
source: {
|
|
27
|
+
label: 'UTM Source',
|
|
28
|
+
type: 'string',
|
|
29
|
+
default: { '@path': '$.context.campaign.source' }
|
|
30
|
+
},
|
|
31
|
+
medium: {
|
|
32
|
+
label: 'UTM Medium',
|
|
33
|
+
type: 'string',
|
|
34
|
+
default: { '@path': '$.context.campaign.medium' }
|
|
35
|
+
},
|
|
36
|
+
name: {
|
|
37
|
+
label: 'UTM Campaign',
|
|
38
|
+
type: 'string',
|
|
39
|
+
default: { '@path': '$.context.campaign.name' }
|
|
40
|
+
},
|
|
41
|
+
term: {
|
|
42
|
+
label: 'UTM Term',
|
|
43
|
+
type: 'string',
|
|
44
|
+
default: { '@path': '$.context.campaign.term' }
|
|
45
|
+
},
|
|
46
|
+
content: {
|
|
47
|
+
label: 'UTM Content',
|
|
48
|
+
type: 'string',
|
|
49
|
+
default: { '@path': '$.context.campaign.content' }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
location: {
|
|
54
|
+
label: 'Location',
|
|
55
|
+
type: 'object',
|
|
56
|
+
description: 'information about the user’s current location',
|
|
57
|
+
properties: {
|
|
58
|
+
city: {
|
|
59
|
+
label: 'City',
|
|
60
|
+
type: 'string',
|
|
61
|
+
default: { '@path': '$.context.location.city' }
|
|
62
|
+
},
|
|
63
|
+
country: {
|
|
64
|
+
label: 'Country',
|
|
65
|
+
type: 'string',
|
|
66
|
+
default: { '@path': '$.context.location.country' }
|
|
67
|
+
},
|
|
68
|
+
latitude: {
|
|
69
|
+
label: 'Latitude',
|
|
70
|
+
type: 'number',
|
|
71
|
+
default: { '@path': '$.context.location.latitude' }
|
|
72
|
+
},
|
|
73
|
+
longitude: {
|
|
74
|
+
label: 'Longitude',
|
|
75
|
+
type: 'number',
|
|
76
|
+
default: { '@path': '$.context.location.longitude' }
|
|
77
|
+
},
|
|
78
|
+
region: {
|
|
79
|
+
label: 'Region',
|
|
80
|
+
type: 'string',
|
|
81
|
+
default: { '@path': '$.context.location.region' }
|
|
82
|
+
},
|
|
83
|
+
speed: {
|
|
84
|
+
label: 'Speed',
|
|
85
|
+
type: 'number',
|
|
86
|
+
default: { '@path': '$.context.location.speed' }
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
page: {
|
|
91
|
+
label: 'Page Properties',
|
|
92
|
+
type: 'object',
|
|
93
|
+
description: 'Current page properties',
|
|
94
|
+
properties: {
|
|
95
|
+
path: {
|
|
96
|
+
label: 'Page path',
|
|
97
|
+
type: 'string',
|
|
98
|
+
default: { '@path': '$.context.page.path' }
|
|
99
|
+
},
|
|
100
|
+
referrer: {
|
|
101
|
+
label: 'Referrer',
|
|
102
|
+
type: 'string',
|
|
103
|
+
default: { '@path': '$.context.page.referrer' }
|
|
104
|
+
},
|
|
105
|
+
search: {
|
|
106
|
+
label: 'Search',
|
|
107
|
+
type: 'string',
|
|
108
|
+
default: { '@path': '$.context.page.search' }
|
|
109
|
+
},
|
|
110
|
+
title: {
|
|
111
|
+
label: 'Title',
|
|
112
|
+
type: 'string',
|
|
113
|
+
default: { '@path': '$.context.page.title' }
|
|
114
|
+
},
|
|
115
|
+
url: {
|
|
116
|
+
label: 'Url',
|
|
117
|
+
type: 'string',
|
|
118
|
+
default: { '@path': '$.context.page.url' }
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
screen: {
|
|
123
|
+
label: 'Screen Properties',
|
|
124
|
+
type: 'object',
|
|
125
|
+
description: 'Screen Properties',
|
|
126
|
+
properties: {
|
|
127
|
+
width: {
|
|
128
|
+
label: 'Screen Width',
|
|
129
|
+
type: 'number',
|
|
130
|
+
default: { '@path': '$.context.screen.width' }
|
|
131
|
+
},
|
|
132
|
+
height: {
|
|
133
|
+
label: 'Screen Height',
|
|
134
|
+
type: 'number',
|
|
135
|
+
default: { '@path': '$.context.screen.height' }
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
app: {
|
|
140
|
+
label: 'Application Properties',
|
|
141
|
+
type: 'object',
|
|
142
|
+
description: 'Application Properties',
|
|
143
|
+
properties: {
|
|
144
|
+
name: {
|
|
145
|
+
label: 'Name',
|
|
146
|
+
type: 'string',
|
|
147
|
+
default: { '@path': '$.context.app.name' },
|
|
148
|
+
},
|
|
149
|
+
version: {
|
|
150
|
+
label: 'Version',
|
|
151
|
+
type: 'string',
|
|
152
|
+
default: { '@path': '$.context.app.version' }
|
|
153
|
+
},
|
|
154
|
+
build: {
|
|
155
|
+
label: 'Build',
|
|
156
|
+
type: 'string',
|
|
157
|
+
default: { '@path': '$.context.app.build' }
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
device: {
|
|
162
|
+
label: 'Device Properties',
|
|
163
|
+
type: 'object',
|
|
164
|
+
description: 'Device Properties',
|
|
165
|
+
default: { '@path': '$.context.device' }
|
|
166
|
+
},
|
|
167
|
+
network: {
|
|
168
|
+
label: 'Network Properties',
|
|
169
|
+
type: 'object',
|
|
170
|
+
description: 'Network Properties',
|
|
171
|
+
default: { '@path': '$.context.network' }
|
|
172
|
+
},
|
|
173
|
+
library: {
|
|
174
|
+
label: 'Library Properties',
|
|
175
|
+
type: 'object',
|
|
176
|
+
description: 'Device Properties',
|
|
177
|
+
properties: {
|
|
178
|
+
name: {
|
|
179
|
+
label: 'Name',
|
|
180
|
+
type: 'string',
|
|
181
|
+
default: { '@path': '$.context.library.name' },
|
|
182
|
+
},
|
|
183
|
+
version: {
|
|
184
|
+
label: 'Version',
|
|
185
|
+
type: 'string',
|
|
186
|
+
default: { '@path': '$.context.library.version' }
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
ip: {
|
|
191
|
+
label: 'Users IP address',
|
|
192
|
+
type: 'string',
|
|
193
|
+
description: 'Users IP address',
|
|
194
|
+
default: { '@path': '$.context.ip' }
|
|
195
|
+
},
|
|
196
|
+
locale: {
|
|
197
|
+
label: 'Users Locale string',
|
|
198
|
+
type: 'string',
|
|
199
|
+
description: 'Users Locale string',
|
|
200
|
+
default: { '@path': '$.context.locale' }
|
|
201
|
+
},
|
|
202
|
+
userAgent: {
|
|
203
|
+
label: 'User Agent string',
|
|
204
|
+
type: 'string',
|
|
205
|
+
description: 'User Agent string',
|
|
206
|
+
default: { '@path': '$.context.userAgent' }
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
messageId: {
|
|
211
|
+
type: 'string',
|
|
212
|
+
label: 'Message ID',
|
|
213
|
+
description: 'The message ID uniquely identifies an event to ensure each event is only processed once.',
|
|
214
|
+
required: true,
|
|
215
|
+
default: {
|
|
216
|
+
'@path': '$.messageId'
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
receivedAt: {
|
|
220
|
+
type: 'datetime',
|
|
221
|
+
label: 'receivedAt',
|
|
222
|
+
description: 'The timestamp at which this event was received.',
|
|
223
|
+
required: true,
|
|
224
|
+
default: {
|
|
225
|
+
'@path': '$.receivedAt'
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
sentAt: {
|
|
229
|
+
type: 'datetime',
|
|
230
|
+
label: 'sentAt',
|
|
231
|
+
description: 'The timestamp at which this was sent.',
|
|
232
|
+
required: true,
|
|
233
|
+
default: {
|
|
234
|
+
'@path': '$.sentAt'
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
timestamp: {
|
|
238
|
+
type: 'datetime',
|
|
239
|
+
label: 'timestamp',
|
|
240
|
+
description: 'The timestamp at which this event occurred.',
|
|
241
|
+
required: true,
|
|
242
|
+
default: {
|
|
243
|
+
'@path': '$.timestamp'
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
userId: {
|
|
247
|
+
label: 'User ID',
|
|
248
|
+
type: 'string',
|
|
249
|
+
allowNull: true,
|
|
250
|
+
required: true,
|
|
251
|
+
description: 'The unique user identifier',
|
|
252
|
+
default: {
|
|
253
|
+
'@path': '$.userId'
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
type: {
|
|
257
|
+
label: 'Type',
|
|
258
|
+
type: 'string',
|
|
259
|
+
allowNull: false,
|
|
260
|
+
required: true,
|
|
261
|
+
description: 'Segment event type',
|
|
262
|
+
default: {
|
|
263
|
+
'@path': '$.type'
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
version: {
|
|
267
|
+
label: 'Version',
|
|
268
|
+
type: 'number',
|
|
269
|
+
allowNull: true,
|
|
270
|
+
required: false,
|
|
271
|
+
description: 'Version of the Segment Tracking API that received the message',
|
|
272
|
+
default: {
|
|
273
|
+
'@path': '$.version'
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
};
|
|
277
|
+
//# sourceMappingURL=common-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-fields.js","sourceRoot":"","sources":["../../../src/destinations/gainsight-px-cloud-action/common-fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAA+B;IACtD,WAAW,EAAE;QACX,KAAK,EAAE,cAAc;QACrB,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE;YACP,OAAO,EAAE,eAAe;SACzB;KACF;IACD,OAAO,EAAE;QACP,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,uCAAuC;QACpD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;QACjC,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,KAAK,EAAE,gBAAgB;gBACvB,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EAAE;QACT,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,6CAA6C;QAC1D,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE;YACP,OAAO,EAAE,aAAa;SACvB;KACF;IACD,MAAM,EAAE;QACN,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,4BAA4B;QACzC,OAAO,EAAE;YACP,OAAO,EAAE,UAAU;SACpB;KACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,oBAAoB;QACjC,OAAO,EAAE;YACP,OAAO,EAAE,QAAQ;SAClB;KACF;IACD,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,+DAA+D;QAC5E,OAAO,EAAE;YACP,OAAO,EAAE,WAAW;SACrB;KACF;CACF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/gainsight-px-cloud-action/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
groupId: string;
|
|
3
|
+
traits: {
|
|
4
|
+
[k: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
anonymousId?: string | null;
|
|
7
|
+
context: {
|
|
8
|
+
campaign?: {
|
|
9
|
+
source?: string;
|
|
10
|
+
medium?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
term?: string;
|
|
13
|
+
content?: string;
|
|
14
|
+
};
|
|
15
|
+
location?: {
|
|
16
|
+
city?: string;
|
|
17
|
+
country?: string;
|
|
18
|
+
latitude?: number;
|
|
19
|
+
longitude?: number;
|
|
20
|
+
region?: string;
|
|
21
|
+
speed?: number;
|
|
22
|
+
};
|
|
23
|
+
page?: {
|
|
24
|
+
path?: string;
|
|
25
|
+
referrer?: string;
|
|
26
|
+
search?: string;
|
|
27
|
+
title?: string;
|
|
28
|
+
url?: string;
|
|
29
|
+
};
|
|
30
|
+
screen?: {
|
|
31
|
+
width?: number;
|
|
32
|
+
height?: number;
|
|
33
|
+
};
|
|
34
|
+
app?: {
|
|
35
|
+
name?: string;
|
|
36
|
+
version?: string;
|
|
37
|
+
build?: string;
|
|
38
|
+
};
|
|
39
|
+
device?: {
|
|
40
|
+
[k: string]: unknown;
|
|
41
|
+
};
|
|
42
|
+
network?: {
|
|
43
|
+
[k: string]: unknown;
|
|
44
|
+
};
|
|
45
|
+
library?: {
|
|
46
|
+
name?: string;
|
|
47
|
+
version?: string;
|
|
48
|
+
};
|
|
49
|
+
ip?: string;
|
|
50
|
+
locale?: string;
|
|
51
|
+
userAgent?: string;
|
|
52
|
+
};
|
|
53
|
+
messageId: string;
|
|
54
|
+
receivedAt: string | number;
|
|
55
|
+
sentAt: string | number;
|
|
56
|
+
timestamp: string | number;
|
|
57
|
+
userId: string | null;
|
|
58
|
+
type: string;
|
|
59
|
+
version?: number | null;
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/gainsight-px-cloud-action/groupIdentify/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const regional_endpoints_1 = require("../regional-endpoints");
|
|
4
|
+
const common_fields_1 = require("../common-fields");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Group Identify User',
|
|
7
|
+
description: 'Updates or adds properties to an account. The account is created if it does not exist.',
|
|
8
|
+
defaultSubscription: 'type = "group"',
|
|
9
|
+
fields: {
|
|
10
|
+
groupId: {
|
|
11
|
+
label: 'Account ID',
|
|
12
|
+
type: 'string',
|
|
13
|
+
description: 'The unique identifier of the account.',
|
|
14
|
+
required: true,
|
|
15
|
+
default: {
|
|
16
|
+
'@path': '$.groupId'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
traits: {
|
|
20
|
+
label: 'User Properties',
|
|
21
|
+
type: 'object',
|
|
22
|
+
description: 'Properties to set on the user profile',
|
|
23
|
+
required: true,
|
|
24
|
+
default: {
|
|
25
|
+
'@path': '$.traits'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
...common_fields_1.commonFields
|
|
29
|
+
},
|
|
30
|
+
perform: (request, { payload, settings }) => {
|
|
31
|
+
return request(regional_endpoints_1.getEndpointByRegion('track', settings.dataCenter), {
|
|
32
|
+
method: 'post',
|
|
33
|
+
json: payload
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.default = action;
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/gainsight-px-cloud-action/groupIdentify/index.ts"],"names":[],"mappings":";;AAGA,8DAA2D;AAC3D,oDAAgD;AAEhD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,wFAAwF;IACrG,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,WAAW;aACrB;SACF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,GAAG,4BAAY;KAChB;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAE1C,OAAO,OAAO,CAAC,wCAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE;YAChE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO;SACd,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
traits: {
|
|
3
|
+
[k: string]: unknown;
|
|
4
|
+
};
|
|
5
|
+
anonymousId?: string | null;
|
|
6
|
+
context: {
|
|
7
|
+
campaign?: {
|
|
8
|
+
source?: string;
|
|
9
|
+
medium?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
term?: string;
|
|
12
|
+
content?: string;
|
|
13
|
+
};
|
|
14
|
+
location?: {
|
|
15
|
+
city?: string;
|
|
16
|
+
country?: string;
|
|
17
|
+
latitude?: number;
|
|
18
|
+
longitude?: number;
|
|
19
|
+
region?: string;
|
|
20
|
+
speed?: number;
|
|
21
|
+
};
|
|
22
|
+
page?: {
|
|
23
|
+
path?: string;
|
|
24
|
+
referrer?: string;
|
|
25
|
+
search?: string;
|
|
26
|
+
title?: string;
|
|
27
|
+
url?: string;
|
|
28
|
+
};
|
|
29
|
+
screen?: {
|
|
30
|
+
width?: number;
|
|
31
|
+
height?: number;
|
|
32
|
+
};
|
|
33
|
+
app?: {
|
|
34
|
+
name?: string;
|
|
35
|
+
version?: string;
|
|
36
|
+
build?: string;
|
|
37
|
+
};
|
|
38
|
+
device?: {
|
|
39
|
+
[k: string]: unknown;
|
|
40
|
+
};
|
|
41
|
+
network?: {
|
|
42
|
+
[k: string]: unknown;
|
|
43
|
+
};
|
|
44
|
+
library?: {
|
|
45
|
+
name?: string;
|
|
46
|
+
version?: string;
|
|
47
|
+
};
|
|
48
|
+
ip?: string;
|
|
49
|
+
locale?: string;
|
|
50
|
+
userAgent?: string;
|
|
51
|
+
};
|
|
52
|
+
messageId: string;
|
|
53
|
+
receivedAt: string | number;
|
|
54
|
+
sentAt: string | number;
|
|
55
|
+
timestamp: string | number;
|
|
56
|
+
userId: string | null;
|
|
57
|
+
type: string;
|
|
58
|
+
version?: number | null;
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/gainsight-px-cloud-action/identifyUser/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const regional_endpoints_1 = require("../regional-endpoints");
|
|
4
|
+
const common_fields_1 = require("../common-fields");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Identify User',
|
|
7
|
+
description: 'Set the user ID for a particular device ID or update user properties',
|
|
8
|
+
defaultSubscription: 'type = "identify"',
|
|
9
|
+
fields: {
|
|
10
|
+
traits: {
|
|
11
|
+
label: 'User Properties',
|
|
12
|
+
type: 'object',
|
|
13
|
+
description: 'Properties to set on the user profile',
|
|
14
|
+
required: true,
|
|
15
|
+
default: {
|
|
16
|
+
'@path': '$.traits'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
...common_fields_1.commonFields
|
|
20
|
+
},
|
|
21
|
+
perform: (request, { payload, settings }) => {
|
|
22
|
+
return request(regional_endpoints_1.getEndpointByRegion('track', settings.dataCenter), {
|
|
23
|
+
method: 'post',
|
|
24
|
+
json: payload
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.default = action;
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/gainsight-px-cloud-action/identifyUser/index.ts"],"names":[],"mappings":";;AAGA,8DAA2D;AAC3D,oDAAgD;AAEhD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,sEAAsE;IACnF,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,MAAM,EAAE;YACN,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,GAAG,4BAAY;KAChB;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAE1C,OAAO,OAAO,CAAC,wCAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE;YAChE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO;SACd,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,100 @@
|
|
|
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 actions_core_2 = require("@segment/actions-core");
|
|
8
|
+
const regional_endpoints_1 = require("./regional-endpoints");
|
|
9
|
+
const identifyUser_1 = __importDefault(require("./identifyUser"));
|
|
10
|
+
const groupIdentify_1 = __importDefault(require("./groupIdentify"));
|
|
11
|
+
const trackEvent_1 = __importDefault(require("./trackEvent"));
|
|
12
|
+
const trackPageView_1 = __importDefault(require("./trackPageView"));
|
|
13
|
+
const presets = [
|
|
14
|
+
{
|
|
15
|
+
name: 'Identify User',
|
|
16
|
+
subscribe: 'type = "identify"',
|
|
17
|
+
partnerAction: 'identifyUser',
|
|
18
|
+
mapping: actions_core_2.defaultValues(identifyUser_1.default.fields)
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'Group User',
|
|
22
|
+
subscribe: 'type = "group"',
|
|
23
|
+
partnerAction: 'groupIdentify',
|
|
24
|
+
mapping: actions_core_2.defaultValues(groupIdentify_1.default.fields)
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Track Event',
|
|
28
|
+
subscribe: 'type = "track"',
|
|
29
|
+
partnerAction: 'trackEvent',
|
|
30
|
+
mapping: actions_core_2.defaultValues(trackEvent_1.default.fields)
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'Track Page View',
|
|
34
|
+
subscribe: 'type = "page"',
|
|
35
|
+
partnerAction: 'trackPageView',
|
|
36
|
+
mapping: actions_core_2.defaultValues(trackPageView_1.default.fields)
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
const destination = {
|
|
40
|
+
name: 'Gainsight Px Cloud (Actions)',
|
|
41
|
+
slug: 'actions-gainsight-px-cloud',
|
|
42
|
+
mode: 'cloud',
|
|
43
|
+
authentication: {
|
|
44
|
+
scheme: 'basic',
|
|
45
|
+
fields: {
|
|
46
|
+
apiKey: {
|
|
47
|
+
label: 'API Key',
|
|
48
|
+
description: 'Gainsight PX API key. You can find this key in the "Administration/Products" screen.',
|
|
49
|
+
type: 'string',
|
|
50
|
+
required: true
|
|
51
|
+
},
|
|
52
|
+
dataCenter: {
|
|
53
|
+
label: 'Data center',
|
|
54
|
+
description: 'The PX data center where your PX subscription is hosted.',
|
|
55
|
+
type: 'string',
|
|
56
|
+
format: 'text',
|
|
57
|
+
required: true,
|
|
58
|
+
choices: [
|
|
59
|
+
{
|
|
60
|
+
label: 'North America',
|
|
61
|
+
value: 'north_america'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
label: 'Europe',
|
|
65
|
+
value: 'europe'
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
testAuthentication: async (request, { settings }) => {
|
|
71
|
+
const endpoint = regional_endpoints_1.getEndpointByRegion('track', settings.dataCenter);
|
|
72
|
+
const response = await request(endpoint, {
|
|
73
|
+
method: 'post',
|
|
74
|
+
username: settings.apiKey,
|
|
75
|
+
password: '',
|
|
76
|
+
json: [],
|
|
77
|
+
throwHttpErrors: false
|
|
78
|
+
});
|
|
79
|
+
if (response.status === 400) {
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
throw new actions_core_1.IntegrationError('Invalid API key', 'Invalid API Key', 401);
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
extendRequest({ settings }) {
|
|
86
|
+
return {
|
|
87
|
+
username: settings.apiKey,
|
|
88
|
+
password: ''
|
|
89
|
+
};
|
|
90
|
+
},
|
|
91
|
+
presets,
|
|
92
|
+
actions: {
|
|
93
|
+
identifyUser: identifyUser_1.default,
|
|
94
|
+
groupIdentify: groupIdentify_1.default,
|
|
95
|
+
trackEvent: trackEvent_1.default,
|
|
96
|
+
trackPageView: trackPageView_1.default
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
exports.default = destination;
|
|
100
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/gainsight-px-cloud-action/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAwD;AAExD,wDAAqD;AAErD,6DAA0D;AAC1D,kEAAyC;AACzC,oEAA2C;AAC3C,8DAAqC;AACrC,oEAA2C;AAG3C,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE,mBAAmB;QAC9B,aAAa,EAAE,cAAc;QAC7B,OAAO,EAAE,4BAAa,CAAC,sBAAY,CAAC,MAAM,CAAC;KAC5C;IACD;QACE,IAAI,EAAE,YAAY;QAClB,SAA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M;gBACd,QAAQ,EAAE,QAAQ,CAAC,MAAM;gBACzB,QAAQ,EAAE,EAAE;gBACZ,IAAI,EAAE,EAAE;gBACR,eAAe,EAAE,KAAK;aACvB,CAAC,CAAA;YAGF,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE;gBAC3B,OAAO,IAAI,CAAA;aACZ;YACD,MAAM,IAAI,+BAAgB,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,GAAG,CAAC,CAAA;QACvE,CAAC;KACF;IACD,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO;YACL,QAAQ,EAAE,QAAQ,CAAC,MAAM;YACzB,QAAQ,EAAE,EAAE;SACb,CAAA;IACH,CAAC;IACD,OAAO;IACP,OAAO,EAAE;QACP,YAAY,EAAZ,sBAAY;QACZ,aAAa,EAAb,uBAAa;QACb,UAAU,EAAV,oBAAU;QACV,aAAa,EAAb,uBAAa;KACd;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const endpoints: {
|
|
2
|
+
track: {
|
|
3
|
+
north_america: string;
|
|
4
|
+
europe: string;
|
|
5
|
+
};
|
|
6
|
+
batch: {
|
|
7
|
+
north_america: string;
|
|
8
|
+
europe: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare function getEndpointByRegion(endpoint: keyof typeof endpoints, region?: string): string;
|
|
12
|
+
export default endpoints;
|