@segment/action-destinations 3.125.1-pipedrive-issue.0 → 3.125.1-pipedrive-pe-20.124
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.
- package/README.md +1 -1
- package/dist/destinations/actable-predictive/index.js +1 -1
- package/dist/destinations/actable-predictive/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendCustomEvent/index.js +13 -13
- package/dist/destinations/actable-predictive/sendCustomEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js +21 -21
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js +29 -29
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendWebEvent/index.js +26 -26
- package/dist/destinations/actable-predictive/sendWebEvent/index.js.map +1 -1
- package/dist/destinations/clevertap/userDelete/index.js +4 -4
- package/dist/destinations/clevertap/userDelete/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/addToCart/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/addToCart/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/custom/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/custom/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/generated-types.d.ts +1 -0
- package/dist/destinations/facebook-conversions-api/index.js +7 -1
- package/dist/destinations/facebook-conversions-api/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/pageView/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/pageView/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/purchase/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/purchase/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/search/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/search/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/viewContent/index.js +2 -1
- package/dist/destinations/facebook-conversions-api/viewContent/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addPaymentInfo/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js +9 -3
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToCart/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/addToCart/index.js +9 -3
- package/dist/destinations/google-analytics-4/addToCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToWishlist/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/addToWishlist/index.js +9 -3
- package/dist/destinations/google-analytics-4/addToWishlist/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/beginCheckout/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/beginCheckout/index.js +9 -3
- package/dist/destinations/google-analytics-4/beginCheckout/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/customEvent/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/customEvent/index.js +9 -3
- package/dist/destinations/google-analytics-4/customEvent/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-functions.d.ts +3 -0
- package/dist/destinations/google-analytics-4/ga4-functions.js +31 -1
- package/dist/destinations/google-analytics-4/ga4-functions.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-properties.d.ts +2 -0
- package/dist/destinations/google-analytics-4/ga4-properties.js +17 -2
- package/dist/destinations/google-analytics-4/ga4-properties.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-types.d.ts +14 -0
- package/dist/destinations/google-analytics-4/ga4-types.js +6 -0
- package/dist/destinations/google-analytics-4/ga4-types.js.map +1 -1
- package/dist/destinations/google-analytics-4/generateLead/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/generateLead/index.js +9 -3
- package/dist/destinations/google-analytics-4/generateLead/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/generated-types.d.ts +2 -1
- package/dist/destinations/google-analytics-4/index.js +8 -10
- package/dist/destinations/google-analytics-4/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/login/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/login/index.js +9 -3
- package/dist/destinations/google-analytics-4/login/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/pageView/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/pageView/index.js +9 -3
- package/dist/destinations/google-analytics-4/pageView/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/purchase/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/purchase/index.js +9 -3
- package/dist/destinations/google-analytics-4/purchase/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/refund/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/refund/index.js +9 -3
- package/dist/destinations/google-analytics-4/refund/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/removeFromCart/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/removeFromCart/index.js +9 -3
- package/dist/destinations/google-analytics-4/removeFromCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/search/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/search/index.js +9 -3
- package/dist/destinations/google-analytics-4/search/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectItem/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/selectItem/index.js +9 -3
- package/dist/destinations/google-analytics-4/selectItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectPromotion/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/selectPromotion/index.js +9 -3
- package/dist/destinations/google-analytics-4/selectPromotion/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/signUp/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/signUp/index.js +9 -3
- package/dist/destinations/google-analytics-4/signUp/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewCart/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/viewCart/index.js +9 -3
- package/dist/destinations/google-analytics-4/viewCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItem/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/viewItem/index.js +9 -3
- package/dist/destinations/google-analytics-4/viewItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItemList/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/viewItemList/index.js +9 -3
- package/dist/destinations/google-analytics-4/viewItemList/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewPromotion/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/viewPromotion/index.js +9 -3
- package/dist/destinations/google-analytics-4/viewPromotion/index.js.map +1 -1
- package/dist/destinations/index.js +1 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/mixpanel/index.js +1 -1
- package/dist/destinations/mixpanel/mixpanel-properties.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/functions.js +1 -1
- package/dist/destinations/mixpanel/trackEvent/functions.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/index.js.map +1 -1
- package/dist/destinations/mixpanel/trackPurchase/index.js.map +1 -1
- package/dist/destinations/mixpanel/utils.js +1 -1
- package/dist/destinations/mixpanel/utils.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateActivity/index.js +44 -17
- package/dist/destinations/pipedrive/createUpdateActivity/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateDeal/index.js +39 -12
- package/dist/destinations/pipedrive/createUpdateDeal/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateLead/generated-types.d.ts +3 -8
- package/dist/destinations/pipedrive/createUpdateLead/index.js +62 -28
- package/dist/destinations/pipedrive/createUpdateLead/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateNote/generated-types.d.ts +1 -1
- package/dist/destinations/pipedrive/createUpdateNote/index.js +22 -13
- package/dist/destinations/pipedrive/createUpdateNote/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateOrganization/index.js +12 -3
- package/dist/destinations/pipedrive/createUpdateOrganization/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdatePerson/index.js +19 -4
- package/dist/destinations/pipedrive/createUpdatePerson/index.js.map +1 -1
- package/dist/destinations/pipedrive/index.d.ts +1 -1
- package/dist/destinations/pipedrive/index.js +22 -1
- package/dist/destinations/pipedrive/index.js.map +1 -1
- package/dist/destinations/pipedrive/pipedriveApi/leads.d.ts +5 -1
- package/dist/destinations/pipedrive/pipedriveApi/leads.js.map +1 -1
- package/dist/destinations/pipedrive/pipedriveApi/notes.d.ts +1 -1
- package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.d.ts +2 -1
- package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.js +7 -1
- package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.js.map +1 -1
- package/dist/destinations/vwo/generated-types.d.ts +3 -0
- package/dist/destinations/vwo/generated-types.js +3 -0
- package/dist/destinations/vwo/generated-types.js.map +1 -0
- package/dist/destinations/vwo/identifyUser/generated-types.d.ts +12 -0
- package/dist/destinations/vwo/identifyUser/generated-types.js +3 -0
- package/dist/destinations/vwo/identifyUser/generated-types.js.map +1 -0
- package/dist/destinations/vwo/identifyUser/index.d.ts +5 -0
- package/dist/destinations/vwo/identifyUser/index.js +80 -0
- package/dist/destinations/vwo/identifyUser/index.js.map +1 -0
- package/dist/destinations/vwo/index.d.ts +4 -0
- package/dist/destinations/vwo/index.js +60 -0
- package/dist/destinations/vwo/index.js.map +1 -0
- package/dist/destinations/vwo/pageVisit/generated-types.d.ts +10 -0
- package/dist/destinations/vwo/pageVisit/generated-types.js +3 -0
- package/dist/destinations/vwo/pageVisit/generated-types.js.map +1 -0
- package/dist/destinations/vwo/pageVisit/index.d.ts +5 -0
- package/dist/destinations/vwo/pageVisit/index.js +77 -0
- package/dist/destinations/vwo/pageVisit/index.js.map +1 -0
- package/dist/destinations/vwo/trackEvent/generated-types.d.ts +13 -0
- package/dist/destinations/vwo/trackEvent/generated-types.js +3 -0
- package/dist/destinations/vwo/trackEvent/generated-types.js.map +1 -0
- package/dist/destinations/vwo/trackEvent/index.d.ts +5 -0
- package/dist/destinations/vwo/trackEvent/index.js +86 -0
- package/dist/destinations/vwo/trackEvent/index.js.map +1 -0
- package/dist/destinations/vwo/types.d.ts +42 -0
- package/dist/destinations/vwo/types.js +3 -0
- package/dist/destinations/vwo/types.js.map +1 -0
- package/dist/destinations/vwo/utility.d.ts +13 -0
- package/dist/destinations/vwo/utility.js +59 -0
- package/dist/destinations/vwo/utility.js.map +1 -0
- package/package.json +4 -4
|
@@ -25,14 +25,17 @@ const action = {
|
|
|
25
25
|
type: 'string',
|
|
26
26
|
required: true,
|
|
27
27
|
default: {
|
|
28
|
-
'@path': '$.
|
|
28
|
+
'@path': '$.groupId'
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
name: {
|
|
32
32
|
label: 'Organization Name',
|
|
33
33
|
description: 'Name of the organization',
|
|
34
34
|
type: 'string',
|
|
35
|
-
required: false
|
|
35
|
+
required: false,
|
|
36
|
+
default: {
|
|
37
|
+
'@path': '$.traits.name'
|
|
38
|
+
}
|
|
36
39
|
},
|
|
37
40
|
visible_to: {
|
|
38
41
|
label: 'Visible To',
|
|
@@ -42,7 +45,10 @@ const action = {
|
|
|
42
45
|
{ label: 'Owner & followers (private)', value: 1 },
|
|
43
46
|
{ label: 'Entire company (shared)', value: 3 }
|
|
44
47
|
],
|
|
45
|
-
required: false
|
|
48
|
+
required: false,
|
|
49
|
+
default: {
|
|
50
|
+
'@path': '$.traits.visible_to'
|
|
51
|
+
}
|
|
46
52
|
},
|
|
47
53
|
add_time: {
|
|
48
54
|
label: 'Created At',
|
|
@@ -68,6 +74,9 @@ const action = {
|
|
|
68
74
|
add_time: payload.add_time ? `${payload.add_time}` : undefined,
|
|
69
75
|
visible_to: payload.visible_to
|
|
70
76
|
};
|
|
77
|
+
if (!organizationId)
|
|
78
|
+
if (payload.match_field && payload.match_value)
|
|
79
|
+
Object.assign(organization, { [payload.match_field]: payload.match_value });
|
|
71
80
|
utils_1.addCustomFieldsFromPayloadToEntity(payload, organization);
|
|
72
81
|
return organizations_1.createOrUpdateOrganizationById(request, settings.domain, organizationId, organization);
|
|
73
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/createUpdateOrganization/index.ts"],"names":[],"mappings":";;;;;AAGA,wFAA8D;AAC9D,iEAA4F;AAC5F,oCAA6D;AAE7D,MAAM,YAAY,GAAG,0BAAe,CAAC,YAAY,CAAA;AAEjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,+BAA+B;IACtC,WAAW,EAAE,2EAA2E;IACxF,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,2FAA2F;YACxG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,IAAI;SACd;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,wCAAwC;YACrD,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/createUpdateOrganization/index.ts"],"names":[],"mappings":";;;;;AAGA,wFAA8D;AAC9D,iEAA4F;AAC5F,oCAA6D;AAE7D,MAAM,YAAY,GAAG,0BAAe,CAAC,YAAY,CAAA;AAEjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,+BAA+B;IACtC,WAAW,EAAE,2EAA2E;IACxF,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB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M,MAAM,GAAG,IAAI,0BAAe,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QAErD,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,cAAc,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;QAE3F,MAAM,YAAY,GAAiB;YACjC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;YAC9D,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B,CAAA;QAED,IAAI,CAAC,cAAc;YACjB,IAAI,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,WAAW;gBAE5C,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;QAE/E,0CAAkC,CAAC,OAAO,EAAE,YAAY,CAAC,CAAA;QAEzD,OAAO,8CAA8B,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,cAAc,EAAE,YAAY,CAAC,CAAA;IAC/F,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -32,21 +32,30 @@ const action = {
|
|
|
32
32
|
label: 'Person Name',
|
|
33
33
|
description: 'Name of the person',
|
|
34
34
|
type: 'string',
|
|
35
|
-
required: false
|
|
35
|
+
required: false,
|
|
36
|
+
default: {
|
|
37
|
+
'@path': '$.traits.name'
|
|
38
|
+
}
|
|
36
39
|
},
|
|
37
40
|
email: {
|
|
38
41
|
label: 'Email Address',
|
|
39
42
|
description: 'Email addresses for this person.',
|
|
40
43
|
type: 'string',
|
|
41
44
|
required: false,
|
|
42
|
-
multiple: true
|
|
45
|
+
multiple: true,
|
|
46
|
+
default: {
|
|
47
|
+
'@path': '$.traits.email'
|
|
48
|
+
}
|
|
43
49
|
},
|
|
44
50
|
phone: {
|
|
45
51
|
label: 'Phone Number',
|
|
46
52
|
description: 'Phone numbers for the person.',
|
|
47
53
|
type: 'string',
|
|
48
54
|
required: false,
|
|
49
|
-
multiple: true
|
|
55
|
+
multiple: true,
|
|
56
|
+
default: {
|
|
57
|
+
'@path': '$.traits.phone'
|
|
58
|
+
}
|
|
50
59
|
},
|
|
51
60
|
visible_to: {
|
|
52
61
|
label: 'Visible To',
|
|
@@ -56,7 +65,10 @@ const action = {
|
|
|
56
65
|
{ label: 'Owner & followers (private)', value: 1 },
|
|
57
66
|
{ label: 'Entire company (shared)', value: 3 }
|
|
58
67
|
],
|
|
59
|
-
required: false
|
|
68
|
+
required: false,
|
|
69
|
+
default: {
|
|
70
|
+
'@path': '$.traits.visible_to'
|
|
71
|
+
}
|
|
60
72
|
},
|
|
61
73
|
add_time: {
|
|
62
74
|
label: 'Created At',
|
|
@@ -84,6 +96,9 @@ const action = {
|
|
|
84
96
|
add_time: payload.add_time ? `${payload.add_time}` : undefined,
|
|
85
97
|
visible_to: payload.visible_to
|
|
86
98
|
};
|
|
99
|
+
if (!personId)
|
|
100
|
+
if (payload.match_field)
|
|
101
|
+
Object.assign(person, { [payload.match_field]: payload.match_value });
|
|
87
102
|
utils_1.addCustomFieldsFromPayloadToEntity(payload, person);
|
|
88
103
|
return persons_1.createOrUpdatePersonById(request, settings.domain, personId, person);
|
|
89
104
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/createUpdatePerson/index.ts"],"names":[],"mappings":";;;;;AAGA,wFAA8D;AAC9D,qDAA0E;AAC1E,oCAA6D;AAE7D,MAAM,YAAY,GAAG,0BAAe,CAAC,YAAY,CAAA;AAEjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,sEAAsE;IACnF,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,qFAAqF;YAClG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,IAAI;SACd;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,kCAAkC;YAC/C,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/createUpdatePerson/index.ts"],"names":[],"mappings":";;;;;AAGA,wFAA8D;AAC9D,qDAA0E;AAC1E,oCAA6D;AAE7D,MAAM,YAAY,GAAG,0BAAe,CAAC,YAAY,CAAA;AAEjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,sEAAsE;IACnF,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,qFAAqF;YAClG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,IAAI;SACd;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,kCAAkC;YAC/C,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,eAAe;aACzB;SACF;QACD,KAAK,EAAE;YAC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D,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;QAE/E,MAAM,MAAM,GAAW;YACrB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;YAC9D,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B,CAAA;QAED,IAAI,CAAC,QAAQ;YACX,IAAI,OAAO,CAAC,WAAW;gBAErB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;QAEzE,0CAAkC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;QAEnD,OAAO,kCAAwB,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;IAC7E,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { DestinationDefinition } from '@segment/actions-core';
|
|
2
2
|
import type { Settings } from './generated-types';
|
|
3
3
|
declare const destination: DestinationDefinition<Settings>;
|
|
4
4
|
export default destination;
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const createUpdateOrganization_1 = __importDefault(require("./createUpdateOrganization"));
|
|
7
7
|
const createUpdatePerson_1 = __importDefault(require("./createUpdatePerson"));
|
|
8
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
8
9
|
const createUpdateActivity_1 = __importDefault(require("./createUpdateActivity"));
|
|
9
10
|
const createUpdateDeal_1 = __importDefault(require("./createUpdateDeal"));
|
|
10
11
|
const createUpdateLead_1 = __importDefault(require("./createUpdateLead"));
|
|
@@ -68,7 +69,27 @@ const destination = {
|
|
|
68
69
|
createUpdateDeal: createUpdateDeal_1.default,
|
|
69
70
|
createUpdateLead: createUpdateLead_1.default,
|
|
70
71
|
createUpdateNote: createUpdateNote_1.default
|
|
71
|
-
}
|
|
72
|
+
},
|
|
73
|
+
presets: [
|
|
74
|
+
{
|
|
75
|
+
name: 'Create or Update a Person',
|
|
76
|
+
subscribe: 'type = "identify"',
|
|
77
|
+
partnerAction: 'createUpdatePerson',
|
|
78
|
+
mapping: actions_core_1.defaultValues(createUpdatePerson_1.default.fields)
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'Create or Update an Organization',
|
|
82
|
+
subscribe: 'type = "group"',
|
|
83
|
+
partnerAction: 'createUpdateOrganization',
|
|
84
|
+
mapping: actions_core_1.defaultValues(createUpdateOrganization_1.default.fields)
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'Create or Update an Activity',
|
|
88
|
+
subscribe: 'type = "track" and event == "Activity Upserted"',
|
|
89
|
+
partnerAction: 'createUpdateActivity',
|
|
90
|
+
mapping: actions_core_1.defaultValues(createUpdateActivity_1.default.fields)
|
|
91
|
+
}
|
|
92
|
+
]
|
|
72
93
|
};
|
|
73
94
|
exports.default = destination;
|
|
74
95
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/pipedrive/index.ts"],"names":[],"mappings":";;;;;AAAA,0FAAiE;AACjE,8EAAqD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/pipedrive/index.ts"],"names":[],"mappings":";;;;;AAAA,0FAAiE;AACjE,8EAAqD;AACrD,wDAA4E;AAG5E,kFAAyD;AAEzD,0EAAiD;AAEjD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xB,kCAAwB;QACxB,kBAAkB,EAAlB,4BAAkB;QAClB,oBAAoB,EAApB,8BAAoB;QACpB,gBAAgB,EAAhB,0BAAgB;QAChB,gBAAgB,EAAhB,0BAAgB;QAChB,gBAAgB,EAAhB,0BAAgB;KACjB;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,2BAA2B;YACjC,SAAS,EAAE,mBAAmB;YAC9B,aAAa,EAAE,oBAAoB;YACnC,OAAO,EAAE,4BAAa,CAAC,4BAAkB,CAAC,MAAM,CAAC;SAClD;QACD;YACE,IAAI,EAAE,kCAAkC;YACxC,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,0BAA0B;YACzC,OAAO,EAAE,4BAAa,CAAC,kCAAwB,CAAC,MAAM,CAAC;SACxD;QACD;YACE,IAAI,EAAE,8BAA8B;YACpC,SAAS,EAAE,iDAAiD;YAC5D,aAAa,EAAE,sBAAsB;YACrC,OAAO,EAAE,4BAAa,CAAC,8BAAoB,CAAC,MAAM,CAAC;SACpD;KACF;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -4,9 +4,13 @@ export interface Lead extends Record<string, unknown> {
|
|
|
4
4
|
title: string;
|
|
5
5
|
expected_close_date?: string;
|
|
6
6
|
visible_to?: number;
|
|
7
|
-
id?:
|
|
7
|
+
id?: string;
|
|
8
8
|
person_id?: number;
|
|
9
9
|
organization_id?: number;
|
|
10
10
|
add_time?: string;
|
|
11
11
|
}
|
|
12
|
+
export declare type LeadValue = {
|
|
13
|
+
amount?: number;
|
|
14
|
+
currency?: string;
|
|
15
|
+
};
|
|
12
16
|
export declare function createUpdateLead(client: PipedriveClient, lead: Lead): Promise<ModifiedResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leads.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/pipedriveApi/leads.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"leads.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/pipedriveApi/leads.ts"],"names":[],"mappings":";;;AAoBO,KAAK,UAAU,gBAAgB,CAAC,MAAuB,EAAE,IAAU;IACxE,OAAO,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;AAC3C,CAAC;AAFD,4CAEC"}
|
|
@@ -22,7 +22,8 @@ declare class PipedriveClient {
|
|
|
22
22
|
createUpdate(itemPath: string, item: Record<string, unknown>): Promise<ModifiedResponse>;
|
|
23
23
|
post(path: string, payload: Record<string, unknown>): Promise<ModifiedResponse>;
|
|
24
24
|
put(path: string, payload: Record<string, unknown>): Promise<ModifiedResponse>;
|
|
25
|
-
|
|
25
|
+
patch(path: string, payload: Record<string, unknown>): Promise<ModifiedResponse>;
|
|
26
|
+
reqWithPayload(path: string, payload: Record<string, unknown>, method: 'post' | 'put' | 'patch'): Promise<ModifiedResponse<unknown>>;
|
|
26
27
|
static filterPayload(payload: Record<string, unknown>): void;
|
|
27
28
|
static fieldHandler(fieldType: keyof PipedriveFieldTypes): (request: RequestClient, { settings }: ExecuteInput<Settings, unknown>) => Promise<DynamicFieldResponse>;
|
|
28
29
|
}
|
|
@@ -88,7 +88,10 @@ class PipedriveClient {
|
|
|
88
88
|
if (item.id) {
|
|
89
89
|
const id = item.id;
|
|
90
90
|
delete item['id'];
|
|
91
|
-
|
|
91
|
+
if (itemPath == 'leads')
|
|
92
|
+
return this.patch(`${itemPath}/${id}`, item);
|
|
93
|
+
else
|
|
94
|
+
return this.put(`${itemPath}/${id}`, item);
|
|
92
95
|
}
|
|
93
96
|
return this.post(itemPath, item);
|
|
94
97
|
}
|
|
@@ -98,6 +101,9 @@ class PipedriveClient {
|
|
|
98
101
|
async put(path, payload) {
|
|
99
102
|
return this.reqWithPayload(path, payload, 'put');
|
|
100
103
|
}
|
|
104
|
+
async patch(path, payload) {
|
|
105
|
+
return this.reqWithPayload(path, payload, 'patch');
|
|
106
|
+
}
|
|
101
107
|
async reqWithPayload(path, payload, method) {
|
|
102
108
|
PipedriveClient.filterPayload(payload);
|
|
103
109
|
const urlBase = `https://${this.settings.domain}.pipedrive.com/api/v1`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipedrive-client.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/pipedriveApi/pipedrive-client.ts"],"names":[],"mappings":";;;;;AAEA,qDAA4B;AAa5B,MAAM,cAAc,GAAqB;IACvC,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,OAAO,EAAE,cAAc;IACvB,YAAY,EAAE,mBAAmB;CAClC,CAAA;AAED,MAAM,8BAA8B,GAAG;IACrC,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,cAAc;IACtB,OAAO,EAAE,eAAe;IACxB,YAAY,EAAE,oBAAoB;CACnC,CAAA;AAOD,MAAM,iBAAiB,GAAG;IACxB,GAAG,8BAA8B;IACjC,QAAQ,EAAE,gBAAgB;IAC1B,IAAI,EAAE,YAAY;CACnB,CAAA;AASD,MAAM,KAAK,GAAG,EAAE,CAAA;AAEhB,MAAM,eAAe;IAInB,YAAY,QAAkB,EAAE,OAAsB;QACpD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;IACzB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,IAAc,EAAE,SAAiB,EAAE,IAAa;QAC1D,IAAI,CAAC,IAAI,EAAE;YACT,OAAO,IAAI,CAAA;SACZ;QACD,MAAM,YAAY,GAA+B;YAC/C,IAAI;YACJ,SAAS,EAAE,SAAS;YACpB,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,cAAc,CAAC,IAAI,CAAC;SACjC,CAAA;QAED,IAAI,MAAM,GAAG,IAAI,CAAA;QACjB,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,CAAC,QAAQ,CAAC,MAAM,wCAAwC,EAAE;gBAC1G,YAAY,EAAE;oB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C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC5C,KAAK,EAAE,CAAC,CAAC,IAAI;YACb,KAAK,EAAE,CAAC,CAAC,UAAU;SACpB,CAAC,CAAC,CAAA;QACH,MAAM,MAAM,GAAG;YACb,OAAO,EAAE,MAAM;YACf,UAAU,EAAE,EAAE;SACf,CAAA;QACD,OAAO,MAAM,CAAA;IACf,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,QAAgB,EAAE,IAA6B;QAChE,IAAI,IAAI,CAAC,EAAE,EAAE;YACX,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAA;YAClB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAA;YACjB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"pipedrive-client.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/pipedriveApi/pipedrive-client.ts"],"names":[],"mappings":";;;;;AAEA,qDAA4B;AAa5B,MAAM,cAAc,GAAqB;IACvC,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,OAAO,EAAE,cAAc;IACvB,YAAY,EAAE,mBAAmB;CAClC,CAAA;AAED,MAAM,8BAA8B,GAAG;IACrC,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,cAAc;IACtB,OAAO,EAAE,eAAe;IACxB,YAAY,EAAE,oBAAoB;CACnC,CAAA;AAOD,MAAM,iBAAiB,GAAG;IACxB,GAAG,8BAA8B;IACjC,QAAQ,EAAE,gBAAgB;IAC1B,IAAI,EAAE,YAAY;CACnB,CAAA;AASD,MAAM,KAAK,GAAG,EAAE,CAAA;AAEhB,MAAM,eAAe;IAInB,YAAY,QAAkB,EAAE,OAAsB;QACpD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;IACzB,CAAC;IAED,K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|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/vwo/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/vwo/identifyUser/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utility_1 = require("../utility");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Identify User',
|
|
6
|
+
description: "Maps segment's visitor traits to VWO visitors' attributes",
|
|
7
|
+
defaultSubscription: 'type = "identify"',
|
|
8
|
+
fields: {
|
|
9
|
+
attributes: {
|
|
10
|
+
description: 'A JSON object containing additional attributes that will be associated with the event.',
|
|
11
|
+
label: 'attributes',
|
|
12
|
+
required: true,
|
|
13
|
+
type: 'object',
|
|
14
|
+
default: {
|
|
15
|
+
'@path': '$.traits'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
vwoUuid: {
|
|
19
|
+
description: 'VWO UUID',
|
|
20
|
+
label: 'VWO UUID',
|
|
21
|
+
required: true,
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: {
|
|
24
|
+
'@path': '$.traits.vwo_uuid'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
page: {
|
|
28
|
+
description: 'Page Context',
|
|
29
|
+
label: 'Page',
|
|
30
|
+
required: true,
|
|
31
|
+
type: 'object',
|
|
32
|
+
default: {
|
|
33
|
+
'@path': '$.context.page'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
ip: {
|
|
37
|
+
description: 'IP Address',
|
|
38
|
+
label: 'IP Address',
|
|
39
|
+
required: false,
|
|
40
|
+
type: 'string',
|
|
41
|
+
default: {
|
|
42
|
+
'@path': '$.context.ip'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
userAgent: {
|
|
46
|
+
description: 'User Agent',
|
|
47
|
+
label: 'User Agent',
|
|
48
|
+
required: true,
|
|
49
|
+
type: 'string',
|
|
50
|
+
default: {
|
|
51
|
+
'@path': '$.context.userAgent'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
timestamp: {
|
|
55
|
+
description: 'Timestamp',
|
|
56
|
+
label: 'Timestamp',
|
|
57
|
+
required: true,
|
|
58
|
+
type: 'string',
|
|
59
|
+
default: {
|
|
60
|
+
'@path': '$.timestamp'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
perform: (request, { settings, payload }) => {
|
|
65
|
+
const eventName = 'vwo_syncVisitorProp';
|
|
66
|
+
const attributes = payload.attributes;
|
|
67
|
+
delete attributes['vwo_uuid'];
|
|
68
|
+
const visitor = { props: utility_1.formatAttributes(attributes) };
|
|
69
|
+
const { headers, structuredPayload } = utility_1.formatPayload(eventName, payload, true);
|
|
70
|
+
structuredPayload.d.visitor = structuredPayload.d.event.props['$visitor'] = visitor;
|
|
71
|
+
const endpoint = `https://dev.visualwebsiteoptimizer.com/events/t?en=${eventName}&a=${settings.vwoAccountId}`;
|
|
72
|
+
return request(endpoint, {
|
|
73
|
+
method: 'POST',
|
|
74
|
+
json: structuredPayload,
|
|
75
|
+
headers
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
exports.default = action;
|
|
80
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/vwo/identifyUser/index.ts"],"names":[],"mappings":";;AAGA,wCAA4D;AAE5D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,2DAA2D;IACxE,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,UAAU,EAAE;YACV,WAAW,EAAE,wFAAwF;YACrG,KAAK,EAAE,YAAY;YACnB,QAAQ,EAAE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OAAO,EAAE,iBAAiB,EAAE,GAAG,uBAAa,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;QAC9E,iBAAiB,CAAC,CAAC,CAAC,OAAO,GAAG,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,OAAO,CAAA;QACnF,MAAM,QAAQ,GAAG,sDAAsD,SAAS,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAA;QAC7G,OAAO,OAAO,CAAC,QAAQ,EAAE;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,iBAAiB;YACvB,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
7
|
+
const trackEvent_1 = __importDefault(require("./trackEvent"));
|
|
8
|
+
const identifyUser_1 = __importDefault(require("./identifyUser"));
|
|
9
|
+
const pageVisit_1 = __importDefault(require("./pageVisit"));
|
|
10
|
+
const destination = {
|
|
11
|
+
name: 'VWO Cloud Mode (Actions)',
|
|
12
|
+
slug: 'actions-vwo-cloud',
|
|
13
|
+
mode: 'cloud',
|
|
14
|
+
presets: [
|
|
15
|
+
{
|
|
16
|
+
name: 'Track Event',
|
|
17
|
+
subscribe: 'type = "track"',
|
|
18
|
+
partnerAction: 'trackEvent',
|
|
19
|
+
mapping: actions_core_1.defaultValues(trackEvent_1.default.fields)
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'Identify User',
|
|
23
|
+
subscribe: 'type = "identify"',
|
|
24
|
+
partnerAction: 'identifyUser',
|
|
25
|
+
mapping: actions_core_1.defaultValues(identifyUser_1.default.fields)
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'Page Visit',
|
|
29
|
+
subscribe: 'type = "page"',
|
|
30
|
+
partnerAction: 'pageVisit',
|
|
31
|
+
mapping: actions_core_1.defaultValues(pageVisit_1.default.fields)
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
authentication: {
|
|
35
|
+
scheme: 'custom',
|
|
36
|
+
fields: {
|
|
37
|
+
vwoAccountId: {
|
|
38
|
+
label: 'Your VWO account ID, used for fetching your VWO async smart code. ',
|
|
39
|
+
description: 'Enter your VWO Account ID',
|
|
40
|
+
type: 'number',
|
|
41
|
+
required: true
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
testAuthentication: (_request, { settings }) => {
|
|
45
|
+
if (settings.vwoAccountId < 1 || settings.vwoAccountId.toString().length > 7) {
|
|
46
|
+
throw new Error('Invalid AccountID. Please check your AccountID');
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
actions: {
|
|
54
|
+
trackEvent: trackEvent_1.default,
|
|
55
|
+
identifyUser: identifyUser_1.default,
|
|
56
|
+
pageVisit: pageVisit_1.default
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
exports.default = destination;
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/vwo/index.ts"],"names":[],"mappings":";;;;;AAEA,wDAAqD;AAErD,8DAAqC;AACrC,kEAAyC;AACzC,4DAAmC;AAEnC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,OAAO;IACb,OAAO,EAAE;QACP;YACE,IAAI,EAAE,aAAa;YACnB,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,YAAY;YAC3B,OAAO,EAAE,4BAAa,CAAC,oBAAU,CAAC,MAAM,CAAC;SAC1C;QACD;YACE,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,mBAAmB;YAC9B,aAAa,EAAE,cAAc;YAC7B,OAAO,EAAE,4BAAa,CAAC,sBAAY,CAAC,MAAM,CAAC;SAC5C;QACD;YACE,IAAI,EAAE,YAAY;YAClB,SAAS,EAAE,eAAe;YAC1B,aAAa,EAAE,WAAW;YAC1B,OAAO,EAAE,4BAAa,CAAC,mBAAS,CAAC,MAAM,CAAC;SACzC;KACF;IACD,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,YAAY,EAAE;gBACZ,KAAK,EAAE,oEAAoE;gBAC3E,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC7C,IAAI,QAAQ,CAAC,YAAY,GAAG,CAAC,IAAI,QAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC5E,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;aAClE;iBAAM;gBACL,OAAO,IAAI,CAAA;aACZ;QACH,CAAC;KACF;IAED,OAAO,EAAE;QACP,UAAU,EAAV,oBAAU;QACV,YAAY,EAAZ,sBAAY;QACZ,SAAS,EAAT,mBAAS;KACV;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/vwo/pageVisit/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utility_1 = require("../utility");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Page Visit',
|
|
6
|
+
description: 'Sends page visit information to VWO',
|
|
7
|
+
fields: {
|
|
8
|
+
url: {
|
|
9
|
+
description: 'The URL of the page',
|
|
10
|
+
label: 'Page URL',
|
|
11
|
+
required: true,
|
|
12
|
+
type: 'string',
|
|
13
|
+
default: {
|
|
14
|
+
'@path': '$.context.page.url'
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
vwoUuid: {
|
|
18
|
+
description: 'VWO UUID',
|
|
19
|
+
label: 'VWO UUID',
|
|
20
|
+
required: true,
|
|
21
|
+
type: 'string',
|
|
22
|
+
default: {
|
|
23
|
+
'@path': '$.properties.vwo_uuid'
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
page: {
|
|
27
|
+
description: 'Page Context',
|
|
28
|
+
label: 'Page',
|
|
29
|
+
required: true,
|
|
30
|
+
type: 'object',
|
|
31
|
+
default: {
|
|
32
|
+
'@path': '$.context.page'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
ip: {
|
|
36
|
+
description: 'IP Address',
|
|
37
|
+
label: 'IP Address',
|
|
38
|
+
required: false,
|
|
39
|
+
type: 'string',
|
|
40
|
+
default: {
|
|
41
|
+
'@path': '$.context.ip'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
userAgent: {
|
|
45
|
+
description: 'User Agent',
|
|
46
|
+
label: 'User Agent',
|
|
47
|
+
required: true,
|
|
48
|
+
type: 'string',
|
|
49
|
+
default: {
|
|
50
|
+
'@path': '$.context.userAgent'
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
timestamp: {
|
|
54
|
+
description: 'Timestamp',
|
|
55
|
+
label: 'Timestamp',
|
|
56
|
+
required: true,
|
|
57
|
+
type: 'string',
|
|
58
|
+
default: {
|
|
59
|
+
'@path': '$.timestamp'
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
defaultSubscription: 'type = "page"',
|
|
64
|
+
perform: (request, { settings, payload }) => {
|
|
65
|
+
const eventName = 'vwo_pageView';
|
|
66
|
+
const { headers, structuredPayload } = utility_1.formatPayload(eventName, payload, false);
|
|
67
|
+
structuredPayload.d.event.props['url'] = payload.url;
|
|
68
|
+
const endpoint = `https://dev.visualwebsiteoptimizer.com/events/t?en=${eventName}&a=${settings.vwoAccountId}`;
|
|
69
|
+
return request(endpoint, {
|
|
70
|
+
method: 'POST',
|
|
71
|
+
json: structuredPayload,
|
|
72
|
+
headers
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
exports.default = action;
|
|
77
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/vwo/pageVisit/index.ts"],"names":[],"mappings":";;AAGA,wCAA0C;AAE1C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,qCAAqC;IAClD,MAAM,EAAE;QACN,GAAG,EAAE;YACH,WAAW,EAAE,qBAAqB;YAClC,KAAK,EAAE,UAAU;YACjB,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,oBAAoB;aAC9B;SACF;QACD,OAAO,EAAE;YACP,WAAW,EAAE,UAAU;YACvB,KAAK,EAAE,UAAU;YACjB,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,uBAAuB;aACjC;SACF;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,cAAc;YAC3B,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,gBAAgB;aAC1B;SACF;QACD,EAAE,EAAE;YACF,WAAW,EAAE,YAAY;YACzB,KAAK,EAAE,YAAY;YACnB,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;aACxB;SACF;QACD,SAAS,EAAE;YACT,WAAW,EAAE,YAAY;YACzB,KAAK,EAAE,YAAY;YACnB,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,qBAAqB;aAC/B;SACF;QACD,SAAS,EAAE;YACT,WAAW,EAAE,WAAW;YACxB,KAAK,EAAE,WAAW;YAClB,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;KACF;IACD,mBAAmB,EAAE,eAAe;IACpC,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,MAAM,SAAS,GAAG,cAAc,CAAA;QAChC,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,GAAG,uBAAa,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;QAC/E,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,GAAG,CAAA;QACpD,MAAM,QAAQ,GAAG,sDAAsD,SAAS,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAA;QAC7G,OAAO,OAAO,CAAC,QAAQ,EAAE;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,iBAAiB;YACvB,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/vwo/trackEvent/generated-types.ts"],"names":[],"mappings":""}
|