@segment/action-destinations 3.74.4-alpha.4 → 3.74.4-alpha.7

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.
@@ -1,204 +1,2 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const nock_1 = __importDefault(require("nock"));
7
- const actions_core_1 = require("@segment/actions-core");
8
- const index_1 = __importDefault(require("../index"));
9
- const testDestination = actions_core_1.createTestIntegration(index_1.default);
10
- const timestamp = '2022-05-12T15:21:15.449Z';
11
- const settings = {
12
- snap_app_id: 'test123',
13
- pixel_id: 'test123',
14
- app_id: 'test123'
15
- };
16
- const accessToken = 'test123';
17
- const refreshToken = 'test123';
18
- const testEvent = actions_core_1.createTestEvent({
19
- timestamp: timestamp,
20
- messageId: 'test-message-rv4t40s898k',
21
- event: 'PURCHASE',
22
- type: 'track',
23
- properties: {
24
- email: 'test123@gmail.com',
25
- phone: '+44 844 412 4653',
26
- event_tag: 'back-to-school',
27
- number_items: 10,
28
- price: '15',
29
- currency: 'USD',
30
- level: 3
31
- }
32
- });
33
- const conversionEventUrl = 'https://tr.snapchat.com/v2/conversion';
34
- describe('Snap Conversions API ', () => {
35
- describe('ReportConversionEvent', () => {
36
- it('should handle a basic event', async () => {
37
- nock_1.default(conversionEventUrl).post('').reply(200, {});
38
- const event = actions_core_1.createTestEvent(testEvent);
39
- const responses = await testDestination.testAction('reportConversionEvent', {
40
- event,
41
- settings,
42
- useDefaultMappings: true,
43
- auth: {
44
- accessToken,
45
- refreshToken
46
- },
47
- mapping: {
48
- event_type: 'PURCHASE',
49
- event_conversion_type: 'WEB'
50
- }
51
- });
52
- expect(responses).not.toBeNull();
53
- expect(responses[0].status).toBe(200);
54
- expect(responses[0].options.body).toMatchInlineSnapshot(`"{\\"event_type\\":\\"PURCHASE\\",\\"event_conversion_type\\":\\"WEB\\",\\"timestamp\\":1652368875449,\\"hashed_email\\":\\"cc779c04191c2e736d89e45c11339c8382832bcaf70383f7df94e3d08ba7a6d9\\",\\"hashed_phone_number\\":\\"dc008fda46e2e64002cf2f82a4906236282d431c4f75e5b60bfe79fc48546383\\",\\"user_agent\\":\\"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1\\",\\"hashed_ip_address\\":\\"838c4c2573848f58e74332341a7ca6bc5cd86a8aec7d644137d53b4d597f10f5\\",\\"price\\":15,\\"currency\\":\\"USD\\",\\"page_url\\":\\"https://segment.com/academy/\\",\\"pixel_id\\":\\"test123\\"}"`);
55
- });
56
- it('should fail web event without pixel_id', async () => {
57
- nock_1.default(conversionEventUrl).post('').reply(400, {});
58
- const event = actions_core_1.createTestEvent(testEvent);
59
- await expect(testDestination.testAction('reportConversionEvent', {
60
- event,
61
- settings: {
62
- app_id: 'test123'
63
- },
64
- useDefaultMappings: true,
65
- auth: {
66
- accessToken,
67
- refreshToken
68
- },
69
- mapping: {
70
- event_type: 'PURCHASE',
71
- event_conversion_type: 'WEB'
72
- }
73
- })).rejects.toThrowError('If event conversion type is "WEB" then pixel_id must be defined');
74
- });
75
- it('should fail web event without snap_app_id', async () => {
76
- nock_1.default(conversionEventUrl).post('').reply(400, {});
77
- const event = actions_core_1.createTestEvent(testEvent);
78
- await expect(testDestination.testAction('reportConversionEvent', {
79
- event,
80
- settings: {
81
- pixel_id: 'test123',
82
- app_id: 'test123'
83
- },
84
- useDefaultMappings: true,
85
- auth: {
86
- accessToken,
87
- refreshToken
88
- },
89
- mapping: {
90
- event_type: 'PURCHASE',
91
- event_conversion_type: 'MOBILE_APP'
92
- }
93
- })).rejects.toThrowError('If event conversion type is "MOBILE_APP" then snap_app_id and app_id must be defined');
94
- });
95
- it('should handle an offline event conversion type', async () => {
96
- nock_1.default(conversionEventUrl).post('').reply(200, {});
97
- const event = actions_core_1.createTestEvent(testEvent);
98
- const responses = await testDestination.testAction('reportConversionEvent', {
99
- event,
100
- settings,
101
- useDefaultMappings: true,
102
- auth: {
103
- accessToken,
104
- refreshToken
105
- },
106
- mapping: {
107
- event_type: 'SAVE',
108
- event_conversion_type: 'OFFLINE'
109
- }
110
- });
111
- expect(responses).not.toBeNull();
112
- expect(responses[0].status).toBe(200);
113
- expect(responses[0].options.body).toMatchInlineSnapshot(`"{\\"event_type\\":\\"SAVE\\",\\"event_conversion_type\\":\\"OFFLINE\\",\\"timestamp\\":1652368875449,\\"hashed_email\\":\\"cc779c04191c2e736d89e45c11339c8382832bcaf70383f7df94e3d08ba7a6d9\\",\\"hashed_phone_number\\":\\"dc008fda46e2e64002cf2f82a4906236282d431c4f75e5b60bfe79fc48546383\\",\\"user_agent\\":\\"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1\\",\\"hashed_ip_address\\":\\"838c4c2573848f58e74332341a7ca6bc5cd86a8aec7d644137d53b4d597f10f5\\",\\"price\\":15,\\"currency\\":\\"USD\\",\\"page_url\\":\\"https://segment.com/academy/\\",\\"pixel_id\\":\\"test123\\"}"`);
114
- });
115
- it('should handle a mobile app event conversion type', async () => {
116
- nock_1.default(conversionEventUrl).post('').reply(200, {});
117
- const event = actions_core_1.createTestEvent(testEvent);
118
- const responses = await testDestination.testAction('reportConversionEvent', {
119
- event,
120
- settings: {
121
- snap_app_id: '123',
122
- app_id: '123'
123
- },
124
- useDefaultMappings: true,
125
- auth: {
126
- accessToken,
127
- refreshToken
128
- },
129
- mapping: {
130
- event_type: 'SAVE',
131
- event_conversion_type: 'MOBILE_APP'
132
- }
133
- });
134
- expect(responses).not.toBeNull();
135
- expect(responses[0].status).toBe(200);
136
- expect(responses[0].options.body).toMatchInlineSnapshot(`"{\\"event_type\\":\\"SAVE\\",\\"event_conversion_type\\":\\"MOBILE_APP\\",\\"timestamp\\":1652368875449,\\"hashed_email\\":\\"cc779c04191c2e736d89e45c11339c8382832bcaf70383f7df94e3d08ba7a6d9\\",\\"hashed_phone_number\\":\\"dc008fda46e2e64002cf2f82a4906236282d431c4f75e5b60bfe79fc48546383\\",\\"user_agent\\":\\"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1\\",\\"hashed_ip_address\\":\\"838c4c2573848f58e74332341a7ca6bc5cd86a8aec7d644137d53b4d597f10f5\\",\\"price\\":15,\\"currency\\":\\"USD\\",\\"page_url\\":\\"https://segment.com/academy/\\",\\"snap_app_id\\":\\"123\\",\\"app_id\\":\\"123\\"}"`);
137
- });
138
- it('should fail invalid currency', async () => {
139
- nock_1.default(conversionEventUrl).post('').reply(400, {});
140
- const event = actions_core_1.createTestEvent({
141
- ...testEvent,
142
- properties: {
143
- currency: 'Galleon'
144
- }
145
- });
146
- await expect(testDestination.testAction('reportConversionEvent', {
147
- event,
148
- settings,
149
- useDefaultMappings: true,
150
- auth: {
151
- accessToken,
152
- refreshToken
153
- },
154
- mapping: {
155
- event_type: 'PURCHASE',
156
- event_conversion_type: 'WEB'
157
- }
158
- })).rejects.toThrowError('Galleon is not a valid currency code.');
159
- });
160
- it('should fail missing event conversion type', async () => {
161
- nock_1.default(conversionEventUrl).post('').reply(400, {});
162
- const event = actions_core_1.createTestEvent(testEvent);
163
- await expect(testDestination.testAction('reportConversionEvent', {
164
- event,
165
- settings,
166
- useDefaultMappings: true,
167
- auth: {
168
- accessToken,
169
- refreshToken
170
- },
171
- mapping: {
172
- event_type: 'PURCHASE'
173
- }
174
- })).rejects.toThrowError("The root value is missing the required field 'event_conversion_type'.");
175
- });
176
- it('should handle a custom event', async () => {
177
- nock_1.default(conversionEventUrl).post('').reply(200, {});
178
- const event = actions_core_1.createTestEvent({
179
- ...testEvent,
180
- event: 'CUSTOM_EVENT_5'
181
- });
182
- const responses = await testDestination.testAction('reportConversionEvent', {
183
- event,
184
- settings: {
185
- snap_app_id: '123',
186
- app_id: '123'
187
- },
188
- useDefaultMappings: true,
189
- auth: {
190
- accessToken,
191
- refreshToken
192
- },
193
- mapping: {
194
- event_type: { '@path': '$.event' },
195
- event_conversion_type: 'MOBILE_APP'
196
- }
197
- });
198
- expect(responses).not.toBeNull();
199
- expect(responses[0].status).toBe(200);
200
- expect(responses[0].options.body).toMatchInlineSnapshot(`"{\\"event_type\\":\\"CUSTOM_EVENT_5\\",\\"event_conversion_type\\":\\"MOBILE_APP\\",\\"timestamp\\":1652368875449,\\"hashed_email\\":\\"cc779c04191c2e736d89e45c11339c8382832bcaf70383f7df94e3d08ba7a6d9\\",\\"hashed_phone_number\\":\\"dc008fda46e2e64002cf2f82a4906236282d431c4f75e5b60bfe79fc48546383\\",\\"user_agent\\":\\"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1\\",\\"hashed_ip_address\\":\\"838c4c2573848f58e74332341a7ca6bc5cd86a8aec7d644137d53b4d597f10f5\\",\\"price\\":15,\\"currency\\":\\"USD\\",\\"page_url\\":\\"https://segment.com/academy/\\",\\"snap_app_id\\":\\"123\\",\\"app_id\\":\\"123\\"}"`);
201
- });
202
- });
203
- });
204
2
  //# sourceMappingURL=index.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../../src/destinations/snap-conversions-api/_tests_/index.test.ts"],"names":[],"mappings":";;;;;AAAA,gDAAuB;AACvB,wDAA8E;AAC9E,qDAAiC;AAGjC,MAAM,eAAe,GAAG,oCAAqB,CAAC,eAAU,CAAC,CAAA;AACzD,MAAM,SAAS,GAAG,0BAA0B,CAAA;AAC5C,MAAM,QAAQ,GAAa;IACzB,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,SAAS;IACnB,MAAM,EAAE,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AAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,qBAAqB,CACrD,0rBAA0rB,CAC3rB,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../../src/destinations/snap-conversions-api/_tests_/index.test.ts"],"names":[],"mappings":""}
