@segment/action-destinations 3.284.0-staging-50e2b5698 → 3.284.0-staging-787f2db99

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 (148) hide show
  1. package/dist/destinations/amazon-amc/index.js.map +1 -1
  2. package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
  3. package/dist/destinations/customerio/test-helper.d.ts +1 -1
  4. package/dist/destinations/customerio/utils.d.ts +1 -1
  5. package/dist/destinations/engage/utils/track.d.ts +9 -9
  6. package/dist/destinations/klaviyo/orderCompleted/formatters.d.ts +11 -1
  7. package/dist/destinations/klaviyo/orderCompleted/formatters.js +2 -3
  8. package/dist/destinations/klaviyo/orderCompleted/formatters.js.map +1 -1
  9. package/dist/destinations/klaviyo/orderCompleted/index.js +17 -5
  10. package/dist/destinations/klaviyo/orderCompleted/index.js.map +1 -1
  11. package/dist/destinations/klaviyo/trackEvent/index.js +1 -1
  12. package/dist/destinations/klaviyo/trackEvent/index.js.map +1 -1
  13. package/package.json +2 -2
  14. package/dist/destinations/amazon-ads/generated-types.d.ts +0 -12
  15. package/dist/destinations/amazon-ads/generated-types.js +0 -3
  16. package/dist/destinations/amazon-ads/generated-types.js.map +0 -1
  17. package/dist/destinations/amazon-ads/index.d.ts +0 -4
  18. package/dist/destinations/amazon-ads/index.js +0 -237
  19. package/dist/destinations/amazon-ads/index.js.map +0 -1
  20. package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +0 -15
  21. package/dist/destinations/amazon-ads/syncAudiences/generated-types.js +0 -3
  22. package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +0 -1
  23. package/dist/destinations/amazon-ads/syncAudiences/index.d.ts +0 -5
  24. package/dist/destinations/amazon-ads/syncAudiences/index.js +0 -182
  25. package/dist/destinations/amazon-ads/syncAudiences/index.js.map +0 -1
  26. package/dist/destinations/amazon-ads/types.d.ts +0 -47
  27. package/dist/destinations/amazon-ads/types.js +0 -11
  28. package/dist/destinations/amazon-ads/types.js.map +0 -1
  29. package/dist/destinations/amazon-ads/utils.d.ts +0 -37
  30. package/dist/destinations/amazon-ads/utils.js +0 -25
  31. package/dist/destinations/amazon-ads/utils.js.map +0 -1
  32. package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.d.ts +0 -1
  33. package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js +0 -184
  34. package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js.map +0 -1
  35. package/dist/destinations/contentstack/constants.d.ts +0 -3
  36. package/dist/destinations/contentstack/constants.js +0 -7
  37. package/dist/destinations/contentstack/constants.js.map +0 -1
  38. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.d.ts +0 -22
  39. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js +0 -3
  40. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js.map +0 -1
  41. package/dist/destinations/dynamic-yield-audiences/types.d.ts +0 -8
  42. package/dist/destinations/dynamic-yield-audiences/types.js +0 -12
  43. package/dist/destinations/dynamic-yield-audiences/types.js.map +0 -1
  44. package/dist/destinations/engage/sendgrid/Profile.d.ts +0 -6
  45. package/dist/destinations/engage/sendgrid/Profile.js +0 -3
  46. package/dist/destinations/engage/sendgrid/Profile.js.map +0 -1
  47. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +0 -21
  48. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +0 -174
  49. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +0 -1
  50. package/dist/destinations/klaviyo/removeProfileToList/generated-types.d.ts +0 -4
  51. package/dist/destinations/klaviyo/removeProfileToList/generated-types.js +0 -3
  52. package/dist/destinations/klaviyo/removeProfileToList/generated-types.js.map +0 -1
  53. package/dist/destinations/klaviyo/removeProfileToList/index.d.ts +0 -5
  54. package/dist/destinations/klaviyo/removeProfileToList/index.js +0 -43
  55. package/dist/destinations/klaviyo/removeProfileToList/index.js.map +0 -1
  56. package/dist/destinations/mixpanel/utils.d.ts +0 -13
  57. package/dist/destinations/mixpanel/utils.js +0 -117
  58. package/dist/destinations/mixpanel/utils.js.map +0 -1
  59. package/dist/destinations/movable-ink/categoryView/generated-types.d.ts +0 -22
  60. package/dist/destinations/movable-ink/categoryView/generated-types.js +0 -3
  61. package/dist/destinations/movable-ink/categoryView/generated-types.js.map +0 -1
  62. package/dist/destinations/movable-ink/categoryView/index.d.ts +0 -5
  63. package/dist/destinations/movable-ink/categoryView/index.js +0 -43
  64. package/dist/destinations/movable-ink/categoryView/index.js.map +0 -1
  65. package/dist/destinations/movable-ink/conversion/generated-types.d.ts +0 -20
  66. package/dist/destinations/movable-ink/conversion/generated-types.js +0 -3
  67. package/dist/destinations/movable-ink/conversion/generated-types.js.map +0 -1
  68. package/dist/destinations/movable-ink/conversion/index.d.ts +0 -5
  69. package/dist/destinations/movable-ink/conversion/index.js +0 -45
  70. package/dist/destinations/movable-ink/conversion/index.js.map +0 -1
  71. package/dist/destinations/movable-ink/fields.d.ts +0 -21
  72. package/dist/destinations/movable-ink/fields.js +0 -236
  73. package/dist/destinations/movable-ink/fields.js.map +0 -1
  74. package/dist/destinations/movable-ink/identify/generated-types.d.ts +0 -7
  75. package/dist/destinations/movable-ink/identify/generated-types.js +0 -3
  76. package/dist/destinations/movable-ink/identify/generated-types.js.map +0 -1
  77. package/dist/destinations/movable-ink/identify/index.d.ts +0 -5
  78. package/dist/destinations/movable-ink/identify/index.js +0 -32
  79. package/dist/destinations/movable-ink/identify/index.js.map +0 -1
  80. package/dist/destinations/movable-ink/productAdded/generated-types.d.ts +0 -22
  81. package/dist/destinations/movable-ink/productAdded/generated-types.js +0 -3
  82. package/dist/destinations/movable-ink/productAdded/generated-types.js.map +0 -1
  83. package/dist/destinations/movable-ink/productAdded/index.d.ts +0 -5
  84. package/dist/destinations/movable-ink/productAdded/index.js +0 -43
  85. package/dist/destinations/movable-ink/productAdded/index.js.map +0 -1
  86. package/dist/destinations/movable-ink/productViewed/generated-types.d.ts +0 -21
  87. package/dist/destinations/movable-ink/productViewed/generated-types.js +0 -3
  88. package/dist/destinations/movable-ink/productViewed/generated-types.js.map +0 -1
  89. package/dist/destinations/movable-ink/productViewed/index.d.ts +0 -5
  90. package/dist/destinations/movable-ink/productViewed/index.js +0 -43
  91. package/dist/destinations/movable-ink/productViewed/index.js.map +0 -1
  92. package/dist/destinations/movable-ink/search/generated-types.d.ts +0 -12
  93. package/dist/destinations/movable-ink/search/generated-types.js +0 -3
  94. package/dist/destinations/movable-ink/search/generated-types.js.map +0 -1
  95. package/dist/destinations/movable-ink/search/index.d.ts +0 -5
  96. package/dist/destinations/movable-ink/search/index.js +0 -43
  97. package/dist/destinations/movable-ink/search/index.js.map +0 -1
  98. package/dist/destinations/movable-ink/sendCustomEvent/generated-types.d.ts +0 -25
  99. package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js +0 -3
  100. package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js.map +0 -1
  101. package/dist/destinations/movable-ink/sendCustomEvent/index.d.ts +0 -5
  102. package/dist/destinations/movable-ink/sendCustomEvent/index.js +0 -48
  103. package/dist/destinations/movable-ink/sendCustomEvent/index.js.map +0 -1
  104. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +0 -14
  105. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js +0 -3
  106. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +0 -1
  107. package/dist/destinations/responsys/asyncMergePetRecords/index.d.ts +0 -5
  108. package/dist/destinations/responsys/asyncMergePetRecords/index.js +0 -113
  109. package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +0 -1
  110. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +0 -20
  111. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js +0 -3
  112. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +0 -1
  113. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.d.ts +0 -5
  114. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +0 -174
  115. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +0 -1
  116. package/dist/destinations/responsys/rsp-operations.d.ts +0 -14
  117. package/dist/destinations/responsys/rsp-operations.js +0 -33
  118. package/dist/destinations/responsys/rsp-operations.js.map +0 -1
  119. package/dist/destinations/responsys/rsp-properties.d.ts +0 -4
  120. package/dist/destinations/responsys/rsp-properties.js +0 -27
  121. package/dist/destinations/responsys/rsp-properties.js.map +0 -1
  122. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.d.ts +0 -1
  123. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js +0 -381
  124. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js.map +0 -1
  125. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.d.ts +0 -1
  126. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js +0 -581
  127. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js.map +0 -1
  128. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.d.ts +0 -4
  129. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js +0 -97
  130. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js.map +0 -1
  131. package/dist/destinations/snap-conversions-api/snap-capi-properties.d.ts +0 -30
  132. package/dist/destinations/snap-conversions-api/snap-capi-properties.js +0 -316
  133. package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +0 -1
  134. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +0 -3
  135. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +0 -34
  136. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +0 -1
  137. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +0 -3
  138. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +0 -43
  139. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +0 -1
  140. package/dist/destinations/trackey/group.types.d.ts +0 -11
  141. package/dist/destinations/trackey/group.types.js +0 -3
  142. package/dist/destinations/trackey/group.types.js.map +0 -1
  143. package/dist/destinations/trackey/identify.types.d.ts +0 -11
  144. package/dist/destinations/trackey/identify.types.js +0 -3
  145. package/dist/destinations/trackey/identify.types.js.map +0 -1
  146. package/dist/destinations/trackey/track.types.d.ts +0 -12
  147. package/dist/destinations/trackey/track.types.js +0 -3
  148. package/dist/destinations/trackey/track.types.js.map +0 -1
