@segment/action-destinations 3.148.1-optimizely-experimentation.9 → 3.148.1-optimizely-lrucache.13

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 (106) hide show
  1. package/dist/destinations/customerio/createUpdateObject/index.js +6 -1
  2. package/dist/destinations/customerio/createUpdateObject/index.js.map +1 -1
  3. package/dist/destinations/customerio/createUpdatePerson/index.js +8 -1
  4. package/dist/destinations/customerio/createUpdatePerson/index.js.map +1 -1
  5. package/dist/destinations/index.js +1 -1
  6. package/dist/destinations/index.js.map +1 -1
  7. package/dist/destinations/insider/cartViewedEvent/generated-types.d.ts +44 -0
  8. package/dist/destinations/insider/cartViewedEvent/generated-types.js +3 -0
  9. package/dist/destinations/insider/cartViewedEvent/generated-types.js.map +1 -0
  10. package/dist/destinations/insider/cartViewedEvent/index.d.ts +5 -0
  11. package/dist/destinations/insider/cartViewedEvent/index.js +27 -0
  12. package/dist/destinations/insider/cartViewedEvent/index.js.map +1 -0
  13. package/dist/destinations/insider/checkoutEvent/generated-types.d.ts +44 -0
  14. package/dist/destinations/insider/checkoutEvent/generated-types.js +3 -0
  15. package/dist/destinations/insider/checkoutEvent/generated-types.js.map +1 -0
  16. package/dist/destinations/insider/checkoutEvent/index.d.ts +5 -0
  17. package/dist/destinations/insider/checkoutEvent/index.js +27 -0
  18. package/dist/destinations/insider/checkoutEvent/index.js.map +1 -0
  19. package/dist/destinations/insider/generated-types.d.ts +4 -0
  20. package/dist/destinations/insider/generated-types.js +3 -0
  21. package/dist/destinations/insider/generated-types.js.map +1 -0
  22. package/dist/destinations/insider/index.d.ts +4 -0
  23. package/dist/destinations/insider/index.js +66 -0
  24. package/dist/destinations/insider/index.js.map +1 -0
  25. package/dist/destinations/insider/insider-helpers.d.ts +57 -0
  26. package/dist/destinations/insider/insider-helpers.js +153 -0
  27. package/dist/destinations/insider/insider-helpers.js.map +1 -0
  28. package/dist/destinations/insider/insider-properties.d.ts +13 -0
  29. package/dist/destinations/insider/insider-properties.js +456 -0
  30. package/dist/destinations/insider/insider-properties.js.map +1 -0
  31. package/dist/destinations/insider/orderCompletedEvent/generated-types.d.ts +44 -0
  32. package/dist/destinations/insider/orderCompletedEvent/generated-types.js +3 -0
  33. package/dist/destinations/insider/orderCompletedEvent/generated-types.js.map +1 -0
  34. package/dist/destinations/insider/orderCompletedEvent/index.d.ts +5 -0
  35. package/dist/destinations/insider/orderCompletedEvent/index.js +27 -0
  36. package/dist/destinations/insider/orderCompletedEvent/index.js.map +1 -0
  37. package/dist/destinations/insider/productAddedEvent/generated-types.d.ts +41 -0
  38. package/dist/destinations/insider/productAddedEvent/generated-types.js +3 -0
  39. package/dist/destinations/insider/productAddedEvent/generated-types.js.map +1 -0
  40. package/dist/destinations/insider/productAddedEvent/index.d.ts +5 -0
  41. package/dist/destinations/insider/productAddedEvent/index.js +39 -0
  42. package/dist/destinations/insider/productAddedEvent/index.js.map +1 -0
  43. package/dist/destinations/insider/productListViewedEvent/generated-types.d.ts +34 -0
  44. package/dist/destinations/insider/productListViewedEvent/generated-types.js +3 -0
  45. package/dist/destinations/insider/productListViewedEvent/generated-types.js.map +1 -0
  46. package/dist/destinations/insider/productListViewedEvent/index.d.ts +5 -0
  47. package/dist/destinations/insider/productListViewedEvent/index.js +26 -0
  48. package/dist/destinations/insider/productListViewedEvent/index.js.map +1 -0
  49. package/dist/destinations/insider/productRemovedEvent/generated-types.d.ts +41 -0
  50. package/dist/destinations/insider/productRemovedEvent/generated-types.js +3 -0
  51. package/dist/destinations/insider/productRemovedEvent/generated-types.js.map +1 -0
  52. package/dist/destinations/insider/productRemovedEvent/index.d.ts +5 -0
  53. package/dist/destinations/insider/productRemovedEvent/index.js +39 -0
  54. package/dist/destinations/insider/productRemovedEvent/index.js.map +1 -0
  55. package/dist/destinations/insider/productViewedEvent/generated-types.d.ts +41 -0
  56. package/dist/destinations/insider/productViewedEvent/generated-types.js +3 -0
  57. package/dist/destinations/insider/productViewedEvent/generated-types.js.map +1 -0
  58. package/dist/destinations/insider/productViewedEvent/index.d.ts +5 -0
  59. package/dist/destinations/insider/productViewedEvent/index.js +39 -0
  60. package/dist/destinations/insider/productViewedEvent/index.js.map +1 -0
  61. package/dist/destinations/insider/trackEvent/generated-types.d.ts +56 -0
  62. package/dist/destinations/insider/trackEvent/generated-types.js +3 -0
  63. package/dist/destinations/insider/trackEvent/generated-types.js.map +1 -0
  64. package/dist/destinations/insider/trackEvent/index.d.ts +5 -0
  65. package/dist/destinations/insider/trackEvent/index.js +28 -0
  66. package/dist/destinations/insider/trackEvent/index.js.map +1 -0
  67. package/dist/destinations/insider/updateUserProfile/generated-types.d.ts +19 -0
  68. package/dist/destinations/insider/updateUserProfile/generated-types.js +3 -0
  69. package/dist/destinations/insider/updateUserProfile/generated-types.js.map +1 -0
  70. package/dist/destinations/insider/updateUserProfile/index.d.ts +5 -0
  71. package/dist/destinations/insider/updateUserProfile/index.js +141 -0
  72. package/dist/destinations/insider/updateUserProfile/index.js.map +1 -0
  73. package/dist/destinations/insider/userRegisteredEvent/generated-types.d.ts +28 -0
  74. package/dist/destinations/insider/userRegisteredEvent/generated-types.js +3 -0
  75. package/dist/destinations/insider/userRegisteredEvent/generated-types.js.map +1 -0
  76. package/dist/destinations/insider/userRegisteredEvent/index.d.ts +5 -0
  77. package/dist/destinations/insider/userRegisteredEvent/index.js +25 -0
  78. package/dist/destinations/insider/userRegisteredEvent/index.js.map +1 -0
  79. package/dist/destinations/insider-audiences/generated-types.d.ts +4 -0
  80. package/dist/destinations/insider-audiences/generated-types.js +3 -0
  81. package/dist/destinations/insider-audiences/generated-types.js.map +1 -0
  82. package/dist/destinations/insider-audiences/index.d.ts +4 -0
  83. package/dist/destinations/insider-audiences/index.js +47 -0
  84. package/dist/destinations/insider-audiences/index.js.map +1 -0
  85. package/dist/destinations/insider-audiences/insider-helpers.d.ts +6 -0
  86. package/dist/destinations/insider-audiences/insider-helpers.js +179 -0
  87. package/dist/destinations/insider-audiences/insider-helpers.js.map +1 -0
  88. package/dist/destinations/insider-audiences/insiderAudiences/generated-types.d.ts +14 -0
  89. package/dist/destinations/insider-audiences/insiderAudiences/generated-types.js +3 -0
  90. package/dist/destinations/insider-audiences/insiderAudiences/generated-types.js.map +1 -0
  91. package/dist/destinations/insider-audiences/insiderAudiences/index.d.ts +5 -0
  92. package/dist/destinations/insider-audiences/insiderAudiences/index.js +123 -0
  93. package/dist/destinations/insider-audiences/insiderAudiences/index.js.map +1 -0
  94. package/dist/destinations/optimizely-feature-experimentation-actions/generated-types.d.ts +1 -0
  95. package/dist/destinations/optimizely-feature-experimentation-actions/index.js +10 -3
  96. package/dist/destinations/optimizely-feature-experimentation-actions/index.js.map +1 -1
  97. package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/functions.d.ts +17 -3
  98. package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/functions.js +75 -1
  99. package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/functions.js.map +1 -1
  100. package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/index.js +4 -6
  101. package/dist/destinations/optimizely-feature-experimentation-actions/trackEvent/index.js.map +1 -1
  102. package/dist/destinations/optimizely-feature-experimentation-actions/types.d.ts +5 -0
  103. package/dist/destinations/optimizely-feature-experimentation-actions/utils.d.ts +5 -0
  104. package/dist/destinations/optimizely-feature-experimentation-actions/utils.js +10 -0
  105. package/dist/destinations/optimizely-feature-experimentation-actions/utils.js.map +1 -0
  106. package/package.json +4 -4