@@ -3,139 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const actions_core_1 = require("@segment/actions-core");
7
6
  const reportConversionEvent_1 = __importDefault(require("./reportConversionEvent"));
8
- const DEFAULT_VALS = {
9
- ...actions_core_1.defaultValues(reportConversionEvent_1.default.fields)
10
- };
11
- const presets = [
12
- {
13
- name: 'Add Billing',
14
- subscribe: 'event = "Payment Info Entered"',
15
- partnerAction: 'reportConversionEvent',
16
- mapping: {
17
- ...DEFAULT_VALS,
18
- event_type: 'ADD_BILLING'
19
- }
20
- },
21
- {
22
- name: 'Add to Cart',
23
- subscribe: 'event = "Product Added"',
24
- partnerAction: 'reportConversionEvent',
25
- mapping: {
26
- ...DEFAULT_VALS,
27
- event_type: 'ADD_CART'
28
- }
29
- },
30
- {
31
- name: 'Add to Wishlist',
32
- subscribe: 'event = "Product Added to Wishlist"',
33
- partnerAction: 'reportConversionEvent',
34
- mapping: {
35
- ...DEFAULT_VALS,
36
- event_type: 'ADD_TO_WISHLIST'
37
- }
38
- },
39
- {
40
- name: 'App Install',
41
- subscribe: 'event = "Application Installed"',
42
- partnerAction: 'reportConversionEvent',
43
- mapping: {
44
- ...DEFAULT_VALS,
45
- event_type: 'APP_INSTALL'
46
- }
47
- },
48
- {
49
- name: 'List View',
50
- subscribe: 'event = "Product List Viewed"',
51
- partnerAction: 'reportConversionEvent',
52
- mapping: {
53
- ...DEFAULT_VALS,
54
- event_type: 'LIST_VIEW'
55
- }
56
- },
57
- {
58
- name: 'App Open',
59
- subscribe: 'event = "Application Opened"',
60
- partnerAction: 'reportConversionEvent',
61
- mapping: {
62
- ...DEFAULT_VALS,
63
- event_type: 'APP_OPEN'
64
- }
65
- },
66
- {
67
- name: 'Login',
68
- subscribe: 'event = "Signed In"',
69
- partnerAction: 'reportConversionEvent',
70
- mapping: {
71
- ...DEFAULT_VALS,
72
- event_type: 'LOGIN'
73
- }
74
- },
75
- {
76
- name: 'Page View',
77
- subscribe: 'type = "page"',
78
- partnerAction: 'reportConversionEvent',
79
- mapping: {
80
- ...DEFAULT_VALS,
81
- event_type: 'PAGE_VIEW'
82
- }
83
- },
84
- {
85
- name: 'Purchase',
86
- subscribe: 'event = "Order Completed"',
87
- partnerAction: 'reportConversionEvent',
88
- mapping: {
89
- ...DEFAULT_VALS,
90
- event_type: 'PURCHASE'
91
- }
92
- },
93
- {
94
- name: 'Search',
95
- subscribe: 'event = "Products Searched"',
96
- partnerAction: 'reportConversionEvent',
97
- mapping: {
98
- ...DEFAULT_VALS,
99
- event_type: 'SEARCH'
100
- }
101
- },
102
- {
103
- name: 'Share',
104
- subscribe: 'event = "Product Shared"',
105
- partnerAction: 'reportConversionEvent',
106
- mapping: {
107
- ...DEFAULT_VALS,
108
- event_type: 'SHARE'
109
- }
110
- },
111
- {
112
- name: 'Sign Up',
113
- subscribe: 'event = "Signed Up"',
114
- partnerAction: 'reportConversionEvent',
115
- mapping: {
116
- ...DEFAULT_VALS,
117
- event_type: 'SIGN_UP'
118
- }
119
- },
120
- {
121
- name: 'Start Checkout',
122
- subscribe: 'event = "Checkout Started"',
123
- partnerAction: 'reportConversionEvent',
124
- mapping: {
125
- ...DEFAULT_VALS,
126
- event_type: 'START_CHECKOUT'
127
- }
128
- },
129
- {
130
- name: 'View Content',
131
- subscribe: 'event = "Product Viewed"',
132
- partnerAction: 'reportConversionEvent',
133
- mapping: {
134
- ...DEFAULT_VALS,
135
- event_type: 'VIEW_CONTENT'
136
- }
137
- }
138
- ];
7
+ const ACCESS_TOKEN_URL = 'https://accounts.snapchat.com/login/oauth2/access_token';
139
8
  const destination = {
140
9
  name: 'Snap Conversions Api',
141
10
  slug: 'actions-snap-conversions',
@@ -158,9 +27,27 @@ const destination = {
158
27
  description: 'The unique ID assigned for a given application. It should be numeric for iOS, and the human interpretable string for Android. Required for app events.',
159
28
  type: 'string'
160
29
  }
161
- }
30
+ },
31
+ refreshAccessToken: async (request, { auth }) => {
32
+ const res = await request(ACCESS_TOKEN_URL, {
33
+ method: 'POST',
34
+ body: new URLSearchParams({
35
+ refresh_token: auth.refreshToken,
36
+ client_id: auth.clientId,
37
+ client_secret: auth.clientSecret,
38
+ grant_type: 'refresh_token'
39
+ })
40
+ });
41
+ return { accessToken: res.data.access_token };
42
+ }
43
+ },
44
+ extendRequest({ auth }) {
45
+ return {
46
+ headers: {
47
+ authorization: `Bearer ${auth?.accessToken}`
48
+ }
49
+ };
162
50
  },
