@segment/action-destinations 3.105.1-alpha.13 → 3.105.1-alpha.17
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/dist/destinations/actions-pardot/prospects/index.js.map +1 -1
- package/dist/destinations/adobe-target/adobeTarget_operations.d.ts +1 -1
- package/dist/destinations/adobe-target/adobeTarget_operations.js +14 -18
- package/dist/destinations/adobe-target/adobeTarget_operations.js.map +1 -1
- package/dist/destinations/amplitude/emptyObject.d.ts +2 -0
- package/dist/destinations/amplitude/emptyObject.js +7 -0
- package/dist/destinations/amplitude/emptyObject.js.map +1 -0
- package/dist/destinations/amplitude/index.js +3 -1
- package/dist/destinations/amplitude/index.js.map +1 -1
- package/dist/destinations/amplitude/logEvent/generated-types.d.ts +21 -0
- package/dist/destinations/amplitude/logEvent/index.js +96 -10
- package/dist/destinations/amplitude/logEvent/index.js.map +1 -1
- package/dist/destinations/amplitude/logEventV2/generated-types.d.ts +77 -0
- package/dist/destinations/{hubspot/company → amplitude/logEventV2}/generated-types.js +0 -0
- package/dist/destinations/amplitude/logEventV2/generated-types.js.map +1 -0
- package/dist/destinations/amplitude/logEventV2/index.d.ts +13 -0
- package/dist/destinations/amplitude/logEventV2/index.js +237 -0
- package/dist/destinations/amplitude/logEventV2/index.js.map +1 -0
- package/dist/destinations/cordial/addProductToCart/index.js +1 -1
- package/dist/destinations/cordial/addProductToCart/index.js.map +1 -1
- package/dist/destinations/cordial/index.js +1 -1
- package/dist/destinations/cordial/index.js.map +1 -1
- package/dist/destinations/cordial/removeProductFromCart/index.js.map +1 -1
- package/dist/destinations/cordial/upsertOrder/index.js +8 -8
- package/dist/destinations/cordial/upsertOrder/index.js.map +1 -1
- package/dist/destinations/customerio/trackEvent/index.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +4 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/addToCart/generated-types.d.ts +3 -0
- package/dist/destinations/facebook-conversions-api/addToCart/index.js +13 -2
- package/dist/destinations/facebook-conversions-api/addToCart/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/custom/generated-types.d.ts +3 -0
- package/dist/destinations/facebook-conversions-api/custom/index.js +13 -2
- package/dist/destinations/facebook-conversions-api/custom/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.d.ts +4 -0
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.js +32 -1
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout/generated-types.d.ts +3 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js +13 -2
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/pageView/generated-types.d.ts +3 -0
- package/dist/destinations/facebook-conversions-api/pageView/index.js +13 -2
- package/dist/destinations/facebook-conversions-api/pageView/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/purchase/generated-types.d.ts +3 -0
- package/dist/destinations/facebook-conversions-api/purchase/index.js +13 -2
- package/dist/destinations/facebook-conversions-api/purchase/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/search/generated-types.d.ts +3 -0
- package/dist/destinations/facebook-conversions-api/search/index.js +13 -2
- package/dist/destinations/facebook-conversions-api/search/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/viewContent/generated-types.d.ts +3 -0
- package/dist/destinations/facebook-conversions-api/viewContent/index.js +13 -2
- package/dist/destinations/facebook-conversions-api/viewContent/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/constants.d.ts +1 -0
- package/dist/destinations/google-enhanced-conversions/constants.js +185 -0
- package/dist/destinations/google-enhanced-conversions/constants.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/functions.d.ts +3 -0
- package/dist/destinations/google-enhanced-conversions/functions.js +34 -0
- package/dist/destinations/google-enhanced-conversions/functions.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/generated-types.d.ts +2 -1
- package/dist/destinations/google-enhanced-conversions/index.js +15 -8
- package/dist/destinations/google-enhanced-conversions/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js +7 -1
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/types.d.ts +15 -0
- package/dist/destinations/google-enhanced-conversions/types.js +3 -0
- package/dist/destinations/google-enhanced-conversions/types.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/generated-types.d.ts +11 -0
- package/dist/destinations/{hubspot/contact → google-enhanced-conversions/uploadCallConversion}/generated-types.js +0 -0
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/generated-types.js.map +1 -0
- package/dist/destinations/{hubspot/contact → google-enhanced-conversions/uploadCallConversion}/index.d.ts +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js +106 -0
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.d.ts +25 -0
- package/dist/destinations/{hubspot → google-enhanced-conversions/uploadClickConversion}/generated-types.js +0 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.js.map +1 -0
- package/dist/destinations/{hubspot/sendCustomBehavioralEvent → google-enhanced-conversions/uploadClickConversion}/index.d.ts +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +248 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/types.d.ts +5 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/types.js +3 -0
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/types.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/generated-types.d.ts +20 -0
- package/dist/destinations/{hubspot/sendCustomBehavioralEvent → google-enhanced-conversions/uploadConversionAdjustment}/generated-types.js +0 -0
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/generated-types.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.d.ts +5 -0
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js +269 -0
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js.map +1 -0
- package/dist/destinations/index.js +1 -1
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/mixpanel/index.js +1 -1
- package/dist/destinations/mixpanel/trackEvent/index.js.map +1 -1
- package/dist/destinations/salesforce/lead/index.js +2 -1
- package/dist/destinations/salesforce/lead/index.js.map +1 -1
- package/dist/destinations/salesforce-marketing-cloud/contact/generated-types.d.ts +2 -0
- package/dist/destinations/salesforce-marketing-cloud/contact/generated-types.js +3 -0
- package/dist/destinations/salesforce-marketing-cloud/contact/generated-types.js.map +1 -0
- package/dist/destinations/{hubspot/company → salesforce-marketing-cloud/contact}/index.d.ts +0 -0
- package/dist/destinations/salesforce-marketing-cloud/contact/index.js +11 -0
- package/dist/destinations/salesforce-marketing-cloud/contact/index.js.map +1 -0
- package/dist/destinations/{hubspot → salesforce-marketing-cloud}/generated-types.d.ts +0 -0
- package/dist/destinations/salesforce-marketing-cloud/generated-types.js +3 -0
- package/dist/destinations/salesforce-marketing-cloud/generated-types.js.map +1 -0
- package/dist/destinations/{hubspot → salesforce-marketing-cloud}/index.d.ts +0 -0
- package/dist/destinations/salesforce-marketing-cloud/index.js +27 -0
- package/dist/destinations/salesforce-marketing-cloud/index.js.map +1 -0
- package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.d.ts +13 -0
- package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.js +51 -0
- package/dist/destinations/salesforce-marketing-cloud/sfmc-operations.js.map +1 -0
- package/package.json +5 -4
- package/dist/destinations/hubspot/company/generated-types.d.ts +0 -11
- package/dist/destinations/hubspot/company/generated-types.js.map +0 -1
- package/dist/destinations/hubspot/company/index.js +0 -53
- package/dist/destinations/hubspot/company/index.js.map +0 -1
- package/dist/destinations/hubspot/contact/generated-types.d.ts +0 -11
- package/dist/destinations/hubspot/contact/generated-types.js.map +0 -1
- package/dist/destinations/hubspot/contact/index.js +0 -68
- package/dist/destinations/hubspot/contact/index.js.map +0 -1
- package/dist/destinations/hubspot/generated-types.js.map +0 -1
- package/dist/destinations/hubspot/index.js +0 -50
- package/dist/destinations/hubspot/index.js.map +0 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/generated-types.d.ts +0 -10
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/generated-types.js.map +0 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +0 -57
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +0 -1
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const action = {
|
|
4
|
-
title: 'Company',
|
|
5
|
-
description: 'Create or update a company in HubSpot.',
|
|
6
|
-
defaultSubscription: 'type = "group"',
|
|
7
|
-
fields: {
|
|
8
|
-
name: {
|
|
9
|
-
label: 'Name',
|
|
10
|
-
description: 'The company’s name.',
|
|
11
|
-
required: true,
|
|
12
|
-
type: 'string'
|
|
13
|
-
},
|
|
14
|
-
city: {
|
|
15
|
-
label: 'City',
|
|
16
|
-
description: 'City for the company’s address.',
|
|
17
|
-
type: 'string'
|
|
18
|
-
},
|
|
19
|
-
state: {
|
|
20
|
-
label: 'State',
|
|
21
|
-
description: 'State for the company’s address.',
|
|
22
|
-
type: 'string'
|
|
23
|
-
},
|
|
24
|
-
domain: {
|
|
25
|
-
label: 'Domain/Website',
|
|
26
|
-
description: 'Company’s domain name URL.',
|
|
27
|
-
type: 'string',
|
|
28
|
-
format: 'uri'
|
|
29
|
-
},
|
|
30
|
-
phone: {
|
|
31
|
-
label: 'Phone',
|
|
32
|
-
description: 'Phone number for the company',
|
|
33
|
-
type: 'string'
|
|
34
|
-
},
|
|
35
|
-
industry: {
|
|
36
|
-
label: 'Industry',
|
|
37
|
-
description: 'Industry to which the company belong from',
|
|
38
|
-
type: 'string'
|
|
39
|
-
},
|
|
40
|
-
otherFields: {
|
|
41
|
-
label: 'Other Fields',
|
|
42
|
-
description: 'Any other default or custom company properties. Custom properties must be predefined in HubSpot. More information in HubSpot documentation.',
|
|
43
|
-
type: 'object',
|
|
44
|
-
defaultObjectUI: 'keyvalue:only'
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
perform: (_request, data) => {
|
|
48
|
-
data.logger?.info(`Hubspot Cloud: Company Action: Received Transactio Node: ${JSON.stringify(data.transactionContext?.transaction)}`);
|
|
49
|
-
data.transactionContext?.setTransaction('contact_id', '801');
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
exports.default = action;
|
|
53
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/company/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,wCAAwC;IACrD,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,qBAAqB;YAClC,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;SACf;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,iCAAiC;YAC9C,IAAI,EAAE,QAAQ;SACf;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,kCAAkC;YAC/C,IAAI,EAAE,QAAQ;SACf;QACD,MAAM,EAAE;YACN,KAAK,EAAE,gBAAgB;YACvB,WAAW,EAAE,4BAA4B;YACzC,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,KAAK;SACd;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,8BAA8B;YAC3C,IAAI,EAAE,QAAQ;SACf;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,2CAA2C;YACxD,IAAI,EAAE,QAAQ;SACf;QACD,WAAW,EAAE;YACX,KAAK,EAAE,cAAc;YACrB,WAAW,EACT,6IAA6I;YAC/I,IAAI,EAAE,QAAQ;YACd,eAAe,EAAE,eAAe;SACjC;KACF;IACD,OAAO,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE;QAM1B,IAAI,CAAC,MAAM,EAAE,IAAI,CACf,4DAA4D,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,kBAAkB,EAAE,WAAW,CAAC,EAAE,CACnH,CAAA;QACD,IAAI,CAAC,kBAAkB,EAAE,cAAc,CAAC,YAAY,EAAE,KAAK,CAAC,CAAA;IAC9D,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/contact/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const action = {
|
|
4
|
-
title: 'Contact',
|
|
5
|
-
description: 'Create or update a contact in HubSpot.',
|
|
6
|
-
defaultSubscription: 'type = "identify"',
|
|
7
|
-
fields: {
|
|
8
|
-
email: {
|
|
9
|
-
label: 'Email',
|
|
10
|
-
description: 'The contact’s email.',
|
|
11
|
-
type: 'string',
|
|
12
|
-
required: true,
|
|
13
|
-
format: 'email'
|
|
14
|
-
},
|
|
15
|
-
company: {
|
|
16
|
-
label: 'Company',
|
|
17
|
-
description: 'The contact’s company.',
|
|
18
|
-
type: 'string'
|
|
19
|
-
},
|
|
20
|
-
firstname: {
|
|
21
|
-
label: 'First Name',
|
|
22
|
-
description: 'The contact’s first name.',
|
|
23
|
-
type: 'string',
|
|
24
|
-
default: {
|
|
25
|
-
'@if': {
|
|
26
|
-
exists: { '@path': '$.traits.first_name' },
|
|
27
|
-
then: { '@path': '$.traits.first_name' },
|
|
28
|
-
else: { '@path': '$.properties.first_name' }
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
lastname: {
|
|
33
|
-
label: 'Last Name',
|
|
34
|
-
description: 'The contact’s last name.',
|
|
35
|
-
type: 'string',
|
|
36
|
-
default: {
|
|
37
|
-
'@if': {
|
|
38
|
-
exists: { '@path': '$.traits.last_name' },
|
|
39
|
-
then: { '@path': '$.traits.last_name' },
|
|
40
|
-
else: { '@path': '$.properties.last_name' }
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
phone: {
|
|
45
|
-
label: 'Phone',
|
|
46
|
-
description: 'The contact’s phone number.',
|
|
47
|
-
type: 'string'
|
|
48
|
-
},
|
|
49
|
-
website: {
|
|
50
|
-
label: 'Company',
|
|
51
|
-
description: 'The contact’s company/other website.',
|
|
52
|
-
type: 'string'
|
|
53
|
-
},
|
|
54
|
-
otherFields: {
|
|
55
|
-
label: 'Other Fields',
|
|
56
|
-
description: 'Any other default or custom contact properties. Custom properties must be predefined in HubSpot. More information in HubSpot documentation.',
|
|
57
|
-
type: 'object',
|
|
58
|
-
defaultObjectUI: 'keyvalue:only'
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
perform: (_request, data) => {
|
|
62
|
-
data.logger?.info(`Hubspot Cloud: Contact Action: Returning Contact Id: 801`);
|
|
63
|
-
data.transactionContext?.setTransaction('contact_id', '801');
|
|
64
|
-
return {};
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
exports.default = action;
|
|
68
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/contact/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,wCAAwC;IACrD,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,sBAAsB;YACnC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,OAAO;SAChB;QACD,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,QAAQ;SACf;QACD,SAAS,EAAE;YACT,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,2BAA2B;YACxC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;oBAC1C,IAAI,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;oBACxC,IAAI,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAE;iBAC7C;aACF;SACF;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;oBACzC,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;oBACvC,IAAI,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE;iBAC5C;aACF;SACF;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,6BAA6B;YAC1C,IAAI,EAAE,QAAQ;SACf;QACD,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,sCAAsC;YACnD,IAAI,EAAE,QAAQ;SACf;QACD,WAAW,EAAE;YACX,KAAK,EAAE,cAAc;YACrB,WAAW,EACT,6IAA6I;YAC/I,IAAI,EAAE,QAAQ;YACd,eAAe,EAAE,eAAe;SACjC;KACF;IACD,OAAO,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE;QAM1B,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,0DAA0D,CAAC,CAAA;QAC7E,IAAI,CAAC,kBAAkB,EAAE,cAAc,CAAC,YAAY,EAAE,KAAK,CAAC,CAAA;QAC5D,OAAO,EAAE,CAAA;IACX,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/hubspot/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,50 +0,0 @@
|
|
|
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 contact_1 = __importDefault(require("./contact"));
|
|
7
|
-
const company_1 = __importDefault(require("./company"));
|
|
8
|
-
const sendCustomBehavioralEvent_1 = __importDefault(require("./sendCustomBehavioralEvent"));
|
|
9
|
-
const destination = {
|
|
10
|
-
name: 'Hubspot Cloud Mode (Actions)',
|
|
11
|
-
slug: 'actions-hubspot-cloud',
|
|
12
|
-
mode: 'cloud',
|
|
13
|
-
authentication: {
|
|
14
|
-
scheme: 'oauth2',
|
|
15
|
-
fields: {},
|
|
16
|
-
testAuthentication: (request) => {
|
|
17
|
-
console.log('testAuthentication');
|
|
18
|
-
return request(`https://api.hubapi.com/crm/v3/objects/contacts?limit=1`);
|
|
19
|
-
},
|
|
20
|
-
refreshAccessToken: async (request, { auth }) => {
|
|
21
|
-
const res = await request('https://api.hubapi.com/oauth/v1/token', {
|
|
22
|
-
method: 'POST',
|
|
23
|
-
body: new URLSearchParams({
|
|
24
|
-
refresh_token: auth.refreshToken,
|
|
25
|
-
client_id: auth.clientId,
|
|
26
|
-
client_secret: auth.clientSecret,
|
|
27
|
-
grant_type: 'refresh_token'
|
|
28
|
-
})
|
|
29
|
-
});
|
|
30
|
-
return { accessToken: res.data.access_token };
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
extendRequest({ auth }) {
|
|
34
|
-
return {
|
|
35
|
-
headers: {
|
|
36
|
-
authorization: `Bearer ${auth?.accessToken}`
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
onDelete: async (request, { settings, payload }) => {
|
|
41
|
-
console.debug(request, settings, payload);
|
|
42
|
-
},
|
|
43
|
-
actions: {
|
|
44
|
-
contact: contact_1.default,
|
|
45
|
-
company: company_1.default,
|
|
46
|
-
sendCustomBehavioralEvent: sendCustomBehavioralEvent_1.default
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
exports.default = destination;
|
|
50
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/hubspot/index.ts"],"names":[],"mappings":";;;;;AAGA,wDAA+B;AAE/B,wDAA+B;AAC/B,4FAAmE;AAKnE,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,8BAA8B;IACpC,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,EAAE;QACV,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;YAE9B,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;YACjC,OAAO,OAAO,CAAC,wDAAwD,CAAC,CAAA;QAC1E,CAAC;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YAE9C,MAAM,GAAG,GAAG,MAAM,OAAO,CAAuB,uCAAuC,EAAE;gBACvF,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI,eAAe,CAAC;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,SAAS,EAAE,IAAI,CAAC,QAAQ;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,UAAU,EAAE,eAAe;iBAC5B,CAAC;aACH,CAAC,CAAA;YAEF,OAAO,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,CAAA;QAC/C,CAAC;KACF;IACD,aAAa,CAAC,EAAE,IAAI,EAAE;QACpB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,EAAE,WAAW,EAAE;aAC7C;SACF,CAAA;IACH,CAAC;IAED,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QACjD,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;IAI3C,CAAC;IAED,OAAO,EAAE;QACP,OAAO,EAAP,iBAAO;QACP,OAAO,EAAP,iBAAO;QACP,yBAAyB,EAAzB,mCAAyB;KAC1B;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/sendCustomBehavioralEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const action = {
|
|
4
|
-
title: 'Send Custom Behavioral Event',
|
|
5
|
-
description: 'Send a custom behavioral event to HubSpot.',
|
|
6
|
-
defaultSubscription: 'type = "track"',
|
|
7
|
-
fields: {
|
|
8
|
-
eventName: {
|
|
9
|
-
label: 'Event Name',
|
|
10
|
-
description: 'The internal event name assigned by HubSpot. This can be found in your HubSpot account. Events must be predefined in HubSpot. Learn how to find the internal name in [HubSpot’s documentation](https://knowledge.hubspot.com/analytics-tools/create-custom-behavioral-events?_ga=2.219778269.578939721.1663963266-497800475.1660075188#define-the-api-call).',
|
|
11
|
-
type: 'string',
|
|
12
|
-
required: true
|
|
13
|
-
},
|
|
14
|
-
occuredAt: {
|
|
15
|
-
label: 'Event Timestamp',
|
|
16
|
-
description: "The time when this event occurred. If this isn't set, the current time will be used.",
|
|
17
|
-
type: 'string',
|
|
18
|
-
default: {
|
|
19
|
-
'@path': '$.timestamp'
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
email: {
|
|
23
|
-
label: 'Email Address',
|
|
24
|
-
description: 'The email of the contact associated with this event. This is required if no user token or object ID is provided.',
|
|
25
|
-
type: 'string',
|
|
26
|
-
format: 'email',
|
|
27
|
-
default: {
|
|
28
|
-
'@if': {
|
|
29
|
-
exists: { '@path': '$.properties.email' },
|
|
30
|
-
then: { '@path': '$.properties.email' },
|
|
31
|
-
else: { '@path': '$.context.traits.email' }
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
utk: {
|
|
36
|
-
label: 'User Token',
|
|
37
|
-
description: 'The user token (utk) of the contact associated with this event. This is required if no email or object ID is provided.',
|
|
38
|
-
type: 'string'
|
|
39
|
-
},
|
|
40
|
-
objectId: {
|
|
41
|
-
label: 'Object ID',
|
|
42
|
-
description: 'The ID of the object associated with this event. This can be the HubSpot contact ID, company ID, or ID of any other object. This is required if no email or user token is provided.',
|
|
43
|
-
type: 'string'
|
|
44
|
-
},
|
|
45
|
-
properties: {
|
|
46
|
-
label: 'Event Properties',
|
|
47
|
-
description: 'Default or custom properties that describe the event. See more information in [HubSpot’s documentation](https://knowledge.hubspot.com/analytics-tools/create-custom-behavioral-events#add-and-manage-event-properties).',
|
|
48
|
-
type: 'object',
|
|
49
|
-
defaultObjectUI: 'keyvalue:only'
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
perform: (_request, { logger, transactionContext }) => {
|
|
53
|
-
logger?.info(`Custom Behavioral Event Triggered. Transaction Variables received are:${transactionContext?.transaction}`);
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
exports.default = action;
|
|
57
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/hubspot/sendCustomBehavioralEvent/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,8BAA8B;IACrC,WAAW,EAAE,4CAA4C;IACzD,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,SAAS,EAAE;YACT,KAAK,EAAE,YAAY;YACnB,WAAW,EACT,8VAA8V;YAChW,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,SAAS,EAAE;YACT,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,sFAAsF;YACnG,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,KAAK,EAAE;YACL,KAAK,EAAE,eAAe;YACtB,WAAW,EACT,kHAAkH;YACpH,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;YACf,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;oBACzC,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE;oBACvC,IAAI,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE;iBAC5C;aACF;SACF;QACD,GAAG,EAAE;YACH,KAAK,EAAE,YAAY;YACnB,WAAW,EACT,wHAAwH;YAC1H,IAAI,EAAE,QAAQ;SACf;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,WAAW;YAClB,WAAW,EACT,qLAAqL;YACvL,IAAI,EAAE,QAAQ;SACf;QACD,UAAU,EAAE;YACV,KAAK,EAAE,kBAAkB;YACzB,WAAW,EACT,yNAAyN;YAC3N,IAAI,EAAE,QAAQ;YACd,eAAe,EAAE,eAAe;SACjC;KACF;IACD,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,EAAE,EAAE;QAMpD,MAAM,EAAE,IAAI,CACV,yEAAyE,kBAAkB,EAAE,WAAW,EAAE,CAC3G,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|