@segment/action-destinations 3.251.0 → 3.251.1-staging

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 (164) hide show
  1. package/dist/destinations/engage/sendgrid/Profile.d.ts +6 -0
  2. package/dist/destinations/engage/sendgrid/Profile.js +3 -0
  3. package/dist/destinations/engage/sendgrid/Profile.js.map +1 -0
  4. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +21 -0
  5. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +174 -0
  6. package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +1 -0
  7. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +1 -0
  8. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js +19 -11
  9. package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +1 -1
  10. package/dist/destinations/engage/utils/track.d.ts +17 -17
  11. package/dist/destinations/klaviyo/index.js +1 -1
  12. package/dist/destinations/klaviyo/properties.js +1 -1
  13. package/dist/destinations/linkedin-conversions/api/api.test.js +32 -14
  14. package/dist/destinations/linkedin-conversions/api/api.test.js.map +1 -1
  15. package/dist/destinations/linkedin-conversions/api/index.d.ts +8 -6
  16. package/dist/destinations/linkedin-conversions/api/index.js +66 -17
  17. package/dist/destinations/linkedin-conversions/api/index.js.map +1 -1
  18. package/dist/destinations/linkedin-conversions/constants.d.ts +7 -0
  19. package/dist/destinations/linkedin-conversions/constants.js +45 -1
  20. package/dist/destinations/linkedin-conversions/constants.js.map +1 -1
  21. package/dist/destinations/linkedin-conversions/streamConversion/generated-types.d.ts +6 -2
  22. package/dist/destinations/linkedin-conversions/streamConversion/index.js +74 -43
  23. package/dist/destinations/linkedin-conversions/streamConversion/index.js.map +1 -1
  24. package/dist/destinations/linkedin-conversions/types.d.ts +5 -0
  25. package/dist/destinations/marketo-static-lists/addToList/generated-types.d.ts +13 -1
  26. package/dist/destinations/marketo-static-lists/addToList/index.js +69 -2
  27. package/dist/destinations/marketo-static-lists/addToList/index.js.map +1 -1
  28. package/dist/destinations/marketo-static-lists/constants.d.ts +10 -3
  29. package/dist/destinations/marketo-static-lists/constants.js +2 -14
  30. package/dist/destinations/marketo-static-lists/constants.js.map +1 -1
  31. package/dist/destinations/marketo-static-lists/functions.d.ts +18 -1
  32. package/dist/destinations/marketo-static-lists/functions.js +87 -1
  33. package/dist/destinations/marketo-static-lists/functions.js.map +1 -1
  34. package/dist/destinations/marketo-static-lists/index.js +4 -42
  35. package/dist/destinations/marketo-static-lists/index.js.map +1 -1
  36. package/dist/destinations/marketo-static-lists/properties.js +1 -2
  37. package/dist/destinations/marketo-static-lists/properties.js.map +1 -1
  38. package/dist/destinations/marketo-static-lists/removeFromList/generated-types.d.ts +1 -1
  39. package/dist/destinations/mixpanel/utils.d.ts +13 -0
  40. package/dist/destinations/mixpanel/utils.js +117 -0
  41. package/dist/destinations/mixpanel/utils.js.map +1 -0
  42. package/dist/destinations/moloco-rmp/addToCart/generated-types.d.ts +28 -0
  43. package/dist/destinations/moloco-rmp/addToCart/generated-types.js +3 -0
  44. package/dist/destinations/moloco-rmp/addToCart/generated-types.js.map +1 -0
  45. package/dist/destinations/moloco-rmp/addToCart/index.d.ts +5 -0
  46. package/dist/destinations/moloco-rmp/addToCart/index.js +44 -0
  47. package/dist/destinations/moloco-rmp/addToCart/index.js.map +1 -0
  48. package/dist/destinations/moloco-rmp/addToWishlist/generated-types.d.ts +32 -0
  49. package/dist/destinations/moloco-rmp/addToWishlist/generated-types.js +3 -0
  50. package/dist/destinations/moloco-rmp/addToWishlist/generated-types.js.map +1 -0
  51. package/dist/destinations/moloco-rmp/addToWishlist/index.d.ts +5 -0
  52. package/dist/destinations/moloco-rmp/addToWishlist/index.js +45 -0
  53. package/dist/destinations/moloco-rmp/addToWishlist/index.js.map +1 -0
  54. package/dist/destinations/moloco-rmp/common/convert.d.ts +9 -0
  55. package/dist/destinations/moloco-rmp/common/convert.js +83 -0
  56. package/dist/destinations/moloco-rmp/common/convert.js.map +1 -0
  57. package/dist/destinations/moloco-rmp/common/event.d.ts +10 -0
  58. package/dist/destinations/moloco-rmp/common/event.js +15 -0
  59. package/dist/destinations/moloco-rmp/common/event.js.map +1 -0
  60. package/dist/destinations/moloco-rmp/common/fields.d.ts +14 -0
  61. package/dist/destinations/moloco-rmp/common/fields.js +348 -0
  62. package/dist/destinations/moloco-rmp/common/fields.js.map +1 -0
  63. package/dist/destinations/moloco-rmp/common/payload/moloco.d.ts +35 -0
  64. package/dist/destinations/moloco-rmp/common/payload/moloco.js +3 -0
  65. package/dist/destinations/moloco-rmp/common/payload/moloco.js.map +1 -0
  66. package/dist/destinations/moloco-rmp/common/payload/segment.d.ts +40 -0
  67. package/dist/destinations/moloco-rmp/common/payload/segment.js +3 -0
  68. package/dist/destinations/moloco-rmp/common/payload/segment.js.map +1 -0
  69. package/dist/destinations/moloco-rmp/common/request-client.d.ts +11 -0
  70. package/dist/destinations/moloco-rmp/common/request-client.js +28 -0
  71. package/dist/destinations/moloco-rmp/common/request-client.js.map +1 -0
  72. package/dist/destinations/moloco-rmp/common/settings.d.ts +4 -0
  73. package/dist/destinations/moloco-rmp/common/settings.js +3 -0
  74. package/dist/destinations/moloco-rmp/common/settings.js.map +1 -0
  75. package/dist/destinations/moloco-rmp/generated-types.d.ts +5 -0
  76. package/dist/destinations/moloco-rmp/generated-types.js +3 -0
  77. package/dist/destinations/moloco-rmp/generated-types.js.map +1 -0
  78. package/dist/destinations/moloco-rmp/home/generated-types.d.ts +28 -0
  79. package/dist/destinations/moloco-rmp/home/generated-types.js +3 -0
  80. package/dist/destinations/moloco-rmp/home/generated-types.js.map +1 -0
  81. package/dist/destinations/moloco-rmp/home/index.d.ts +5 -0
  82. package/dist/destinations/moloco-rmp/home/index.js +29 -0
  83. package/dist/destinations/moloco-rmp/home/index.js.map +1 -0
  84. package/dist/destinations/moloco-rmp/index.d.ts +4 -0
  85. package/dist/destinations/moloco-rmp/index.js +117 -0
  86. package/dist/destinations/moloco-rmp/index.js.map +1 -0
  87. package/dist/destinations/moloco-rmp/itemPageView/generated-types.d.ts +28 -0
  88. package/dist/destinations/moloco-rmp/itemPageView/generated-types.js +3 -0
  89. package/dist/destinations/moloco-rmp/itemPageView/generated-types.js.map +1 -0
  90. package/dist/destinations/moloco-rmp/itemPageView/index.d.ts +5 -0
  91. package/dist/destinations/moloco-rmp/itemPageView/index.js +44 -0
  92. package/dist/destinations/moloco-rmp/itemPageView/index.js.map +1 -0
  93. package/dist/destinations/moloco-rmp/land/generated-types.d.ts +29 -0
  94. package/dist/destinations/moloco-rmp/land/generated-types.js +3 -0
  95. package/dist/destinations/moloco-rmp/land/generated-types.js.map +1 -0
  96. package/dist/destinations/moloco-rmp/land/index.d.ts +5 -0
  97. package/dist/destinations/moloco-rmp/land/index.js +33 -0
  98. package/dist/destinations/moloco-rmp/land/index.js.map +1 -0
  99. package/dist/destinations/moloco-rmp/pageView/generated-types.d.ts +29 -0
  100. package/dist/destinations/moloco-rmp/pageView/generated-types.js +3 -0
  101. package/dist/destinations/moloco-rmp/pageView/generated-types.js.map +1 -0
  102. package/dist/destinations/moloco-rmp/pageView/index.d.ts +5 -0
  103. package/dist/destinations/moloco-rmp/pageView/index.js +36 -0
  104. package/dist/destinations/moloco-rmp/pageView/index.js.map +1 -0
  105. package/dist/destinations/moloco-rmp/purchase/generated-types.d.ts +36 -0
  106. package/dist/destinations/moloco-rmp/purchase/generated-types.js +3 -0
  107. package/dist/destinations/moloco-rmp/purchase/generated-types.js.map +1 -0
  108. package/dist/destinations/moloco-rmp/purchase/index.d.ts +5 -0
  109. package/dist/destinations/moloco-rmp/purchase/index.js +37 -0
  110. package/dist/destinations/moloco-rmp/purchase/index.js.map +1 -0
  111. package/dist/destinations/moloco-rmp/search/generated-types.d.ts +30 -0
  112. package/dist/destinations/moloco-rmp/search/generated-types.js +3 -0
  113. package/dist/destinations/moloco-rmp/search/generated-types.js.map +1 -0
  114. package/dist/destinations/moloco-rmp/search/index.d.ts +5 -0
  115. package/dist/destinations/moloco-rmp/search/index.js +34 -0
  116. package/dist/destinations/moloco-rmp/search/index.js.map +1 -0
  117. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +14 -0
  118. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js +3 -0
  119. package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +1 -0
  120. package/dist/destinations/responsys/asyncMergePetRecords/index.d.ts +5 -0
  121. package/dist/destinations/responsys/asyncMergePetRecords/index.js +113 -0
  122. package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +1 -0
  123. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +20 -0
  124. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js +3 -0
  125. package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +1 -0
  126. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.d.ts +5 -0
  127. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +174 -0
  128. package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +1 -0
  129. package/dist/destinations/responsys/index.d.ts +1 -1
  130. package/dist/destinations/responsys/index.js +12 -2
  131. package/dist/destinations/responsys/index.js.map +1 -1
  132. package/dist/destinations/responsys/rsp-operations.d.ts +14 -0
  133. package/dist/destinations/responsys/rsp-operations.js +33 -0
  134. package/dist/destinations/responsys/rsp-operations.js.map +1 -0
  135. package/dist/destinations/responsys/rsp-properties.d.ts +4 -0
  136. package/dist/destinations/responsys/rsp-properties.js +27 -0
  137. package/dist/destinations/responsys/rsp-properties.js.map +1 -0
  138. package/dist/destinations/responsys/sendAudience/generated-types.d.ts +2 -0
  139. package/dist/destinations/responsys/sendAudience/index.js +25 -6
  140. package/dist/destinations/responsys/sendAudience/index.js.map +1 -1
  141. package/dist/destinations/responsys/sendCustomTraits/generated-types.d.ts +2 -0
  142. package/dist/destinations/responsys/sendCustomTraits/index.js +25 -6
  143. package/dist/destinations/responsys/sendCustomTraits/index.js.map +1 -1
  144. package/dist/destinations/responsys/upsertListMember/generated-types.d.ts +1 -0
  145. package/dist/destinations/responsys/upsertListMember/index.js +8 -1
  146. package/dist/destinations/responsys/upsertListMember/index.js.map +1 -1
  147. package/dist/destinations/responsys/utils.d.ts +3 -1
  148. package/dist/destinations/responsys/utils.js +23 -7
  149. package/dist/destinations/responsys/utils.js.map +1 -1
  150. package/dist/destinations/segment-profiles/index.js +3 -1
  151. package/dist/destinations/segment-profiles/index.js.map +1 -1
  152. package/dist/destinations/segment-profiles/segment-properties.d.ts +2 -0
  153. package/dist/destinations/segment-profiles/segment-properties.js +14 -1
  154. package/dist/destinations/segment-profiles/segment-properties.js.map +1 -1
  155. package/dist/destinations/segment-profiles/sendTrack/generated-types.d.ts +11 -0
  156. package/dist/destinations/segment-profiles/sendTrack/generated-types.js +3 -0
  157. package/dist/destinations/segment-profiles/sendTrack/generated-types.js.map +1 -0
  158. package/dist/destinations/segment-profiles/sendTrack/index.d.ts +5 -0
  159. package/dist/destinations/segment-profiles/sendTrack/index.js +42 -0
  160. package/dist/destinations/segment-profiles/sendTrack/index.js.map +1 -0
  161. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +3 -0
  162. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +43 -0
  163. package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +1 -0
  164. package/package.json +3 -3
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const event_1 = require("../common/event");
4
+ const fields_1 = require("../common/fields");
5
+ const request_client_1 = require("../common/request-client");
6
+ const convert_1 = require("../common/convert");
7
+ const action = {
8
+ title: 'Add to Cart',
9
+ description: 'Represents a user adding an item to their cart',
10
+ defaultSubscription: 'type = "track" and event = "Product Added"',
11
+ fields: {
12
+ event_id: fields_1.event_id,
13
+ timestamp: fields_1.timestamp,
14
+ user_id: fields_1.user_id,
15
+ device: fields_1.device,
16
+ session_id: fields_1.session_id,
17
+ default_currency: fields_1.default_currency,
18
+ items: {
19
+ ...fields_1.items,
20
+ required: true,
21
+ default: {
22
+ '@arrayPath': [
23
+ '$.properties',
24
+ {
25
+ id: { '@path': '$.product_id' },
26
+ price: { '@path': '$.price' },
27
+ currency: { '@path': '$.currency' },
28
+ quantity: { '@path': '$.quantity' },
29
+ seller_id: { '@path': '$.seller_id' }
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ page_id: fields_1.page_id,
35
+ page_identifier_tokens: fields_1.page_identifier_tokens
36
+ },
37
+ perform: (request, { payload, settings }) => {
38
+ const client = new request_client_1.MolocoAPIClient(request, settings);
39
+ const body = convert_1.convertEvent({ eventType: event_1.EventType.AddToCart, payload, settings });
40
+ return client.sendEvent(body);
41
+ }
42
+ };
43
+ exports.default = action;
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/moloco-rmp/addToCart/index.ts"],"names":[],"mappings":";;AACA,2CAA2C;AAC3C,6CAUyB;AACzB,6DAA0D;AAC1D,+CAAgD;AAIhD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,gDAAgD;IAC7D,mBAAmB,EAAE,4CAA4C;IACjE,MAAM,EAAE;QACN,QAAQ,EAAR,iBAAQ;QACR,SAAS,EAAT,kBAAS;QACT,OAAO,EAAP,gBAAO;QACP,MAAM,EAAN,eAAM;QACN,UAAU,EAAV,mBAAU;QACV,gBAAgB,EAAhB,yBAAgB;QAChB,KAAK,EAAE;YACL,GAAG,cAAK;YACR,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,YAAY,EAAE;oBACZ,cAAc;oBACd;wBACE,EAAE,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;wBAC/B,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;wBAC7B,QAAQ,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE;wBACnC,QAAQ,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE;wBACnC,SAAS,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;qBACtC;iBACF;aACF;SACF;QACD,OAAO,EAAP,gBAAO;QACP,sBAAsB,EAAtB,+BAAsB;KACvB;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,MAAM,MAAM,GAAG,IAAI,gCAAe,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;QACrD,MAAM,IAAI,GAAG,sBAAY,CAAC,EAAE,SAAS,EAAE,iBAAS,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAA;QAChF,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAC/B,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,32 @@
1
+ export interface Payload {
2
+ event_id?: string;
3
+ timestamp: string | number;
4
+ user_id?: string;
5
+ device?: {
6
+ os?: string;
7
+ os_version?: string;
8
+ advertising_id?: string;
9
+ unique_device_id?: string;
10
+ model?: string;
11
+ ua?: string;
12
+ language?: string;
13
+ ip?: string;
14
+ };
15
+ session_id?: string;
16
+ default_currency?: string;
17
+ items: {
18
+ id: string;
19
+ price?: number;
20
+ currency?: string;
21
+ quantity?: number;
22
+ seller_id?: string;
23
+ }[];
24
+ revenue?: {
25
+ price: number;
26
+ currency: string;
27
+ };
28
+ page_id?: string;
29
+ page_identifier_tokens?: {
30
+ [k: string]: unknown;
31
+ };
32
+ }
@@ -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/moloco-rmp/addToWishlist/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,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const event_1 = require("../common/event");
4
+ const fields_1 = require("../common/fields");
5
+ const request_client_1 = require("../common/request-client");
6
+ const convert_1 = require("../common/convert");
7
+ const action = {
8
+ title: 'Add to Wishlist',
9
+ description: 'Represents a user adding an item to their wishlist',
10
+ defaultSubscription: 'type = "track" and event = "Product Added to Wishlist"',
11
+ fields: {
12
+ event_id: fields_1.event_id,
13
+ timestamp: fields_1.timestamp,
14
+ user_id: fields_1.user_id,
15
+ device: fields_1.device,
16
+ session_id: fields_1.session_id,
17
+ default_currency: fields_1.default_currency,
18
+ items: {
19
+ ...fields_1.items,
20
+ required: true,
21
+ default: {
22
+ '@arrayPath': [
23
+ '$.properties',
24
+ {
25
+ id: { '@path': '$.product_id' },
26
+ price: { '@path': '$.price' },
27
+ currency: { '@path': '$.currency' },
28
+ quantity: { '@path': '$.quantity' },
29
+ seller_id: { '@path': '$.seller_id' }
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ revenue: fields_1.revenue,
35
+ page_id: fields_1.page_id,
36
+ page_identifier_tokens: fields_1.page_identifier_tokens
37
+ },
38
+ perform: (request, { payload, settings }) => {
39
+ const client = new request_client_1.MolocoAPIClient(request, settings);
40
+ const body = convert_1.convertEvent({ eventType: event_1.EventType.AddtoWishlist, payload, settings });
41
+ return client.sendEvent(body);
42
+ }
43
+ };
44
+ exports.default = action;
45
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/moloco-rmp/addToWishlist/index.ts"],"names":[],"mappings":";;AACA,2CAA2C;AAC3C,6CAWyB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mentEventPayload } from './payload/segment';
4
+ import { EventPayload as MolocoEventPayload } from './payload/moloco';
5
+ export declare function convertEvent(args: {
6
+ eventType: EventType;
7
+ payload: SegmentEventPayload;
8
+ settings: Settings;
9
+ }): MolocoEventPayload;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.convertEvent = void 0;
4
+ const actions_core_1 = require("@segment/actions-core");
5
+ function convertEvent(args) {
6
+ const { eventType, payload, settings } = args;
7
+ return {
8
+ event_type: eventType,
9
+ channel_type: settings.channel_type,
10
+ timestamp: payload.timestamp,
11
+ id: payload.event_id ?? undefined,
12
+ user_id: payload.user_id ?? undefined,
13
+ device: payload.device ? convertDevicePayload(payload.device) : undefined,
14
+ session_id: payload.session_id ?? undefined,
15
+ revenue: payload.revenue
16
+ ? {
17
+ amount: payload.revenue.price,
18
+ currency: payload.revenue.currency
19
+ }
20
+ : undefined,
21
+ search_query: payload.search_query ?? undefined,
22
+ referrer_page_id: payload.referrer_page_id ?? undefined,
23
+ shipping_charge: payload.shipping_charge
24
+ ? {
25
+ amount: payload.shipping_charge.price,
26
+ currency: payload.shipping_charge.currency
27
+ }
28
+ : undefined,
29
+ items: payload.items
30
+ ? payload.items.map((item) => convertItemPayload({ payload: item, defaultCurrency: payload.default_currency }))
31
+ : undefined,
32
+ page_id: payload.page_id ||
33
+ (payload.page_identifier_tokens ? convertPageIdentifierTokensToPageId(payload.page_identifier_tokens) : undefined)
34
+ };
35
+ }
36
+ exports.convertEvent = convertEvent;
37
+ function convertItemPayload(args) {
38
+ const { payload, defaultCurrency } = args;
39
+ const actualCurrency = payload.currency ?? defaultCurrency;
40
+ if ((payload.price !== undefined && actualCurrency === undefined) ||
41
+ (payload.price === undefined && actualCurrency !== undefined)) {
42
+ throw new actions_core_1.PayloadValidationError('Price and Currency/Default Currency should be both present or both absent');
43
+ }
44
+ return {
45
+ id: payload.id,
46
+ quantity: payload.quantity,
47
+ seller_id: payload.seller_id,
48
+ price: payload.price && actualCurrency
49
+ ? {
50
+ amount: payload.price,
51
+ currency: actualCurrency
52
+ }
53
+ : undefined
54
+ };
55
+ }
56
+ function convertOs(os) {
57
+ os = os.toUpperCase();
58
+ if (os === 'IPADOS') {
59
+ os = 'IOS';
60
+ }
61
+ return os;
62
+ }
63
+ function convertDevicePayload(payload) {
64
+ return {
65
+ os: payload.os ? convertOs(payload.os) : undefined,
66
+ os_version: payload.os_version ?? undefined,
67
+ advertising_id: payload.advertising_id ?? undefined,
68
+ unique_device_id: payload.unique_device_id ?? undefined,
69
+ model: payload.model ?? undefined,
70
+ ua: payload.ua ?? undefined,
71
+ language: payload.language ?? undefined,
72
+ ip: payload.ip ?? undefined
73
+ };
74
+ }
75
+ function convertPageIdentifierTokensToPageId(tokens) {
76
+ if (tokens === undefined) {
77
+ return '';
78
+ }
79
+ return Object.entries(tokens)
80
+ .map(([key, value]) => `${key}:${value}`)
81
+ .join(';');
82
+ }
83
+ //# sourceMappingURL=convert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert.js","sourceRoot":"","sources":["../../../../src/destinations/moloco-rmp/common/convert.ts"],"names":[],"mappings":";;;AAAA,wDAA8D;AAiB9D,SAAgB,YAAY,CAAC,IAI5B;IACC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;IAE7C,OAAO;QACL,UAAU,EAAE,SAAS;QACrB,YAAY,EAAE,QAAQ,CAAC,YAAY;QACnC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,EAAE,EAAE,OAAO,CAAC,QAAQ,IAAI,SAAS;QACjC,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,SAAS;QACrC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS;QACzE,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,SAAS;QAC3C,OAAO,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KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;SACxC,IAAI,CAAC,GAAG,CAAC,CAAA;AACd,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare enum EventType {
2
+ Search = "SEARCH",
3
+ ItemPageView = "ITEM_PAGE_VIEW",
4
+ AddToCart = "ADD_TO_CART",
5
+ Purchase = "PURCHASE",
6
+ AddtoWishlist = "ADD_TO_WISHLIST",
7
+ Home = "HOME",
8
+ Land = "LAND",
9
+ PageView = "PAGE_VIEW"
10
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventType = void 0;
4
+ var EventType;
5
+ (function (EventType) {
6
+ EventType["Search"] = "SEARCH";
7
+ EventType["ItemPageView"] = "ITEM_PAGE_VIEW";
8
+ EventType["AddToCart"] = "ADD_TO_CART";
9
+ EventType["Purchase"] = "PURCHASE";
10
+ EventType["AddtoWishlist"] = "ADD_TO_WISHLIST";
11
+ EventType["Home"] = "HOME";
12
+ EventType["Land"] = "LAND";
13
+ EventType["PageView"] = "PAGE_VIEW";
14
+ })(EventType = exports.EventType || (exports.EventType = {}));
15
+ //# sourceMappingURL=event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.js","sourceRoot":"","sources":["../../../../src/destinations/moloco-rmp/common/event.ts"],"names":[],"mappings":";;;AAAA,IAAY,SASX;AATD,WAAY,SAAS;IACnB,8BAAiB,CAAA;IACjB,4CAA+B,CAAA;IAC/B,sCAAyB,CAAA;IACzB,kCAAqB,CAAA;IACrB,8CAAiC,CAAA;IACjC,0BAAa,CAAA;IACb,0BAAa,CAAA;IACb,mCAAsB,CAAA;AACxB,CAAC,EATW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QASpB"}
@@ -0,0 +1,14 @@
1
+ import { InputField } from '@segment/actions-core/destination-kit/types';
2
+ export declare const event_id: InputField;
3
+ export declare const timestamp: InputField;
4
+ export declare const user_id: InputField;
5
+ export declare const device: InputField;
6
+ export declare const session_id: InputField;
7
+ export declare const default_currency: InputField;
8
+ export declare const items: InputField;
9
+ export declare const revenue: InputField;
10
+ export declare const search_query: InputField;
11
+ export declare const page_id: InputField;
12
+ export declare const page_identifier_tokens: InputField;
13
+ export declare const referrer_page_id: InputField;
14
+ export declare const shipping_charge: InputField;
@@ -0,0 +1,348 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.shipping_charge = exports.referrer_page_id = exports.page_identifier_tokens = exports.page_id = exports.search_query = exports.revenue = exports.items = exports.default_currency = exports.session_id = exports.device = exports.user_id = exports.timestamp = exports.event_id = void 0;
4
+ exports.event_id = {
5
+ label: 'Event ID',
6
+ description: 'Unique ID generated by the client to suppress duplicate events. The length should not exceed 128 characters.',
7
+ type: 'string',
8
+ required: false,
9
+ default: {
10
+ '@path': '$.messageId'
11
+ }
12
+ };
13
+ exports.timestamp = {
14
+ label: 'Timestamp',
15
+ description: 'Timestamp that the event happened at.',
16
+ type: 'datetime',
17
+ required: true,
18
+ default: {
19
+ '@path': '$.timestamp'
20
+ }
21
+ };
22
+ exports.user_id = {
23
+ label: 'User ID',
24
+ description: 'User Identifier for the platform. The length should not exceed 128 characters.',
25
+ type: 'string',
26
+ required: false,
27
+ default: {
28
+ '@path': '$.userId'
29
+ }
30
+ };
31
+ exports.device = {
32
+ label: 'Device',
33
+ description: `Device information of the event`,
34
+ type: 'object',
35
+ required: false,
36
+ properties: {
37
+ os: {
38
+ label: 'OS',
39
+ description: 'OS of the device. "ios" or "android" must be included for the APP channel type.',
40
+ type: 'string',
41
+ required: false
42
+ },
43
+ os_version: {
44
+ label: 'OS Version',
45
+ description: 'Device OS version, which is taken from the device without manipulation or normalization. (e.g., "14.4.1")',
46
+ type: 'string',
47
+ required: false
48
+ },
49
+ advertising_id: {
50
+ label: 'Advertising ID',
51
+ description: 'For app traffic, IDFA of iOS or ADID of android should be filled in this field. (e.g., 7acefbed-d1f6-4e4e-aa26-74e93dd017e4)',
52
+ type: 'string',
53
+ required: false
54
+ },
55
+ unique_device_id: {
56
+ label: 'Unique Device ID',
57
+ description: `For app traffic, a unique identifier for the device being used should be provided in this field.
58
+ Clients can issue identifiers for their user devices or use their IDFV values if using iOS apps.
59
+ The length of this id should not exceed 128 characters.`,
60
+ type: 'string',
61
+ required: false
62
+ },
63
+ model: {
64
+ label: 'Model',
65
+ description: 'Device model, which is taken from the device without manipulation or normalization. (e.g., "iPhone 11 Pro")',
66
+ type: 'string',
67
+ required: false
68
+ },
69
+ ua: {
70
+ label: 'User Agent',
71
+ description: 'User Agent. (e.g., "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/111FFF")',
72
+ type: 'string',
73
+ required: false
74
+ },
75
+ language: {
76
+ label: 'Language',
77
+ description: 'ISO-639-1 alpha-2 language code. (e.g., "en")',
78
+ type: 'string',
79
+ required: false
80
+ },
81
+ ip: {
82
+ label: 'IP Address',
83
+ description: 'IP in IPv4 format. (e.g., 216.212.237.213)',
84
+ type: 'string',
85
+ required: false
86
+ }
87
+ },
88
+ default: {
89
+ os: { '@path': '$.context.os.name' },
90
+ os_version: { '@path': '$.context.os.version' },
91
+ advertising_id: { '@path': '$.context.device.advertisingId' },
92
+ unique_device_id: { '@path': '$.context.device.id' },
93
+ model: { '@path': '$.context.device.model' },
94
+ ua: { '@path': '$.context.userAgent' },
95
+ ip: { '@path': '$.context.ip' }
96
+ }
97
+ };
98
+ exports.session_id = {
99
+ label: 'Session ID',
100
+ description: 'Identifier for tracking users regardless of sign-in status. The length should not exceed 128 characters.',
101
+ type: 'string',
102
+ required: false,
103
+ default: {
104
+ '@path': '$.anonymousId'
105
+ }
106
+ };
107
+ exports.default_currency = {
108
+ label: 'Default Currency',
109
+ description: 'The default currency value. Defaults to "USD". If this is set, it will be used as a default currency value for items.',
110
+ choices: [
111
+ { label: 'UNKNOWN_CURRENCY', value: 'UNKNOWN_CURRENCY' },
112
+ { label: 'USD', value: 'USD' },
113
+ { label: 'KRW', value: 'KRW' },
114
+ { label: 'JPY', value: 'JPY' },
115
+ { label: 'EUR', value: 'EUR' },
116
+ { label: 'GBP', value: 'GBP' },
117
+ { label: 'SEK', value: 'SEK' },
118
+ { label: 'INR', value: 'INR' },
119
+ { label: 'THB', value: 'THB' },
120
+ { label: 'IDR', value: 'IDR' },
121
+ { label: 'CNY', value: 'CNY' },
122
+ { label: 'CAD', value: 'CAD' },
123
+ { label: 'RUB', value: 'RUB' },
124
+ { label: 'BRL', value: 'BRL' },
125
+ { label: 'SGD', value: 'SGD' },
126
+ { label: 'HKD', value: 'HKD' },
127
+ { label: 'AUD', value: 'AUD' },
128
+ { label: 'PLN', value: 'PLN' },
129
+ { label: 'DKK', value: 'DKK' },
130
+ { label: 'VND', value: 'VND' },
131
+ { label: 'MYR', value: 'MYR' },
132
+ { label: 'PHP', value: 'PHP' },
133
+ { label: 'TRY', value: 'TRY' },
134
+ { label: 'VEF', value: 'VEF' }
135
+ ],
136
+ default: 'USD',
137
+ type: 'string',
138
+ required: false
139
+ };
140
+ exports.items = {
141
+ label: 'Items',
142
+ description: 'Item information list related to the event.',
143
+ type: 'object',
144
+ required: false,
145
+ multiple: true,
146
+ properties: {
147
+ id: {
148
+ label: 'ID',
149
+ description: 'Unique identifier of the Item.',
150
+ type: 'string',
151
+ required: true
152
+ },
153
+ price: {
154
+ label: 'Price',
155
+ description: 'Monetary amount without currency, e.g. 12.34. This field is required if the Currency field is populated.',
156
+ type: 'number',
157
+ required: false
158
+ },
159
+ currency: {
160
+ label: 'Currency',
161
+ description: 'Currency information. This field is required if the Price field is populated.',
162
+ choices: [
163
+ { label: 'UNKNOWN_CURRENCY', value: 'UNKNOWN_CURRENCY' },
164
+ { label: 'USD', value: 'USD' },
165
+ { label: 'KRW', value: 'KRW' },
166
+ { label: 'JPY', value: 'JPY' },
167
+ { label: 'EUR', value: 'EUR' },
168
+ { label: 'GBP', value: 'GBP' },
169
+ { label: 'SEK', value: 'SEK' },
170
+ { label: 'INR', value: 'INR' },
171
+ { label: 'THB', value: 'THB' },
172
+ { label: 'IDR', value: 'IDR' },
173
+ { label: 'CNY', value: 'CNY' },
174
+ { label: 'CAD', value: 'CAD' },
175
+ { label: 'RUB', value: 'RUB' },
176
+ { label: 'BRL', value: 'BRL' },
177
+ { label: 'SGD', value: 'SGD' },
178
+ { label: 'HKD', value: 'HKD' },
179
+ { label: 'AUD', value: 'AUD' },
180
+ { label: 'PLN', value: 'PLN' },
181
+ { label: 'DKK', value: 'DKK' },
182
+ { label: 'VND', value: 'VND' },
183
+ { label: 'MYR', value: 'MYR' },
184
+ { label: 'PHP', value: 'PHP' },
185
+ { label: 'TRY', value: 'TRY' },
186
+ { label: 'VEF', value: 'VEF' }
187
+ ],
188
+ type: 'string',
189
+ required: false
190
+ },
191
+ quantity: {
192
+ label: 'Quantity',
193
+ description: 'Quantity of the item. Recommended.',
194
+ type: 'integer',
195
+ required: false
196
+ },
197
+ seller_id: {
198
+ label: 'Seller ID',
199
+ description: 'Unique identifier of the Seller.',
200
+ type: 'string',
201
+ required: false
202
+ }
203
+ },
204
+ default: {
205
+ '@arrayPath': [
206
+ '$.properties.products',
207
+ {
208
+ id: { '@path': '$.product_id' },
209
+ price: { '@path': '$.price' },
210
+ currency: { '@path': '$.currency' },
211
+ quantity: { '@path': '$.quantity' },
212
+ seller_id: { '@path': '$.seller_id' }
213
+ }
214
+ ]
215
+ }
216
+ };
217
+ exports.revenue = {
218
+ label: 'Revenue',
219
+ description: 'Revenue of the event',
220
+ type: 'object',
221
+ required: false,
222
+ additionalProperties: false,
223
+ properties: {
224
+ price: {
225
+ label: 'Price',
226
+ description: 'Monetary amount without currency, e.g. 12.34. This field is required if the Currency field is populated.',
227
+ type: 'number',
228
+ required: true
229
+ },
230
+ currency: {
231
+ label: 'Currency',
232
+ description: 'Currency information. This field is required if the Price field is populated.',
233
+ choices: [
234
+ { label: 'UNKNOWN_CURRENCY', value: 'UNKNOWN_CURRENCY' },
235
+ { label: 'USD', value: 'USD' },
236
+ { label: 'KRW', value: 'KRW' },
237
+ { label: 'JPY', value: 'JPY' },
238
+ { label: 'EUR', value: 'EUR' },
239
+ { label: 'GBP', value: 'GBP' },
240
+ { label: 'SEK', value: 'SEK' },
241
+ { label: 'INR', value: 'INR' },
242
+ { label: 'THB', value: 'THB' },
243
+ { label: 'IDR', value: 'IDR' },
244
+ { label: 'CNY', value: 'CNY' },
245
+ { label: 'CAD', value: 'CAD' },
246
+ { label: 'RUB', value: 'RUB' },
247
+ { label: 'BRL', value: 'BRL' },
248
+ { label: 'SGD', value: 'SGD' },
249
+ { label: 'HKD', value: 'HKD' },
250
+ { label: 'AUD', value: 'AUD' },
251
+ { label: 'PLN', value: 'PLN' },
252
+ { label: 'DKK', value: 'DKK' },
253
+ { label: 'VND', value: 'VND' },
254
+ { label: 'MYR', value: 'MYR' },
255
+ { label: 'PHP', value: 'PHP' },
256
+ { label: 'TRY', value: 'TRY' },
257
+ { label: 'VEF', value: 'VEF' }
258
+ ],
259
+ type: 'string',
260
+ required: true
261
+ }
262
+ },
263
+ default: {
264
+ price: { '@path': '$.properties.revenue' },
265
+ currency: { '@path': '$.properties.currency' }
266
+ }
267
+ };
268
+ exports.search_query = {
269
+ label: 'Search Query',
270
+ description: 'Query string for the search.',
271
+ type: 'string',
272
+ required: false,
273
+ default: {
274
+ '@path': '$.properties.query'
275
+ }
276
+ };
277
+ exports.page_id = {
278
+ label: 'Page ID',
279
+ description: `A string value used to uniquely identify a page. For example: "electronics", "categories/12312", "azd911d" or "/classes/foo/lectures/bar".`,
280
+ type: 'string',
281
+ required: false,
282
+ default: {
283
+ '@path': '$.context.page.path'
284
+ }
285
+ };
286
+ exports.page_identifier_tokens = {
287
+ label: 'Page Identifier Tokens',
288
+ description: 'Tokens that can be used to identify a page. Alternative to page_id with a lower priority.',
289
+ type: 'object',
290
+ defaultObjectUI: 'keyvalue',
291
+ required: false
292
+ };
293
+ exports.referrer_page_id = {
294
+ label: 'Referrer Page ID',
295
+ description: 'Similar to referrer in HTTP, this value indicates from which page the user came to the current page.',
296
+ type: 'string',
297
+ required: false,
298
+ default: {
299
+ '@path': '$.context.page.referrer'
300
+ }
301
+ };
302
+ exports.shipping_charge = {
303
+ label: 'Shipping Charge',
304
+ description: 'Shipping charge’s monetary amount in a specific currency.',
305
+ type: 'object',
306
+ required: false,
307
+ properties: {
308
+ price: {
309
+ label: 'Price',
310
+ description: 'Monetary amount without currency, e.g. 12.34. This field is required if the Currency field is populated.',
311
+ type: 'number',
312
+ required: true
313
+ },
314
+ currency: {
315
+ label: 'Currency',
316
+ description: 'Currency information. This field is required if the Price field is populated.',
317
+ choices: [
318
+ { label: 'UNKNOWN_CURRENCY', value: 'UNKNOWN_CURRENCY' },
319
+ { label: 'USD', value: 'USD' },
320
+ { label: 'KRW', value: 'KRW' },
321
+ { label: 'JPY', value: 'JPY' },
322
+ { label: 'EUR', value: 'EUR' },
323
+ { label: 'GBP', value: 'GBP' },
324
+ { label: 'SEK', value: 'SEK' },
325
+ { label: 'INR', value: 'INR' },
326
+ { label: 'THB', value: 'THB' },
327
+ { label: 'IDR', value: 'IDR' },
328
+ { label: 'CNY', value: 'CNY' },
329
+ { label: 'CAD', value: 'CAD' },
330
+ { label: 'RUB', value: 'RUB' },
331
+ { label: 'BRL', value: 'BRL' },
332
+ { label: 'SGD', value: 'SGD' },
333
+ { label: 'HKD', value: 'HKD' },
334
+ { label: 'AUD', value: 'AUD' },
335
+ { label: 'PLN', value: 'PLN' },
336
+ { label: 'DKK', value: 'DKK' },
337
+ { label: 'VND', value: 'VND' },
338
+ { label: 'MYR', value: 'MYR' },
339
+ { label: 'PHP', value: 'PHP' },
340
+ { label: 'TRY', value: 'TRY' },
341
+ { label: 'VEF', value: 'VEF' }
342
+ ],
343
+ type: 'string',
344
+ required: true
345
+ }
346
+ }
347
+ };
348
+ //# sourceMappingURL=fields.js.map