@segment/action-destinations 3.162.1-staging.64 → 3.164.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.
Files changed (96) hide show
  1. package/dist/destinations/engage-messaging-twilio/index.js +1 -3
  2. package/dist/destinations/engage-messaging-twilio/index.js.map +1 -1
  3. package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
  4. package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js +1 -1
  5. package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js.map +1 -1
  6. package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js.map +1 -1
  7. package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js.map +1 -1
  8. package/dist/destinations/engage-messaging-twilio/utils/message-sender.js +16 -18
  9. package/dist/destinations/engage-messaging-twilio/utils/message-sender.js.map +1 -1
  10. package/dist/destinations/facebook-conversions-api/addToCart/index.js +46 -2
  11. package/dist/destinations/facebook-conversions-api/addToCart/index.js.map +1 -1
  12. package/dist/destinations/facebook-conversions-api/index.js +1 -1
  13. package/dist/destinations/facebook-conversions-api/index.js.map +1 -1
  14. package/dist/destinations/google-enhanced-conversions/functions.d.ts +1 -1
  15. package/dist/destinations/google-enhanced-conversions/functions.js +2 -3
  16. package/dist/destinations/google-enhanced-conversions/functions.js.map +1 -1
  17. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +2 -2
  18. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -1
  19. package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js +5 -5
  20. package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js.map +1 -1
  21. package/dist/destinations/google-sheets-dev/index.js +3 -10
  22. package/dist/destinations/google-sheets-dev/index.js.map +1 -1
  23. package/dist/destinations/index.js +2 -0
  24. package/dist/destinations/index.js.map +1 -1
  25. package/dist/destinations/liveramp-audiences/audienceEntered/generated-types.d.ts +9 -0
  26. package/dist/destinations/liveramp-audiences/audienceEntered/generated-types.js.map +1 -0
  27. package/dist/destinations/liveramp-audiences/audienceEntered/index.js +54 -0
  28. package/dist/destinations/liveramp-audiences/audienceEntered/index.js.map +1 -0
  29. package/dist/destinations/liveramp-audiences/audienceEntered/operations.d.ts +6 -0
  30. package/dist/destinations/liveramp-audiences/audienceEntered/operations.js +42 -0
  31. package/dist/destinations/liveramp-audiences/audienceEntered/operations.js.map +1 -0
  32. package/dist/destinations/liveramp-audiences/generated-types.d.ts +10 -0
  33. package/dist/destinations/{engage-messaging-twilio/utils/types.js → liveramp-audiences/generated-types.js} +1 -1
  34. package/dist/destinations/liveramp-audiences/generated-types.js.map +1 -0
  35. package/dist/destinations/liveramp-audiences/index.d.ts +4 -0
  36. package/dist/destinations/liveramp-audiences/index.js +69 -0
  37. package/dist/destinations/liveramp-audiences/index.js.map +1 -0
  38. package/dist/destinations/liveramp-audiences/s3.d.ts +5 -0
  39. package/dist/destinations/liveramp-audiences/s3.js +37 -0
  40. package/dist/destinations/liveramp-audiences/s3.js.map +1 -0
  41. package/dist/destinations/revx/generated-types.d.ts +3 -0
  42. package/dist/destinations/revx/generated-types.js +3 -0
  43. package/dist/destinations/revx/generated-types.js.map +1 -0
  44. package/dist/destinations/revx/index.d.ts +4 -0
  45. package/dist/destinations/revx/index.js +36 -0
  46. package/dist/destinations/revx/index.js.map +1 -0
  47. package/dist/destinations/revx/sendRevxPing/generated-types.d.ts +41 -0
  48. package/dist/destinations/revx/sendRevxPing/generated-types.js +3 -0
  49. package/dist/destinations/revx/sendRevxPing/generated-types.js.map +1 -0
  50. package/dist/destinations/revx/sendRevxPing/index.d.ts +5 -0
  51. package/dist/destinations/revx/sendRevxPing/index.js +268 -0
  52. package/dist/destinations/revx/sendRevxPing/index.js.map +1 -0
  53. package/dist/destinations/segment-profiles/generated-types.d.ts +0 -1
  54. package/dist/destinations/segment-profiles/helperFunctions.d.ts +0 -7
  55. package/dist/destinations/segment-profiles/helperFunctions.js +1 -45
  56. package/dist/destinations/segment-profiles/helperFunctions.js.map +1 -1
  57. package/dist/destinations/segment-profiles/index.js +0 -14
  58. package/dist/destinations/segment-profiles/index.js.map +1 -1
  59. package/dist/destinations/segment-profiles/properties.js +10 -1
  60. package/dist/destinations/segment-profiles/properties.js.map +1 -1
  61. package/dist/destinations/segment-profiles/sendGroup/index.js +0 -8
  62. package/dist/destinations/segment-profiles/sendGroup/index.js.map +1 -1
  63. package/dist/destinations/segment-profiles/sendIdentify/index.js +0 -8
  64. package/dist/destinations/segment-profiles/sendIdentify/index.js.map +1 -1
  65. package/dist/destinations/usermaven/common-definitions.js +1 -1
  66. package/dist/destinations/usermaven/group/generated-types.d.ts +1 -1
  67. package/dist/destinations/usermaven/identify/generated-types.d.ts +1 -1
  68. package/dist/destinations/usermaven/index.js +9 -1
  69. package/dist/destinations/usermaven/index.js.map +1 -1
  70. package/dist/destinations/usermaven/page/generated-types.d.ts +31 -0
  71. package/dist/destinations/usermaven/page/generated-types.js +3 -0
  72. package/dist/destinations/usermaven/page/generated-types.js.map +1 -0
  73. package/dist/destinations/usermaven/page/index.d.ts +5 -0
  74. package/dist/destinations/usermaven/page/index.js +58 -0
  75. package/dist/destinations/usermaven/page/index.js.map +1 -0
  76. package/dist/destinations/usermaven/request-params.js +12 -8
  77. package/dist/destinations/usermaven/request-params.js.map +1 -1
  78. package/dist/destinations/usermaven/track/generated-types.d.ts +1 -1
  79. package/dist/lib/AWS/s3.d.ts +4 -0
  80. package/dist/lib/AWS/s3.js +21 -0
  81. package/dist/lib/AWS/s3.js.map +1 -0
  82. package/package.json +5 -4
  83. package/dist/destinations/engage-messaging-twilio/sendPush/generated-types.d.ts +0 -20
  84. package/dist/destinations/engage-messaging-twilio/sendPush/generated-types.js.map +0 -1
  85. package/dist/destinations/engage-messaging-twilio/sendPush/index.js +0 -125
  86. package/dist/destinations/engage-messaging-twilio/sendPush/index.js.map +0 -1
  87. package/dist/destinations/engage-messaging-twilio/sendPush/push-sender.d.ts +0 -17
  88. package/dist/destinations/engage-messaging-twilio/sendPush/push-sender.js +0 -147
  89. package/dist/destinations/engage-messaging-twilio/sendPush/push-sender.js.map +0 -1
  90. package/dist/destinations/engage-messaging-twilio/utils/content.d.ts +0 -2
  91. package/dist/destinations/engage-messaging-twilio/utils/content.js +0 -15
  92. package/dist/destinations/engage-messaging-twilio/utils/content.js.map +0 -1
  93. package/dist/destinations/engage-messaging-twilio/utils/types.d.ts +0 -10
  94. package/dist/destinations/engage-messaging-twilio/utils/types.js.map +0 -1
  95. /package/dist/destinations/{engage-messaging-twilio/sendPush → liveramp-audiences/audienceEntered}/generated-types.js +0 -0
  96. /package/dist/destinations/{engage-messaging-twilio/sendPush → liveramp-audiences/audienceEntered}/index.d.ts +0 -0
