@segment/action-destinations 3.331.7-staging → 3.331.7-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.
Files changed (119) hide show
  1. package/dist/destinations/absmartly/segment.d.ts +11 -0
  2. package/dist/destinations/absmartly/segment.js +3 -0
  3. package/dist/destinations/absmartly/segment.js.map +1 -0
  4. package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
  5. package/dist/destinations/braze/updateUserProfile/__snapshots__/__snapshots__/snapshot.test.js.snap +208 -0
  6. package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.d.ts +1 -0
  7. package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js +184 -0
  8. package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js.map +1 -0
  9. package/dist/destinations/display-video-360/addToAudience/generated-types.d.ts +1 -1
  10. package/dist/destinations/display-video-360/addToAudience/index.js +2 -3
  11. package/dist/destinations/display-video-360/addToAudience/index.js.map +1 -1
  12. package/dist/destinations/display-video-360/index.js +3 -3
  13. package/dist/destinations/display-video-360/index.js.map +1 -1
  14. package/dist/destinations/display-video-360/properties.d.ts +1 -1
  15. package/dist/destinations/display-video-360/properties.js +17 -14
  16. package/dist/destinations/display-video-360/properties.js.map +1 -1
  17. package/dist/destinations/display-video-360/removeFromAudience/generated-types.d.ts +1 -1
  18. package/dist/destinations/display-video-360/removeFromAudience/index.js +2 -3
  19. package/dist/destinations/display-video-360/removeFromAudience/index.js.map +1 -1
  20. package/dist/destinations/display-video-360/shared.js +3 -3
  21. package/dist/destinations/display-video-360/shared.js.map +1 -1
  22. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +3 -0
  23. package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +1 -1
  24. package/dist/destinations/gleap/generated-types.d.ts +3 -0
  25. package/dist/destinations/gleap/generated-types.js +3 -0
  26. package/dist/destinations/gleap/generated-types.js.map +1 -0
  27. package/dist/destinations/gleap/identifyContact/generated-types.d.ts +18 -0
  28. package/dist/destinations/gleap/identifyContact/generated-types.js +3 -0
  29. package/dist/destinations/gleap/identifyContact/generated-types.js.map +1 -0
  30. package/dist/destinations/gleap/identifyContact/index.d.ts +5 -0
  31. package/dist/destinations/gleap/identifyContact/index.js +155 -0
  32. package/dist/destinations/gleap/identifyContact/index.js.map +1 -0
  33. package/dist/destinations/gleap/index.d.ts +4 -0
  34. package/dist/destinations/gleap/index.js +52 -0
  35. package/dist/destinations/gleap/index.js.map +1 -0
  36. package/dist/destinations/gleap/trackEvent/generated-types.d.ts +10 -0
  37. package/dist/destinations/gleap/trackEvent/generated-types.js +3 -0
  38. package/dist/destinations/gleap/trackEvent/generated-types.js.map +1 -0
  39. package/dist/destinations/gleap/trackEvent/index.d.ts +5 -0
  40. package/dist/destinations/gleap/trackEvent/index.js +111 -0
  41. package/dist/destinations/gleap/trackEvent/index.js.map +1 -0
  42. package/dist/destinations/klaviyo/addProfileToList/generated-types.d.ts +2 -1
  43. package/dist/destinations/klaviyo/addProfileToList/index.js +7 -0
  44. package/dist/destinations/klaviyo/addProfileToList/index.js.map +1 -1
  45. package/dist/destinations/klaviyo/functions.d.ts +8 -0
  46. package/dist/destinations/klaviyo/functions.js +34 -1
  47. package/dist/destinations/klaviyo/functions.js.map +1 -1
  48. package/dist/destinations/klaviyo/properties.d.ts +2 -1
  49. package/dist/destinations/klaviyo/properties.js +8 -3
  50. package/dist/destinations/klaviyo/properties.js.map +1 -1
  51. package/dist/destinations/klaviyo/removeProfileFromList/generated-types.d.ts +1 -1
  52. package/dist/destinations/klaviyo/removeProfileToList/generated-types.d.ts +4 -0
  53. package/dist/destinations/klaviyo/removeProfileToList/generated-types.js +3 -0
  54. package/dist/destinations/klaviyo/removeProfileToList/generated-types.js.map +1 -0
  55. package/dist/destinations/klaviyo/removeProfileToList/index.d.ts +5 -0
  56. package/dist/destinations/klaviyo/removeProfileToList/index.js +41 -0
  57. package/dist/destinations/klaviyo/removeProfileToList/index.js.map +1 -0
  58. package/dist/destinations/klaviyo/upsertProfile/generated-types.d.ts +1 -0
  59. package/dist/destinations/klaviyo/upsertProfile/index.js +26 -1
  60. package/dist/destinations/klaviyo/upsertProfile/index.js.map +1 -1
  61. package/dist/destinations/linkedin-conversions/api/index.d.ts +1 -1
  62. package/dist/destinations/linkedin-conversions/api/index.js +1 -1
  63. package/dist/destinations/linkedin-conversions/streamConversion/index.js +1 -1
  64. package/dist/destinations/linkedin-conversions/streamConversion/index.js.map +1 -1
  65. package/dist/destinations/mixpanel/utils.d.ts +13 -0
  66. package/dist/destinations/mixpanel/utils.js +117 -0
  67. package/dist/destinations/mixpanel/utils.js.map +1 -0
  68. package/dist/destinations/tiktok-audiences/properties.js +5 -4
  69. package/dist/destinations/tiktok-audiences/properties.js.map +1 -1
  70. package/dist/destinations/tiktok-conversions/index.js +92 -3
  71. package/dist/destinations/tiktok-conversions/index.js.map +1 -1
  72. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -3
  73. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +33 -24
  74. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -1
  75. package/dist/destinations/tiktok-conversions/reportWebEvent/generated-types.d.ts +12 -4
  76. package/dist/destinations/tiktok-conversions/reportWebEvent/index.js +113 -40
  77. package/dist/destinations/tiktok-conversions/reportWebEvent/index.js.map +1 -1
  78. package/dist/destinations/tiktok-offline-conversions/index.js +199 -48
  79. package/dist/destinations/tiktok-offline-conversions/index.js.map +1 -1
  80. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +3 -0
  81. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +43 -0
  82. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +1 -0
  83. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.d.ts +33 -0
  84. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.js +3 -0
  85. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.js.map +1 -0
  86. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.d.ts +5 -0
  87. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js +317 -0
  88. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/index.js.map +1 -0
  89. package/dist/destinations/trackey/identifyUser/generated-types.d.ts +8 -0
  90. package/dist/destinations/trackey/identifyUser/generated-types.js +3 -0
  91. package/dist/destinations/trackey/identifyUser/generated-types.js.map +1 -0
  92. package/dist/destinations/trackey/identifyUser/index.d.ts +5 -0
  93. package/dist/destinations/trackey/identifyUser/index.js +52 -0
  94. package/dist/destinations/trackey/identifyUser/index.js.map +1 -0
  95. package/dist/destinations/trackey/identifyUser.types.d.ts +8 -0
  96. package/dist/destinations/trackey/identifyUser.types.js +3 -0
  97. package/dist/destinations/trackey/identifyUser.types.js.map +1 -0
  98. package/dist/destinations/trackey/registerCompany/generated-types.d.ts +9 -0
  99. package/dist/destinations/trackey/registerCompany/generated-types.js +3 -0
  100. package/dist/destinations/trackey/registerCompany/generated-types.js.map +1 -0
  101. package/dist/destinations/trackey/registerCompany/index.d.ts +5 -0
  102. package/dist/destinations/trackey/registerCompany/index.js +60 -0
  103. package/dist/destinations/trackey/registerCompany/index.js.map +1 -0
  104. package/dist/destinations/trackey/registerCompany.types.d.ts +9 -0
  105. package/dist/destinations/trackey/registerCompany.types.js +3 -0
  106. package/dist/destinations/trackey/registerCompany.types.js.map +1 -0
  107. package/dist/destinations/trackey/trackEvent/generated-types.d.ts +12 -0
  108. package/dist/destinations/trackey/trackEvent/generated-types.js +3 -0
  109. package/dist/destinations/trackey/trackEvent/generated-types.js.map +1 -0
  110. package/dist/destinations/trackey/trackEvent/index.d.ts +5 -0
  111. package/dist/destinations/trackey/trackEvent/index.js +68 -0
  112. package/dist/destinations/trackey/trackEvent/index.js.map +1 -0
  113. package/dist/destinations/trackey/trackEvent.types.d.ts +12 -0
  114. package/dist/destinations/trackey/trackEvent.types.js +3 -0
  115. package/dist/destinations/trackey/trackEvent.types.js.map +1 -0
  116. package/package.json +1 -1
  117. package/dist/destinations/display-video-360/listManagement.d.ts +0 -9
  118. package/dist/destinations/display-video-360/listManagement.js +0 -16
  119. package/dist/destinations/display-video-360/listManagement.js.map +0 -1