163
- presets,
164
51
  actions: {
165
52
  reportConversionEvent: reportConversionEvent_1.default
166
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/snap-conversions-api/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAG5E,oFAA2D;AAE3D,MAAM,YAAY,GAAG;IACnB,GAAG,4BAAa,CAAC,+BAAqB,CAAC,MAAM,CAAC;CAC/C,CAAA;AAQD,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,gCAAgC;QAC3C,aAAa,EAAE,uBAAuB;QACtC,OAAO,EAAE;YACP,GAAG,YAAY;YACf,UAAU,EAAE,aAAa;SAC1B;KACF;IACD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,yBAAyB;QACpC,aAAa,EAAE,uBAAuB;QACtC,OAAO,EAAE;YACP,GAAG,YAAY;YACf,UAAU,EAAE,UAAU;SACvB;KACF;IACD;QACE,IAAI,EAAE,iBAAiB;QACv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,EAAE,uBAAuB;QACtC,OAAO,EAAE;YACP,GAAG,YAAY;YACf,UAAU,EAAE,OAAO;SACpB;KACF;IACD;QACE,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,qBAAqB;QAChC,aAAa,EAAE,uBAAuB;QACtC,OAAO,EAAE;YACP,GAAG,YAAY;YACf,UAAU,EAAE,SAAS;SACtB;KACF;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,4BAA4B;QACvC,aAAa,EAAE,uBAAuB;QACtC,OAAO,EAAE;YACP,GAAG,YAAY;YACf,UAAU,EAAE,gBAAgB;SAC7B;KACF;IACD;QACE,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE,0BAA0B;QACrC,aAAa,EAAE,uBAAuB;QACtC,OAAO,EAAE;YACP,GAAG,YAAY;YACf,UAAU,EAAE,cAAc;SAC3B;KACF;CACF,CAAA;AACD,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,QAAQ,EAAE;gBACR,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,iFAAiF;gBAC9F,IAAI,EAAE,QAAQ;aACf;YACD,WAAW,EAAE;gBACX,KAAK,EAAE,aAAa;gBACpB,WAAW,EACT,gKAAgK;gBAClK,IAAI,EAAE,QAAQ;aACf;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,QAAQ;gBACf,WAAW,EACT,wJAAwJ;gBAC1J,IAAI,EAAE,QAAQ;aACf;SACF;KAkCF;IACD,OAAO;IACP,OAAO,EAAE;QACP,qBAAqB,EAArB,+BAAqB;KACtB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/snap-conversions-api/index.ts"],"names":[],"mappings":";;;;;AAIA,oFAA2D;AAM3D,MA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;
3
- event_conversion_type: string;
4
- event_tag?: string;
5
- timestamp: string;
6
- email?: string;
7
- mobile_ad_id?: string;
8
- uuid_c1?: string;
9
- idfv?: string;
10
- phone_number?: string;
11
- user_agent?: string;
12
- ip_address?: string;
13
- item_category?: string;
14
- item_ids?: string;
15
- description?: string;
16
- number_items?: string;
17
- price?: number;
18
- currency?: string;
19
- transaction_id?: string;
20
- level?: string;
21
- client_dedup_id?: string;
22
- search_string?: string;
23
- page_url?: string;
24
- sign_up_method?: string;
25
2
  }