@@ -0,0 +1,268 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const action = {
4
+ title: 'Send Revx Ping',
5
+ description: 'Send event to revx',
6
+ defaultSubscription: 'type = "track" or type ="screen"',
7
+ fields: {
8
+ os: {
9
+ label: 'Platform',
10
+ type: 'string',
11
+ description: 'Platform of the device.',
12
+ required: true,
13
+ default: {
14
+ '@path': '$.context.device.type'
15
+ }
16
+ },
17
+ advertising_id: {
18
+ label: 'Identifier For Advertiser (IDFA/GAID)',
19
+ type: 'string',
20
+ description: 'Identifier For Advertiser (IDFA/GAID)',
21
+ default: { '@path': '$.context.device.advertisingId' }
22
+ },
23
+ event_name: {
24
+ label: 'Event name',
25
+ description: 'A unique identifier for your event.',
26
+ type: 'string',
27
+ default: {
28
+ '@if': {
29
+ exists: { '@path': '$.name' },
30
+ then: { '@path': '$.name' },
31
+ else: { '@path': '$.event' }
32
+ }
33
+ }
34
+ },
35
+ type: {
36
+ label: 'Request type',
37
+ description: 'A unique identifier for your request type.',
38
+ type: 'string',
39
+ default: { '@path': '$.type' }
40
+ },
41
+ idfv: {
42
+ label: 'Identifier For Vendor (IDFV)',
43
+ type: 'string',
44
+ description: 'Identifier for Device Id for IOS and Android',
45
+ default: {
46
+ '@path': '$.context.device.id'
47
+ }
48
+ },
49
+ time: {
50
+ label: 'Timestamp',
51
+ type: 'datetime',
52
+ description: 'The timestamp of the event. If time is not sent with the event, it will be set to the request upload time.',
53
+ default: {
54
+ '@path': '$.timestamp'
55
+ }
56
+ },
57
+ event_properties: {
58
+ label: 'Event Properties',
59
+ type: 'object',
60
+ description: 'An object of key-value pairs that represent additional data to be sent along with the event.',
61
+ default: {
62
+ '@path': '$.properties'
63
+ }
64
+ },
65
+ user_properties: {
66
+ label: 'User Properties',
67
+ type: 'object',
68
+ description: 'An object of key-value pairs that represent additional data tied to the user',
69
+ default: {
70
+ '@path': '$.context.traits'
71
+ }
72
+ },
73
+ app_version: {
74
+ label: 'App Version',
75
+ type: 'string',
76
+ description: 'The current version of your application.',
77
+ default: {
78
+ '@path': '$.context.app.version'
79
+ }
80
+ },
81
+ os_name: {
82
+ label: 'OS Name',
83
+ type: 'string',
84
+ description: 'The name of the mobile operating system or browser that the user is using.',
85
+ default: {
86
+ '@path': '$.context.os.name'
87
+ }
88
+ },
89
+ os_version: {
90
+ label: 'OS Version',
91
+ type: 'string',
92
+ description: 'The version of the mobile operating system or browser the user is using.',
93
+ default: {
94
+ '@path': '$.context.os.version'
95
+ }
96
+ },
97
+ device_brand: {
98
+ label: 'Device Brand',
99
+ type: 'string',
100
+ description: 'The device brand that the user is using.',
101
+ default: {
102
+ '@path': '$.context.device.brand'
103
+ }
104
+ },
105
+ device_manufacturer: {
106
+ label: 'Device Manufacturer',
107
+ type: 'string',
108
+ description: 'The device manufacturer that the user is using.',
109
+ default: {
110
+ '@path': '$.context.device.manufacturer'
111
+ }
112
+ },
113
+ device_model: {
114
+ label: 'Device Model',
115
+ type: 'string',
116
+ description: 'The device model that the user is using.',
117
+ default: {
118
+ '@path': '$.context.device.model'
119
+ }
120
+ },
121
+ carrier: {
122
+ label: 'Carrier',
123
+ type: 'string',
124
+ description: 'The carrier that the user is using.',
125
+ default: {
126
+ '@path': '$.context.network.carrier'
127
+ }
128
+ },
129
+ country: {
130
+ label: 'Country',
131
+ type: 'string',
132
+ description: 'The current country of the user.',
133
+ default: {
134
+ '@path': '$.context.location.country'
135
+ }
136
+ },
137
+ region: {
138
+ label: 'Region',
139
+ type: 'string',
140
+ description: 'The current region of the user.',
141
+ default: {
142
+ '@path': '$.context.location.region'
143
+ }
144
+ },
145
+ city: {
146
+ label: 'City',
147
+ type: 'string',
148
+ description: 'The current city of the user.',
149
+ default: {
150
+ '@path': '$.context.location.city'
151
+ }
152
+ },
153
+ dma: {
154
+ label: 'Designated Market Area',
155
+ type: 'string',
156
+ description: 'The current Designated Market Area of the user.'
157
+ },
158
+ language: {
159
+ label: 'Language',
160
+ type: 'string',
161
+ description: 'The language set by the user.',
162
+ default: {
163
+ '@path': '$.context.locale'
164
+ }
165
+ },
166
+ product: {
167
+ label: 'Product',
168
+ description: 'The single product viewed or Added to cart.',
169
+ type: 'object',
170
+ additionalProperties: true,
171
+ properties: {
172
+ price: {
173
+ label: 'Price',
174
+ type: 'number',
175
+ description: 'The price of the item purchased. Required for revenue data if the revenue field is not sent. You can use negative values to indicate refunds.'
176
+ },
177
+ quantity: {
178
+ label: 'Quantity',
179
+ type: 'integer',
180
+ description: 'The quantity of the item purchased. Defaults to 1 if not specified.'
181
+ },
182
+ productId: {
183
+ label: 'Product ID',
184
+ type: 'string',
185
+ description: 'An identifier for the item purchased. You must send a price and quantity or revenue with this field.'
186
+ }
187
+ },
188
+ default: {
189
+ price: { '@path': '$.properties.price' },
190
+ quantity: { '@path': '$.properties.quantity' },
191
+ productId: { '@path': '$.properties.product_id' }
192
+ }
193
+ },
194
+ products: {
195
+ label: 'Products',
196
+ description: 'The list of products purchased.',
197
+ type: 'object',
198
+ multiple: true,
199
+ additionalProperties: true,
200
+ properties: {
201
+ price: {
202
+ label: 'Price',
203
+ type: 'number',
204
+ description: 'The price of the item purchased. Required for revenue data if the revenue field is not sent. You can use negative values to indicate refunds.'
205
+ },
206
+ quantity: {
207
+ label: 'Quantity',
208
+ type: 'integer',
209
+ description: 'The quantity of the item purchased. Defaults to 1 if not specified.'
210
+ },
211
+ productId: {
212
+ label: 'Product ID',
213
+ type: 'string',
214
+ description: 'An identifier for the item purchased. You must send a price and quantity or revenue with this field.'
215
+ }
216
+ },
217
+ default: {
218
+ '@arrayPath': [
219
+ '$.properties.products',
220
+ {
221
+ price: {
222
+ '@path': 'price'
223
+ },
224
+ quantity: {
225
+ '@path': 'quantity'
226
+ },
227
+ productId: {
228
+ '@path': 'product_id'
229
+ }
230
+ }
231
+ ]
232
+ }
233
+ },
234
+ location_lat: {
235
+ label: 'Latitude',
236
+ type: 'number',
237
+ description: 'The current Latitude of the user.',
238
+ default: {
239
+ '@path': '$.context.location.latitude'
240
+ }
241
+ },
242
+ location_lng: {
243
+ label: 'Longtitude',
244
+ type: 'number',
245
+ description: 'The current Longitude of the user.',
246
+ default: {
247
+ '@path': '$.context.location.longitude'
248
+ }
249
+ },
250
+ ip: {
251
+ label: 'IP Address',
252
+ type: 'string',
253
+ description: 'The IP address of the user. Use "$remote" to use the IP address on the upload request. ',
254
+ default: {
255
+ '@path': '$.context.ip'
256
+ }
257
+ }
258
+ },
259
+ perform: (request, { settings, payload }) => {
260
+ const body = { ...settings, ...payload };
261
+ return request('https://segmentdata.atomex.net/data/1x1.gif', {
262
+ method: 'post',
263
+ json: body
264
+ });
265
+ }
266
+ };
267
+ exports.default = action;
268
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/revx/sendRevxPing/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,oBAAoB;IACjC,mBAAmB,EAAE,kCAAkC;IACvD,MAAM,EAAE;QACN,EAAE,EAAE;YACF,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EA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;QACxC,OAAO,OAAO,CAAC,6CAA6C,EAAE;YAC5D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -1,4 +1,3 @@
1
1
  export interface Settings {
2
- segment_papi_token: string;
3
2
  endpoint: string;
4
3
  }