@@ -0,0 +1,33 @@
1
+ export interface Payload {
2
+ event: string;
3
+ event_id?: string;
4
+ timestamp?: string;
5
+ phone_numbers?: string[];
6
+ emails?: string[];
7
+ external_ids?: string[];
8
+ ttclid?: string;
9
+ ttp?: string;
10
+ lead_id?: string;
11
+ locale?: string;
12
+ url?: string;
13
+ referrer?: string;
14
+ ip?: string;
15
+ user_agent?: string;
16
+ contents?: {
17
+ price?: number;
18
+ quantity?: number;
19
+ content_category?: string;
20
+ content_id?: string;
21
+ content_name?: string;
22
+ brand?: string;
23
+ }[];
24
+ content_type?: string;
25
+ currency?: string;
26
+ value?: number;
27
+ description?: string;
28
+ query?: string;
29
+ order_id?: string;
30
+ shop_id?: string;
31
+ limited_data_use?: boolean;
32
+ test_event_code?: string;
33
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-offline-conversions/reportOfflineEvent/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,317 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const actions_core_1 = require("@segment/actions-core");
4
+ const formatter_1 = require("./formatter");
5
+ const action = {
6
+ title: 'Track Payment Offline Conversion',
7
+ description: 'Send details of an in-store purchase or console purchase to the Tiktok Offline Events API',
8
+ fields: {
9
+ event: {
10
+ label: 'Event Name',
11
+ type: 'string',
12
+ required: true,
13
+ description: 'Conversion event name. Please refer to the "Offline Standard Events" section on in TikTok’s [Events API 2.0 documentation](https://business-api.tiktok.com/portal/docs?id=1771101186666498) for accepted event names.'
14
+ },
15
+ event_id: {
16
+ label: 'Event ID',
17
+ type: 'string',
18
+ description: 'Any hashed ID that can identify a unique user/session.',
19
+ default: {
20
+ '@path': '$.messageId'
21
+ }
22
+ },
23
+ timestamp: {
24
+ label: 'Event Timestamp',
25
+ type: 'string',
26
+ description: 'Timestamp that the event took place, in ISO 8601 format.',
27
+ default: {
28
+ '@path': '$.timestamp'
29
+ }
30
+ },
31
+ phone_numbers: {
32
+ label: 'Phone Numbers',
33
+ description: 'A single phone number or array of phone numbers in E.164 standard format. Segment will hash this value before sending to TikTok. At least one phone number is required if no value is provided in the Emails field.',
34
+ type: 'string',
35
+ multiple: true,
36
+ default: {
37
+ '@if': {
38
+ exists: { '@path': '$.properties.phone' },
39
+ then: { '@path': '$.properties.phone' },
40
+ else: { '@path': '$.traits.phone' }
41
+ }
42
+ }
43
+ },
44
+ emails: {
45
+ label: 'Emails',
46
+ description: 'A single email address or an array of email addresses. Segment will hash this value before sending to TikTok. At least one email is required if no value is provided in the Phone Numbers field.',
47
+ type: 'string',
48
+ multiple: true,
49
+ default: {
50
+ '@if': {
51
+ exists: { '@path': '$.properties.email' },
52
+ then: { '@path': '$.properties.email' },
53
+ else: { '@path': '$.traits.email' }
54
+ }
55
+ }
56
+ },
57
+ external_ids: {
58
+ label: 'External ID',
59
+ description: 'Uniquely identifies the user who triggered the conversion event. Segment will hash this value before sending to TikTok.',
60
+ type: 'string',
61
+ multiple: true,
62
+ default: {
63
+ '@if': {
64
+ exists: { '@path': '$.userId' },
65
+ then: { '@path': '$.userId' },
66
+ else: { '@path': '$.anonymousId' }
67
+ }
68
+ }
69
+ },
70
+ ttclid: {
71
+ label: 'TikTok Click ID',
72
+ description: 'The value of the ttclid used to match website visitor events with TikTok ads. The ttclid is valid for 7 days. See [Set up ttclid](https://ads.tiktok.com/marketing_api/docs?rid=4eezrhr6lg4&id=1681728034437121) for details.',
73
+ type: 'string',
74
+ default: {
75
+ '@if': {
76
+ exists: { '@path': '$.properties.ttclid' },
77
+ then: { '@path': '$.properties.ttclid' },
78
+ else: { '@path': '$.traits.ttclid' }
79
+ }
80
+ }
81
+ },
82
+ ttp: {
83
+ label: 'TikTok Cookie ID',
84
+ description: 'TikTok Cookie ID. If you also use Pixel SDK and have enabled cookies, Pixel SDK automatically saves a unique identifier in the `_ttp` cookie. The value of `_ttp` is used to match website visitor events with TikTok ads. You can extract the value of `_ttp` and attach the value here. To learn more about the `ttp` parameter, refer to [Events API 2.0 - Send TikTok Cookie](https://ads.tiktok.com/marketing_api/docs?id=%201771100936446977) (`_ttp`).',
85
+ type: 'string',
86
+ default: {
87
+ '@if': {
88
+ exists: { '@path': '$.properties.ttp' },
89
+ then: { '@path': '$.properties.ttp' },
90
+ else: { '@path': '$.integrations.TikTok Pixel.ttp' }
91
+ }
92
+ }
93
+ },
94
+ lead_id: {
95
+ label: 'TikTok Lead ID',
96
+ description: 'ID of TikTok leads. Every lead will have its own lead_id when exported from TikTok. This feature is in Beta. Please contact your TikTok representative to inquire regarding availability',
97
+ type: 'string',
98
+ default: {
99
+ '@if': {
100
+ exists: { '@path': '$.properties.lead_id' },
101
+ then: { '@path': '$.properties.lead_id' },
102
+ else: { '@path': '$.traits.lead_id' }
103
+ }
104
+ }
105
+ },
106
+ locale: {
107
+ label: 'Locale',
108
+ description: 'The BCP 47 language identifier. For reference, refer to the [IETF BCP 47 standardized code](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).',
109
+ type: 'string',
110
+ default: {
111
+ '@path': '$.context.locale'
112
+ }
113
+ },
114
+ url: {
115
+ label: 'Page URL',
116
+ type: 'string',
117
+ description: 'The page URL where the conversion event took place.',
118
+ default: {
119
+ '@path': '$.context.page.url'
120
+ }
121
+ },
122
+ referrer: {
123
+ label: 'Page Referrer',
124
+ type: 'string',
125
+ description: 'The page referrer.',
126
+ default: {
127
+ '@path': '$.context.page.referrer'
128
+ }
129
+ },
130
+ ip: {
131
+ label: 'IP Address',
132
+ type: 'string',
133
+ description: 'IP address of the browser.',
134
+ default: {
135
+ '@path': '$.context.ip'
136
+ }
137
+ },
138
+ user_agent: {
139
+ label: 'User Agent',
140
+ type: 'string',
141
+ description: 'User agent from the user’s device.',
142
+ default: {
143
+ '@path': '$.context.userAgent'
144
+ }
145
+ },
146
+ contents: {
147
+ label: 'Contents',
148
+ type: 'object',
149
+ multiple: true,
150
+ description: 'Related items in a web event.',
151
+ properties: {
152
+ price: {
153
+ label: 'Price',
154
+ description: 'Price of the item.',
155
+ type: 'number'
156
+ },
157
+ quantity: {
158
+ label: 'Quantity',
159
+ description: 'Number of items.',
160
+ type: 'number'
161
+ },
162
+ content_category: {
163
+ label: 'Content Category',
164
+ description: 'Category of the product item.',
165
+ type: 'string'
166
+ },
167
+ content_id: {
168
+ label: 'Content ID',
169
+ description: 'ID of the product item.',
170
+ type: 'string'
171
+ },
172
+ content_name: {
173
+ label: 'Content Name',
174
+ description: 'Name of the product item.',
175
+ type: 'string'
176
+ },
177
+ brand: {
178
+ label: 'Brand',
179
+ description: 'Brand name of the product item.',
180
+ type: 'string'
181
+ }
182
+ }
183
+ },
184
+ content_type: {
185
+ label: 'Content Type',
186
+ description: 'Type of the product item. When the `content_id` in the `contents` parameter is specified as `sku_id`, set this field to `product`. When the `content_id` in the `contents` parameter is specified as `item_group_id`, set this field to `product_group`.',
187
+ type: 'string',
188
+ choices: ['product', 'product_group'],
189
+ default: 'product'
190
+ },
191
+ currency: {
192
+ label: 'Currency',
193
+ type: 'string',
194
+ description: 'Currency for the value specified as ISO 4217 code.',
195
+ default: {
196
+ '@path': '$.properties.currency'
197
+ }
198
+ },
199
+ value: {
200
+ label: 'Value',
201
+ type: 'number',
202
+ description: 'Value of the order or items sold.',
203
+ default: {
204
+ '@if': {
205
+ exists: { '@path': '$.properties.value' },
206
+ then: { '@path': '$.properties.value' },
207
+ else: { '@path': '$.properties.revenue' }
208
+ }
209
+ }
210
+ },
211
+ description: {
212
+ label: 'Description',
213
+ type: 'string',
214
+ description: 'A string description of the web event.'
215
+ },
216
+ query: {
217
+ label: 'Query',
218
+ type: 'string',
219
+ description: 'The text string that was searched for.',
220
+ default: {
221
+ '@path': '$.properties.query'
222
+ }
223
+ },
224
+ order_id: {
225
+ label: 'Order ID',
226
+ type: 'string',
227
+ description: 'Order ID of the transaction.',
228
+ default: {
229
+ '@path': '$.properties.order_id'
230
+ }
231
+ },
232
+ shop_id: {
233
+ label: 'Shop ID',
234
+ type: 'string',
235
+ description: 'Shop ID of the transaction.',
236
+ default: {
237
+ '@path': '$.properties.shop_id'
238
+ }
239
+ },
240
+ limited_data_use: {
241
+ label: 'Limited Data Use',
242
+ type: 'boolean',
243
+ description: 'Use this field to flag an event for limited data processing. TikTok will recognize this parameter as a request for limited data processing, and will limit its processing activities accordingly if the event shared occurred in an eligible location. To learn more about the Limited Data Use feature, refer to [Events API 2.0 - Limited Data Use](https://ads.tiktok.com/marketing_api/docs?id=1771101204435970).',
244
+ default: {
245
+ '@path': '$.properties.limited_data_use'
246
+ }
247
+ },
248
+ test_event_code: {
249
+ label: 'Test Event Code',
250
+ type: 'string',
251
+ description: 'Use this field to specify that events should be test events rather than actual traffic. You can find your Test Event Code in your TikTok Events Manager under the "Test Event" tab. You\'ll want to remove your Test Event Code when sending real traffic through this integration.'
252
+ }
253
+ },
254
+ perform: (request, { payload, settings }) => {
255
+ const phone_numbers = formatter_1.formatPhones(payload.phone_numbers);
256
+ const emails = formatter_1.formatEmails(payload.emails);
257
+ const userIds = formatter_1.formatUserIds(payload.external_ids);
258
+ if (phone_numbers.length < 1 && emails.length < 1 && userIds.length < 1)
259
+ throw new actions_core_1.PayloadValidationError('TikTok Offline Conversions API requires an email address and/or phone number');
260
+ let payloadUrl, urlTtclid;
261
+ if (payload.url) {
262
+ try {
263
+ payloadUrl = new URL(payload.url);
264
+ }
265
+ catch (error) {
266
+ }
267
+ }
268
+ if (payloadUrl)
269
+ urlTtclid = payloadUrl.searchParams.get('ttclid');
270
+ return request('https://business-api.tiktok.com/open_api/v1.3/event/track/', {
271
+ method: 'post',
272
+ json: {
273
+ event_source: 'offline',
274
+ event_source_id: settings.eventSetID,
275
+ partner_name: 'Segment',
276
+ data: [
277
+ {
278
+ event: payload.event,
279
+ event_time: payload.timestamp
280
+ ? Math.floor(new Date(payload.timestamp).getTime() / 1000)
281
+ : Math.floor(new Date().getTime() / 1000),
282
+ event_id: payload.event_id ? `${payload.event_id}` : undefined,
283
+ user: {
284
+ ttclid: payload.ttclid ? payload.ttclid : urlTtclid ? urlTtclid : undefined,
285
+ external_id: userIds,
286
+ phone_number: phone_numbers,
287
+ email: emails,
288
+ lead_id: payload.lead_id ? payload.lead_id : undefined,
289
+ ttp: payload.ttp ? payload.ttp : undefined,
290
+ ip: payload.ip ? payload.ip : undefined,
291
+ user_agent: payload.user_agent ? payload.user_agent : undefined,
292
+ locale: payload.locale ? payload.locale : undefined
293
+ },
294
+ properties: {
295
+ contents: payload.contents ? payload.contents : [],
296
+ content_type: payload.content_type ? payload.content_type : undefined,
297
+ currency: payload.currency ? payload.currency : undefined,
298
+ value: payload.value ? payload.value : undefined,
299
+ query: payload.query ? payload.query : undefined,
300
+ description: payload.description ? payload.description : undefined,
301
+ order_id: payload.order_id ? payload.order_id : undefined,
302
+ shop_id: payload.shop_id ? payload.shop_id : undefined
303
+ },
304
+ page: {
305
+ url: payload.url ? payload.url : undefined,
306
+ referrer: payload.referrer ? payload.referrer : undefined
307
+ },
308
+ limited_data_use: payload.limited_data_use ? payload.limited_data_use : false,
309
+ test_event_code: payload.test_event_code ? payload.test_event_code : undefined
310
+ }
311
+ ]
312
+ }
313
+ });
314
+ }
315
+ };
316
+ exports.default = action;
317
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-offline-conversions/reportOfflineEvent/index.ts"],"names":[],"mappings":";;AAAA,wDAAgF;AAGhF,2CAAuE;AAEvE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kCAAkC;IACzC,WAAW,EAAE,2FAA2F;IACxG,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EACT,uNAAuN;SAC1N;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,wDAAwD;YACrE,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,SAAS,EAAE;YACT,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,0DAA0D;YACvE,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QAED,aAAa,EAAE;YACb,KAAK,EAAE,eAAe;YACtB,WAAW,EACT,qNAAqN;YACvN,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;oBACzC,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;oBACvC,IAAI,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;iBACpC;aACF;SACF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,WAAW,EACT,kMAAkM;YACpM,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;oBACzC,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;oBAC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,CAAC,KAAK;wBAC7E,eAAe,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS;qBAC/E;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,8 @@
1
+ export interface Payload {
2
+ userId: string;
3
+ messageId?: string;
4
+ timestamp: string;
5
+ traits?: {
6
+ [k: string]: unknown;
7
+ };
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/trackey/identifyUser/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const constants_1 = require("../constants");
4
+ const action = {
5
+ title: 'Identify User',
6
+ description: 'Identify a user',
7
+ defaultSubscription: 'type = "identify"',
8
+ fields: {
9
+ userId: {
10
+ label: 'User ID',
11
+ type: 'string',
12
+ required: true,
13
+ description: 'The user identifier to associate the event with',
14
+ default: { '@path': '$.userId' }
15
+ },
16
+ messageId: {
17
+ label: 'Message ID',
18
+ type: 'string',
19
+ description: 'A unique value for each event.',
20
+ default: {
21
+ '@path': '$.messageId'
22
+ }
23
+ },
24
+ timestamp: {
25
+ label: 'Event Timestamp',
26
+ type: 'string',
27
+ required: true,
28
+ description: 'Timestamp that the event took place, in ISO 8601 format. e.g. 2019-06-12T19:11:01.152Z',
29
+ default: { '@path': '$.timestamp' }
30
+ },
31
+ traits: {
32
+ label: 'User Traits',
33
+ type: 'object',
34
+ required: false,
35
+ description: 'User profile information',
36
+ default: { '@path': '$.traits' }
37
+ }
38
+ },
39
+ perform: (request, { payload }) => {
40
+ return request(constants_1.baseUrl, {
41
+ method: 'POST',
42
+ json: {
43
+ userId: payload.userId,
44
+ messageId: payload.messageId,
45
+ timestamp: payload.timestamp,
46
+ traits: payload.traits
47
+ }
48
+ });
49
+ }
50
+ };
51
+ exports.default = action;
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/trackey/identifyUser/index.ts"],"names":[],"mappings":";;AAGA,4CAAsC;AAEtC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,iBAAiB;IAC9B,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,MAAM,EAAE;YACN,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,iDAAiD;YAC9D,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;QACD,SAAS,EAAE;YACT,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,gCAAgC;YAC7C,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,SAAS,EAAE;YACT,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,wFAAwF;YACrG,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;SACpC;QACD,MAAM,EAAE;YACN,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,0BAA0B;YACvC,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,OAAO,OAAO,CAAC,mBAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;aACvB;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,8 @@
1
+ export interface Payload {
2
+ userId: string;
3
+ messageId?: string;
4
+ timestamp: string;
5
+ traits?: {
6
+ [k: string]: unknown;
7
+ };
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=identifyUser.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identifyUser.types.js","sourceRoot":"","sources":["../../../src/destinations/trackey/identifyUser.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export interface Payload {
2
+ userId: string;
3
+ messageId?: string;
4
+ timestamp: string;
5
+ traits?: {
6
+ [k: string]: unknown;
7
+ };
8
+ groupId: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/trackey/registerCompany/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const constants_1 = require("../constants");
4
+ const action = {
5
+ title: 'Register Company',
6
+ description: 'Register a user in a company',
7
+ defaultSubscription: 'type = "group"',
8
+ fields: {
9
+ userId: {
10
+ label: 'User ID',
11
+ type: 'string',
12
+ required: true,
13
+ description: 'The user identifier to associate the event with',
14
+ default: { '@path': '$.userId' }
15
+ },
16
+ messageId: {
17
+ label: 'Message ID',
18
+ type: 'string',
19
+ description: 'A unique value for each event.',
20
+ default: {
21
+ '@path': '$.messageId'
22
+ }
23
+ },
24
+ timestamp: {
25
+ label: 'Event Timestamp',
26
+ type: 'string',
27
+ required: true,
28
+ description: 'Timestamp that the event took place, in ISO 8601 format. e.g. 2019-06-12T19:11:01.152Z',
29
+ default: { '@path': '$.timestamp' }
30
+ },
31
+ traits: {
32
+ label: 'COmpany Traits',
33
+ type: 'object',
34
+ required: false,
35
+ description: 'Company profile information',
36
+ default: { '@path': '$.traits' }
37
+ },
38
+ groupId: {
39
+ label: 'Group ID',
40
+ type: 'string',
41
+ required: true,
42
+ description: 'Company ID associated with the event',
43
+ default: { '@path': '$.groupId' }
44
+ }
45
+ },
46
+ perform: (request, { payload }) => {
47
+ return request(constants_1.baseUrl, {
48
+ method: 'POST',
49
+ json: {
50
+ userId: payload.userId,
51
+ messageId: payload.messageId,
52
+ timestamp: payload.timestamp,
53
+ traits: payload.traits,
54
+ groupId: payload.groupId
55
+ }
56
+ });
57
+ }
58
+ };
59
+ exports.default = action;
60
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/trackey/registerCompany/index.ts"],"names":[],"mappings":";;AAGA,4CAAsC;AAEtC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,8BAA8B;IAC3C,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,MAAM,EAAE;YACN,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,iDAAiD;YAC9D,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;QACD,SAAS,EAAE;YACT,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,gCAAgC;YAC7C,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,SAAS,EAAE;YACT,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,wFAAwF;YACrG,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;SACpC;QACD,MAAM,EAAE;YACN,KAAK,EAAE,gBAAgB;YACvB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,6BAA6B;YAC1C,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;QACD,OAAO,EAAE;YACP,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,sCAAsC;YACnD,OAAO,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;SAClC;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,OAAO,OAAO,CAAC,mBAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,OAAO,EAAE,OAAO,CAAC,OAAO;aACzB;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,9 @@
1
+ export interface Payload {
2
+ userId: string;
3
+ messageId?: string;
4
+ timestamp: string;
5
+ traits?: {
6
+ [k: string]: unknown;
7
+ };
8
+ groupId: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=registerCompany.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerCompany.types.js","sourceRoot":"","sources":["../../../src/destinations/trackey/registerCompany.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ export interface Payload {
2
+ userId: string;
3
+ event: string;
4
+ messageId?: string;
5
+ timestamp: string;
6
+ properties?: {
7
+ [k: string]: unknown;
8
+ };
9
+ groupId?: {
10
+ [k: string]: unknown;
11
+ };
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/trackey/trackEvent/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;