@@ -1,49 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const actions_core_1 = require("@segment/actions-core");
4
- const snap_capi_properties_1 = require("../snap-capi-properties");
5
- const CONVERSION_EVENT_URL = 'https://tr.snapchat.com/v2/conversion';
6
3
  const action = {
7
4
  title: 'Report Conversion Event',
8
5
  description: 'Report events directly to Snapchat. Data shared can power Snap solutions such as custom audience targeting, campaign optimization, Dynamic Ads, and more.',
9
- fields: {
10
- event_type: { ...snap_capi_properties_1.event_type, required: true },
11
- event_conversion_type: { ...snap_capi_properties_1.event_conversion_type, required: true },
12
- event_tag: snap_capi_properties_1.event_tag,
13
- timestamp: { ...snap_capi_properties_1.timestamp, required: true },
14
- email: snap_capi_properties_1.email,
15
- mobile_ad_id: snap_capi_properties_1.mobile_ad_id,
16
- uuid_c1: snap_capi_properties_1.uuid_c1,
17
- idfv: snap_capi_properties_1.idfv,
18
- phone_number: snap_capi_properties_1.phone_number,
19
- user_agent: snap_capi_properties_1.user_agent,
20
- ip_address: snap_capi_properties_1.ip_address,
21
- item_category: snap_capi_properties_1.item_category,
22
- item_ids: snap_capi_properties_1.item_ids,
23
- description: snap_capi_properties_1.description,
24
- number_items: snap_capi_properties_1.number_items,
25
- price: snap_capi_properties_1.price,
26
- currency: snap_capi_properties_1.currency,
27
- transaction_id: snap_capi_properties_1.transaction_id,
28
- level: snap_capi_properties_1.level,
29
- client_dedup_id: snap_capi_properties_1.client_dedup_id,
30
- search_string: snap_capi_properties_1.search_string,
31
- page_url: snap_capi_properties_1.page_url,
32
- sign_up_method: snap_capi_properties_1.sign_up_method
33
- },
34
- perform: (request, data) => {
35
- const payload = snap_capi_properties_1.formatPayload(data.payload);
36
- const settings = snap_capi_properties_1.conversionType(data.settings, data.payload.event_conversion_type);
37
- if (data.payload.currency && !snap_capi_properties_1.CURRENCY_ISO_4217_CODES.has(data.payload.currency)) {
38
- throw new actions_core_1.IntegrationError(`${data.payload.currency} is not a valid currency code.`, 'Misconfigured required field', 400);
39
- }
40
- return request(CONVERSION_EVENT_URL, {
41
- method: 'post',
42
- json: {
43
- ...payload,
44
- ...settings
45
- }
46
- });
6
+ fields: {},
7
+ perform: () => {
8
+ return;
47
9
  }
48
10
  };
49
11
  exports.default = action;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/snap-conversions-api/reportConversionEvent/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAG1E,kEA2BgC;AAEhC,MAAM,oBAAoB,GAAG,uCAAuC,CAAA;AAEpE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EACT,2JAA2J;IAC7J,MAAM,EAAE;QACN,UAAU,EAAE,EAAE,GAAG,iCAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7C,qBAAqB,EAAE,EAAE,GAAG,4CAAqB,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnE,SAAS,EAAE,gCAAS;QACpB,SAAS,EAAE,EAAE,GAAG,gCAAS,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC3C,KAAK,EAAE,4BAAK;QACZ,YAAY,EAAE,mCAAY;QAC1B,OAAO,EAAE,8BAAO;QAChB,IAAI,EAAE,2BAAI;QACV,YAAY,EAAE,mCAAY;QAC1B,UAAU,EAAE,iCAAU;QACtB,UAAU,EAAE,iCAAU;QACtB,aAAa,EAAE,oCAAa;QAC5B,QAAQ,EAAE,+BAAQ;QAClB,WAAW,EAAE,kCAAW;QACxB,YAAY,EAAE,mCAAY;QAC1B,KAAK,EAAE,4BAAK;QACZ,QAAQ,EAAE,+BAAQ;QAClB,cAAc,EAAE,qCAAc;QAC9B,KAAK,EAAE,4BAAK;QACZ,eAAe,EAAE,sCAAe;QAChC,aAAa,EAAE,oCAAa;QAC5B,QAAQ,EAAE,+BAAQ;QAClB,cAAc,EAAE,qCAAc;KAC/B;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,MAAM,OAAO,GAAW,oCAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACnD,MAAM,QAAQ,GAAa,qCAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAA;QAE5F,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,8CAAuB,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAChF,MAAM,IAAI,+BAAgB,CACxB,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,gCAAgC,EACxD,8BAA8B,EAC9B,GAAG,CACJ,CAAA;SACF;QAGD,OAAO,OAAO,CAAC,oBAAoB,EAAE;YACnC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,GAAG,OAAO;gBACV,GAAG,QAAQ;aACZ;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/snap-conversions-api/reportConversionEvent/index.ts"],"names":[],"mappings":";;AAqFA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EACT,2JAA2J;IAC7J,MAAM,EAAE,EAAE;IAEV,OAAO,EAAE,GAAG,EAAE;QACZ,OAAM;IACR,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -1,30 +0,0 @@
1
- import { InputField } from '@segment/actions-core/src/destination-kit/types';
2
- import { Settings } from '../snap-conversions-api/generated-types';
3
- import { Payload } from './reportConversionEvent/generated-types';
4
- export declare const CURRENCY_ISO_4217_CODES: Set<string>;
5
- export declare const event_type: InputField;
6
- export declare const event_conversion_type: InputField;
7
- export declare const event_tag: InputField;
8
- export declare const timestamp: InputField;
9
- export declare const email: InputField;
10
- export declare const mobile_ad_id: InputField;
11
- export declare const uuid_c1: InputField;
12
- export declare const idfv: InputField;
13
- export declare const phone_number: InputField;
14
- export declare const user_agent: InputField;
15
- export declare const ip_address: InputField;
16
- export declare const item_category: InputField;
17
- export declare const item_ids: InputField;
18
- export declare const description: InputField;
19
- export declare const number_items: InputField;
20
- export declare const price: InputField;
21
- export declare const currency: InputField;
22
- export declare const transaction_id: InputField;
23
- export declare const level: InputField;
24
- export declare const client_dedup_id: InputField;
25
- export declare const search_string: InputField;
26
- export declare const page_url: InputField;
27
- export declare const sign_up_method: InputField;
28
- export declare const conversionType: (settings: Settings, event_conversion_type: String) => Settings;
29
- export declare const hash: (value: string | undefined) => string | undefined;
30
- export declare const formatPayload: (payload: Payload) => Object;
@@ -1,310 +1,2 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatPayload = exports.hash = exports.conversionType = exports.sign_up_method = exports.page_url = exports.search_string = exports.client_dedup_id = exports.level = exports.transaction_id = exports.currency = exports.price = exports.number_items = exports.description = exports.item_ids = exports.item_category = exports.ip_address = exports.user_agent = exports.phone_number = exports.idfv = exports.uuid_c1 = exports.mobile_ad_id = exports.email = exports.timestamp = exports.event_tag = exports.event_conversion_type = exports.event_type = exports.CURRENCY_ISO_4217_CODES = void 0;
4
- const actions_core_1 = require("@segment/actions-core");
5
- const crypto_1 = require("crypto");
6
- exports.CURRENCY_ISO_4217_CODES = new Set([
7
- 'USD',
8
- 'AED',
9
- 'AUD',
10
- 'BGN',
11
- 'BRL',
12
- 'CAD',
13
- 'CHF',
14
- 'CLP',
15
- 'CNY',
16
- 'COP',
17
- 'CZK',
18
- 'DKK',
19
- 'EGP',
20
- 'EUR',
21
- 'GBP',
22
- 'GIP',
23
- 'HKD',
24
- 'HRK',
25
- 'HUF',
26
- 'IDR',
27
- 'ILS',
28
- 'INR',
29
- 'JPY',
30
- 'KRW',
31
- 'KWD',
32
- 'KZT',
33
- 'LBP',
34
- 'MXN',
35
- 'MYR',
36
- 'NGN',
37
- 'NOK',
38
- 'NZD',
39
- 'PEN',
40
- 'PHP',
41
- 'PKR',
42
- 'PLN',
43
- 'QAR',
44
- 'RON',
45
- 'RUB',
46
- 'SAR',
47
- 'SEK',
48
- 'SGD',
49
- 'THB',
50
- 'TRY',
51
- 'TWD',
52
- 'TZS',
53
- 'UAH',
54
- 'VND',
55
- 'ZAR',
56
- 'ALL',
57
- 'BHD',
58
- 'DZD',
59
- 'GHS',
60
- 'IQD',
61
- 'ISK',
62
- 'JOD',
63
- 'KES',
64
- 'MAD',
65
- 'OMR',
66
- 'XOF'
67
- ]);
68
- exports.event_type = {
69
- label: 'Event Type',
70
- description: 'The conversion event type. For custom events, you must use one of the predefined event types (i.e. CUSTOM_EVENT_1). Please refer to the possible event types in [Snapchat Marketing API docs](https://marketingapi.snapchat.com/docs/conversion.html#conversion-parameters).',
71
- type: 'string'
72
- };
73
- exports.event_conversion_type = {
74
- label: 'Event Conversion Type',
75
- description: 'Where the event took place. This must be OFFLINE, WEB, or MOBILE_APP.',
76
- type: 'string',
77
- choices: [
78
- { label: 'Offline', value: 'OFFLINE' },
79
- { label: 'Web', value: 'WEB' },
80
- { label: 'Mobile App', value: 'MOBILE_APP' }
81
- ]
82
- };
83
- exports.event_tag = {
84
- label: 'Event Tag',
85
- description: 'Custom event label.',
86
- type: 'string'
87
- };
88
- exports.timestamp = {
89
- label: 'Event Timestamp',
90
- description: 'The Epoch timestamp for when the conversion happened. The timestamp cannot be more than 28 days in the past.',
91
- type: 'string',
92
- default: {
93
- '@path': '$.timestamp'
94
- }
95
- };
96
- exports.email = {
97
- label: 'Email',
98
- description: 'Email address of the user who triggered the conversion event. Segment will normalize and hash this value before sending to Snapchat.',
99
- type: 'string',
100
- default: {
101
- '@if': {
102
- exists: { '@path': '$.properties.email' },
103
- then: { '@path': '$.properties.email' },
104
- else: { '@path': '$.traits.email' }
105
- }
106
- }
107
- };
108
- exports.mobile_ad_id = {
109
- label: 'Mobile Ad Identifier',
110
- description: 'Mobile ad identifier (IDFA or AAID) of the user who triggered the conversion event. Segment will normalize and hash this value before sending to Snapchat.',
111
- type: 'string',
112
- default: {
113
- '@path': '$.context.device.advertisingId'
114
- }
115
- };
116
- exports.uuid_c1 = {
117
- label: 'uuid_c1 Cookie',
118
- description: 'Unique user ID cookie. If you are using the Pixel SDK, you can access a cookie1 by looking at the _scid value.',
119
- type: 'string'
120
- };
121
- exports.idfv = {
122
- label: 'Identifier for Vendor',
123
- description: 'IDFV of the user’s device. Segment will normalize and hash this value before sending to Snapchat.',
124
- type: 'string',
125
- default: {
126
- '@path': '$.context.device.id'
127
- }
128
- };
129
- exports.phone_number = {
130
- label: 'Phone Number',
131
- description: 'Phone number of the user who triggered the conversion event. Segment will normalize and hash this value before sending to Snapchat.',
132
- type: 'string',
133
- default: {
134
- '@if': {
135
- exists: { '@path': '$.properties.phone' },
136
- then: { '@path': '$.properties.phone' },
137
- else: { '@path': '$.traits.phone' }
138
- }
139
- }
140
- };
141
- exports.user_agent = {
142
- label: 'User Agent',
143
- description: 'User agent from the user’s device.',
144
- type: 'string',
145
- default: {
146
- '@path': '$.context.userAgent'
147
- }
148
- };
149
- exports.ip_address = {
150
- label: 'IP Address',
151
- description: 'IP address of the device or browser. Segment will normalize and hash this value before sending to Snapchat.',
152
- type: 'string',
153
- default: {
154
- '@path': '$.context.ip'
155
- }
156
- };
157
- exports.item_category = {
158
- label: 'Item Category',
159
- description: 'Category of the item.',
160
- type: 'string',
161
- default: {
162
- '@path': '$.properties.category'
163
- }
164
- };
165
- exports.item_ids = {
166
- label: 'Item IDs',
167
- description: 'International Article Number (EAN) when applicable, or other product or category identifier.',
168
- type: 'string',
169
- default: {
170
- '@path': '$.properties.product_id'
171
- }
172
- };
173
- exports.description = {
174
- label: 'Description',
175
- description: 'A string description for additional info.',
176
- type: 'string'
177
- };
178
- exports.number_items = {
179
- label: 'Number of Items',
180
- description: 'Number of items.',
181
- type: 'string',
182
- default: {
183
- '@path': '$.properties.quantity'
184
- }
185
- };
186
- exports.price = {
187
- label: 'Price',
188
- description: 'Value of the purchase.This should be a single number.',
189
- type: 'number',
190
- default: {
191
- '@if': {
192
- exists: { '@path': '$.properties.price' },
193
- then: { '@path': '$.properties.price' },
194
- else: { '@path': '$.properties.value' }
195
- }
196
- }
197
- };
198
- exports.currency = {
199
- label: 'Currency',
200
- description: 'Currency for the value specified as ISO 4217 code.',
201
- type: 'string',
202
- default: {
203
- '@path': '$.properties.currency'
204
- }
205
- };
206
- exports.transaction_id = {
207
- label: 'Transaction ID',
208
- description: 'Transaction ID or order ID tied to the conversion event. Please refer to the [Snapchat Marketing API docs](https://marketingapi.snapchat.com/docs/conversion.html#deduplication) for information on how this field is used for deduplication against Snap Pixel SDK and App Adds Kit events.',
209
- type: 'string',
210
- default: {
211
- '@path': '$.properties.order_id'
212
- }
213
- };
214
- exports.level = {
215
- label: 'Level',
216
- description: 'Represents a level in the context of a game.',
217
- type: 'string'
218
- };
219
- exports.client_dedup_id = {
220
- label: 'Client Deduplication ID',
221
- description: 'If you are reporting events via more than one method (Snap Pixel, App Ads Kit, Conversions API) you should use the same client_dedup_id across all methods. Please refer to the [Snapchat Marketing API docs](https://marketingapi.snapchat.com/docs/conversion.html#deduplication) for information on how this field is used for deduplication against Snap Pixel SDK and App Adds Kit events.',
222
- type: 'string'
223
- };
224
- exports.search_string = {
225
- label: 'Search String',
226
- description: 'The text string that was searched for.',
227
- type: 'string',
228
- default: {
229
- '@path': '$.properties.query'
230
- }
231
- };
232
- exports.page_url = {
233
- label: 'Page URL',
234
- description: 'The URL of the web page where the event took place.',
235
- type: 'string',
236
- default: {
237
- '@path': '$.context.page.url'
238
- }
239
- };
240
- exports.sign_up_method = {
241
- label: 'Sign Up Method',
242
- description: 'A string indicating the sign up method.',
243
- type: 'string'
244
- };
245
- const conversionType = (settings, event_conversion_type) => {
246
- if (event_conversion_type === 'MOBILE_APP') {
247
- if (settings?.snap_app_id === undefined ||
248
- settings?.app_id === undefined ||
249
- settings?.snap_app_id === '' ||
250
- settings?.app_id === '') {
251
- throw new actions_core_1.IntegrationError('If event conversion type is "MOBILE_APP" then snap_app_id and app_id must be defined', 'Misconfigured required field', 400);
252
- }
253
- delete settings?.pixel_id;
254
- }
255
- else {
256
- if (settings?.pixel_id === undefined) {
257
- throw new actions_core_1.IntegrationError(`If event conversion type is "${event_conversion_type}" then pixel_id must be defined`, 'Misconfigured required field', 400);
258
- }
259
- delete settings?.snap_app_id;
260
- delete settings?.app_id;
261
- }
262
- return settings;
263
- };
264
- exports.conversionType = conversionType;
265
- const hash = (value) => {
266
- if (value === undefined)
267
- return;
268
- const hash = crypto_1.createHash('sha256');
269
- hash.update(value);
270
- return hash.digest('hex');
271
- };
272
- exports.hash = hash;
273
- const formatPayload = (payload) => {
274
- if (payload.email) {
275
- payload.email = payload.email.replace(/\s/g, '').toLowerCase();
276
- }
277
- if (payload.phone_number) {
278
- payload.phone_number = payload.phone_number.replace(/\D|^0+/g, '');
279
- }
280
- if (payload.mobile_ad_id) {
281
- payload.mobile_ad_id = payload.mobile_ad_id.toLowerCase();
282
- }
283
- return {
284
- event_type: payload?.event_type,
285
- event_conversion_type: payload?.event_conversion_type,
286
- event_tag: payload?.event_tag,
287
- timestamp: Date.parse(payload?.timestamp),
288
- hashed_email: exports.hash(payload?.email),
289
- mobile_ad_id: exports.hash(payload?.mobile_ad_id),
290
- uuid_c1: payload?.uuid_c1,
291
- hashed_idfv: exports.hash(payload?.idfv),
292
- hashed_phone_number: exports.hash(payload?.phone_number),
293
- user_agent: payload?.user_agent,
294
- hashed_ip_address: exports.hash(payload?.ip_address),
295
- item_category: payload?.item_category,
296
- item_ids: payload?.item_ids,
297
- description: payload?.description,
298
- number_items: payload?.number_items,
299
- price: payload?.price,
300
- currency: payload?.currency,
301
- transaction_id: payload?.transaction_id,
302
- level: payload?.level,
303
- client_dedup_id: payload?.client_dedup_id,
304
- search_string: payload?.search_string,
305
- page_url: payload?.page_url,
306
- sign_up_method: payload?.sign_up_method
307
- };
308
- };
309
- exports.formatPayload = formatPayload;
310
2
  //# sourceMappingURL=snap-capi-properties.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"snap-capi-properties.js","sourceRoot":"","sources":["../../../src/destinations/snap-conversions-api/snap-capi-properties.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AAExD,mCAAmC;AAItB,QAAA,uBAAuB,GAAG,IAAI,GAAG,CAAC;IAC7C,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;CACN,CAAC,CAAA;AAEW,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,YAA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QACvC,KAAK,EAAE,OAAO,EAAE,KAAK;QACrB,eAAe,EAAE,OAAO,EAAE,eAAe;QACzC,aAAa,EAAE,OAAO,EAAE,aAAa;QACrC,QAAQ,EAAE,OAAO,EAAE,QAAQ;QAC3B,cAAc,EAAE,OAAO,EAAE,cAAc;KACxC,CAAA;AACH,CAAC,CAAA;AA1CY,QAAA,aAAa,iBA0CzB"}
1
+ {"version":3,"file":"snap-capi-properties.js","sourceRoot":"","sources":["../../../src/destinations/snap-conversions-api/snap-capi-properties.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@segment/action-destinations",
3
3
  "description": "Destination Actions engine and definitions.",
4
- "version": "3.74.4-alpha.4",
4
+ "version": "3.74.4-alpha.7",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/segmentio/action-destinations",
@@ -61,5 +61,5 @@
61
61
  "<rootDir>/test/setup-after-env.ts"
62
62
  ]
63
63
  },
64
- "gitHead": "acb5e94cec4f011be8b17044e4500461019b5115"
64
+ "gitHead": "efd33d39adc694499ad173f7d14b431ca81580a3"
65
65
  }