@@ -1,8 +1 @@
1
- import { RequestClient, DynamicFieldResponse } from '@segment/actions-core';
2
- interface GetEngageSpaceParams {
3
- endpoint: string;
4
- bearerToken: string;
5
- }
6
- export declare function getEngageSpaces(request: RequestClient, data: GetEngageSpaceParams): Promise<DynamicFieldResponse>;
7
1
  export declare function generateSegmentAPIAuthHeaders(writeKey: string): string;
8
- export {};
@@ -1,50 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateSegmentAPIAuthHeaders = exports.getEngageSpaces = void 0;
4
- const properties_1 = require("./properties");
5
- async function getEngageSpaces(request, data) {
6
- let cursor = 'MA==';
7
- const choices = [];
8
- let response;
9
- const segmentPAPIEndpoint = properties_1.SEGMENT_ENDPOINTS[data.endpoint || properties_1.DEFAULT_SEGMENT_ENDPOINT].papi;
10
- do {
11
- const publicApiUrl = `${segmentPAPIEndpoint}/sources?pagination%5Bcount%5D=${properties_1.PAGINATION_COUNT}&pagination%5Bcursor%5D=${cursor}`;
12
- try {
13
- response = await request(publicApiUrl, {
14
- headers: {
15
- authorization: `Bearer ${data.bearerToken}`
16
- },
17
- method: 'GET',
18
- skipResponseCloning: true
19
- });
20
- for (const source of response.data.data.sources) {
21
- if (source.metadata.slug !== 'personas-compute') {
22
- continue;
23
- }
24
- choices.push({
25
- label: source.name,
26
- value: source.writeKeys[0]
27
- });
28
- }
29
- }
30
- catch (err) {
31
- return {
32
- choices: [],
33
- error: {
34
- message: err?.response?.errors?.message ?? 'Unknown Error',
35
- code: err?.response?.statusText ?? 'Unknown Error'
36
- }
37
- };
38
- }
39
- if (response.data.data.pagination.next) {
40
- cursor = response.data.data.pagination.next;
41
- }
42
- } while (response.data.data.pagination.next);
43
- return {
44
- choices
45
- };
46
- }
47
- exports.getEngageSpaces = getEngageSpaces;
3
+ exports.generateSegmentAPIAuthHeaders = void 0;
48
4
  function generateSegmentAPIAuthHeaders(writeKey) {
49
5
  return `Basic ${Buffer.from(writeKey + ':').toString('base64')}`;
50
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"helperFunctions.js","sourceRoot":"","sources":["../../../src/destinations/segment-profiles/helperFunctions.ts"],"names":[],"mappings":";;;AACA,6CAA4F;AAuCrF,KAAK,UAAU,eAAe,CACnC,OAAsB,EACtB,IAA0B;IAE1B,IAAI,MAAM,GAAG,MAAM,CAAA;IACnB,MAAM,OAAO,GAAuB,EAAE,CAAA;IACtC,IAAI,QAA2C,CAAA;IAE/C,MAAM,mBAAmB,GAAG,8BAAiB,CAAC,IAAI,CAAC,QAAQ,IAAI,qCAAwB,CAAC,CAAC,IAAI,CAAA;IAE7F,GAAG;QAED,MAAM,YAAY,GAAG,GAAG,mBAAmB,kCAAkC,6BAAgB,2BAA2B,MAAM,EAAE,CAAA;QAEhI,IAAI;YACF,QAAQ,GAAG,MAAM,OAAO,CAAkB,YAAY,EAAE;gBACtD,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE;iBAC5C;gBACD,MAAM,EAAE,KAAK;gBACb,mBAAmB,EAAE,IAAI;aAC1B,CAAC,CAAA;YAEF,KAAK,MAAM,MAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;gBAC/C,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,kBAAkB,EAAE;oBAC/C,SAAQ;iBACT;gBAED,OAAO,CAAC,IAAI,CAAC;oBACX,KAAK,EAAE,MAAM,CAAC,IAAI;oBAClB,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;iBAC3B,CAAC,CAAA;aACH;SACF;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO;gBACL,OAAO,EAAE,EAAE;gBACX,KAAK,EAAE;oBACL,OAAO,EAAG,GAA6B,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,IAAI,eAAe;oBACrF,IAAI,EAAG,GAA6B,EAAE,QAAQ,EAAE,UAAU,IAAI,eAAe;iBAC9E;aACF,CAAA;SACF;QAED,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACtC,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAA;SAC5C;KACF,QAAQ,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAC;IAE5C,OAAO;QACL,OAAO;KACR,CAAA;AACH,CAAC;AAnDD,0CAmDC;AAED,SAAgB,6BAA6B,CAAC,QAAgB;IAI5D,OAAO,SAAS,MAAM,CAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAA;AAClE,CAAC;AALD,sEAKC"}
1
+ {"version":3,"file":"helperFunctions.js","sourceRoot":"","sources":["../../../src/destinations/segment-profiles/helperFunctions.ts"],"names":[],"mappings":";;;AAAA,SAAgB,6BAA6B,CAAC,QAAgB;IAI5D,OAAO,SAAS,MAAM,CAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAA;AAClE,CAAC;AALD,sEAKC"}
@@ -13,12 +13,6 @@ const destination = {
13
13
  authentication: {
14
14
  scheme: 'custom',
15
15
  fields: {
16
- segment_papi_token: {
17
- label: 'Segment Public API Token',
18
- description: 'The Segment Public API requires that you have an authentication token before you send requests. [This document](https://docs.segmentapis.com/tag/Getting-Started#section/Get-an-API-token) explains how to setup a token.',
19
- type: 'password',
20
- required: true
21
- },
22
16
  endpoint: {
23
17
  label: 'Endpoint Region',
24
18
  description: 'The region to send your data.',
@@ -31,14 +25,6 @@ const destination = {
31
25
  default: properties_1.DEFAULT_SEGMENT_ENDPOINT,
32
26
  required: true
33
27
  }
34
- },
35
- testAuthentication: async (request, { settings }) => {
36
- const { endpoint } = settings;
37
- return request(properties_1.SEGMENT_ENDPOINTS[endpoint || properties_1.DEFAULT_SEGMENT_ENDPOINT].papi, {
38
- headers: {
39
- authorization: `Bearer ${settings.segment_papi_token}`
40
- }
41
- });
42
28
  }
43
29
  },
44
30
  actions: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/segment-profiles/index.ts"],"names":[],"mappings":";;;;;AAEA,6CAA0E;AAE1E,4DAAmC;AAEnC,kEAAyC;AAEzC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,OAAO;IACb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,kBAAkB,EAAE;gBAClB,KAAK,EAAE,0BAA0B;gBACjC,WAAW,EACT,2NAA2N;gBAC7N,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,IAAI;aACf;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,+BAA+B;gBAC5C,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,8BAAiB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;oBACpD,KAAK,EAAE,8BAAiB,CAAC,GAAG,CAAC,CAAC,KAAK;oBACnC,KAAK,EAAE,GAAG;iBACX,CAAC,CAAC;gBACH,OAAO,EAAE,qCAAwB;gBACjC,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAClD,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAA;YAC7B,OAAO,OAAO,CAAC,8BAAiB,CAAC,QAAQ,IAAI,qCAAwB,CAAC,CAAC,IAAI,EAAE;gBAC3E,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,QAAQ,CAAC,kBAAkB,EAAE;iBACvD;aACF,CAAC,CAAA;QACJ,CAAC;KACF;IACD,OAAO,EAAE;QACP,SAAS,EAAT,mBAAS;QACT,YAAY,EAAZ,sBAAY;KACb;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/segment-profiles/index.ts"],"names":[],"mappings":";;;;;AAEA,6CAA0E;AAE1E,4DAAmC;AAEnC,kEAAyC;AAEzC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,OAAO;IACb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,QAAQ,EAAE;gBACR,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,+BAA+B;gBAC5C,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,8BAAiB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;oBACpD,KAAK,EAAE,8BAAiB,CAAC,GAAG,CAAC,CAAC,KAAK;oBACnC,KAAK,EAAE,GAAG;iBACX,CAAC,CAAC;gBACH,OAAO,EAAE,qCAAwB;gBACjC,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,OAAO,EAAE;QACP,SAAS,EAAT,mBAAS;QACT,YAAY,EAAZ,sBAAY;KACb;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PAGINATION_COUNT = exports.DEFAULT_SEGMENT_ENDPOINT = exports.SEGMENT_ENDPOINTS = void 0;
4
- exports.SEGMENT_ENDPOINTS = {
4
+ const SEG_ENDPOINT = {
5
5
  north_america: {
6
6
  label: 'North America',
7
7
  url: 'https://api.segment.io/v1',
@@ -15,6 +15,15 @@ exports.SEGMENT_ENDPOINTS = {
15
15
  papi: 'https://eu1.api.segmentapis.com'
16
16
  }
17
17
  };
18
+ if (process.env.NODE_ENV != 'production') {
19
+ SEG_ENDPOINT.stage = {
20
+ label: 'Staging',
21
+ url: 'https://api.segment.build/v1',
22
+ cdn: 'https://cdn.segment.build/v1',
23
+ papi: 'https://api.segmentapis.build'
24
+ };
25
+ }
26
+ exports.SEGMENT_ENDPOINTS = SEG_ENDPOINT;
18
27
  exports.DEFAULT_SEGMENT_ENDPOINT = 'north_america';
19
28
  exports.PAGINATION_COUNT = 10;
20
29
  //# sourceMappingURL=properties.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../src/destinations/segment-profiles/properties.ts"],"names":[],"mappings":";;;AAOa,QAAA,iBAAiB,GAAuC;IACnE,aAAa,EAAE;QACb,KAAK,EAAE,eAAe;QACtB,GAAG,EAAE,2BAA2B;QAChC,GAAG,EAAE,4BAA4B;QACjC,IAAI,EAAE,6BAA6B;KACpC;IACD,MAAM,EAAE;QACN,KAAK,EAAE,QAAQ;QACf,GAAG,EAAE,uCAAuC;QAC5C,GAAG,EAAE,4BAA4B;QACjC,IAAI,EAAE,iCAAiC;KACxC;CACF,CAAA;AAEY,QAAA,wBAAwB,GAAG,eAAe,CAAA;AAE1C,QAAA,gBAAgB,GAAG,EAAE,CAAA"}
1
+ {"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../src/destinations/segment-profiles/properties.ts"],"names":[],"mappings":";;;AAMA,MAAM,YAAY,GAAuC;IACvD,aAAa,EAAE;QACb,KAAK,EAAE,eAAe;QACtB,GAAG,EAAE,2BAA2B;QAChC,GAAG,EAAE,4BAA4B;QACjC,IAAI,EAAE,6BAA6B;KACpC;IACD,MAAM,EAAE;QACN,KAAK,EAAE,QAAQ;QACf,GAAG,EAAE,uCAAuC;QAC5C,GAAG,EAAE,4BAA4B;QACjC,IAAI,EAAE,iCAAiC;KACxC;CACF,CAAA;AACD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,YAAY,EAAE;IACxC,YAAY,CAAC,KAAK,GAAG;QACnB,KAAK,EAAE,SAAS;QAChB,GAAG,EAAE,8BAA8B;QACnC,GAAG,EAAE,8BAA8B;QACnC,IAAI,EAAE,+BAA+B;KACtC,CAAA;CACF;AACY,QAAA,iBAAiB,GAAG,YAAY,CAAA;AAChC,QAAA,wBAAwB,GAAG,eAAe,CAAA;AAE1C,QAAA,gBAAgB,GAAG,EAAE,CAAA"}
@@ -15,14 +15,6 @@ const action = {
15
15
  group_id: { ...segment_properties_1.group_id, required: true },
16
16
  traits: segment_properties_1.traits
17
17
  },
18
- dynamicFields: {
19
- engage_space: async (request, { settings }) => {
20
- return helperFunctions_1.getEngageSpaces(request, {
21
- endpoint: settings.endpoint,
22
- bearerToken: settings.segment_papi_token
23
- });
24
- }
25
- },
26
18
  perform: (request, { payload, settings }) => {
27
19
  if (!payload.anonymous_id && !payload.user_id) {
28
20
  throw errors_1.MissingUserOrAnonymousIdThrowableError;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment-profiles/sendGroup/index.ts"],"names":[],"mappings":";;AAGA,8DAA6F;AAC7F,wDAAmF;AACnF,8CAAiD;AACjD,sCAAyG;AAEzG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,wGAAwG;IACrH,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,YAAY,EAAZ,iCAAY;QACZ,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,QAAQ,EAAE,EAA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CAA6B,CAAC,OAAO,CAAC,YAAY,CAAC;aACnE;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -15,14 +15,6 @@ const action = {
15
15
  group_id: segment_properties_1.group_id,
16
16
  traits: segment_properties_1.traits
17
17
  },
18
- dynamicFields: {
19
- engage_space: async (request, { settings }) => {
20
- return helperFunctions_1.getEngageSpaces(request, {
21
- endpoint: settings.endpoint,
22
- bearerToken: settings.segment_papi_token
23
- });
24
- }
25
- },
26
18
  perform: (request, { payload, settings }) => {
27
19
  if (!payload.anonymous_id && !payload.user_id) {
28
20
  throw errors_1.MissingUserOrAnonymousIdThrowableError;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment-profiles/sendIdentify/index.ts"],"names":[],"mappings":";;AAGA,8DAA6F;AAC7F,wDAAmF;AACnF,8CAAiD;AACjD,sCAAyG;AAEzG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EACT,gIAAgI;IAClI,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,YAAY,EAAZ,iCAAY;QACZ,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,QAAQ,EAAR,6BAAQ;QACR,MAAM,EAAN,2BAAM;KACP;IACD,aAAa,EAAE;QACb,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC5C,OAAO,iCAAe,CAAC,OAAO,EAAE;gBAC9B,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,WAAW,EAAE,QAAQ,CAAC,kBAAkB;aACzC,CAAC,CAAA;QACJ,CAAC;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YAC7C,MAAM,+CAAsC,CAAA;SAC7C;QACD,MAAM,YAAY,GAAW;YAC3B,MAAM,EAAE,OAAO,EAAE,OAAO;YACxB,WAAW,EAAE,OAAO,EAAE,YAAY;YAClC,OAAO,EAAE,OAAO,EAAE,QAAQ;YAC1B,MAAM,EAAE;gBACN,GAAG,OAAO,EAAE,MAAM;aACnB;YACD,YAAY,EAAE;gBAGZ,GAAG,EAAE,KAAK;aACX;SACF,CAAA;QAGD,IAAI,CAAC,QAAQ,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,IAAI,8BAAiB,CAAC,EAAE;YACnE,MAAM,8CAAqC,CAAA;SAC5C;QAED,MAAM,uBAAuB,GAAG,8BAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAA;QACxE,OAAO,OAAO,CAAC,GAAG,uBAAuB,WAAW,EAAE;YACpD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE;gBACP,aAAa,EAAE,+CAA6B,CAAC,OAAO,CAAC,YAAY,CAAC;aACnE;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/segment-profiles/sendIdentify/index.ts"],"names":[],"mappings":";;AAGA,8DAA6F;AAC7F,wDAAkE;AAClE,8CAAiD;AACjD,sCAAyG;AAEzG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EACT,gIAAgI;IAClI,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,YAAY,EAAZ,iCAAY;QACZ,OAAO,EAAP,4BAAO;QACP,YAAY,EAAZ,iCAAY;QACZ,QAAQ,EAAR,6BAAQ;QACR,MAAM,EAAN,2BAAM;KACP;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YAC7C,MAAM,+CAAsC,CAAA;SAC7C;QACD,MAAM,YAAY,GAAW;YAC3B,MAAM,EAAE,OAAO,EAAE,OAAO;YACxB,WAAW,EAAE,OAAO,EAAE,YAAY;YAClC,OAAO,EAAE,OAAO,EAAE,QAAQ;YAC1B,MAAM,EAAE;gBACN,GAAG,OAAO,EAAE,MAAM;aACnB;YACD,YAAY,EAAE;gBAGZ,GAAG,EAAE,KAAK;aACX;SACF,CAAA;QAGD,IAAI,CAAC,QAAQ,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,IAAI,8BAAiB,CAAC,EAAE;YACnE,MAAM,8CAAqC,CAAA;SAC5C;QAED,MAAM,uBAAuB,GAAG,8BAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAA;QACxE,OAAO,OAAO,CAAC,GAAG,uBAAuB,WAAW,EAAE;YACpD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE;gBACP,aAAa,EAAE,+CAA6B,CAAC,OAAO,CAAC,YAAY,CAAC;aACnE;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.commonFields = void 0;
4
4
  exports.commonFields = {
5
- user_anonymous_Id: {
5
+ user_anonymous_id: {
6
6
  type: 'string',
7
7
  allowNull: true,
8
8
  required: false,
@@ -6,7 +6,7 @@ export interface Payload {
6
6
  company_custom_attributes?: {
7
7
  [k: string]: unknown;
8
8
  };
9
- user_anonymous_Id?: string | null;
9
+ user_anonymous_id?: string | null;
10
10
  event_id?: string;
11
11
  doc_path?: string;
12
12
  doc_search?: string;
@@ -7,7 +7,7 @@ export interface Payload {
7
7
  user_custom_attributes?: {
8
8
  [k: string]: unknown;
9
9
  };
10
- user_anonymous_Id?: string | null;
10
+ user_anonymous_id?: string | null;
11
11
  event_id?: string;
12
12
  doc_path?: string;
13
13
  doc_search?: string;
@@ -8,6 +8,7 @@ const actions_core_2 = require("@segment/actions-core");
8
8
  const identify_1 = __importDefault(require("./identify"));
9
9
  const track_1 = __importDefault(require("./track"));
10
10
  const group_1 = __importDefault(require("./group"));
11
+ const page_1 = __importDefault(require("./page"));
11
12
  const destination = {
12
13
  name: 'Usermaven (Actions)',
13
14
  slug: 'actions-usermaven',
@@ -46,12 +47,19 @@ const destination = {
46
47
  subscribe: 'type = "group"',
47
48
  partnerAction: 'group',
48
49
  mapping: actions_core_1.defaultValues(group_1.default.fields)
50
+ },
51
+ {
52
+ name: 'Page',
53
+ subscribe: 'type = "page"',
54
+ partnerAction: 'page',
55
+ mapping: actions_core_1.defaultValues(page_1.default.fields)
49
56
  }
50
57
  ],
51
58
  actions: {
52
59
  identify: identify_1.default,
53
60
  track: track_1.default,
54
- group: group_1.default
61
+ group: group_1.default,
62
+ page: page_1.default
55
63
  }
56
64
  };
57
65
  exports.default = destination;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/usermaven/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAE5E,wDAAwD;AAExD,0DAAiC;AACjC,oDAA2B;AAE3B,oDAA2B;AAE3B,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,8BAA8B;gBAC3C,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAItC,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;gBACtD,MAAM,IAAI,+BAAgB,CAAC,qBAAqB,EAAE,iBAAiB,EAAE,GAAG,CAAC,CAAA;aAC1E;QACH,CAAC;KACF;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,aAAa;YACnB,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,OAAO;YACtB,OAAO,EAAE,4BAAa,CAAC,eAAK,CAAC,MAAM,CAAC;SACrC;QACD;YACE,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,mBAAmB;YAC9B,aAAa,EAAE,UAAU;YACzB,OAAO,EAAE,4BAAa,CAAC,kBAAQ,CAAC,MAAM,CAAC;SACxC;QACD;YACE,IAAI,EAAE,OAAO;YACb,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,OAAO;YACtB,OAAO,EAAE,4BAAa,CAAC,eAAK,CAAC,MAAM,CAAC;SACrC;KACF;IACD,OAAO,EAAE;QACP,QAAQ,EAAR,kBAAQ;QACR,KAAK,EAAL,eAAK;QACL,KAAK,EAAL,eAAK;KACN;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/usermaven/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAE5E,wDAAwD;AAExD,0DAAiC;AACjC,oDAA2B;AAE3B,oDAA2B;AAE3B,kDAAyB;AAEzB,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,8BAA8B;gBAC3C,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAItC,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;gBACtD,MAAM,IAAI,+BAAgB,CAAC,qBAAqB,EAAE,iBAAiB,EAAE,GAAG,CAAC,CAAA;aAC1E;QACH,CAAC;KACF;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,aAAa;YACnB,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,OAAO;YACtB,OAAO,EAAE,4BAAa,CAAC,eAAK,CAAC,MAAM,CAAC;SACrC;QACD;YACE,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,mBAAmB;YAC9B,aAAa,EAAE,UAAU;YACzB,OAAO,EAAE,4BAAa,CAAC,kBAAQ,CAAC,MAAM,CAAC;SACxC;QACD;YACE,IAAI,EAAE,OAAO;YACb,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,OAAO;YACtB,OAAO,EAAE,4BAAa,CAAC,eAAK,CAAC,MAAM,CAAC;SACrC;QACD;YACE,IAAI,EAAE,MAAM;YACZ,SAAS,EAAE,eAAe;YAC1B,aAAa,EAAE,MAAM;YACrB,OAAO,EAAE,4BAAa,CAAC,cAAI,CAAC,MAAM,CAAC;SACpC;KACF;IACD,OAAO,EAAE;QACP,QAAQ,EAAR,kBAAQ;QACR,KAAK,EAAL,eAAK;QACL,KAAK,EAAL,eAAK;QACL,IAAI,EAAJ,cAAI;KACL;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,31 @@
1
+ export interface Payload {
2
+ user_id?: string;
3
+ user_email?: string;
4
+ user_created_at?: string;
5
+ page_name?: string;
6
+ user_anonymous_id?: string | null;
7
+ event_id?: string;
8
+ doc_path?: string;
9
+ doc_search?: string;
10
+ event_type?: string;
11
+ page_title?: string;
12
+ referer?: string;
13
+ url?: string;
14
+ user_agent?: string;
15
+ user_language?: string;
16
+ utc_time?: string;
17
+ utm?: {
18
+ source?: string;
19
+ medium?: string;
20
+ name?: string;
21
+ term?: string;
22
+ content?: string;
23
+ };
24
+ screen?: {
25
+ height?: number;
26
+ width?: number;
27
+ density?: number;
28
+ };
29
+ timezone?: string;
30
+ ip?: string;
31
+ }
@@ -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/usermaven/page/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,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const common_definitions_1 = require("../common-definitions");
4
+ const request_params_1 = require("../request-params");
5
+ const action = {
6
+ title: 'Page',
7
+ description: 'Send pageview events to Usermaven.',
8
+ fields: {
9
+ user_id: {
10
+ type: 'string',
11
+ required: false,
12
+ description: 'The user id, to uniquely identify the user',
13
+ label: 'User id',
14
+ default: { '@path': '$.userId' }
15
+ },
16
+ user_email: {
17
+ type: 'string',
18
+ required: false,
19
+ description: 'The user email address',
20
+ label: 'Email address',
21
+ default: {
22
+ '@if': {
23
+ exists: { '@path': '$.properties.email' },
24
+ then: { '@path': '$.properties.email' },
25
+ else: { '@path': '$.context.traits.email' }
26
+ }
27
+ }
28
+ },
29
+ user_created_at: {
30
+ type: 'string',
31
+ required: false,
32
+ description: 'The timestamp when the user was created',
33
+ label: 'Created at',
34
+ default: {
35
+ '@if': {
36
+ exists: { '@path': '$.properties.created_at' },
37
+ then: { '@path': '$.properties.created_at' },
38
+ else: { '@path': '$.context.traits.created_at' }
39
+ }
40
+ }
41
+ },
42
+ page_name: {
43
+ type: 'string',
44
+ required: false,
45
+ description: 'The name of the page',
46
+ label: 'Page Name',
47
+ default: { '@path': '$.properties.name' }
48
+ },
49
+ ...common_definitions_1.commonFields
50
+ },
51
+ perform: (request, { payload, settings }) => {
52
+ const resolvedPayload = request_params_1.resolveRequestPayload(settings, payload);
53
+ const { url, options } = request_params_1.eventRequestParams(settings, resolvedPayload, 'pageview');
54
+ return request(url, options);
55
+ }
56
+ };
57
+ exports.default = action;
58
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/usermaven/page/index.ts"],"names":[],"mappings":";;AAGA,8DAAoD;AACpD,sDAA6E;AAE7E,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,oCAAoC;IACjD,MAAM,EAAE;QACN,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,4CAA4C;YACzD,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,wBAAwB;YACrC,KAAK,EAAE,eAAe;YACtB,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,wBAAwB,EAAE;iBAC5C;aACF;SACF;QACD,eAAe,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,yCAAyC;YACtD,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAE;oBA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