@@ -65,6 +65,7 @@ const action = {
65
65
  perform: (request, { settings, payload }) => {
66
66
  let createdAt = payload.created_at;
67
67
  let customAttributes = payload.custom_attributes;
68
+ let objectTypeIDInTraits = null;
68
69
  const objectTypeID = payload.object_type_id;
69
70
  const userID = payload.user_id;
70
71
  const objectID = payload.id;
@@ -75,6 +76,10 @@ const action = {
75
76
  }
76
77
  if (customAttributes) {
77
78
  customAttributes = utils_1.convertAttributeTimestamps(customAttributes);
79
+ if (customAttributes.object_type_id) {
80
+ objectTypeIDInTraits = customAttributes.object_type_id;
81
+ delete customAttributes.object_type_id;
82
+ }
78
83
  }
79
84
  }
80
85
  const body = {};
@@ -83,7 +88,7 @@ const action = {
83
88
  body.created_at = createdAt;
84
89
  }
85
90
  body.type = 'object';
86
- body.identifiers = { object_type_id: objectTypeID ?? '1', object_id: objectID };
91
+ body.identifiers = { object_type_id: objectTypeIDInTraits ?? objectTypeID ?? '1', object_id: objectID };
87
92
  if (userID) {
88
93
  body.action = 'identify';
89
94
  body.cio_relationships = [{ identifiers: { id: userID } }];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/customerio/createUpdateObject/index.ts"],"names":[],"mappings":";;AAGA,oCAA8F;AAE9F,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,+DAA+D;IAC5E,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,EAAE,EAAE;YACF,KAAK,EAAE,WAAW;YAClB,WAAW,EACT,yHAAyH;YAC3H,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,WAAW;aACrB;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,6CAA6C;YAC1D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,WAAW,EAAE,uBAAuB;aACrC;SACF;QACD,iBAAiB,EAAE;YACjB,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EACT,4GAA4G;YAC9G,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,WAAW,EACT,mIAAmI;YACrI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc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AAY,IAAI,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAA;QAE/E,IAAI,MAAM,EAAE;YACV,IAAI,CAAC,MAAM,GAAG,UAAU,CAAA;YACxB,IAAI,CAAC,iBAAiB,GAAG,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,CAAA;SAC3D;aAAM;YACL,IAAI,CAAC,MAAM,GAAG,oBAAoB,CAAA;YAClC,IAAI,CAAC,iBAAiB,GAAG,CAAC,EAAE,WAAW,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,CAAC,CAAA;SAC1E;QAED,OAAO,OAAO,CAAC,GAAG,wBAAgB,CAAC,QAAQ,CAAC,aAAa,CAAC,gBAAgB,EAAE;YAC1E,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/customerio/createUpdateObject/index.ts"],"names":[],"mappings":";;AAGA,oCAA8F;AAE9F,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,+DAA+D;IAC5E,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,EAAE,EAAE;YACF,KAAK,EAAE,WAAW;YAClB,WAAW,EACT,yHAAyH;YAC3H,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,WAAW;aACrB;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,6CAA6C;YAC1D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,WAAW,EAAE,uBAAuB;aACrC;SACF;QACD,iBAAiB,EAAE;YACjB,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EACT,4GAA4G;YAC9G,IAAI,EAAE,QAAQ;Y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AgB,CAAC,CAAA;gBAC/D,IAAI,gBAAgB,CAAC,cAAc,EAAE;oBACnC,oBAAoB,GAAG,gBAAgB,CAAC,cAAc,CAAA;oBACtD,OAAO,gBAAgB,CAAC,cAAc,CAAA;iBACvC;aACF;SACF;QAED,MAAM,IAAI,GAA4B,EAAE,CAAA;QACxC,IAAI,CAAC,UAAU,GAAG,gBAAgB,CAAA;QAClC,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA;SAC5B;QACD,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;QACpB,IAAI,CAAC,WAAW,GAAG,EAAE,cAAc,EAAE,oBAAoB,IAAI,YAAY,IAAI,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAA;QAEvG,IAAI,MAAM,EAAE;YACV,IAAI,CAAC,MAAM,GAAG,UAAU,CAAA;YACxB,IAAI,CAAC,iBAAiB,GAAG,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,CAAA;SAC3D;aAAM;YACL,IAAI,CAAC,MAAM,GAAG,oBAAoB,CAAA;YAClC,IAAI,CAAC,iBAAiB,GAAG,CAAC,EAAE,WAAW,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,CAAC,CAAA;SAC1E;QAED,OAAO,OAAO,CAAC,GAAG,wBAAgB,CAAC,QAAQ,CAAC,aAAa,CAAC,gBAAgB,EAAE;YAC1E,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -77,6 +77,7 @@ const action = {
77
77
  perform: (request, { settings, payload }) => {
78
78
  let createdAt = payload.created_at;
79
79
  let customAttributes = payload.custom_attributes;
80
+ let objectTypeIDInTraits = null;
80
81
  const objectId = payload.group_id;
81
82
  const objectTypeId = payload.object_type_id;
82
83
  if (payload.convert_timestamp !== false) {
@@ -85,6 +86,10 @@ const action = {
85
86
  }
86
87
  if (customAttributes) {
87
88
  customAttributes = utils_1.convertAttributeTimestamps(customAttributes);
89
+ if (customAttributes.object_type_id && objectId) {
90
+ objectTypeIDInTraits = customAttributes.object_type_id;
91
+ delete customAttributes.object_type_id;
92
+ }
88
93
  }
89
94
  }
90
95
  const body = {
@@ -98,7 +103,9 @@ const action = {
98
103
  if (objectId) {
99
104
  body.cio_relationships = {
100
105
  action: 'add_relationships',
101
- relationships: [{ identifiers: { object_type_id: objectTypeId ?? '1', object_id: objectId } }]
106
+ relationships: [
107
+ { identifiers: { object_type_id: objectTypeIDInTraits ?? objectTypeId ?? '1', object_id: objectId } }
108
+ ]
102
109
  };
103
110
  }
104
111
  return request(`${utils_1.trackApiEndpoint(settings.accountRegion)}/api/v1/customers/${payload.id}`, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/customerio/createUpdatePerson/index.ts"],"names":[],"mappings":";;AAGA,oCAA8F;AAE9F,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,8DAA8D;IAC3E,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,EAAE,EAAE;YACF,KAAK,EAAE,WAAW;YAClB,WAAW,EACT,mIAAmI;YACrI,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC7B,IAAI,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;iBACpC;aACF;SACF;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,WAAW,EACT,yGAAyG;YAC3G,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,eAAe;aACzB;SACF;QACD,KAAK,EAAE;YACL,KAAK,E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AAS,CAAC,CAAA;aAC7C;YAED,IAAI,gBAAgB,EAAE;gBACpB,gBAAgB,GAAG,kCAA0B,CAAC,gBAAgB,CAAC,CAAA;aAChE;SACF;QAED,MAAM,IAAI,GAA4B;YACpC,GAAG,gBAAgB;YACnB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,YAAY,EAAE,OAAO,CAAC,YAAY;SACnC,CAAA;QAED,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA;SAC5B;QAGD,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,iBAAiB,GAAG;gBACvB,MAAM,EAAE,mBAAmB;gBAC3B,aAAa,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,cAAc,EAAE,YAAY,IAAI,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC;aAC/F,CAAA;SACF;QAED,OAAO,OAAO,CAAC,GAAG,wBAAgB,CAAC,QAAQ,CAAC,aAAa,CAAC,qBAAqB,OAAO,CAAC,EAAE,EAAE,EAAE;YAC3F,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/customerio/createUpdatePerson/index.ts"],"names":[],"mappings":";;AAGA,oCAA8F;AAE9F,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,8DAA8D;IAC3E,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,EAAE,EAAE;YACF,KAAK,EAAE,WAAW;YAClB,WAAW,EACT,mIAAmI;YACrI,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,UA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,13 @@ register('63e42e512566ad7c7ca6ba9b', './pinterest-conversions');
88
88
  register('63e52bea7747fbc311d5b872', './algolia-insights');
89
89
  register('63ff8bae963d5cb4fc79f097', './outfunnel');
90
90
  register('6408ac6c144a7d5ac55cf414', './toplyne');
91
+ register('641d5acea88fa531b9068608', './optimizely-feature-experimentation-actions');
91
92
  register('6411f979382d3759292d739f', './gwen');
92
93
  register('6419fbec071f03f0e4887a7f', './acoustic');
93
94
  register('6419fc9da58e84c112de12c3', './revend');
94
95
  register('6419fce5b6e12cf44efbd34c', './june');
95
96
  register('642440d46b66b3eeac42b581', './encharge');
96
97
  register('64244158b33d1380a79dc85c', './blend-ai');
97
- register('641d5acea88fa531b9068608', './optimizely-feature-experimentation-actions');
98
98
  function register(id, destinationPath) {
99
99
  const definition = require(destinationPath).default;
100
100
  const resolvedPath = require.resolve(destinationPath);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/destinations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,wDAAmD;AACnD,gDAAuB;AAWV,QAAA,YAAY,GAA0C,EAAE,CAAA;AACxD,QAAA,QAAQ,GAAsC,EAAE,CAAA;AAU7D,QAAQ,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAAA;AAChD,QAAQ,CAAC,0BAA0B,EAAE,sBAAsB,CAAC,CAAA;AAC5D,QAAQ,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,CAAA;AACtD,QAAQ,CAAC,0BAA0B,EAAE,aAAa,CAAC,CAAA;AACnD,QAAQ,CAAC,0BAA0B,EAAE,SAAS,CAAC,CAAA;AAC/C,QAAQ,CAAC,0BAA0B,EAAE,aAAa,CAAC,CAAA;AACnD,QAAQ,CAAC,0BAA0B,EAAE,SAAS,CAAC,CAAA;AAC/C,QAAQ,CAAC,0BAA0B,EAAE,WAAW,CAAC,CAAA;AACjD,QAAQ,CAAC,0BAA0B,EAAE,oBAAoB,CAAC,CAAA;AAC1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AEC"}
@@ -0,0 +1,44 @@
1
+ export interface Payload {
2
+ email_as_identifier?: boolean;
3
+ phone_number_as_identifier?: boolean;
4
+ uuid?: string;
5
+ segment_anonymous_id?: string;
6
+ timestamp: string | number;
7
+ parameters?: {
8
+ currency?: string;
9
+ event_group_id?: string;
10
+ [k: string]: unknown;
11
+ };
12
+ products?: {
13
+ product_id?: string;
14
+ taxonomy?: string;
15
+ name?: string;
16
+ unit_sale_price?: number;
17
+ unit_price?: number;
18
+ quantity?: number;
19
+ url?: string;
20
+ product_image_url?: string;
21
+ [k: string]: unknown;
22
+ }[];
23
+ attributes?: {
24
+ email?: string;
25
+ phone?: string;
26
+ age?: number;
27
+ birthday?: string;
28
+ name?: string;
29
+ gender?: string;
30
+ surname?: string;
31
+ app_version?: string;
32
+ idfa?: string;
33
+ model?: string;
34
+ last_ip?: string;
35
+ city?: string;
36
+ country?: string;
37
+ carrier?: string;
38
+ os_version?: string;
39
+ platform?: string;
40
+ timezone?: string;
41
+ locale?: string;
42
+ [k: string]: unknown;
43
+ };
44
+ }
@@ -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/insider/cartViewedEvent/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 insider_properties_1 = require("../insider-properties");
4
+ const insider_helpers_1 = require("../insider-helpers");
5
+ const action = {
6
+ title: 'Cart Viewed Event',
7
+ description: 'Record Cart Viewed Event to Insider',
8
+ defaultSubscription: 'type = "track" and event = "Cart Viewed"',
9
+ fields: {
10
+ email_as_identifier: { ...insider_properties_1.email_as_identifier },
11
+ phone_number_as_identifier: { ...insider_properties_1.phone_number_as_identifier },
12
+ uuid: { ...insider_properties_1.uuid },
13
+ segment_anonymous_id: { ...insider_properties_1.segment_anonymous_id },
14
+ timestamp: { ...insider_properties_1.timestamp },
15
+ parameters: { ...insider_properties_1.cart_event_parameters },
16
+ products: { ...insider_properties_1.products },
17
+ attributes: { ...insider_properties_1.user_attributes }
18
+ },
19
+ perform: (request, data) => {
20
+ return request(`${insider_helpers_1.API_BASE}${insider_helpers_1.UPSERT_ENDPOINT}`, {
21
+ method: 'post',
22
+ json: insider_helpers_1.sendTrackEvent(data.payload, 'cart_page_view')
23
+ });
24
+ }
25
+ };
26
+ exports.default = action;
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/cartViewedEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAS8B;AAC9B,wDAA8E;AAE9E,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EAAE,qCAAqC;IAClD,mBAAmB,EAAE,0CAA0C;IAC/D,MAAM,EAAE;QACN,mBAAmB,EAAE,EAAE,GAAG,wCAAmB,EAAE;QAC/C,0BAA0B,EAAE,EAAE,GAAG,+CAA0B,EAAE;QAC7D,IAAI,EAAE,EAAE,GAAG,yBAAI,EAAE;QACjB,oBAAoB,EAAE,EAAE,GAAG,yCAAoB,EAAE;QACjD,SAAS,EAAE,EAAE,GAAG,8BAAS,EAAE;QAC3B,UAAU,EAAE,EAAE,GAAG,0CAAqB,EAAE;QACxC,QAAQ,EAAE,EAAE,GAAG,6BAAQ,EAAE;QACzB,UAAU,EAAE,EAAE,GAAG,oCAAe,EAAE;KACnC;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,gCAAc,CAAC,IAAI,CAAC,OAAO,EAAE,gBAAgB,CAAC;SACrD,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,44 @@
1
+ export interface Payload {
2
+ email_as_identifier?: boolean;
3
+ phone_number_as_identifier?: boolean;
4
+ uuid?: string;
5
+ segment_anonymous_id?: string;
6
+ timestamp: string | number;
7
+ parameters?: {
8
+ currency?: string;
9
+ event_group_id?: string;
10
+ [k: string]: unknown;
11
+ };
12
+ products?: {
13
+ product_id?: string;
14
+ taxonomy?: string;
15
+ name?: string;
16
+ unit_sale_price?: number;
17
+ unit_price?: number;
18
+ quantity?: number;
19
+ url?: string;
20
+ product_image_url?: string;
21
+ [k: string]: unknown;
22
+ }[];
23
+ attributes?: {
24
+ email?: string;
25
+ phone?: string;
26
+ age?: number;
27
+ birthday?: string;
28
+ name?: string;
29
+ gender?: string;
30
+ surname?: string;
31
+ app_version?: string;
32
+ idfa?: string;
33
+ model?: string;
34
+ last_ip?: string;
35
+ city?: string;
36
+ country?: string;
37
+ carrier?: string;
38
+ os_version?: string;
39
+ platform?: string;
40
+ timezone?: string;
41
+ locale?: string;
42
+ [k: string]: unknown;
43
+ };
44
+ }
@@ -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/insider/checkoutEvent/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 insider_properties_1 = require("../insider-properties");
4
+ const insider_helpers_1 = require("../insider-helpers");
5
+ const action = {
6
+ title: 'Checkout Event',
7
+ description: 'Record Checkout Events to Insider',
8
+ defaultSubscription: 'type = "track" and (event = "Checkout Started" or event = "Checkout Step Viewed")',
9
+ fields: {
10
+ email_as_identifier: { ...insider_properties_1.email_as_identifier },
11
+ phone_number_as_identifier: { ...insider_properties_1.phone_number_as_identifier },
12
+ uuid: { ...insider_properties_1.uuid },
13
+ segment_anonymous_id: { ...insider_properties_1.segment_anonymous_id },
14
+ timestamp: { ...insider_properties_1.timestamp },
15
+ parameters: { ...insider_properties_1.checkout_event_parameters },
16
+ products: { ...insider_properties_1.products },
17
+ attributes: { ...insider_properties_1.user_attributes }
18
+ },
19
+ perform: (request, data) => {
20
+ return request(`${insider_helpers_1.API_BASE}${insider_helpers_1.UPSERT_ENDPOINT}`, {
21
+ method: 'post',
22
+ json: insider_helpers_1.sendTrackEvent(data.payload, 'checkout_page_view')
23
+ });
24
+ }
25
+ };
26
+ exports.default = action;
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/insider/checkoutEvent/index.ts"],"names":[],"mappings":";;AAGA,8DAS8B;AAC9B,wDAA8E;AAE9E,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,mCAAmC;IAChD,mBAAmB,EAAE,mFAAmF;IACxG,MAAM,EAAE;QACN,mBAAmB,EAAE,EAAE,GAAG,wCAAmB,EAAE;QAC/C,0BAA0B,EAAE,EAAE,GAAG,+CAA0B,EAAE;QAC7D,IAAI,EAAE,EAAE,GAAG,yBAAI,EAAE;QACjB,oBAAoB,EAAE,EAAE,GAAG,yCAAoB,EAAE;QACjD,SAAS,EAAE,EAAE,GAAG,8BAAS,EAAE;QAC3B,UAAU,EAAE,EAAE,GAAG,8CAAyB,EAAE;QAC5C,QAAQ,EAAE,EAAE,GAAG,6BAAQ,EAAE;QACzB,UAAU,EAAE,EAAE,GAAG,oCAAe,EAAE;KACnC;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,GAAG,0BAAQ,GAAG,iCAAe,EAAE,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,gCAAc,CAAC,IAAI,CAAC,OAAO,EAAE,oBAAoB,CAAC;SACzD,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,4 @@
1
+ export interface Settings {
2
+ account_name: string;
3
+ ucd_key: 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/insider/generated-types.ts"],"names":[],"mappings":""}
@@ -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,66 @@
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 productListViewedEvent_1 = __importDefault(require("./productListViewedEvent"));
7
+ const productViewedEvent_1 = __importDefault(require("./productViewedEvent"));
8
+ const updateUserProfile_1 = __importDefault(require("./updateUserProfile"));
9
+ const productAddedEvent_1 = __importDefault(require("./productAddedEvent"));
10
+ const productRemovedEvent_1 = __importDefault(require("./productRemovedEvent"));
11
+ const userRegisteredEvent_1 = __importDefault(require("./userRegisteredEvent"));
12
+ const cartViewedEvent_1 = __importDefault(require("./cartViewedEvent"));
13
+ const checkoutEvent_1 = __importDefault(require("./checkoutEvent"));
14
+ const orderCompletedEvent_1 = __importDefault(require("./orderCompletedEvent"));
15
+ const trackEvent_1 = __importDefault(require("./trackEvent"));
16
+ const actions_core_1 = require("@segment/actions-core");
17
+ const presets = [
18
+ {
19
+ name: 'Create or Update a User Profile',
20
+ subscribe: 'type = "identify"',
21
+ partnerAction: 'updateUserProfile',
22
+ mapping: actions_core_1.defaultValues(updateUserProfile_1.default.fields)
23
+ }
24
+ ];
25
+ const destination = {
26
+ name: 'Insider Cloud Mode (Actions)',
27
+ slug: 'actions-insider-cloud',
28
+ mode: 'cloud',
29
+ authentication: {
30
+ scheme: 'custom',
31
+ fields: {
32
+ account_name: {
33
+ label: 'Account Name',
34
+ description: 'You can get your Account Name via Insider Inone Panel > Settings > Inone Settings > Account Preferences.',
35
+ type: 'string',
36
+ required: true
37
+ },
38
+ ucd_key: {
39
+ label: 'API Key',
40
+ description: 'You can get your API Key via Insider Inone Panel > Settings > Preferences > Integration Settings',
41
+ type: 'password',
42
+ required: true
43
+ }
44
+ }
45
+ },
46
+ extendRequest: ({ settings }) => {
47
+ return {
48
+ headers: { 'X-PARTNER-NAME': settings.account_name, 'X-REQUEST-TOKEN': settings.ucd_key }
49
+ };
50
+ },
51
+ presets,
52
+ actions: {
53
+ updateUserProfile: updateUserProfile_1.default,
54
+ trackEvent: trackEvent_1.default,
55
+ productListViewedEvent: productListViewedEvent_1.default,
56
+ productViewedEvent: productViewedEvent_1.default,
57
+ productAddedEvent: productAddedEvent_1.default,
58
+ productRemovedEvent: productRemovedEvent_1.default,
59
+ userRegisteredEvent: userRegisteredEvent_1.default,
60
+ cartViewedEvent: cartViewedEvent_1.default,
61
+ checkoutEvent: checkoutEvent_1.default,
62
+ orderCompletedEvent: orderCompletedEvent_1.default
63
+ }
64
+ };
65
+ exports.default = destination;
66
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/insider/index.ts"],"names":[],"mappings":";;;;;AAEA,sFAA6D;AA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ACb,mBAAmB,EAAnB,6BAAmB;KACpB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,57 @@
1
+ import { Payload as UserPayload } from './updateUserProfile/generated-types';
2
+ import { Payload as TrackEventPayload } from './trackEvent/generated-types';
3
+ import { Payload as CartViewedEventPayload } from './cartViewedEvent/generated-types';
4
+ import { Payload as CheckoutEventPayload } from './checkoutEvent/generated-types';
5
+ import { Payload as OrderCompletedEventPayload } from './orderCompletedEvent/generated-types';
6
+ import { Payload as ProductAddedEventPayload } from './productAddedEvent/generated-types';
7
+ import { Payload as ProductListViewedEventPayload } from './productListViewedEvent/generated-types';
8
+ import { Payload as productRemovedEventPayload } from './productRemovedEvent/generated-types';
9
+ import { Payload as productViewedEventPayload } from './productViewedEvent/generated-types';
10
+ import { Payload as userRegisteredEventPayload } from './userRegisteredEvent/generated-types';
11
+ export declare const API_BASE = "https://unification.useinsider.com/api/";
12
+ export declare const UPSERT_ENDPOINT = "user/v1/upsert";
13
+ export interface insiderEvent {
14
+ event_name: string;
15
+ timestamp: string;
16
+ event_params: {
17
+ [key: string]: string | number | boolean;
18
+ };
19
+ }
20
+ export interface upsertUserPayload {
21
+ identifiers: {
22
+ uuid?: string | null | undefined;
23
+ custom?: object;
24
+ };
25
+ attributes: {
26
+ [key: string]: never;
27
+ };
28
+ events: insiderEvent[];
29
+ }
30
+ export declare function userProfilePayload(data: UserPayload): {
31
+ users: {
32
+ identifiers: {
33
+ uuid: string | undefined;
34
+ custom: {
35
+ segment_anonymous_id: string | undefined;
36
+ };
37
+ };
38
+ attributes: {
39
+ age: number | undefined;
40
+ birthday: string | undefined;
41
+ email: string | undefined;
42
+ name: string | undefined;
43
+ gender: string | undefined;
44
+ surname: string | undefined;
45
+ phone_number: string | undefined;
46
+ city: string | undefined;
47
+ country: string | undefined;
48
+ email_optin: boolean | undefined;
49
+ sms_optin: boolean | undefined;
50
+ whatsapp_optin: boolean | undefined;
51
+ language: string | undefined;
52
+ };
53
+ }[];
54
+ };
55
+ export declare function sendTrackEvent(data: TrackEventPayload | CartViewedEventPayload | CheckoutEventPayload | OrderCompletedEventPayload | ProductAddedEventPayload | ProductListViewedEventPayload | productRemovedEventPayload | productViewedEventPayload | userRegisteredEventPayload, event_name: string): {
56
+ users: upsertUserPayload[];
57
+ };
@@ -0,0 +1,153 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendTrackEvent = exports.userProfilePayload = exports.UPSERT_ENDPOINT = exports.API_BASE = void 0;
4
+ exports.API_BASE = 'https://unification.useinsider.com/api/';
5
+ exports.UPSERT_ENDPOINT = 'user/v1/upsert';
6
+ function userProfilePayload(data) {
7
+ const identifiers = {
8
+ uuid: data.uuid,
9
+ custom: {
10
+ segment_anonymous_id: data.segment_anonymous_id
11
+ }
12
+ };
13
+ if (data.email_as_identifier) {
14
+ identifiers['email'] = data.email;
15
+ }
16
+ if (data.phone_number_as_identifier) {
17
+ identifiers['phone_number'] = data.phone;
18
+ }
19
+ return {
20
+ users: [
21
+ {
22
+ identifiers,
23
+ attributes: {
24
+ age: data.age,
25
+ birthday: data.birthday,
26
+ email: data.email,
27
+ name: data.firstName,
28
+ gender: data.gender,
29
+ surname: data.lastName,
30
+ phone_number: data.phone,
31
+ city: data.city,
32
+ country: data.country,
33
+ email_optin: data.emailOptin,
34
+ sms_optin: data.smsOptin,
35
+ whatsapp_optin: data.whatsappOptin,
36
+ language: data.language?.replace('-', '_')
37
+ }
38
+ }
39
+ ]
40
+ };
41
+ }
42
+ exports.userProfilePayload = userProfilePayload;
43
+ function sendTrackEvent(data, event_name) {
44
+ const addEventParameters = function (event, data, parameter) {
45
+ parameter = parameter.toString().toLowerCase().trim().split(' ').join('_');
46
+ if (parameter === 'taxonomy') {
47
+ event.event_params[parameter] = [data[parameter]];
48
+ }
49
+ else if (defaultEvents.indexOf(parameter) > -1) {
50
+ event.event_params[parameter] = data[parameter];
51
+ }
52
+ else if (data) {
53
+ event.event_params.custom[parameter] = data[parameter];
54
+ }
55
+ return event;
56
+ };
57
+ const identifiers = {
58
+ uuid: data.uuid,
59
+ custom: {
60
+ segment_anonymous_id: data.segment_anonymous_id
61
+ }
62
+ };
63
+ if (data.email_as_identifier && data?.attributes?.email) {
64
+ identifiers['email'] = data?.attributes?.email;
65
+ }
66
+ if (data.phone_number_as_identifier && data?.attributes?.phone) {
67
+ identifiers['phone_number'] = data?.attributes?.phone;
68
+ }
69
+ const payload = {
70
+ identifiers,
71
+ attributes: {
72
+ custom: {}
73
+ },
74
+ events: []
75
+ };
76
+ const defaultAttributes = [
77
+ 'email',
78
+ 'phone',
79
+ 'age',
80
+ 'birthday',
81
+ 'name',
82
+ 'gender',
83
+ 'surname',
84
+ 'city',
85
+ 'country',
86
+ 'app_version',
87
+ 'idfa',
88
+ 'model',
89
+ 'last_ip',
90
+ 'carrier',
91
+ 'os_version',
92
+ 'platform',
93
+ 'timezone',
94
+ 'locale'
95
+ ];
96
+ const defaultEvents = [
97
+ 'campaign_id',
98
+ 'campaign_name',
99
+ 'url',
100
+ 'product_id',
101
+ 'user_agent',
102
+ 'taxonomy',
103
+ 'name',
104
+ 'variant_id',
105
+ 'unit_sale_price',
106
+ 'unit_price',
107
+ 'quantity',
108
+ 'product_image_url',
109
+ 'event_group_id',
110
+ 'referrer',
111
+ 'currency'
112
+ ];
113
+ for (const key of Object.keys(data.attributes || {})) {
114
+ const attributeName = key.toString().toLowerCase().trim().split(' ').join('_').toString();
115
+ if (attributeName === 'locale' && data.attributes) {
116
+ payload.attributes[attributeName] = data.attributes[attributeName]
117
+ ?.split('-')
118
+ .join('_');
119
+ }
120
+ else if (defaultAttributes.indexOf(attributeName) > -1 && data.attributes) {
121
+ payload.attributes[attributeName] = data.attributes[attributeName];
122
+ }
123
+ else if (data.attributes) {
124
+ payload.attributes.custom[attributeName] =
125
+ data.attributes[attributeName];
126
+ }
127
+ }
128
+ let event = {
129
+ event_name,
130
+ timestamp: data.timestamp.toString(),
131
+ event_params: {
132
+ custom: {}
133
+ }
134
+ };
135
+ for (const key of Object.keys(data.parameters || {})) {
136
+ event = addEventParameters(event, data.parameters, key);
137
+ }
138
+ if (data.products) {
139
+ for (const product of data.products) {
140
+ let productEvent = event;
141
+ for (const key of Object.keys(product || {})) {
142
+ productEvent = addEventParameters(productEvent, product, key);
143
+ }
144
+ payload.events.push(productEvent);
145
+ }
146
+ }
147
+ else {
148
+ payload.events.push(event);
149
+ }
150
+ return { users: [payload] };
151
+ }
152
+ exports.sendTrackEvent = sendTrackEvent;
153
+ //# sourceMappingURL=insider-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insider-helpers.js","sourceRoot":"","sources":["../../../src/destinations/insider/insider-helpers.ts"],"names":[],"mappings":";;;AAWa,QAAA,QAAQ,GAAG,yCAAyC,CAAA;AACpD,QAAA,eAAe,GAAG,gBAAgB,CAAA;AAiB/C,SAAgB,kBAAkB,CAAC,IAAiB;IAClD,MAAM,WAAW,GAAG;QAClB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,MAAM,EAAE;YACN,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;SAChD;KACF,CAAA;IAED,IAAI,IAAI,CAAC,mBAAmB,EAAE;QAG5B,WAAW,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAA;KAClC;IAED,IAAI,IAAI,CAAC,0BAA0B,EAAE;QAGnC,WAAW,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,KAAK,CAAA;KACzC;IAED,OAAO;QACL,KAAK,EAAE;YACL;gBACE,WAAW;gBACX,UAAU,EAAE;oBACV,GAAG,EAAE,IAAI,CAAC,GAAG;oBACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;oBACvB,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,IAAI,EAAE,IAAI,CAAC,SAAS;oBACpB,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,OAAO,EAAE,IAAI,CAAC,QAAQ;oBACtB,YAAY,EAAE,IAAI,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AAE,CAAC,OAAO,CAAC,EAAE,CAAA;AAC7B,CAAC;AAnLD,wCAmLC"}
@@ -0,0 +1,13 @@
1
+ import { InputField } from '@segment/actions-core/src/destination-kit/types';
2
+ export declare const getEventParameteres: (wantedParameters: string[]) => InputField;
3
+ export declare const email_as_identifier: InputField;
4
+ export declare const phone_number_as_identifier: InputField;
5
+ export declare const uuid: InputField;
6
+ export declare const segment_anonymous_id: InputField;
7
+ export declare const event_name: InputField;
8
+ export declare const timestamp: InputField;
9
+ export declare const products: InputField;
10
+ export declare const cart_event_parameters: InputField;
11
+ export declare const checkout_event_parameters: InputField;
12
+ export declare const order_event_parameters: InputField;
13
+ export declare const user_attributes: InputField;