@segment/action-destinations 3.485.1-staging-7cfaca0ed.0 → 3.486.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 (168) hide show
  1. package/dist/destinations/amazon-conversions-api/index.js +1 -1
  2. package/dist/destinations/amazon-conversions-api/index.js.map +1 -1
  3. package/dist/destinations/amazon-conversions-api/trackConversion/utils.js +3 -6
  4. package/dist/destinations/amazon-conversions-api/trackConversion/utils.js.map +1 -1
  5. package/dist/destinations/avo/sendSchemaToInspector/index.js +1 -2
  6. package/dist/destinations/avo/sendSchemaToInspector/index.js.map +1 -1
  7. package/dist/destinations/aws-kinesis/index.js +12 -14
  8. package/dist/destinations/aws-kinesis/index.js.map +1 -1
  9. package/dist/destinations/aws-kinesis/send/generated-types.d.ts +2 -2
  10. package/dist/destinations/aws-kinesis/send/index.js +38 -36
  11. package/dist/destinations/aws-kinesis/send/index.js.map +1 -1
  12. package/dist/destinations/aws-kinesis/utils.d.ts +4 -3
  13. package/dist/destinations/aws-kinesis/utils.js +101 -84
  14. package/dist/destinations/aws-kinesis/utils.js.map +1 -1
  15. package/dist/destinations/braze-cohorts/syncAudiences/index.js +11 -28
  16. package/dist/destinations/braze-cohorts/syncAudiences/index.js.map +1 -1
  17. package/dist/destinations/display-video-360/index.js +0 -2
  18. package/dist/destinations/display-video-360/index.js.map +1 -1
  19. package/dist/destinations/display-video-360/shared.d.ts +1 -6
  20. package/dist/destinations/display-video-360/shared.js +1 -42
  21. package/dist/destinations/display-video-360/shared.js.map +1 -1
  22. package/dist/destinations/engage-messaging-sendgrid/index.js +1 -2
  23. package/dist/destinations/engage-messaging-sendgrid/index.js.map +1 -1
  24. package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js +1 -2
  25. package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
  26. package/dist/destinations/facebook-conversions-api/addToCart/index.js +37 -7
  27. package/dist/destinations/facebook-conversions-api/addToCart/index.js.map +1 -1
  28. package/dist/destinations/facebook-conversions-api/addToCart2/index.js +37 -7
  29. package/dist/destinations/facebook-conversions-api/addToCart2/index.js.map +1 -1
  30. package/dist/destinations/facebook-conversions-api/custom/index.js +22 -7
  31. package/dist/destinations/facebook-conversions-api/custom/index.js.map +1 -1
  32. package/dist/destinations/facebook-conversions-api/custom2/index.js +22 -7
  33. package/dist/destinations/facebook-conversions-api/custom2/index.js.map +1 -1
  34. package/dist/destinations/facebook-conversions-api/fb-capi-app-data.d.ts +2 -0
  35. package/dist/destinations/facebook-conversions-api/fb-capi-app-data.js +156 -1
  36. package/dist/destinations/facebook-conversions-api/fb-capi-app-data.js.map +1 -1
  37. package/dist/destinations/facebook-conversions-api/fb-capi-properties.d.ts +19 -0
  38. package/dist/destinations/facebook-conversions-api/fb-capi-properties.js +157 -1
  39. package/dist/destinations/facebook-conversions-api/fb-capi-properties.js.map +1 -1
  40. package/dist/destinations/facebook-conversions-api/fb-capi-user-data.d.ts +2 -0
  41. package/dist/destinations/facebook-conversions-api/fb-capi-user-data.js +176 -1
  42. package/dist/destinations/facebook-conversions-api/fb-capi-user-data.js.map +1 -1
  43. package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js +40 -7
  44. package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js.map +1 -1
  45. package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.js +40 -7
  46. package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.js.map +1 -1
  47. package/dist/destinations/facebook-conversions-api/pageView/index.js +13 -7
  48. package/dist/destinations/facebook-conversions-api/pageView/index.js.map +1 -1
  49. package/dist/destinations/facebook-conversions-api/pageView2/index.js +13 -7
  50. package/dist/destinations/facebook-conversions-api/pageView2/index.js.map +1 -1
  51. package/dist/destinations/facebook-conversions-api/purchase/index.js +43 -7
  52. package/dist/destinations/facebook-conversions-api/purchase/index.js.map +1 -1
  53. package/dist/destinations/facebook-conversions-api/purchase2/fields.d.ts +2 -0
  54. package/dist/destinations/facebook-conversions-api/purchase2/fields.js +50 -0
  55. package/dist/destinations/facebook-conversions-api/purchase2/fields.js.map +1 -0
  56. package/dist/destinations/facebook-conversions-api/purchase2/functions.d.ts +4 -0
  57. package/dist/destinations/facebook-conversions-api/purchase2/functions.js +59 -0
  58. package/dist/destinations/facebook-conversions-api/purchase2/functions.js.map +1 -0
  59. package/dist/destinations/facebook-conversions-api/purchase2/index.js +4 -59
  60. package/dist/destinations/facebook-conversions-api/purchase2/index.js.map +1 -1
  61. package/dist/destinations/facebook-conversions-api/search/index.js +44 -7
  62. package/dist/destinations/facebook-conversions-api/search/index.js.map +1 -1
  63. package/dist/destinations/facebook-conversions-api/search2/index.js +44 -7
  64. package/dist/destinations/facebook-conversions-api/search2/index.js.map +1 -1
  65. package/dist/destinations/facebook-conversions-api/viewContent/index.js +38 -7
  66. package/dist/destinations/facebook-conversions-api/viewContent/index.js.map +1 -1
  67. package/dist/destinations/facebook-conversions-api/viewContent2/index.js +38 -7
  68. package/dist/destinations/facebook-conversions-api/viewContent2/index.js.map +1 -1
  69. package/dist/destinations/facebook-custom-audiences/constants.js +2 -3
  70. package/dist/destinations/facebook-custom-audiences/constants.js.map +1 -1
  71. package/dist/destinations/first-party-dv360/functions.js +2 -3
  72. package/dist/destinations/first-party-dv360/functions.js.map +1 -1
  73. package/dist/destinations/google-enhanced-conversions/functions.d.ts +3 -3
  74. package/dist/destinations/google-enhanced-conversions/functions.js +31 -65
  75. package/dist/destinations/google-enhanced-conversions/functions.js.map +1 -1
  76. package/dist/destinations/google-enhanced-conversions/userList/index.js +5 -5
  77. package/dist/destinations/google-enhanced-conversions/userList/index.js.map +1 -1
  78. package/dist/destinations/google-sheets/googleapis/index.js +4 -4
  79. package/dist/destinations/google-sheets/googleapis/index.js.map +1 -1
  80. package/dist/destinations/linkedin-audiences/updateAudience/functions.d.ts +3 -3
  81. package/dist/destinations/linkedin-audiences/updateAudience/functions.js +6 -14
  82. package/dist/destinations/linkedin-audiences/updateAudience/functions.js.map +1 -1
  83. package/dist/destinations/linkedin-audiences/updateAudience/index.js +4 -4
  84. package/dist/destinations/linkedin-audiences/updateAudience/index.js.map +1 -1
  85. package/dist/destinations/marketo-static-lists/functions.js +1 -4
  86. package/dist/destinations/marketo-static-lists/functions.js.map +1 -1
  87. package/dist/destinations/memora/upsertProfile/index.js +2 -2
  88. package/dist/destinations/memora/upsertProfile/index.js.map +1 -1
  89. package/dist/destinations/memora-internal/upsertProfile.types.d.ts +2 -3
  90. package/dist/destinations/optimizely-advanced-audience-targeting/syncAudience/index.js +1 -4
  91. package/dist/destinations/optimizely-advanced-audience-targeting/syncAudience/index.js.map +1 -1
  92. package/dist/destinations/rokt-audiences/constants.js +1 -2
  93. package/dist/destinations/rokt-audiences/constants.js.map +1 -1
  94. package/dist/destinations/segment-profiles/properties.js +6 -7
  95. package/dist/destinations/segment-profiles/properties.js.map +1 -1
  96. package/dist/destinations/taboola-actions/index.js +1 -2
  97. package/dist/destinations/taboola-actions/index.js.map +1 -1
  98. package/dist/destinations/taboola-actions/syncAudience/client.js +1 -2
  99. package/dist/destinations/taboola-actions/syncAudience/client.js.map +1 -1
  100. package/dist/destinations/talon-one/trackEventV2/index.js +1 -2
  101. package/dist/destinations/talon-one/trackEventV2/index.js.map +1 -1
  102. package/dist/destinations/talon-one/updateCustomerProfileV3/index.js +1 -2
  103. package/dist/destinations/talon-one/updateCustomerProfileV3/index.js.map +1 -1
  104. package/dist/destinations/talon-one/updateCustomerSessionV2/index.js +1 -2
  105. package/dist/destinations/talon-one/updateCustomerSessionV2/index.js.map +1 -1
  106. package/dist/destinations/tiktok-offline-conversions/index.js +1 -2
  107. package/dist/destinations/tiktok-offline-conversions/index.js.map +1 -1
  108. package/dist/destinations/tiktok-offline-conversions/utils.js +1 -2
  109. package/dist/destinations/tiktok-offline-conversions/utils.js.map +1 -1
  110. package/dist/destinations/yahoo-audiences/utils-rt.js +1 -2
  111. package/dist/destinations/yahoo-audiences/utils-rt.js.map +1 -1
  112. package/dist/destinations/yahoo-audiences/utils-tax.js +3 -4
  113. package/dist/destinations/yahoo-audiences/utils-tax.js.map +1 -1
  114. package/package.json +5 -5
  115. package/dist/destinations/amazon-conversions-api/versioning-info.d.ts +0 -2
  116. package/dist/destinations/amazon-conversions-api/versioning-info.js +0 -6
  117. package/dist/destinations/amazon-conversions-api/versioning-info.js.map +0 -1
  118. package/dist/destinations/avo/versioning-info.d.ts +0 -1
  119. package/dist/destinations/avo/versioning-info.js +0 -5
  120. package/dist/destinations/avo/versioning-info.js.map +0 -1
  121. package/dist/destinations/display-video-360/syncAudience/generated-types.d.ts +0 -7
  122. package/dist/destinations/display-video-360/syncAudience/generated-types.js +0 -3
  123. package/dist/destinations/display-video-360/syncAudience/generated-types.js.map +0 -1
  124. package/dist/destinations/display-video-360/syncAudience/index.d.ts +0 -5
  125. package/dist/destinations/display-video-360/syncAudience/index.js +0 -30
  126. package/dist/destinations/display-video-360/syncAudience/index.js.map +0 -1
  127. package/dist/destinations/engage-messaging-sendgrid/versioning-info.d.ts +0 -1
  128. package/dist/destinations/engage-messaging-sendgrid/versioning-info.js +0 -5
  129. package/dist/destinations/engage-messaging-sendgrid/versioning-info.js.map +0 -1
  130. package/dist/destinations/facebook-conversions-api/shared/constants.d.ts +0 -23
  131. package/dist/destinations/facebook-conversions-api/shared/constants.js +0 -506
  132. package/dist/destinations/facebook-conversions-api/shared/constants.js.map +0 -1
  133. package/dist/destinations/facebook-conversions-api/shared/fields.d.ts +0 -29
  134. package/dist/destinations/facebook-conversions-api/shared/fields.js +0 -735
  135. package/dist/destinations/facebook-conversions-api/shared/fields.js.map +0 -1
  136. package/dist/destinations/facebook-conversions-api/shared/functions.d.ts +0 -36
  137. package/dist/destinations/facebook-conversions-api/shared/functions.js +0 -337
  138. package/dist/destinations/facebook-conversions-api/shared/functions.js.map +0 -1
  139. package/dist/destinations/facebook-conversions-api/shared/types.d.ts +0 -166
  140. package/dist/destinations/facebook-conversions-api/shared/types.js +0 -3
  141. package/dist/destinations/facebook-conversions-api/shared/types.js.map +0 -1
  142. package/dist/destinations/facebook-custom-audiences/versioning-info.d.ts +0 -2
  143. package/dist/destinations/facebook-custom-audiences/versioning-info.js +0 -6
  144. package/dist/destinations/facebook-custom-audiences/versioning-info.js.map +0 -1
  145. package/dist/destinations/first-party-dv360/versioning-info.d.ts +0 -2
  146. package/dist/destinations/first-party-dv360/versioning-info.js +0 -6
  147. package/dist/destinations/first-party-dv360/versioning-info.js.map +0 -1
  148. package/dist/destinations/google-sheets/versioning-info.d.ts +0 -1
  149. package/dist/destinations/google-sheets/versioning-info.js +0 -5
  150. package/dist/destinations/google-sheets/versioning-info.js.map +0 -1
  151. package/dist/destinations/rokt-audiences/versioning-info.d.ts +0 -1
  152. package/dist/destinations/rokt-audiences/versioning-info.js +0 -5
  153. package/dist/destinations/rokt-audiences/versioning-info.js.map +0 -1
  154. package/dist/destinations/segment-profiles/versioning-info.d.ts +0 -1
  155. package/dist/destinations/segment-profiles/versioning-info.js +0 -5
  156. package/dist/destinations/segment-profiles/versioning-info.js.map +0 -1
  157. package/dist/destinations/taboola-actions/versioning-info.d.ts +0 -1
  158. package/dist/destinations/taboola-actions/versioning-info.js +0 -5
  159. package/dist/destinations/taboola-actions/versioning-info.js.map +0 -1
  160. package/dist/destinations/talon-one/versioning-info.d.ts +0 -1
  161. package/dist/destinations/talon-one/versioning-info.js +0 -5
  162. package/dist/destinations/talon-one/versioning-info.js.map +0 -1
  163. package/dist/destinations/tiktok-offline-conversions/versioning-info.d.ts +0 -1
  164. package/dist/destinations/tiktok-offline-conversions/versioning-info.js +0 -5
  165. package/dist/destinations/tiktok-offline-conversions/versioning-info.js.map +0 -1
  166. package/dist/destinations/yahoo-audiences/versioning-info.d.ts +0 -1
  167. package/dist/destinations/yahoo-audiences/versioning-info.js +0 -5
  168. package/dist/destinations/yahoo-audiences/versioning-info.js.map +0 -1