@@ -1,182 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const utils_1 = require("../utils");
4
- const crypto_1 = require("crypto");
5
- const action = {
6
- title: 'Sync Audience',
7
- description: 'Sync audiences from Segment to Amazon Ads Audience.',
8
- defaultSubscription: 'event = "Audience Entered" or event = "Audience Exited"',
9
- fields: {
10
- event_name: {
11
- label: 'Event Name',
12
- description: 'The name of the current Segment event.',
13
- type: 'string',
14
- unsafe_hidden: true,
15
- default: {
16
- '@path': '$.event'
17
- }
18
- },
19
- externalUserId: {
20
- label: 'External User ID',
21
- description: 'This is an external user identifier defined by data providers.',
22
- type: 'string',
23
- required: true,
24
- default: { '@path': '$.userId' }
25
- },
26
- email: {
27
- label: 'Email',
28
- description: 'User email address. Vaule will be hashed before sending to Amazon.',
29
- type: 'string',
30
- required: false,
31
- default: { '@path': '$.properties.email' }
32
- },
33
- firstName: {
34
- label: 'First name',
35
- description: 'User first name. Value will be hashed before sending to Amazon.',
36
- type: 'string',
37
- required: false,
38
- default: { '@path': '$.properties.first_name' }
39
- },
40
- lastName: {
41
- label: 'Last name',
42
- description: 'User Last name. Value will be hashed before sending to Amazon.',
43
- type: 'string',
44
- required: false,
45
- default: { '@path': '$.properties.last_name' }
46
- },
47
- phone: {
48
- label: 'Phone',
49
- description: 'Phone Number. Value will be hashed before sending to Amazon.',
50
- type: 'string',
51
- required: false,
52
- default: { '@path': '$.properties.phone' }
53
- },
54
- postal: {
55
- label: 'Postal',
56
- description: 'POstal Code. Value will be hashed before sending to Amazon.',
57
- type: 'string',
58
- required: false,
59
- default: { '@path': '$.properties.postal' }
60
- },
61
- state: {
62
- label: 'Postal',
63
- description: 'State Code. Value will be hashed before sending to Amazon.',
64
- type: 'string',
65
- required: false,
66
- default: { '@path': '$.properties.state' }
67
- },
68
- city: {
69
- label: 'City',
70
- description: 'City name. Value will be hashed before sending to Amazon.',
71
- type: 'string',
72
- required: false,
73
- default: { '@path': '$.properties.city' }
74
- },
75
- address: {
76
- label: 'Address',
77
- description: 'Address Code. Value will be hashed before sending to Amazon.',
78
- type: 'string',
79
- required: false,
80
- default: { '@path': '$.properties.address' }
81
- },
82
- audienceId: {
83
- label: 'Audience ID',
84
- type: 'string',
85
- required: true,
86
- unsafe_hidden: true,
87
- description: 'A number value representing the Amazon audience identifier. This is the identifier that is returned during audience creation.',
88
- default: {
89
- '@path': '$.context.personas.external_audience_id'
90
- }
91
- },
92
- enable_batching: {
93
- label: 'Enable Batching',
94
- description: 'When enabled,segment will send data in batching',
95
- type: 'boolean',
96
- required: true,
97
- default: true
98
- },
99
- batch_size: {
100
- label: 'Batch Size',
101
- description: 'Maximum number of events to include in each batch. Actual batch sizes may be lower.',
102
- type: 'number',
103
- unsafe_hidden: true,
104
- required: false,
105
- default: 10000
106
- }
107
- },
108
- perform: (request, { settings, payload, statsContext, audienceSettings }) => {
109
- return processPayload(request, settings, [payload], statsContext, audienceSettings);
110
- },
111
- performBatch: (request, { settings, payload: payloads, statsContext, audienceSettings }) => {
112
- return processPayload(request, settings, payloads, statsContext, audienceSettings);
113
- }
114
- };
115
- async function processPayload(request, settings, payload, statsContext, audienceSettings) {
116
- const { statsClient, tags: statsTags } = statsContext || {};
117
- const statsName = 'syncAmazonAdsAudience';
118
- statsClient?.incr(`${statsName}.intialise`, 1, statsTags);
119
- const payloadRecord = createPayloadToUploadRecords(payload, audienceSettings);
120
- const payloadString = JSON.stringify(payloadRecord).replace(/"audienceId":"(\d+)"/, '"audienceId":$1');
121
- const response = await request(`${settings.region}/amc/audiences/records`, {
122
- method: 'POST',
123
- body: payloadString,
124
- headers: {
125
- 'Content-Type': 'application/vnd.amcaudiences.v1+json'
126
- }
127
- });
128
- const result = response.data;
129
- return {
130
- result
131
- };
132
- }
133
- function createPayloadToUploadRecords(payloads, audienceSettings) {
134
- const records = [];
135
- const { audienceId } = payloads[0];
136
- payloads.forEach((payload) => {
137
- const hashedPII = {};
138
- if (payload.firstName) {
139
- hashedPII.firstname = normalizeAndHash(payload.firstName);
140
- }
141
- if (payload.lastName) {
142
- hashedPII.lastname = normalizeAndHash(payload.lastName);
143
- }
144
- if (payload.address) {
145
- hashedPII.address = normalizeAndHash(payload.address);
146
- }
147
- if (payload.postal) {
148
- hashedPII.postal = normalizeAndHash(payload.postal);
149
- }
150
- if (payload.phone) {
151
- hashedPII.phone = normalizeAndHash(payload.phone);
152
- }
153
- if (payload.city) {
154
- hashedPII.city = normalizeAndHash(payload.city);
155
- }
156
- if (payload.state) {
157
- hashedPII.state = normalizeAndHash(payload.state);
158
- }
159
- if (payload.email) {
160
- hashedPII.email = normalizeAndHash(payload.email);
161
- }
162
- const payloadRecord = {
163
- externalUserId: payload.externalUserId,
164
- countryCode: audienceSettings.countryCode,
165
- action: payload.event_name == 'Audience Entered' ? utils_1.CONSTANTS.CREATE : utils_1.CONSTANTS.DELETE,
166
- hashedPII: [hashedPII]
167
- };
168
- records.push(payloadRecord);
169
- });
170
- return {
171
- records: records,
172
- audienceId: audienceId
173
- };
174
- }
175
- function normalizeAndHash(data) {
176
- const normalizedData = data.toLowerCase().trim();
177
- const hash = crypto_1.createHash('sha256');
178
- hash.update(normalizedData);
179
- return hash.digest('hex');
180
- }
181
- exports.default = action;
182
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/amazon-ads/syncAudiences/index.ts"],"names":[],"mapp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CAAC,UAAU,IAAI,kBAAkB,CAAC,CAAC,CAAC,iBAAS,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAS,CAAC,MAAM;YACtF,SAAS,EAAE,CAAC,SAAS,CAAC;SACvB,CAAA;QACD,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IAC7B,CAAC,CAAC,CAAA;IAEF,OAAO;QACL,OAAO,EAAE,OAAO;QAChB,UAAU,EAAE,UAAU;KACvB,CAAA;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAY;IAEpC,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAA;IAEhD,MAAM,IAAI,GAAG,mBAAU,CAAC,QAAQ,CAAC,CAAA;IACjC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAA;IAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC3B,CAAC;AAED,kBAAe,MAAM,CAAA"}
@@ -1,47 +0,0 @@
1
- import { HTTPError } from '@segment/actions-core';
2
- export interface RefreshTokenResponse {
3
- access_token: string;
4
- scope: string;
5
- expires_in: number;
6
- token_type: string;
7
- }
8
- export declare class AmazonTestAuthenticationError extends HTTPError {
9
- response: Response & {
10
- data: {
11
- message: string;
12
- };
13
- };
14
- }
15
- export declare class AmazonRefreshTokenError extends HTTPError {
16
- response: Response & {
17
- data: {
18
- error: string;
19
- error_description: string;
20
- };
21
- };
22
- }
23
- export interface HashedPIIObject {
24
- firstname?: string;
25
- lastname?: string;
26
- phone?: string;
27
- city?: string;
28
- state?: string;
29
- postal?: string;
30
- email?: string;
31
- address?: string;
32
- }
33
- export interface AudienceRecord {
34
- hashedPII?: HashedPIIObject[];
35
- externalUserId: string;
36
- countryCode: string;
37
- action: string;
38
- }
39
- export interface TargetResourceRecords {
40
- connectionId: string;
41
- targetTypes: string[];
42
- }
43
- export interface AudienceRecordPayload {
44
- records: AudienceRecord[];
45
- targetResource: TargetResourceRecords;
46
- audienceId: number;
47
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AmazonRefreshTokenError = exports.AmazonTestAuthenticationError = void 0;
4
- const actions_core_1 = require("@segment/actions-core");
5
- class AmazonTestAuthenticationError extends actions_core_1.HTTPError {
6
- }
7
- exports.AmazonTestAuthenticationError = AmazonTestAuthenticationError;
8
- class AmazonRefreshTokenError extends actions_core_1.HTTPError {
9
- }
10
- exports.AmazonRefreshTokenError = AmazonRefreshTokenError;
11
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/types.ts"],"names":[],"mappings":";;;AAAA,wDAAiD;AAajD,MAAa,6BAA8B,SAAQ,wBAAS;CAM3D;AAND,sEAMC;AAED,MAAa,uBAAwB,SAAQ,wBAAS;CAOrD;AAPD,0DAOC"}
@@ -1,37 +0,0 @@
1
- import { HTTPError } from '@segment/actions-core';
2
- export declare class AmazonAdsError extends HTTPError {
3
- response: Response & {
4
- data: {
5
- status: string;
6
- message: string;
7
- };
8
- };
9
- }
10
- export interface AudiencePayload {
11
- name: string;
12
- description: string;
13
- countryCode: string;
14
- targetResource: {
15
- advertiserId: string;
16
- };
17
- metadata: {
18
- externalAudienceId: string;
19
- ttl?: number;
20
- audienceFees?: {
21
- cpmCents: number;
22
- currency: string;
23
- }[];
24
- };
25
- }
26
- export interface RecordsResponseType {
27
- jobRequestId: string;
28
- }
29
- export declare const AUTHORIZATION_URL: any;
30
- export declare const CONSTANTS: {
31
- CREATE: string;
32
- DELETE: string;
33
- };
34
- export declare const CURRENCY: string[];
35
- export declare const REGEX_AUDIENCEID: RegExp;
36
- export declare const REGEX_ADVERTISERID: RegExp;
37
- export declare function extractNumberAndSubstituteWithStringValue(responseString: string, regex: any, substituteWith: string): any;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.extractNumberAndSubstituteWithStringValue = exports.REGEX_ADVERTISERID = exports.REGEX_AUDIENCEID = exports.CURRENCY = exports.CONSTANTS = exports.AUTHORIZATION_URL = exports.AmazonAdsError = void 0;
4
- const actions_core_1 = require("@segment/actions-core");
5
- class AmazonAdsError extends actions_core_1.HTTPError {
6
- }
7
- exports.AmazonAdsError = AmazonAdsError;
8
- exports.AUTHORIZATION_URL = {
9
- 'https://advertising-api.amazon.com': 'https://api.amazon.com',
10
- 'https://advertising-api-eu.amazon.com': 'https://api.amazon.co.uk',
11
- 'https://advertising-api-fe.amazon.com': 'https://api.amazon.co.jp'
12
- };
13
- exports.CONSTANTS = {
14
- CREATE: 'CREATE',
15
- DELETE: 'DELETE'
16
- };
17
- exports.CURRENCY = ['USD', 'CAD', 'JPY', 'GBP', 'EUR', 'SAR', 'AUD', 'AED', 'CNY', 'MXN', 'INR', 'SEK', 'TRY'];
18
- exports.REGEX_AUDIENCEID = /"audienceId":(\d+)/;
19
- exports.REGEX_ADVERTISERID = /"advertiserId":"(\d+)"/;
20
- function extractNumberAndSubstituteWithStringValue(responseString, regex, substituteWith) {
21
- const resString = responseString.replace(regex, substituteWith);
22
- return JSON.parse(resString);
23
- }
24
- exports.extractNumberAndSubstituteWithStringValue = extractNumberAndSubstituteWithStringValue;
25
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/destinations/amazon-ads/utils.ts"],"names":[],"mappings":";;;AAAA,wDAAiD;AAEjD,MAAa,cAAe,SAAQ,wBAAS;CAO5C;AAPD,wCAOC;AAsBY,QAAA,iBAAiB,GAAQ;IACpC,oCAAoC,EAAE,wBAAwB;IAC9D,uCAAuC,EAAE,0BAA0B;IACnE,uCAAuC,EAAE,0BAA0B;CACpE,CAAA;AACY,QAAA,SAAS,GAAG;IACvB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACjB,CAAA;AACY,QAAA,QAAQ,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;AAEtG,QAAA,gBAAgB,GAAG,oBAAoB,CAAA;AACvC,QAAA,kBAAkB,GAAG,wBAAwB,CAAA;AAE1D,SAAgB,yCAAyC,CAAC,cAAsB,EAAE,KAAU,EAAE,cAAsB;IAClH,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,CAAA;IAC/D,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;AAC9B,CAAC;AAHD,8FAGC"}
@@ -1,184 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const actions_core_1 = require("@segment/actions-core");
7
- const test_data_1 = require("../../../../lib/test-data");
8
- const index_1 = __importDefault(require("../../index"));
9
- const nock_1 = __importDefault(require("nock"));
10
- const testDestination = actions_core_1.createTestIntegration(index_1.default);
11
- const actionSlug = 'updateUserProfile';
12
- const destinationSlug = 'Braze';
13
- const seedName = `${destinationSlug}#${actionSlug}`;
14
- const receivedAt = '2021-08-03T17:40:04.055Z';
15
- const settings = {
16
- app_id: 'my-app-id',
17
- api_key: 'my-api-key',
18
- endpoint: 'https://rest.iad-01.braze.com'
19
- };
20
- describe(`Testing snapshot for ${destinationSlug}'s ${actionSlug} destination action:`, () => {
21
- it('required fields', async () => {
22
- const action = index_1.default.actions[actionSlug];
23
- const [eventData, settingsData] = test_data_1.generateTestData(seedName, index_1.default, action, true);
24
- nock_1.default(/.*/).persist().get(/.*/).reply(200);
25
- nock_1.default(/.*/).persist().post(/.*/).reply(200);
26
- nock_1.default(/.*/).persist().put(/.*/).reply(200);
27
- const event = actions_core_1.createTestEvent({
28
- properties: eventData
29
- });
30
- const responses = await testDestination.testAction(actionSlug, {
31
- event: event,
32
- mapping: event.properties,
33
- settings: settingsData,
34
- auth: undefined
35
- });
36
- const request = responses[0].request;
37
- const rawBody = await request.text();
38
- try {
39
- const json = JSON.parse(rawBody);
40
- expect(json).toMatchSnapshot();
41
- return;
42
- }
43
- catch (err) {
44
- expect(rawBody).toMatchSnapshot();
45
- }
46
- expect(request.headers).toMatchSnapshot();
47
- });
48
- it('all fields', async () => {
49
- const action = index_1.default.actions[actionSlug];
50
- const [eventData, settingsData] = test_data_1.generateTestData(seedName, index_1.default, action, false);
51
- nock_1.default(/.*/).persist().get(/.*/).reply(200);
52
- nock_1.default(/.*/).persist().post(/.*/).reply(200);
53
- nock_1.default(/.*/).persist().put(/.*/).reply(200);
54
- const event = actions_core_1.createTestEvent({
55
- properties: eventData
56
- });
57
- const responses = await testDestination.testAction(actionSlug, {
58
- event: event,
59
- mapping: event.properties,
60
- settings: settingsData,
61
- auth: undefined
62
- });
63
- const request = responses[0].request;
64
- const rawBody = await request.text();
65
- try {
66
- const json = JSON.parse(rawBody);
67
- expect(json).toMatchSnapshot();
68
- return;
69
- }
70
- catch (err) {
71
- expect(rawBody).toMatchSnapshot();
72
- }
73
- });
74
- it('it should work with batched events', async () => {
75
- nock_1.default('https://rest.iad-01.braze.com').post('/users/track').reply(200, {});
76
- const events = [
77
- actions_core_1.createTestEvent({
78
- event: 'Test Event 1',
79
- type: 'track',
80
- receivedAt,
81
- properties: {}
82
- }),
83
- actions_core_1.createTestEvent({
84
- event: 'Test Event 2',
85
- type: 'track',
86
- receivedAt,
87
- properties: {}
88
- })
89
- ];
90
- const responses = await testDestination.testBatchAction(actionSlug, {
91
- events,
92
- useDefaultMappings: true,
93
- mapping: {
94
- external_id: {
95
- '@path': '$.userId'
96
- },
97
- user_alias: {},
98
- braze_id: {
99
- '@path': '$.properties.braze_id'
100
- },
101
- name: {
102
- '@path': '$.event'
103
- },
104
- time: {
105
- '@path': '$.receivedAt'
106
- },
107
- properties: {
108
- '@path': '$.properties'
109
- },
110
- products: {
111
- '@path': '$.properties.products'
112
- },
113
- enable_batching: true,
114
- _update_existing_only: true
115
- },
116
- settings: {
117
- ...settings
118
- }
119
- });
120
- expect(responses.length).toBe(1);
121
- expect(responses[0].status).toBe(200);
122
- expect(responses[0].options.headers).toMatchSnapshot();
123
- expect(responses[0].options.json).toMatchSnapshot();
124
- });
125
- it('it should work with a single batched events', async () => {
126
- nock_1.default('https://rest.iad-01.braze.com').post('/users/track').reply(200, {});
127
- const events = [
128
- actions_core_1.createTestEvent({
129
- event: 'Test Event 1',
130
- type: 'track',
131
- receivedAt,
132
- properties: {
133
- products: [
134
- {
135
- quantity: 1,
136
- product_id: 'Bowflex Treadmill 10',
137
- price: 100
138
- },
139
- {
140
- quantity: 2,
141
- product_id: 'Bowflex Treadmill 20',
142
- price: 200
143
- }
144
- ]
145
- }
146
- })
147
- ];
148
- const responses = await testDestination.testBatchAction(actionSlug, {
149
- events,
150
- useDefaultMappings: true,
151
- mapping: {
152
- external_id: {
153
- '@path': '$.userId'
154
- },
155
- user_alias: {},
156
- braze_id: {
157
- '@path': '$.properties.braze_id'
158
- },
159
- name: {
160
- '@path': '$.event'
161
- },
162
- time: {
163
- '@path': '$.receivedAt'
164
- },
165
- properties: {
166
- '@path': '$.properties'
167
- },
168
- products: {
169
- '@path': '$.properties.products'
170
- },
171
- enable_batching: true,
172
- _update_existing_only: true
173
- },
174
- settings: {
175
- ...settings
176
- }
177
- });
178
- expect(responses.length).toBe(1);
179
- expect(responses[0].status).toBe(200);
180
- expect(responses[0].options.headers).toMatchSnapshot();
181
- expect(responses[0].options.json).toMatchSnapshot();
182
- });
183
- });
184
- //# sourceMappingURL=snapshot.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snapshot.test.js","sourceRoot":"","sources":["../../../../../src/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.ts"],"names":[],"mappings":";;;;;AAAA,w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AA;QAED,MAAM,SAAS,GAAG,MAAM,eAAe,CAAC,eAAe,CAAC,UAAU,EAAE;YAClE,MAAM;YACN,kBAAkB,EAAE,IAAI;YACxB,OAAO,EAAE;gBACP,WAAW,EAAE;oBACX,OAAO,EAAE,UAAU;iBACpB;gBACD,UAAU,EAAE,EAAE;gBACd,QAAQ,EAAE;oBACR,OAAO,EAAE,uBAAuB;iBACjC;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,SAAS;iBACnB;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,cAAc;iBACxB;gBACD,UAAU,EAAE;oBACV,OAAO,EAAE,cAAc;iBACxB;gBACD,QAAQ,EAAE;oBACR,OAAO,EAAE,uBAAuB;iBACjC;gBACD,eAAe,EAAE,IAAI;gBACrB,qBAAqB,EAAE,IAAI;aAC5B;YACD,QAAQ,EAAE;gBACR,GAAG,QAAQ;aACZ;SACF,CAAC,CAAA;QAEF,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QAChC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACrC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,CAAA;QACtD,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAA;IACrD,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- export declare const PERSONALIZE_API_BASE_URL = "https://personalization-api.contentstack.com";
2
- export declare const PERSONALIZE_EDGE_API_URL = "https://personalization-edge.contentstack.com";
3
- export declare const ACCESS_TOKEN_URL = "https://developerhub-api.contentstack.com/apps/token";
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ACCESS_TOKEN_URL = exports.PERSONALIZE_EDGE_API_URL = exports.PERSONALIZE_API_BASE_URL = void 0;
4
- exports.PERSONALIZE_API_BASE_URL = 'https://personalization-api.contentstack.com';
5
- exports.PERSONALIZE_EDGE_API_URL = 'https://personalization-edge.contentstack.com';
6
- exports.ACCESS_TOKEN_URL = 'https://developerhub-api.contentstack.com/apps/token';
7
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/destinations/contentstack/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG,8CAA8C,CAAA;AACzE,QAAA,wBAAwB,GAAG,+CAA+C,CAAA;AAC1E,QAAA,gBAAgB,GAAG,sDAAsD,CAAA"}
@@ -1,22 +0,0 @@
1
- import { Payload } from './generated-types';
2
- export interface Data {
3
- payload: Payload & {
4
- context?: {
5
- [k: string]: unknown;
6
- personas?: {
7
- computation_key?: string;
8
- computation_class?: string;
9
- };
10
- };
11
- };
12
- rawData?: {
13
- context?: {
14
- personas?: {
15
- computation_key?: string;
16
- computation_class?: string;
17
- };
18
- };
19
- properties?: Record<string, boolean>;
20
- traits?: Record<string, boolean>;
21
- };
22
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/destinations/dynamic-yield-audiences/syncAudience/types.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- export declare type AudienceAction = 'ADD' | 'REMOVE';
2
- export declare enum Priority {
3
- UserIdThenEmail = "user_id_then_email",
4
- UserIdThenAnonymousId = "user_id_then_anonymousId",
5
- UserIdThenEmailThenAnonymousId = "user_id_then_email_then_anonymousId",
6
- UserIdOnly = "user_id_only",
7
- EmailOnly = "email_only"
8
- }
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Priority = void 0;
4
- var Priority;
5
- (function (Priority) {
6
- Priority["UserIdThenEmail"] = "user_id_then_email";
7
- Priority["UserIdThenAnonymousId"] = "user_id_then_anonymousId";
8
- Priority["UserIdThenEmailThenAnonymousId"] = "user_id_then_email_then_anonymousId";
9
- Priority["UserIdOnly"] = "user_id_only";
10
- Priority["EmailOnly"] = "email_only";
11
- })(Priority = exports.Priority || (exports.Priority = {}));
12
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/dynamic-yield-audiences/types.ts"],"names":[],"mappings":";;;AAEA,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,kDAAsC,CAAA;IACtC,8DAAkD,CAAA;IAClD,kFAAsE,CAAA;IACtE,uCAA2B,CAAA;IAC3B,oCAAwB,CAAA;AAC1B,CAAC,EANW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMnB"}
@@ -1,6 +0,0 @@
1
- export interface Profile {
2
- user_id?: string;
3
- anonymous_id?: string;
4
- email?: string;
5
- traits: Record<string, string>;
6
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=Profile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Profile.js","sourceRoot":"","sources":["../../../../src/destinations/engage/sendgrid/Profile.ts"],"names":[],"mappings":""}
@@ -1,21 +0,0 @@
1
- import { InputField } from '@segment/actions-core';
2
- import { RequestClient } from '@segment/actions-core';
3
- import { Logger, StatsClient, DataFeedCache } from '@segment/actions-core/destination-kit';
4
- import type { Settings } from '../generated-types';
5
- import { Profile } from '../Profile';
6
- export declare type ApiLookupConfig = {
7
- id?: string | undefined;
8
- name: string;
9
- url: string;
10
- method: string;
11
- cacheTtl: number;
12
- body?: string | undefined;
13
- headers?: object | undefined;
14
- responseType: string;
15
- };
16
- export declare const getRequestId: ({ method, url, body, headers }: ApiLookupConfig) => string;
17
- export declare const getCachedResponse: ({ responseType }: ApiLookupConfig, requestId: string, dataFeedCache: DataFeedCache, datafeedTags: string[]) => Promise<any>;
18
- export declare const performApiLookup: (request: RequestClient, apiLookupConfig: ApiLookupConfig, profile: Profile, statsClient: StatsClient | undefined, tags: string[], settings: Settings, logger?: Logger | undefined, dataFeedCache?: DataFeedCache | undefined) => Promise<any>;
19
- export declare const apiLookupActionFields: Record<string, InputField>;
20
- export declare const apiLookupLiquidKey = "lookups";
21
- export declare const FLAGON_NAME_DATA_FEEDS = "is-datafeeds-enabled";