@segment/action-destinations 3.264.0-staging-1 → 3.265.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 (186) hide show
  1. package/dist/destinations/amazon-ads/generated-types.d.ts +0 -9
  2. package/dist/destinations/amazon-ads/index.d.ts +2 -2
  3. package/dist/destinations/amazon-ads/index.js +3 -180
  4. package/dist/destinations/amazon-ads/index.js.map +1 -1
  5. package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +0 -19
  6. package/dist/destinations/amazon-ads/syncAudiences/index.js +7 -169
  7. package/dist/destinations/amazon-ads/syncAudiences/index.js.map +1 -1
  8. package/dist/destinations/dynamic-yield-audiences/constants.d.ts +5 -1
  9. package/dist/destinations/dynamic-yield-audiences/constants.js +6 -2
  10. package/dist/destinations/dynamic-yield-audiences/constants.js.map +1 -1
  11. package/dist/destinations/dynamic-yield-audiences/generated-types.d.ts +4 -2
  12. package/dist/destinations/dynamic-yield-audiences/helpers.d.ts +2 -3
  13. package/dist/destinations/dynamic-yield-audiences/helpers.js +21 -7
  14. package/dist/destinations/dynamic-yield-audiences/helpers.js.map +1 -1
  15. package/dist/destinations/dynamic-yield-audiences/index.d.ts +3 -3
  16. package/dist/destinations/dynamic-yield-audiences/index.js +86 -27
  17. package/dist/destinations/dynamic-yield-audiences/index.js.map +1 -1
  18. package/dist/destinations/dynamic-yield-audiences/syncAudience/generated-types.d.ts +9 -4
  19. package/dist/destinations/dynamic-yield-audiences/syncAudience/index.d.ts +3 -3
  20. package/dist/destinations/dynamic-yield-audiences/syncAudience/index.js +109 -39
  21. package/dist/destinations/dynamic-yield-audiences/syncAudience/index.js.map +1 -1
  22. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +2 -1
  23. package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
  24. package/dist/destinations/engage/utils/track.d.ts +17 -17
  25. package/dist/destinations/hubspot/upsertCompany/index.js +1 -10
  26. package/dist/destinations/hubspot/upsertCompany/index.js.map +1 -1
  27. package/dist/destinations/index.js +1 -0
  28. package/dist/destinations/index.js.map +1 -1
  29. package/dist/destinations/klaviyo/functions.d.ts +5 -1
  30. package/dist/destinations/klaviyo/functions.js +102 -1
  31. package/dist/destinations/klaviyo/functions.js.map +1 -1
  32. package/dist/destinations/klaviyo/index.js +4 -0
  33. package/dist/destinations/klaviyo/index.js.map +1 -1
  34. package/dist/destinations/klaviyo/subscribeProfile/generated-types.d.ts +8 -0
  35. package/dist/destinations/klaviyo/subscribeProfile/generated-types.js.map +1 -0
  36. package/dist/destinations/{responsys/asyncMergePetRecords → klaviyo/subscribeProfile}/index.d.ts +1 -1
  37. package/dist/destinations/klaviyo/subscribeProfile/index.js +137 -0
  38. package/dist/destinations/klaviyo/subscribeProfile/index.js.map +1 -0
  39. package/dist/destinations/klaviyo/types.d.ts +65 -0
  40. package/dist/destinations/klaviyo/unsubscribeProfile/generated-types.d.ts +6 -0
  41. package/dist/destinations/klaviyo/unsubscribeProfile/generated-types.js.map +1 -0
  42. package/dist/destinations/{responsys/asyncMergeProfileListMembers → klaviyo/unsubscribeProfile}/index.d.ts +1 -1
  43. package/dist/destinations/klaviyo/unsubscribeProfile/index.js +118 -0
  44. package/dist/destinations/klaviyo/unsubscribeProfile/index.js.map +1 -0
  45. package/dist/destinations/magellan-ai/addToCart/generated-types.d.ts +11 -0
  46. package/dist/destinations/{dynamic-yield-audiences/syncAudience/types.js → magellan-ai/addToCart/generated-types.js} +1 -1
  47. package/dist/destinations/magellan-ai/addToCart/generated-types.js.map +1 -0
  48. package/dist/destinations/magellan-ai/addToCart/index.d.ts +5 -0
  49. package/dist/destinations/magellan-ai/addToCart/index.js +22 -0
  50. package/dist/destinations/magellan-ai/addToCart/index.js.map +1 -0
  51. package/dist/destinations/magellan-ai/checkout/generated-types.d.ts +17 -0
  52. package/dist/destinations/{engage/sendgrid/Profile.js → magellan-ai/checkout/generated-types.js} +1 -1
  53. package/dist/destinations/magellan-ai/checkout/generated-types.js.map +1 -0
  54. package/dist/destinations/magellan-ai/checkout/index.d.ts +5 -0
  55. package/dist/destinations/magellan-ai/checkout/index.js +16 -0
  56. package/dist/destinations/magellan-ai/checkout/index.js.map +1 -0
  57. package/dist/destinations/magellan-ai/code/generated-types.d.ts +4 -0
  58. package/dist/destinations/magellan-ai/code/generated-types.js +3 -0
  59. package/dist/destinations/magellan-ai/code/generated-types.js.map +1 -0
  60. package/dist/destinations/magellan-ai/code/index.d.ts +5 -0
  61. package/dist/destinations/magellan-ai/code/index.js +27 -0
  62. package/dist/destinations/magellan-ai/code/index.js.map +1 -0
  63. package/dist/destinations/magellan-ai/generated-types.d.ts +4 -0
  64. package/dist/destinations/magellan-ai/generated-types.js +3 -0
  65. package/dist/destinations/magellan-ai/generated-types.js.map +1 -0
  66. package/dist/destinations/magellan-ai/identify/generated-types.d.ts +3 -0
  67. package/dist/destinations/magellan-ai/identify/generated-types.js +3 -0
  68. package/dist/destinations/magellan-ai/identify/generated-types.js.map +1 -0
  69. package/dist/destinations/magellan-ai/identify/index.d.ts +5 -0
  70. package/dist/destinations/magellan-ai/identify/index.js +20 -0
  71. package/dist/destinations/magellan-ai/identify/index.js.map +1 -0
  72. package/dist/destinations/magellan-ai/index.d.ts +4 -0
  73. package/dist/destinations/magellan-ai/index.js +60 -0
  74. package/dist/destinations/magellan-ai/index.js.map +1 -0
  75. package/dist/destinations/magellan-ai/install/generated-types.d.ts +12 -0
  76. package/dist/destinations/magellan-ai/install/generated-types.js +3 -0
  77. package/dist/destinations/magellan-ai/install/generated-types.js.map +1 -0
  78. package/dist/destinations/magellan-ai/install/index.d.ts +5 -0
  79. package/dist/destinations/magellan-ai/install/index.js +13 -0
  80. package/dist/destinations/magellan-ai/install/index.js.map +1 -0
  81. package/dist/destinations/magellan-ai/lead/generated-types.d.ts +9 -0
  82. package/dist/destinations/magellan-ai/lead/generated-types.js +3 -0
  83. package/dist/destinations/magellan-ai/lead/generated-types.js.map +1 -0
  84. package/dist/destinations/magellan-ai/lead/index.d.ts +5 -0
  85. package/dist/destinations/magellan-ai/lead/index.js +49 -0
  86. package/dist/destinations/magellan-ai/lead/index.js.map +1 -0
  87. package/dist/destinations/magellan-ai/product/generated-types.d.ts +10 -0
  88. package/dist/destinations/magellan-ai/product/generated-types.js +3 -0
  89. package/dist/destinations/magellan-ai/product/generated-types.js.map +1 -0
  90. package/dist/destinations/magellan-ai/product/index.d.ts +5 -0
  91. package/dist/destinations/magellan-ai/product/index.js +13 -0
  92. package/dist/destinations/magellan-ai/product/index.js.map +1 -0
  93. package/dist/destinations/magellan-ai/purchase/generated-types.d.ts +18 -0
  94. package/dist/destinations/magellan-ai/purchase/generated-types.js +3 -0
  95. package/dist/destinations/magellan-ai/purchase/generated-types.js.map +1 -0
  96. package/dist/destinations/magellan-ai/purchase/index.d.ts +5 -0
  97. package/dist/destinations/magellan-ai/purchase/index.js +22 -0
  98. package/dist/destinations/magellan-ai/purchase/index.js.map +1 -0
  99. package/dist/destinations/magellan-ai/schema.d.ts +6 -0
  100. package/dist/destinations/magellan-ai/schema.js +244 -0
  101. package/dist/destinations/magellan-ai/schema.js.map +1 -0
  102. package/dist/destinations/magellan-ai/thirdPartyEvent/generated-types.d.ts +16 -0
  103. package/dist/destinations/magellan-ai/thirdPartyEvent/generated-types.js +3 -0
  104. package/dist/destinations/magellan-ai/thirdPartyEvent/generated-types.js.map +1 -0
  105. package/dist/destinations/magellan-ai/thirdPartyEvent/index.d.ts +5 -0
  106. package/dist/destinations/magellan-ai/thirdPartyEvent/index.js +28 -0
  107. package/dist/destinations/magellan-ai/thirdPartyEvent/index.js.map +1 -0
  108. package/dist/destinations/magellan-ai/utils.d.ts +5 -0
  109. package/dist/destinations/magellan-ai/utils.js +16 -0
  110. package/dist/destinations/magellan-ai/utils.js.map +1 -0
  111. package/dist/destinations/magellan-ai/view/generated-types.d.ts +3 -0
  112. package/dist/destinations/magellan-ai/view/generated-types.js +3 -0
  113. package/dist/destinations/magellan-ai/view/generated-types.js.map +1 -0
  114. package/dist/destinations/magellan-ai/view/index.d.ts +5 -0
  115. package/dist/destinations/magellan-ai/view/index.js +21 -0
  116. package/dist/destinations/magellan-ai/view/index.js.map +1 -0
  117. package/dist/destinations/marketo-static-lists/addToList/index.js +17 -3
  118. package/dist/destinations/marketo-static-lists/addToList/index.js.map +1 -1
  119. package/dist/destinations/marketo-static-lists/functions.d.ts +0 -8
  120. package/dist/destinations/marketo-static-lists/functions.js +4 -6
  121. package/dist/destinations/marketo-static-lists/functions.js.map +1 -1
  122. package/dist/destinations/moloco-rmp/common/convert.js +17 -29
  123. package/dist/destinations/moloco-rmp/common/convert.js.map +1 -1
  124. package/dist/destinations/salesforce/generated-types.d.ts +0 -2
  125. package/dist/destinations/salesforce/index.d.ts +1 -1
  126. package/dist/destinations/salesforce/index.js +10 -22
  127. package/dist/destinations/salesforce/index.js.map +1 -1
  128. package/dist/destinations/salesforce/sf-operations.d.ts +1 -3
  129. package/dist/destinations/salesforce/sf-operations.js +0 -25
  130. package/dist/destinations/salesforce/sf-operations.js.map +1 -1
  131. package/dist/destinations/xtremepush/identify/index.js +2 -2
  132. package/dist/destinations/xtremepush/identify/index.js.map +1 -1
  133. package/dist/destinations/xtremepush/index.js.map +1 -1
  134. package/dist/destinations/xtremepush/track/index.js +2 -2
  135. package/dist/destinations/xtremepush/track/index.js.map +1 -1
  136. package/package.json +4 -4
  137. package/dist/destinations/amazon-ads/utils.d.ts +0 -25
  138. package/dist/destinations/amazon-ads/utils.js +0 -8
  139. package/dist/destinations/amazon-ads/utils.js.map +0 -1
  140. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.d.ts +0 -22
  141. package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js.map +0 -1
  142. package/dist/destinations/dynamic-yield-audiences/types.d.ts +0 -8
  143. package/dist/destinations/dynamic-yield-audiences/types.js +0 -12
  144. package/dist/destinations/dynamic-yield-audiences/types.js.map +0 -1
  145. package/dist/destinations/engage/sendgrid/Profile.d.ts +0 -6
  146. package/dist/destinations/engage/sendgrid/Profile.js.map +0 -1
  147. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +0 -21
  148. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +0 -174
  149. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +0 -1
  150. package/dist/destinations/mixpanel/utils.d.ts +0 -13
  151. package/dist/destinations/mixpanel/utils.js +0 -117
  152. package/dist/destinations/mixpanel/utils.js.map +0 -1
  153. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +0 -14
  154. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +0 -1
  155. package/dist/destinations/responsys/asyncMergePetRecords/index.js +0 -113
  156. package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +0 -1
  157. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +0 -20
  158. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +0 -1
  159. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +0 -174
  160. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +0 -1
  161. package/dist/destinations/responsys/rsp-operations.d.ts +0 -14
  162. package/dist/destinations/responsys/rsp-operations.js +0 -33
  163. package/dist/destinations/responsys/rsp-operations.js.map +0 -1
  164. package/dist/destinations/responsys/rsp-properties.d.ts +0 -4
  165. package/dist/destinations/responsys/rsp-properties.js +0 -27
  166. package/dist/destinations/responsys/rsp-properties.js.map +0 -1
  167. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.d.ts +0 -1
  168. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js +0 -381
  169. package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js.map +0 -1
  170. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.d.ts +0 -1
  171. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js +0 -581
  172. package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js.map +0 -1
  173. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.d.ts +0 -4
  174. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js +0 -97
  175. package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js.map +0 -1
  176. package/dist/destinations/snap-conversions-api/snap-capi-properties.d.ts +0 -30
  177. package/dist/destinations/snap-conversions-api/snap-capi-properties.js +0 -316
  178. package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +0 -1
  179. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +0 -3
  180. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +0 -34
  181. package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +0 -1
  182. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +0 -3
  183. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +0 -43
  184. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +0 -1
  185. /package/dist/destinations/{responsys/asyncMergePetRecords → klaviyo/subscribeProfile}/generated-types.js +0 -0
  186. /package/dist/destinations/{responsys/asyncMergeProfileListMembers → klaviyo/unsubscribeProfile}/generated-types.js +0 -0
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("../utils");
4
+ const schema_1 = require("../schema");
5
+ const action = {
6
+ title: 'Add to Cart',
7
+ description: 'This event tracks any time an object is added to the cart.',
8
+ defaultSubscription: 'type = "track" and event = "Product Added"',
9
+ fields: {
10
+ quantity: {
11
+ label: 'Quantity',
12
+ description: 'The number of items added to the cart',
13
+ type: 'number',
14
+ default: { '@path': '$.properties.quantity' },
15
+ required: true
16
+ },
17
+ ...schema_1.productFields
18
+ },
19
+ perform: utils_1.buildPerformer('add_to_cart')
20
+ };
21
+ exports.default = action;
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/magellan-ai/addToCart/index.ts"],"names":[],"mappings":";;AAIA,oCAAyC;AACzC,sCAAyC;AAEzC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,4DAA4D;IACzE,mBAAmB,EAAE,4CAA4C;IACjE,MAAM,EAAE;QACN,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,uCAAuC;YACpD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE;YAC7C,QAAQ,EAAE,IAAI;SACf;QACD,GAAG,sBAAa;KACjB;IACD,OAAO,EAAE,sBAAc,CAAC,aAAa,CAAC;CACvC,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,17 @@
1
+ export interface Payload {
2
+ value: number;
3
+ currency: string;
4
+ discountCode?: string;
5
+ id?: string;
6
+ quantity?: number;
7
+ lineItems?: {
8
+ quantity?: number;
9
+ value?: number;
10
+ productId?: string;
11
+ productName?: string;
12
+ productType?: string;
13
+ productVendor?: string;
14
+ variantId?: string;
15
+ variantName?: string;
16
+ }[];
17
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=Profile.js.map
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/magellan-ai/checkout/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,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("../utils");
4
+ const schema_1 = require("../schema");
5
+ const action = {
6
+ title: 'Checkout',
7
+ description: 'This event tracks when a user goes to check out, regardless of whether they complete the purchase.',
8
+ defaultSubscription: 'type = "track" and event = "Checkout Started"',
9
+ fields: {
10
+ ...schema_1.priceFields(),
11
+ ...schema_1.orderInfoFields
12
+ },
13
+ perform: utils_1.buildPerformer('checkout')
14
+ };
15
+ exports.default = action;
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/magellan-ai/checkout/index.ts"],"names":[],"mappings":";;AAIA,oCAAyC;AACzC,sCAAwD;AAExD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,oGAAoG;IACjH,mBAAmB,EAAE,+CAA+C;IACpE,MAAM,EAAE;QACN,GAAG,oBAAW,EAAE;QAChB,GAAG,wBAAe;KACnB;IACD,OAAO,EAAE,sBAAc,CAAC,UAAU,CAAC;CACpC,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,4 @@
1
+ export interface Payload {
2
+ code: string;
3
+ type: string;
4
+ }
@@ -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/magellan-ai/code/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,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("../utils");
4
+ const action = {
5
+ title: 'Code',
6
+ description: 'Track when a user enters a discount code at checkout.',
7
+ defaultSubscription: 'type = "track" and event = "Coupon Entered"',
8
+ fields: {
9
+ code: {
10
+ label: 'Code',
11
+ description: 'The coupon or discount code applied',
12
+ type: 'string',
13
+ default: { '@path': '$.properties.coupon_id' },
14
+ required: true
15
+ },
16
+ type: {
17
+ label: 'Type',
18
+ description: 'The type of coupon or discount code used',
19
+ type: 'string',
20
+ default: 'promo',
21
+ required: true
22
+ }
23
+ },
24
+ perform: utils_1.buildPerformer('code')
25
+ };
26
+ exports.default = action;
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/magellan-ai/code/index.ts"],"names":[],"mappings":";;AAIA,oCAAyC;AAEzC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,uDAAuD;IACpE,mBAAmB,EAAE,6CAA6C;IAClE,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,qCAAqC;YAClD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE;YAC9C,QAAQ,EAAE,IAAI;SACf;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,0CAA0C;YACvD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,IAAI;SACf;KACF;IACD,OAAO,EAAE,sBAAc,CAAC,MAAM,CAAC;CAChC,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,4 @@
1
+ export interface Settings {
2
+ pixelToken: string;
3
+ apiToken?: string;
4
+ }
@@ -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/magellan-ai/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export interface Payload {
2
+ userId: string;
3
+ }
@@ -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/magellan-ai/identify/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,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("../utils");
4
+ const action = {
5
+ title: 'Identify',
6
+ description: 'If you have your own identifiers for customers, Magellan AI can accept that identifier and report it back to you with other measurement data.',
7
+ defaultSubscription: 'type = "identify"',
8
+ fields: {
9
+ userId: {
10
+ label: 'User ID',
11
+ description: 'Your internal, unique identifier for the user',
12
+ type: 'string',
13
+ default: { '@path': '$.userId' },
14
+ required: true
15
+ }
16
+ },
17
+ perform: utils_1.buildPerformer('identify')
18
+ };
19
+ exports.default = action;
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/magellan-ai/identify/index.ts"],"names":[],"mappings":";;AAIA,oCAAyC;AAEzC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,UAAU;IACjB,WAAW,EACT,+IAA+I;IACjJ,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,MAAM,EAAE;YACN,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,+CAA+C;YAC5D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;YAChC,QAAQ,EAAE,IAAI;SACf;KACF;IACD,OAAO,EAAE,sBAAc,CAAC,UAAU,CAAC;CACpC,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { DestinationDefinition } from '@segment/actions-core';
2
+ import type { Settings } from './generated-types';
3
+ declare const destination: DestinationDefinition<Settings>;
4
+ export default destination;
@@ -0,0 +1,60 @@
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 identify_1 = __importDefault(require("./identify"));
7
+ const view_1 = __importDefault(require("./view"));
8
+ const lead_1 = __importDefault(require("./lead"));
9
+ const product_1 = __importDefault(require("./product"));
10
+ const addToCart_1 = __importDefault(require("./addToCart"));
11
+ const checkout_1 = __importDefault(require("./checkout"));
12
+ const code_1 = __importDefault(require("./code"));
13
+ const purchase_1 = __importDefault(require("./purchase"));
14
+ const install_1 = __importDefault(require("./install"));
15
+ const thirdPartyEvent_1 = __importDefault(require("./thirdPartyEvent"));
16
+ const destination = {
17
+ name: 'Magellan AI (Actions)',
18
+ slug: 'actions-magellan-ai',
19
+ mode: 'cloud',
20
+ authentication: {
21
+ scheme: 'custom',
22
+ fields: {
23
+ pixelToken: {
24
+ label: 'Pixel token',
25
+ description: 'Unique identifier for the web pixel on whose behalf the event is being sent; 32 hex digits',
26
+ type: 'string',
27
+ required: true
28
+ },
29
+ apiToken: {
30
+ label: 'API token',
31
+ description: 'Required in order to pass GDPR deletion requests to Magellan AI',
32
+ type: 'string',
33
+ required: false
34
+ }
35
+ }
36
+ },
37
+ onDelete: async (request, { payload, settings }) => {
38
+ if (!settings.apiToken)
39
+ return;
40
+ return request('https://api.magellan.ai/v2/gdpr/delete', {
41
+ method: 'post',
42
+ headers: { Authorization: `Bearer ${settings.apiToken}` },
43
+ json: { ...payload, pixelToken: settings.pixelToken }
44
+ });
45
+ },
46
+ actions: {
47
+ identify: identify_1.default,
48
+ view: view_1.default,
49
+ lead: lead_1.default,
50
+ product: product_1.default,
51
+ addToCart: addToCart_1.default,
52
+ checkout: checkout_1.default,
53
+ code: code_1.default,
54
+ purchase: purchase_1.default,
55
+ install: install_1.default,
56
+ thirdPartyEvent: thirdPartyEvent_1.default
57
+ }
58
+ };
59
+ exports.default = destination;
60
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/magellan-ai/index.ts"],"names":[],"mappings":";;;;;AAGA,0DAAiC;AACjC,kDAAyB;AACzB,kDAAyB;AACzB,wDAA+B;AAC/B,4DAAmC;AACnC,0DAAiC;AACjC,kDAAyB;AACzB,0DAAiC;AACjC,wDAA+B;AAC/B,wEAA+C;AAE/C,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,UAAU,EAAE;gBACV,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,4FAA4F;gBACzG,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,iEAAiE;gBAC9E,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;aAChB;SACF;KACF;IAED,QAAQ,EAAE,KAAK,EAAE,OAAsB,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAChE,IAAI,CAAC,QAAQ,CAAC,QAAQ;YAAE,OAAM;QAE9B,OAAO,OAAO,CAAC,wCAAwC,EAAE;YACvD,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,QAAQ,CAAC,QAAQ,EAAE,EAAE;YACzD,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,UAAU,EAAE;SACtD,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,EAAE;QACP,QAAQ,EAAR,kBAAQ;QACR,IAAI,EAAJ,cAAI;QACJ,IAAI,EAAJ,cAAI;QACJ,OAAO,EAAP,iBAAO;QACP,SAAS,EAAT,mBAAS;QACT,QAAQ,EAAR,kBAAQ;QACR,IAAI,EAAJ,cAAI;QACJ,QAAQ,EAAR,kBAAQ;QACR,OAAO,EAAP,iBAAO;QACP,eAAe,EAAf,yBAAe;KAChB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,12 @@
1
+ export interface Payload {
2
+ host: string;
3
+ app: string;
4
+ ip: string;
5
+ ua: string;
6
+ ts: string;
7
+ plat: string;
8
+ aifa?: string;
9
+ andi?: string;
10
+ idfa?: string;
11
+ idfv?: string;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/magellan-ai/install/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,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("../utils");
4
+ const schema_1 = require("../schema");
5
+ const action = {
6
+ title: 'Install',
7
+ description: 'Fire this event to track when a user installs your mobile application. (Mobile applications only)',
8
+ defaultSubscription: 'type = "track" and event = "Application Installed"',
9
+ fields: schema_1.mobileFields,
10
+ perform: utils_1.buildPerformer('install')
11
+ };
12
+ exports.default = action;
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/magellan-ai/install/index.ts"],"names":[],"mappings":";;AAIA,oCAAyC;AACzC,sCAAwC;AAExC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,mGAAmG;IAChH,mBAAmB,EAAE,oDAAoD;IACzE,MAAM,EAAE,qBAAY;IACpB,OAAO,EAAE,sBAAc,CAAC,SAAS,CAAC;CACnC,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,9 @@
1
+ export interface Payload {
2
+ value: number;
3
+ currency: string;
4
+ id?: string;
5
+ productId?: string;
6
+ quantity?: number;
7
+ type?: string;
8
+ category?: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/magellan-ai/lead/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,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("../utils");
4
+ const schema_1 = require("../schema");
5
+ const action = {
6
+ title: 'Lead',
7
+ description: 'Track lead generation, like signups, subscriptions, and notification requests.',
8
+ defaultSubscription: 'type = "track" and event = "Signed Up"',
9
+ fields: {
10
+ ...schema_1.priceFields(),
11
+ id: {
12
+ label: 'Lead ID',
13
+ description: 'The unique ID for this generated lead',
14
+ type: 'string',
15
+ required: false
16
+ },
17
+ productId: {
18
+ label: 'Product ID',
19
+ description: 'The product ID associated with this lead',
20
+ type: 'string',
21
+ default: { '@path': '$.properties.product_id' },
22
+ required: false
23
+ },
24
+ quantity: {
25
+ label: 'Quantity',
26
+ description: 'The number of items represented by this lead',
27
+ type: 'number',
28
+ default: { '@path': '$.properties.quantity' },
29
+ required: false
30
+ },
31
+ type: {
32
+ label: 'Lead type',
33
+ description: 'The type of lead',
34
+ type: 'string',
35
+ default: { '@path': '$.properties.type' },
36
+ required: false
37
+ },
38
+ category: {
39
+ label: 'Lead category',
40
+ description: 'The category of lead',
41
+ type: 'string',
42
+ default: { '@path': '$.properties.category' },
43
+ required: false
44
+ }
45
+ },
46
+ perform: utils_1.buildPerformer('lead')
47
+ };
48
+ exports.default = action;
49
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/magellan-ai/lead/index.ts"],"names":[],"mappings":";;AAIA,oCAAyC;AACzC,sCAAuC;AAEvC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,gFAAgF;IAC7F,mBAAmB,EAAE,wCAAwC;IAC7D,MAAM,EAAE;QACN,GAAG,oBAAW,EAAE;QAChB,EAAE,EAAE;YACF,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,uCAAuC;YACpD,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;SAChB;QACD,SAAS,EAAE;YACT,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,0CAA0C;YACvD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAE;YAC/C,QAAQ,EAAE,KAAK;SAChB;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,8CAA8C;YAC3D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE;YAC7C,QAAQ,EAAE,KAAK;SAChB;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE;YACzC,QAAQ,EAAE,KAAK;SAChB;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,eAAe;YACtB,WAAW,EAAE,sBAAsB;YACnC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE;YAC7C,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,OAAO,EAAE,sBAAc,CAAC,MAAM,CAAC;CAChC,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,10 @@
1
+ export interface Payload {
2
+ value: number;
3
+ currency: string;
4
+ productId?: string;
5
+ productName?: string;
6
+ productType?: string;
7
+ productVendor?: string;
8
+ variantId?: string;
9
+ variantName?: string;
10
+ }
@@ -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/magellan-ai/product/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,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("../utils");
4
+ const schema_1 = require("../schema");
5
+ const action = {
6
+ title: 'Product',
7
+ description: 'Indicates that a user has visited the page for a specific product or variant of a product. This event is similar to the view event, but allows you to provide more details about the product the user has seen.',
8
+ defaultSubscription: 'type = "track" and event = "Product Viewed"',
9
+ fields: schema_1.productFields,
10
+ perform: utils_1.buildPerformer('product')
11
+ };
12
+ exports.default = action;
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/magellan-ai/product/index.ts"],"names":[],"mappings":";;AAIA,oCAAyC;AACzC,sCAAyC;AAEzC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,SAAS;IAChB,WAAW,EACT,iNAAiN;IACnN,mBAAmB,EAAE,6CAA6C;IAClE,MAAM,EAAE,sBAAa;IACrB,OAAO,EAAE,sBAAc,CAAC,SAAS,CAAC;CACnC,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,18 @@
1
+ export interface Payload {
2
+ value: number;
3
+ currency: string;
4
+ discountCode?: string;
5
+ id?: string;
6
+ quantity?: number;
7
+ lineItems?: {
8
+ quantity?: number;
9
+ value?: number;
10
+ productId?: string;
11
+ productName?: string;
12
+ productType?: string;
13
+ productVendor?: string;
14
+ variantId?: string;
15
+ variantName?: string;
16
+ }[];
17
+ isNewCustomer?: boolean;
18
+ }
@@ -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/magellan-ai/purchase/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,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("../utils");
4
+ const schema_1 = require("../schema");
5
+ const action = {
6
+ title: 'Purchase',
7
+ description: 'Fire this event upon successful completion of a purchase.',
8
+ defaultSubscription: 'type = "track" and event = "Order Completed"',
9
+ fields: {
10
+ ...schema_1.priceFields('total'),
11
+ ...schema_1.orderInfoFields,
12
+ isNewCustomer: {
13
+ label: 'New customer?',
14
+ description: 'Whether or not this customer is a first-time buyer from your store',
15
+ type: 'boolean',
16
+ required: false
17
+ }
18
+ },
19
+ perform: utils_1.buildPerformer('purchase')
20
+ };
21
+ exports.default = action;
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/magellan-ai/purchase/index.ts"],"names":[],"mappings":";;AAIA,oCAAyC;AACzC,sCAAwD;AAExD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,2DAA2D;IACxE,mBAAmB,EAAE,8CAA8C;IACnE,MAAM,EAAE;QACN,GAAG,oBAAW,CAAC,OAAO,CAAC;QACvB,GAAG,wBAAe;QAClB,aAAa,EAAE;YACb,KAAK,EAAE,eAAe;YACtB,WAAW,EAAE,oEAAoE;YACjF,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,OAAO,EAAE,sBAAc,CAAC,UAAU,CAAC;CACpC,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { InputField } from '@segment/actions-core';
2
+ export declare function priceFields(valueSource?: string): Record<string, InputField>;
3
+ export declare const lineItemFields: Record<string, InputField>;
4
+ export declare const productFields: Record<string, InputField>;
5
+ export declare const orderInfoFields: Record<string, InputField>;
6
+ export declare const mobileFields: Record<string, InputField>;