@@ -5,17 +5,32 @@ const fb_capi_properties_1 = require("../fb-capi-properties");
5
5
  const fb_capi_user_data_1 = require("../fb-capi-user-data");
6
6
  const utils_1 = require("../utils");
7
7
  const fb_capi_app_data_1 = require("../fb-capi-app-data");
8
- const fields_1 = require("../shared/fields");
9
- const functions_1 = require("../shared/functions");
10
- const constants_1 = require("../shared/constants");
11
8
  const action = {
12
9
  title: 'Custom Event',
13
10
  description: 'Send a custom event',
14
- fields: fields_1.customFields,
11
+ fields: {
12
+ action_source: { ...fb_capi_properties_1.action_source, required: true },
13
+ event_name: {
14
+ label: 'Event Name',
15
+ description: 'A Facebook [standard event](https://developers.facebook.com/docs/meta-pixel/implementation/conversion-tracking#standard-events) or [custom event](https://developers.facebook.com/docs/meta-pixel/implementation/conversion-tracking#custom-events) name.',
16
+ type: 'string',
17
+ required: true,
18
+ default: {
19
+ '@path': '$.event'
20
+ }
21
+ },
22
+ event_time: { ...fb_capi_properties_1.event_time, required: true },
23
+ user_data: fb_capi_user_data_1.user_data_field,
24
+ app_data_field: fb_capi_app_data_1.app_data_field,
25
+ custom_data: fb_capi_properties_1.custom_data,
26
+ event_id: fb_capi_properties_1.event_id,
27
+ event_source_url: fb_capi_properties_1.event_source_url,
28
+ data_processing_options: fb_capi_properties_1.data_processing_options,
29
+ data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
30
+ data_processing_options_state: fb_capi_properties_1.data_processing_options_state,
31
+ test_event_code: fb_capi_properties_1.test_event_code
32
+ },
15
33
  perform: (request, { payload, settings, features, statsContext }) => {
16
- if (features && features[constants_1.FEATURE_FLAG_CUSTOM]) {
17
- return (0, functions_1.send)(request, payload, settings, functions_1.getCustomEventData, constants_1.EventType.Custom, features, statsContext);
18
- }
19
34
  if (!payload.user_data) {
20
35
  throw new actions_core_1.IntegrationError('Must include at least one user data property', 'Misconfigured required field', 400);
21
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/custom/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,8DAA6D;AAC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gBAAgB,EAAE,OAAO,CAAC,gBAAgB;wBAC1C,SAAS,EAAE,IAAA,kCAAc,EAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;wBAC3D,WAAW,EAAE,OAAO,CAAC,WAAW;wBAChC,QAAQ,EAAE,IAAA,oCAAiB,EAAC,OAAO,CAAC,cAAc,CAAC;wBACnD,uBAAuB,EAAE,YAAY;wBACrC,+BAA+B,EAAE,YAAY;wBAC7C,6BAA6B,EAAE,UAAU;qBAC1C;iBACF;gBACD,GAAG,CAAC,aAAa,IAAI,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC;aACzD;SACF,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/custom/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,8DAW8B;AAC9B,4DAAsE;AAGtE,oCAA0C;AAC1C,0DAAuE;AAEvE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,qBAAqB;IAClC,MAAM,EAAE;QACN,aAAa,EAAE,EAAE,GAAG,kCAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnD,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EACT,2PAA2P;YAC7P,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,UAAU,EAAE,EAAE,GAAG,+BAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7C,SAAS,EAAE,mCAAe;QAC1B,cAAc,EAAE,iCAAc;QAC9B,WAAW,EAAE,gCAAW;QACxB,QAAQ,EAAE,6BAAQ;QAClB,gBAAgB,EAAE,qCAAgB;QAClC,uBAAuB,EAAE,4CAAuB;QAChD,+BAA+B,EAAE,oDAA+B;QAChE,6BAA6B,E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AAe,EAAE,aAAa,EAAE,CAAC;aACzD;SACF,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -5,9 +5,6 @@ const fb_capi_properties_1 = require("../fb-capi-properties");
5
5
  const fb_capi_user_data_1 = require("../fb-capi-user-data");
6
6
  const utils_1 = require("../utils");
7
7
  const fb_capi_app_data_1 = require("../fb-capi-app-data");
8
- const fields_1 = require("../shared/fields");
9
- const functions_1 = require("../shared/functions");
10
- const constants_1 = require("../shared/constants");
11
8
  const action = {
12
9
  title: 'Custom Event V2',
13
10
  description: 'Send a custom event',
@@ -17,12 +14,30 @@ const action = {
17
14
  default: 'add',
18
15
  choices: [{ label: 'Insert Records', value: 'add' }]
19
16
  },
20
- fields: fields_1.customFields,
17
+ fields: {
18
+ action_source: { ...fb_capi_properties_1.action_source, required: true },
19
+ event_name: {
20
+ label: 'Event Name',
21
+ description: 'A Facebook [standard event](https://developers.facebook.com/docs/meta-pixel/implementation/conversion-tracking#standard-events) or [custom event](https://developers.facebook.com/docs/meta-pixel/implementation/conversion-tracking#custom-events) name.',
22
+ type: 'string',
23
+ required: true,
24
+ default: {
25
+ '@path': '$.event'
26
+ }
27
+ },
28
+ event_time: { ...fb_capi_properties_1.event_time, required: true },
29
+ user_data: fb_capi_user_data_1.user_data_field,
30
+ app_data_field: fb_capi_app_data_1.app_data_field,
31
+ custom_data: fb_capi_properties_1.custom_data,
32
+ event_id: fb_capi_properties_1.event_id,
33
+ event_source_url: fb_capi_properties_1.event_source_url,
34
+ data_processing_options: fb_capi_properties_1.data_processing_options,
35
+ data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
36
+ data_processing_options_state: fb_capi_properties_1.data_processing_options_state,
37
+ test_event_code: fb_capi_properties_1.test_event_code
38
+ },
21
39
  perform: (request, { payload, settings, features, statsContext, syncMode }) => {
22
40
  if (syncMode === 'add') {
23
- if (features && features[constants_1.FEATURE_FLAG_CUSTOM]) {
24
- return (0, functions_1.send)(request, payload, settings, functions_1.getCustomEventData, constants_1.EventType.Custom, features, statsContext);
25
- }
26
41
  if (!payload.user_data) {
27
42
  throw new actions_core_1.IntegrationError('Must include at least one user data property', 'Misconfigured required field', 400);
28
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/custom2/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,8DAA6D;AAC7D,4DAAqD;AAGrD,oCAA0C;AAC1C,0DAAuD;AACvD,6CAA+C;AAC/C,mDAA8D;AAC9D,mDAAqE;AAErE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,qBAAqB;IAClC,QAAQ,EAAE;QACR,WAAW,EAAE,8DAA8D;QAC3E,KAAK,EAAE,qBAAqB;QAC5B,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;KACrD;IACD,MAAM,EAAE,qBAAY;IACpB,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC5E,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;YAEvB,IAAI,QAAQ,IAAI,QAAQ,CAAC,+BAAmB,CAAC,EAAE,CAAC;gBAC9C,OAAO,IAAA,gBAAI,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,8BAAkB,EAAE,qBAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAA;YACvG,CAAC;YAED,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;gBACvB,MAAM,IAAI,+BAAgB,CAAC,8CAA8C,EAAE,8BAA8B,EAAE,GAAG,CAAC,CAAA;YACjH,CAAC;YAED,MAAM,CAAC,YAAY,EAAE,YAAY,EAAE,UAAU,CAAC,GAAG,IAAA,0CAAqB,EACpE,OAAO,CAAC,uBAAuB,EAC/B,OAAO,CAAC,+BAA+B,EACvC,OAAO,CAAC,6BAA6B,CACtC,CAAA;YAED,MAAM,aAAa,GAAG,OAAO,CAAC,eAAe,IAAI,QAAQ,CAAC,aAAa,CAAA;YAEvE,OAAO,OAAO,CACZ,+BAA+B,IAAA,uBAAe,EAAC,QAAQ,EAAE,YAAY,CAAC,IAAI,QAAQ,CAAC,OAAO,SAAS,EACnG;gBACE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE;wBACJ;4BACE,UAAU,EAAE,OAAO,CAAC,UAAU;4BAC9B,UAAU,EAAE,OAAO,CAAC,UAAU;4BAC9B,aAAa,EAAE,OAAO,CAAC,aAAa;4BACpC,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;4BAC1C,SAAS,EAAE,IAAA,kCAAc,EAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;4BAC3D,WAAW,EAAE,OAAO,CAAC,WAAW;4BAChC,QAAQ,EAAE,IAAA,oCAAiB,EAAC,OAAO,CAAC,cAAc,CAAC;4BACnD,uBAAuB,EAAE,YAAY;4BACrC,+BAA+B,EAAE,YAAY;4BAC7C,6BAA6B,EAAE,UAAU;yBAC1C;qBACF;oBACD,GAAG,CAAC,aAAa,IAAI,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC;iBACzD;aACF,CACF,CAAA;QACH,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,+BAAgB,CAAC,aAAa,QAAQ,mBAAmB,EAAE,yBAAyB,EAAE,GAAG,CAAC,CAAA;QACtG,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/custom2/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,8DAW8B;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,UAAU,CAAC,GAAG,IAAA,0CAAqB,EACpE,OAAO,CAAC,uBAAuB,EAC/B,OAAO,CAAC,+BAA+B,EACvC,OAAO,CAAC,6BAA6B,CACtC,CAAA;YAED,MAAM,aAAa,GAAG,OAAO,CAAC,eAAe,IAAI,QAAQ,CAAC,aAAa,CAAA;YAEvE,OAAO,OAAO,CACZ,+BAA+B,IAAA,uBAAe,EAAC,QAAQ,EAAE,YAAY,CAAC,IAAI,QAAQ,CAAC,OAAO,SAAS,EACnG;gBACE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE;wBACJ;4BACE,UAAU,EAAE,OAAO,CAAC,UAAU;4BAC9B,UAAU,EAAE,OAAO,CAAC,UAAU;4BAC9B,aAAa,EAAE,OAAO,CAAC,aAAa;4BACpC,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;4BAC1C,SAAS,EAAE,IAAA,kCAAc,EAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;4BAC3D,WAAW,EAAE,OAAO,CAAC,WAAW;4BAChC,QAAQ,EAAE,IAAA,oCAAiB,EAAC,OAAO,CAAC,cAAc,CAAC;4BACnD,uBAAuB,EAAE,YAAY;4BACrC,+BAA+B,EAAE,YAAY;4BAC7C,6BAA6B,EAAE,UAAU;yBAC1C;qBACF;oBACD,GAAG,CAAC,aAAa,IAAI,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC;iBACzD;aACF,CACF,CAAA;QACH,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,+BAAgB,CAAC,aAAa,QAAQ,mBAAmB,EAAE,yBAAyB,EAAE,GAAG,CAAC,CAAA;QACtG,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -1,3 +1,4 @@
1
+ import { InputField } from '@segment/actions-core';
1
2
  import { Payload } from './addToCart/generated-types';
2
3
  export type AppData = Payload['app_data_field'];
3
4
  export type GeneratedAppData = {
@@ -7,3 +8,4 @@ export type GeneratedAppData = {
7
8
  extinfo: string[];
8
9
  };
9
10
  export declare const generate_app_data: (app_data: AppData) => GeneratedAppData | undefined;
11
+ export declare const app_data_field: InputField;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate_app_data = void 0;
3
+ exports.app_data_field = exports.generate_app_data = void 0;
4
4
  const generate_app_data = (app_data) => {
5
5
  if (!app_data || !app_data.use_app_data) {
6
6
  return undefined;
@@ -30,4 +30,159 @@ const generate_app_data = (app_data) => {
30
30
  };
31
31
  };
32
32
  exports.generate_app_data = generate_app_data;
33
+ exports.app_data_field = {
34
+ label: 'App Events Fields',
35
+ description: `These fields support sending app events to Facebook through the Conversions API. For more information about app events support in the Conversions API, see the Facebook docs [here](https://developers.facebook.com/docs/marketing-api/conversions-api/app-events).
36
+ App events sent through the Conversions API must be associated with a dataset.
37
+ Instructions for creating a dataset can be found [here](https://www.facebook.com/business/help/750785952855662?id=490360542427371). Once a dataset is created, the dataset ID
38
+ can be substituted for the pixel ID in the destination settings.`,
39
+ type: 'object',
40
+ properties: {
41
+ use_app_data: {
42
+ label: 'Send App Events?',
43
+ description: 'Segment will not send app events to Facebook by default. Enable this once you have created a dataset in Facebook and are ready to begin sending app events.',
44
+ type: 'boolean',
45
+ default: false
46
+ },
47
+ advertiser_tracking_enabled: {
48
+ label: 'Advertiser Tracking Enabled',
49
+ description: `*Required for app events*
50
+ Use this field to specify ATT permission on an iOS 14.5+ device. Set to 0 for disabled or 1 for enabled.`,
51
+ type: 'boolean'
52
+ },
53
+ application_tracking_enabled: {
54
+ label: 'Application Tracking Enabled',
55
+ type: 'boolean',
56
+ description: `*Required for app events*
57
+ A person can choose to enable ad tracking on an app level. Your SDK should allow an app developer to put an opt-out setting into their app. Use this field to specify the person's choice. Use 0 for disabled, 1 for enabled.`
58
+ },
59
+ version: {
60
+ label: 'ExtInfo Version',
61
+ description: `*Required for app events* Example: 'i2'.`,
62
+ type: 'string',
63
+ choices: [
64
+ { label: 'iOS', value: 'i2' },
65
+ { label: 'Android', value: 'a2' }
66
+ ]
67
+ },
68
+ packageName: {
69
+ label: 'Package Name',
70
+ description: `Example: 'com.facebook.sdk.samples.hellofacebook'.`,
71
+ type: 'string'
72
+ },
73
+ shortVersion: {
74
+ label: 'Short Version',
75
+ description: `Example: '1.0'.`,
76
+ type: 'string'
77
+ },
78
+ longVersion: {
79
+ label: 'Long Version',
80
+ description: `Example: '1.0 long'.`,
81
+ type: 'string'
82
+ },
83
+ osVersion: {
84
+ label: '*Required for app events* OS Version',
85
+ description: `Example: '13.4.1'.`,
86
+ type: 'string'
87
+ },
88
+ deviceName: {
89
+ label: 'Device Model Name',
90
+ description: `Example: 'iPhone5,1'.`,
91
+ type: 'string'
92
+ },
93
+ madId: {
94
+ label: 'Advertiser ID (madid)',
95
+ description: 'Your mobile advertiser ID, the advertising ID from an Android device or the Advertising Identifier (IDFA) from an Apple device.',
96
+ type: 'string'
97
+ },
98
+ locale: {
99
+ label: 'Locale',
100
+ description: `Example: 'En_US'.`,
101
+ type: 'string'
102
+ },
103
+ timezone: {
104
+ label: 'Timezone Abbreviation',
105
+ description: `Example: 'PST'.`,
106
+ type: 'string'
107
+ },
108
+ carrier: {
109
+ label: 'Carrier Name',
110
+ description: `Example: 'AT&T'.`,
111
+ type: 'string'
112
+ },
113
+ width: {
114
+ label: 'Screen Width',
115
+ description: `Example: '1080'.`,
116
+ type: 'string'
117
+ },
118
+ height: {
119
+ label: 'Screen Height',
120
+ description: `Example: '1920'.`,
121
+ type: 'string'
122
+ },
123
+ density: {
124
+ label: 'Screen Density',
125
+ description: `Example: '2.0'.`,
126
+ type: 'string'
127
+ },
128
+ cpuCores: {
129
+ label: 'CPU Cores',
130
+ description: `Example: '8'.`,
131
+ type: 'string'
132
+ },
133
+ storageSize: {
134
+ label: 'Storage Size in GBs',
135
+ description: `Example: '64'.`,
136
+ type: 'string'
137
+ },
138
+ freeStorage: {
139
+ label: 'Free Storage in GBs',
140
+ description: `Example: '32'.`,
141
+ type: 'string'
142
+ },
143
+ deviceTimezone: {
144
+ label: 'Device Timezone',
145
+ description: `Example: 'USA/New York'.`,
146
+ type: 'string'
147
+ }
148
+ },
149
+ default: {
150
+ application_tracking_enabled: {
151
+ '@path': '$.context.device.adTrackingEnabled'
152
+ },
153
+ packageName: {
154
+ '@path': '$.context.app.namespace'
155
+ },
156
+ longVersion: {
157
+ '@path': '$.context.app.version'
158
+ },
159
+ osVersion: {
160
+ '@path': '$.context.os.version'
161
+ },
162
+ deviceName: {
163
+ '@path': '$.context.device.model'
164
+ },
165
+ locale: {
166
+ '@path': '$.context.locale'
167
+ },
168
+ carrier: {
169
+ '@path': '$.context.network.carrier'
170
+ },
171
+ width: {
172
+ '@path': '$.context.screen.width'
173
+ },
174
+ height: {
175
+ '@path': '$.context.screen.height'
176
+ },
177
+ density: {
178
+ '@path': '$.context.screen.density'
179
+ },
180
+ deviceTimezone: {
181
+ '@path': '$.context.timezone'
182
+ },
183
+ madId: {
184
+ '@path': '$.context.madId'
185
+ }
186
+ }
187
+ };
33
188
  //# sourceMappingURL=fb-capi-app-data.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fb-capi-app-data.js","sourceRoot":"","sources":["../../../src/destinations/facebook-conversions-api/fb-capi-app-data.ts"],"names":[],"mappings":";;;AAWO,MAAM,iBAAiB,GAAG,CAAC,QAAiB,EAAgC,EAAE;IACnF,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;QACxC,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,OAAO;QACL,2BAA2B,EAAE,QAAQ,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,4BAA4B,EAAE,QAAQ,EAAE,4BAA4B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5E,KAAK,EA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AAE,gBAAgB;YACvB,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,QAAQ;SACf;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,eAAe;YAC5B,IAAI,EAAE,QAAQ;SACf;QACD,WAAW,EAAE;YACX,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EAAE,gBAAgB;YAC7B,IAAI,EAAE,QAAQ;SACf;QACD,WAAW,EAAE;YACX,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EAAE,gBAAgB;YAC7B,IAAI,EAAE,QAAQ;SACf;QACD,cAAc,EAAE;YACd,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,QAAQ;SACf;KACF;IACD,OAAO,EAAE;QACP,4BAA4B,EAAE;YAC5B,OAAO,EAAE,oCAAoC;SAC9C;QACD,WAAW,EAAE;YACX,OAAO,EAAE,yBAAyB;SACnC;QACD,WAAW,EAAE;YACX,OAAO,EAAE,uBAAuB;SACjC;QACD,SAAS,EAAE;YACT,OAAO,EAAE,sBAAsB;SAChC;QACD,UAAU,EAAE;YACV,OAAO,EAAE,wBAAwB;SAClC;QACD,MAAM,EAAE;YACN,OAAO,EAAE,kBAAkB;SAC5B;QACD,OAAO,EAAE;YACP,OAAO,EAAE,2BAA2B;SACrC;QACD,KAAK,EAAE;YACL,OAAO,EAAE,wBAAwB;SAClC;QACD,MAAM,EAAE;YACN,OAAO,EAAE,yBAAyB;SACnC;QACD,OAAO,EAAE;YACP,OAAO,EAAE,0BAA0B;SACpC;QACD,cAAc,EAAE;YACd,OAAO,EAAE,oBAAoB;SAC9B;QACD,KAAK,EAAE;YACL,OAAO,EAAE,iBAAiB;SAC3B;KACF;CACF,CAAA"}
@@ -1,9 +1,28 @@
1
+ import { InputField } from '@segment/actions-core/destination-kit/types';
1
2
  import { PayloadValidationError } from '@segment/actions-core';
2
3
  type Content = {
3
4
  id?: string;
4
5
  delivery_category?: string;
5
6
  };
7
+ export declare const custom_data: InputField;
8
+ export declare const currency: InputField;
9
+ export declare const value: InputField;
10
+ export declare const net_revenue: InputField;
11
+ export declare const content_category: InputField;
12
+ export declare const content_ids: InputField;
13
+ export declare const content_name: InputField;
14
+ export declare const content_type: InputField;
15
+ export declare const contents: InputField;
16
+ export declare const data_processing_options: InputField;
17
+ export declare const data_processing_options_country: InputField;
18
+ export declare const data_processing_options_state: InputField;
6
19
  export declare const validateContents: (contents: Content[]) => PayloadValidationError | false;
7
20
  type DPOption = string[] | number;
8
21
  export declare const dataProcessingOptions: (data_processing_options: boolean | undefined, countryOption: number | undefined, stateOption: number | undefined) => DPOption[];
22
+ export declare const num_items: InputField;
23
+ export declare const event_time: InputField;
24
+ export declare const action_source: InputField;
25
+ export declare const event_source_url: InputField;
26
+ export declare const event_id: InputField;
27
+ export declare const test_event_code: InputField;
9
28
  export {};
@@ -1,7 +1,113 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dataProcessingOptions = exports.validateContents = void 0;
3
+ exports.test_event_code = exports.event_id = exports.event_source_url = exports.action_source = exports.event_time = exports.num_items = exports.dataProcessingOptions = exports.validateContents = exports.data_processing_options_state = exports.data_processing_options_country = exports.data_processing_options = exports.contents = exports.content_type = exports.content_name = exports.content_ids = exports.content_category = exports.net_revenue = exports.value = exports.currency = exports.custom_data = void 0;
4
4
  const actions_core_1 = require("@segment/actions-core");
5
+ exports.custom_data = {
6
+ label: 'Custom Data',
7
+ description: 'The custom data object can be used to pass custom properties. See [Facebook documentation](https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data#custom-properties) for more information.',
8
+ type: 'object',
9
+ defaultObjectUI: 'keyvalue'
10
+ };
11
+ exports.currency = {
12
+ label: 'Currency',
13
+ description: 'The currency for the value specified. Currency must be a valid ISO 4217 three-digit currency code.',
14
+ type: 'string',
15
+ default: {
16
+ '@path': '$.properties.currency'
17
+ }
18
+ };
19
+ exports.value = {
20
+ label: 'Value',
21
+ description: 'A numeric value associated with this event. This could be a monetary value or a value in some other metric.',
22
+ type: 'number'
23
+ };
24
+ exports.net_revenue = {
25
+ label: 'Net Revenue',
26
+ description: 'The numeric net revenue value associated with the purchase event.',
27
+ type: 'number'
28
+ };
29
+ exports.content_category = {
30
+ label: 'Content Category',
31
+ description: 'The category of the content associated with the event.',
32
+ type: 'string'
33
+ };
34
+ exports.content_ids = {
35
+ label: 'Content IDs',
36
+ description: 'The content IDs associated with the event, such as product SKUs.',
37
+ type: 'string',
38
+ multiple: true
39
+ };
40
+ exports.content_name = {
41
+ label: 'Content Name',
42
+ description: 'The name of the page or product associated with the event.',
43
+ type: 'string'
44
+ };
45
+ exports.content_type = {
46
+ label: 'Content Type',
47
+ description: 'The content type should be set to product or product_group. See [Facebook documentation](https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/custom-data) for more information.',
48
+ type: 'string'
49
+ };
50
+ exports.contents = {
51
+ label: 'Contents',
52
+ description: 'A list of JSON objects that contain the product IDs associated with the event plus information about the products. ID and quantity are required fields.',
53
+ type: 'object',
54
+ multiple: true,
55
+ properties: {
56
+ id: {
57
+ label: 'ID',
58
+ description: 'The product ID of the purchased item.',
59
+ type: 'string'
60
+ },
61
+ quantity: {
62
+ label: 'Quantity',
63
+ description: 'The number of items purchased.',
64
+ type: 'integer'
65
+ },
66
+ item_price: {
67
+ label: 'Item Price',
68
+ description: 'The price of the item.',
69
+ type: 'number'
70
+ },
71
+ delivery_category: {
72
+ label: 'Delivery Category',
73
+ description: 'The type of delivery for a purchase event. Supported values are "in_store", "curbside", and "home_delivery".',
74
+ type: 'string'
75
+ }
76
+ }
77
+ };
78
+ exports.data_processing_options = {
79
+ label: 'Data Processing Options',
80
+ description: `The Data Processing Options to send to Facebook. If set to true, Segment will send an array to Facebook indicating events should be processed with Limited Data Use (LDU) restrictions. More information can be found in [Facebook’s documentation](https://developers.facebook.com/docs/marketing-apis/data-processing-options).`,
81
+ type: 'boolean'
82
+ };
83
+ exports.data_processing_options_country = {
84
+ label: 'Data Processing Country',
85
+ description: 'A country that you want to associate to the Data Processing Options. Accepted values are 1, for the United States of America, or 0, to request that Facebook geolocates the event using IP address. This is required if Data Processing Options is set to true. If nothing is provided, Segment will send 0.',
86
+ type: 'number',
87
+ choices: [
88
+ { label: 'Use Facebook’s Geolocation Logic', value: 0 },
89
+ { label: 'United States of America', value: 1 }
90
+ ]
91
+ };
92
+ exports.data_processing_options_state = {
93
+ label: 'Data Processing State',
94
+ description: 'A state that you want to associate to the Data Processing Options. Accepted values are 1000, for California, or 0, to request that Facebook geolocates the event using IP address. This is required if Data Processing Options is set to true. If nothing is provided, Segment will send 0.',
95
+ type: 'number',
96
+ choices: [
97
+ { label: 'Use Facebook’s Geolocation Logic', value: 0 },
98
+ { label: 'California', value: 1000 },
99
+ { label: 'Colorado', value: 1001 },
100
+ { label: 'Connecticut', value: 1002 },
101
+ { label: 'Florida', value: 1003 },
102
+ { label: 'Oregon', value: 1004 },
103
+ { label: 'Texas', value: 1005 },
104
+ { label: 'Montana', value: 1006 },
105
+ { label: 'Delaware', value: 1007 },
106
+ { label: 'Nebraska', value: 1008 },
107
+ { label: 'New Hampshire', value: 1009 },
108
+ { label: 'New Jersey', value: 1010 }
109
+ ]
110
+ };
5
111
  const validateContents = (contents) => {
6
112
  const valid_delivery_categories = ['in_store', 'curbside', 'home_delivery'];
7
113
  for (let i = 0; i < contents.length; i++) {
@@ -26,4 +132,54 @@ const dataProcessingOptions = (data_processing_options, countryOption, stateOpti
26
132
  return [];
27
133
  };
28
134
  exports.dataProcessingOptions = dataProcessingOptions;
135
+ exports.num_items = {
136
+ label: 'Number of Items',
137
+ description: 'The number of items when checkout was initiated.',
138
+ type: 'integer'
139
+ };
140
+ exports.event_time = {
141
+ label: 'Event Time',
142
+ description: 'A Unix timestamp in seconds indicating when the actual event occurred. Facebook will automatically convert ISO 8601 timestamps to Unix.',
143
+ type: 'string',
144
+ default: {
145
+ '@path': '$.timestamp'
146
+ }
147
+ };
148
+ exports.action_source = {
149
+ label: 'Action Source',
150
+ description: 'This field allows you to specify where your conversions occurred. See [Facebook documentation](https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/server-event) for supported values.',
151
+ type: 'string',
152
+ choices: [
153
+ { label: 'EMAIL', value: 'email' },
154
+ { label: 'WEBSITE', value: 'website' },
155
+ { label: 'APP', value: 'app' },
156
+ { label: 'PHONE CALL', value: 'phone_call' },
157
+ { label: 'CHAT', value: 'chat' },
158
+ { label: 'PHYSICAL STORE', value: 'physical_store' },
159
+ { label: 'SYSTEM GENERATED', value: 'system_generated' },
160
+ { label: 'OTHER', value: 'other' }
161
+ ]
162
+ };
163
+ exports.event_source_url = {
164
+ label: 'Event Source URL',
165
+ description: 'The browser URL where the event happened. The URL must begin with http:// or https:// and should match the verified domain. This is required if the action source is "website."',
166
+ type: 'string',
167
+ default: {
168
+ '@path': '$.context.page.url'
169
+ }
170
+ };
171
+ exports.event_id = {
172
+ label: 'Event ID',
173
+ description: 'This ID can be any unique string. Event ID is used to deduplicate events sent by both Facebook Pixel and Conversions API.',
174
+ type: 'string',
175
+ default: {
176
+ '@path': '$.messageId'
177
+ }
178
+ };
179
+ exports.test_event_code = {
180
+ label: 'Test Event Code',
181
+ type: 'string',
182
+ description: 'Use this field to specify that events should be test events rather than actual traffic. You can find your Test Event Code in your Facebook Events Manager under the "Test events" tab. This property overrides the test event code defined in Settings. You\'ll want to remove your Test Event Code when sending real traffic through this integration.',
183
+ required: false
184
+ };
29
185
  //# sourceMappingURL=fb-capi-properties.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fb-capi-properties.js","sourceRoot":"","sources":["../../../src/destinations/facebook-conversions-api/fb-capi-properties.ts"],"names":[],"mappings":";;;AAAA,wDAA8D;AAWvD,MAAM,gBAAgB,GAAG,CAAC,QAAmB,EAAkC,EAAE;IACtF,MAAM,yBAAyB,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,CAAC,CAAA;IAE3E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;QAExB,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACb,OAAO,IAAI,qCAAsB,CAAC,YAAY,CAAC,mCAAmC,CAAC,CAAA;QACrF,CAAC;QAED,IAAI,IAAI,CAAC,iBAAiB,IAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC;YAC1F,OAAO,IAAI,qCAAsB,CAC/B,YAAY,CAAC,yEAAyE,CACvF,CAAA;QACH,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAlBY,QAAA,gBAAgB,oBAkB5B;AAIM,MAAM,qBAAqB,GAAG,CACnC,uBAA4C,EAC5C,aAAiC,EACjC,WAA+B,EACnB,EAAE;IACd,IAAI,uBAAuB,EAAE,CAAC;QAC5B,MAAM,YAAY,GAAG,CAAC,KAAK,CAAC,CAAA;QAC5B,MAAM,YAAY,GAAG,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;QACtD,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;QAChD,OAAO,CAAC,YAAY,EAAE,YAAY,EAAE,UAAU,CAAC,CAAA;IACjD,CAAC;IACD,OAAO,EAAE,CAAA;AACX,CAAC,CAAA;AAZY,QAAA,qBAAqB,yBAYjC"}
1
+ {"version":3,"file":"fb-capi-properties.js","sourceRoot":"","sources":["../../../src/destinations/facebook-conversions-api/fb-capi-properties.ts"],"names":[],"mappings":";;;AACA,wDAA8D;AAWjD,QAAA,WAAW,GAAe;IACrC,KAAK,EAAE,aAAa;IACpB,WAAW,EACT,+NAA+N;IACjO,IAAI,EAAE,QAAQ;IACd,eAAe,EAA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AU;IACjB,WAAW,EACT,2HAA2H;IAC7H,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE;QACP,OAAO,EAAE,aAAa;KACvB;CACF,CAAA;AAEY,QAAA,eAAe,GAAe;IACzC,KAAK,EAAE,iBAAiB;IACxB,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,yVAAyV;IAC3V,QAAQ,EAAE,KAAK;CAChB,CAAA"}
@@ -1,4 +1,6 @@
1
+ import { InputField } from '@segment/actions-core/destination-kit/types';
1
2
  import { Payload } from './addToCart/generated-types';
3
+ export declare const user_data_field: InputField;
2
4
  type UserData = Pick<Payload, 'user_data'>;
3
5
  export declare const normalize_user_data: (payload: UserData) => void;
4
6
  export declare const hash_user_data: (payload: UserData) => Object;