@segment/action-destinations 3.177.0 → 3.178.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/destinations/acoustic/Utility/eventprocessing.js +10 -1
- package/dist/destinations/acoustic/Utility/eventprocessing.js.map +1 -1
- package/dist/destinations/acoustic/Utility/tablemaintutilities.js +17 -34
- package/dist/destinations/acoustic/Utility/tablemaintutilities.js.map +1 -1
- package/dist/destinations/acoustic/generated-types.d.ts +1 -0
- package/dist/destinations/acoustic/index.js +18 -8
- package/dist/destinations/acoustic/index.js.map +1 -1
- package/dist/destinations/acoustic/receiveEvents/index.js +3 -3
- package/dist/destinations/acoustic/receiveEvents/index.js.map +1 -1
- package/dist/destinations/devrev/createRevUser/generated-types.d.ts +8 -0
- package/dist/destinations/devrev/createRevUser/generated-types.js +3 -0
- package/dist/destinations/devrev/createRevUser/generated-types.js.map +1 -0
- package/dist/destinations/devrev/createRevUser/index.d.ts +5 -0
- package/dist/destinations/devrev/createRevUser/index.js +171 -0
- package/dist/destinations/devrev/createRevUser/index.js.map +1 -0
- package/dist/destinations/devrev/createWork/generated-types.d.ts +9 -0
- package/dist/destinations/devrev/createWork/generated-types.js +3 -0
- package/dist/destinations/devrev/createWork/generated-types.js.map +1 -0
- package/dist/destinations/devrev/createWork/index.d.ts +5 -0
- package/dist/destinations/devrev/createWork/index.js +146 -0
- package/dist/destinations/devrev/createWork/index.js.map +1 -0
- package/dist/destinations/devrev/generated-types.d.ts +4 -0
- package/dist/destinations/devrev/generated-types.js +3 -0
- package/dist/destinations/devrev/generated-types.js.map +1 -0
- package/dist/destinations/devrev/index.d.ts +4 -0
- package/dist/destinations/devrev/index.js +47 -0
- package/dist/destinations/devrev/index.js.map +1 -0
- package/dist/destinations/devrev/mocks/index.d.ts +144 -0
- package/dist/destinations/devrev/mocks/index.js +145 -0
- package/dist/destinations/devrev/mocks/index.js.map +1 -0
- package/dist/destinations/devrev/utils/constants.d.ts +15 -0
- package/dist/destinations/devrev/utils/constants.js +19 -0
- package/dist/destinations/devrev/utils/constants.js.map +1 -0
- package/dist/destinations/devrev/utils/helpers.d.ts +14 -0
- package/dist/destinations/devrev/utils/helpers.js +56 -0
- package/dist/destinations/devrev/utils/helpers.js.map +1 -0
- package/dist/destinations/devrev/utils/index.d.ts +3 -0
- package/dist/destinations/devrev/utils/index.js +16 -0
- package/dist/destinations/devrev/utils/index.js.map +1 -0
- package/dist/destinations/devrev/utils/types.d.ts +105 -0
- package/dist/destinations/devrev/utils/types.js +3 -0
- package/dist/destinations/devrev/utils/types.js.map +1 -0
- package/dist/destinations/hubspot/api/index.d.ts +16 -0
- package/dist/destinations/hubspot/api/index.js +55 -0
- package/dist/destinations/hubspot/api/index.js.map +1 -0
- package/dist/destinations/hubspot/errors.d.ts +2 -0
- package/dist/destinations/hubspot/errors.js +3 -1
- package/dist/destinations/hubspot/errors.js.map +1 -1
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +2 -2
- package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
- package/dist/destinations/hubspot/upsertCompany/index.js +13 -68
- package/dist/destinations/hubspot/upsertCompany/index.js.map +1 -1
- package/dist/destinations/hubspot/upsertContact/index.js +2 -2
- package/dist/destinations/hubspot/upsertContact/index.js.map +1 -1
- package/dist/destinations/hubspot/upsertCustomObjectRecord/generated-types.d.ts +4 -0
- package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js +47 -8
- package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js.map +1 -1
- package/dist/destinations/hubspot/utils.d.ts +47 -0
- package/dist/destinations/hubspot/utils.js +43 -0
- package/dist/destinations/hubspot/utils.js.map +1 -0
- package/dist/destinations/index.js +1 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/voucherify/upsertCustomer/generated-types.d.ts +13 -13
- package/dist/destinations/voucherify/upsertCustomer/index.js +18 -5
- package/dist/destinations/voucherify/upsertCustomer/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/destinations/hubspot/helperFunctions.d.ts +0 -7
- package/dist/destinations/hubspot/helperFunctions.js +0 -27
- package/dist/destinations/hubspot/helperFunctions.js.map +0 -1
|
@@ -74,13 +74,22 @@ function addUpdateEvents(payload, email, limit) {
|
|
|
74
74
|
let ak = '';
|
|
75
75
|
let av = '';
|
|
76
76
|
const getValue = (o, part) => Object.entries(o).find(([k, _v]) => k.includes(part))?.[1];
|
|
77
|
-
|
|
77
|
+
const getKey = (o, part) => Object.entries(o).find(([k, _v]) => k.includes(part))?.[0];
|
|
78
|
+
if (getValue(propertiesTraitsKV, 'computation_class')?.toLowerCase() === 'audience') {
|
|
78
79
|
ak = getValue(propertiesTraitsKV, 'computation_key');
|
|
79
80
|
av = getValue(propertiesTraitsKV, `${ak}`);
|
|
81
|
+
let x = getKey(propertiesTraitsKV, 'computation_class');
|
|
82
|
+
delete propertiesTraitsKV[`${x}`];
|
|
83
|
+
x = getKey(propertiesTraitsKV, 'computation_key');
|
|
84
|
+
delete propertiesTraitsKV[`${x}`];
|
|
85
|
+
delete propertiesTraitsKV[`${ak}`];
|
|
80
86
|
}
|
|
81
87
|
if (getValue(propertiesTraitsKV, 'audience_key')) {
|
|
82
88
|
ak = getValue(propertiesTraitsKV, 'audience_key');
|
|
83
89
|
av = getValue(propertiesTraitsKV, `${ak}`);
|
|
90
|
+
const x = getKey(propertiesTraitsKV, 'audience_key');
|
|
91
|
+
delete propertiesTraitsKV[`${x}`];
|
|
92
|
+
delete propertiesTraitsKV[`${ak}`];
|
|
84
93
|
}
|
|
85
94
|
if (av !== '') {
|
|
86
95
|
let audiStatus = av;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventprocessing.js","sourceRoot":"","sources":["../../../../src/destinations/acoustic/Utility/eventprocessing.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAwD;AACxD,qDAA4B;AAG5B,SAAgB,aAAa,CAAC,OAAkC,EAAE,SAAiB;IACjF,MAAM,YAAY,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AC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"eventprocessing.js","sourceRoot":"","sources":["../../../../src/destinations/acoustic/Utility/eventprocessing.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAwD;AACxD,qDAA4B;AAG5B,SAAgB,aAAa,CAAC,OAAkC,EAAE,SAAiB;IACjF,MAAM,YAAY,GAA8B,EAAE,CAAA;IAClD,IAAI;QAEF,IAAI,SAAS,GAAG,EAAE;YAChB,MAAM,IAAI,+BAAgB,CACxB,wGAAwG,EACxG,wBAAwB,EACxB,GAAG,CACJ,CAAA;QAEH,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YACtC,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;gBACpC,SAAS,EAAE,CAAA;gBACX,MAAM,MAAM,GAA8B,aAAa,CACrD,OAAO,CAAC,GAAG,CAAoC,EAC/C,SAAS,CACV,CAAA;gBACD,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;oBAC3C,YAAY,CAAC,GAAG,GAAG,IAAI,SAAS,EAAE,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;iBACxD;aACF;iBAAM;gBACL,YAAY,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;aACjC;SACF;KACF;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,IAAI,+BAAgB,CACxB,uDAAuD,CAAC,EAAE,EAC1D,oCAAoC,EACpC,GAAG,CACJ,CAAA;KACF;IACD,OAAO,YAAY,CAAA;AACrB,CAAC;AAjCD,sCAiCC;AAED,SAAgB,eAAe,CAAC,OAAgB,EAAE,KAAa,EAAE,KAAa;IAC5E,IA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ken = getAccessToken;
|
|
41
41
|
async function doPOST(request, settings, auth, body, action) {
|
|
42
|
-
if (!auth.accessToken) {
|
|
43
|
-
if (!exports.authCreds.accessToken) {
|
|
44
|
-
const ratr = await getAccessToken(request, settings);
|
|
45
|
-
auth = {
|
|
46
|
-
accessToken: ratr.accessToken,
|
|
47
|
-
refreshToken: ratr.refreshToken,
|
|
48
|
-
refreshTokenURL: `https://api-campaign-${settings.region}-${settings.pod}.goacoustic.com/XMLAPI`
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
else
|
|
52
|
-
auth.accessToken = exports.authCreds.accessToken;
|
|
53
|
-
}
|
|
54
42
|
let resultTxt = '';
|
|
55
43
|
let res = '';
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
res = (await postResults.data);
|
|
70
|
-
}
|
|
71
|
-
catch (e) {
|
|
72
|
-
throw new actions_core_1.IntegrationError(`Unexpected Request Exception \n${e}`, 'UNEXPECTED_REQUEST_EXCEPTION', 400);
|
|
73
|
-
}
|
|
44
|
+
const postResults = await request(`https://api-campaign-${settings.region}-${settings.pod}.goacoustic.com/XMLAPI`, {
|
|
45
|
+
method: 'POST',
|
|
46
|
+
headers: {
|
|
47
|
+
Authorization: `Bearer ${auth?.accessToken}`,
|
|
48
|
+
'Content-Type': 'text/xml',
|
|
49
|
+
'user-agent': `Segment Action (Acoustic Destination) ${action}`,
|
|
50
|
+
Connection: 'keep-alive',
|
|
51
|
+
'Accept-Encoding': 'gzip, deflate, br',
|
|
52
|
+
Accept: '*/*'
|
|
53
|
+
},
|
|
54
|
+
body: `${body}`
|
|
55
|
+
});
|
|
56
|
+
res = (await postResults.data);
|
|
74
57
|
resultTxt = res;
|
|
75
|
-
if (resultTxt.
|
|
58
|
+
if (resultTxt.toLowerCase().indexOf('<success>false</success>') > -1) {
|
|
76
59
|
const rx = /<FaultString>(.*)<\/FaultString>/gm;
|
|
77
60
|
const r = rx.exec(resultTxt);
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
61
|
+
const faultMsg = r[1].toLowerCase();
|
|
62
|
+
if (faultMsg.indexOf('max number of concurrent') > -1)
|
|
63
|
+
throw new actions_core_1.RetryableError('Currently exceeding Max number of concurrent API authenticated requests, retrying...', 429);
|
|
81
64
|
}
|
|
82
65
|
return resultTxt;
|
|
83
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tablemaintutilities.js","sourceRoot":"","sources":["../../../../src/destinations/acoustic/Utility/tablemaintutilities.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"tablemaintutilities.js","sourceRoot":"","sources":["../../../../src/destinations/acoustic/Utility/tablemaintutilities.ts"],"names":[],"mappings":";;;AAAA,wDAAyG;AAW9F,QAAA,SAAS,GAAG;IACrB,WAAW,EAAE,EAAE;IACf,QAAQ,EAAE,EAAE;IACZ,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,EAAE;IAChB,eAAe,EAAE,EAAE;CACO,CAAA;AAuB5B,SAAgB,YAAY;IAC1B,OAAO,iBAAS,CAAA;AAClB,CAAC;AAFD,oCAEC;AAEM,KAAK,UAAU,cAAc,CAClC,OAAsB,EACtB,QAAkB;IAGlB,iBAAS,GAAG,YAAY,EAAE,CAAA;IAC1B,iBAAS,CAAC,WAAW,GAAG,EAAE,CAAA;IAC1B,iBAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC,UAAU,CAAA;IACxC,iBAAS,CAAC,YAAY,GAAG,QAAQ,CAAC,cAAc,CAAA;IAChD,iBAAS,CAAC,YAAY,GAAG,QAAQ,CAAC,cAAc,CAAA;IAChD,iBAAS,CAAC,eAAe,GAAG,wBAAwB,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,GAAG,6BAA6B,CAAA;IAEhH,M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;IAGxC,SAAS,GAAG,GAAG,CAAA;IAEf,IAAI,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,0BAA0B,CAAC,GAAG,CAAC,CAAC,EAAE;QACpE,MAAM,EAAE,GAAG,oCAAoC,CAAA;QAC/C,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAoB,CAAA;QAE/C,MAAM,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;QAEnC,IAAI,QAAQ,CAAC,OAAO,CAAC,0BAA0B,CAAC,GAAG,CAAC,CAAC;YACnD,MAAM,IAAI,6BAAc,CACtB,sFAAsF,EACtF,GAAG,CACJ,CAAA;KACJ;IAED,OAAO,SAAS,CAAA;AAClB,CAAC;AAzCD,wBAyCC"}
|
|
@@ -6,6 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const actions_core_1 = require("@segment/actions-core");
|
|
7
7
|
const receiveEvents_1 = __importDefault(require("./receiveEvents"));
|
|
8
8
|
const tablemaintutilities_1 = require("./Utility/tablemaintutilities");
|
|
9
|
+
const mod = `
|
|
10
|
+
Last-Modified: 06.23.2023 12.42.42
|
|
11
|
+
`;
|
|
9
12
|
const presets = [
|
|
10
13
|
{
|
|
11
14
|
name: 'Track Calls',
|
|
@@ -47,14 +50,14 @@ const destination = {
|
|
|
47
50
|
fields: {
|
|
48
51
|
pod: {
|
|
49
52
|
label: 'Pod',
|
|
50
|
-
description: 'Pod Number
|
|
53
|
+
description: 'Pod Number for API Endpoint',
|
|
51
54
|
default: '2',
|
|
52
55
|
type: 'string',
|
|
53
56
|
required: true
|
|
54
57
|
},
|
|
55
58
|
region: {
|
|
56
59
|
label: 'Region',
|
|
57
|
-
description: 'Region
|
|
60
|
+
description: 'Region for API Endpoint, either US, EU, AP, or CA',
|
|
58
61
|
choices: [
|
|
59
62
|
{ label: 'US', value: 'US' },
|
|
60
63
|
{ label: 'EU', value: 'EU' },
|
|
@@ -67,27 +70,27 @@ const destination = {
|
|
|
67
70
|
},
|
|
68
71
|
tableName: {
|
|
69
72
|
label: 'Acoustic Segment Table Name',
|
|
70
|
-
description:
|
|
71
|
-
default: 'Segment Events Table',
|
|
73
|
+
description: `The Segment Table Name in Acoustic Campaign Data dialog.`,
|
|
74
|
+
default: 'Segment Events Table Name',
|
|
72
75
|
type: 'string',
|
|
73
76
|
required: true
|
|
74
77
|
},
|
|
75
78
|
tableListId: {
|
|
76
79
|
label: 'Acoustic Segment Table List Id',
|
|
77
80
|
description: 'The Segment Table List Id from the Database-Relational Table dialog in Acoustic Campaign',
|
|
78
|
-
default: '
|
|
81
|
+
default: '',
|
|
79
82
|
type: 'string',
|
|
80
83
|
required: true
|
|
81
84
|
},
|
|
82
85
|
a_clientId: {
|
|
83
|
-
label: 'Acoustic
|
|
86
|
+
label: 'Acoustic App Definition ClientId',
|
|
84
87
|
description: 'The Client Id from the App definition dialog in Acoustic Campaign',
|
|
85
88
|
default: '',
|
|
86
89
|
type: 'string',
|
|
87
90
|
required: true
|
|
88
91
|
},
|
|
89
92
|
a_clientSecret: {
|
|
90
|
-
label: 'Acoustic App
|
|
93
|
+
label: 'Acoustic App Definition ClientSecret',
|
|
91
94
|
description: 'The Client Secret from the App definition dialog in Acoustic Campaign',
|
|
92
95
|
default: '',
|
|
93
96
|
type: 'password',
|
|
@@ -103,9 +106,16 @@ const destination = {
|
|
|
103
106
|
attributesMax: {
|
|
104
107
|
label: 'Properties Max',
|
|
105
108
|
description: 'A safety against mapping too many attributes into the Event, ignore Event if number of Event Attributes exceeds this maximum. Note: Before increasing the default max number, consult the Acoustic Destination documentation.',
|
|
106
|
-
default:
|
|
109
|
+
default: 15,
|
|
107
110
|
type: 'number',
|
|
108
111
|
required: false
|
|
112
|
+
},
|
|
113
|
+
version: {
|
|
114
|
+
label: `Version:`,
|
|
115
|
+
description: `${mod}`,
|
|
116
|
+
default: 'Version 3.1',
|
|
117
|
+
type: 'string',
|
|
118
|
+
required: false
|
|
109
119
|
}
|
|
110
120
|
},
|
|
111
121
|
refreshAccessToken: async (request, { settings }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/acoustic/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAE5E,oEAA2C;AAC3C,uEAA8D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/acoustic/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAE5E,oEAA2C;AAC3C,uEAA8D;AAE9D,MAAM,GAAG,GAAG;;CAEX,CAAA;AAUD,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,eAAe;QAC9B,OAAO,EAAE;YACP,GAAG,4BAAa,CAAC,uBAAa,CAAC,MAAM,CAAC;YACtC,KAAK,EAAE;gBACL,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;KACF;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,mBAAmB;QAC9B,aAAa,EAAE,eAAe;QAC9B,OAAO,EAAE;YACP,GAAG,4BAAa,CAAC,uBAAa,CAAC,MAAM,CAAC;YACtC,KAAK,EAAE;gBACL,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;oBACrC,IAAI,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;oBACnC,IAAI,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE;iBAC5C;aACF;SACF;KACF;CACF,CAAA;AAED,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,6BAA6B;IACnC,IAAI,EAAE,2BAA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AE,UAAU;gBAChB,QAAQ,EAAE,IAAI;aACf;YACD,cAAc,EAAE;gBACd,KAAK,EAAE,6CAA6C;gBACpD,WAAW,EAAE,iFAAiF;gBAC9F,OAAO,EAAE,EAAE;gBACX,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,IAAI;aACf;YACD,aAAa,EAAE;gBACb,KAAK,EAAE,gBAAgB;gBACvB,WAAW,EACT,+NAA+N;gBACjO,OAAO,EAAE,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;aAChB;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,GAAG,GAAG,EAAE;gBACrB,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAClD,OAAO,MAAM,oCAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;QAChD,CAAC;KACF;IACD,OAAO;IACP,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;KACd;CACF,CAAA;AACD,kBAAe,WAAW,CAAA"}
|
|
@@ -50,17 +50,17 @@ const action = {
|
|
|
50
50
|
},
|
|
51
51
|
context: {
|
|
52
52
|
label: 'Context',
|
|
53
|
-
description: '
|
|
53
|
+
description: 'All properties provided via a Context Section ',
|
|
54
54
|
type: 'object'
|
|
55
55
|
},
|
|
56
56
|
properties: {
|
|
57
57
|
label: 'Properties',
|
|
58
|
-
description: '
|
|
58
|
+
description: 'All properties provided via a Properties Section',
|
|
59
59
|
type: 'object'
|
|
60
60
|
},
|
|
61
61
|
traits: {
|
|
62
62
|
label: 'Traits',
|
|
63
|
-
description: '
|
|
63
|
+
description: 'All properties provided via a Traits Section',
|
|
64
64
|
type: 'object'
|
|
65
65
|
}
|
|
66
66
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/acoustic/receiveEvents/index.ts"],"names":[],"mappings":";;;;;AAGA,wEAAqE;AACrE,qDAA4B;AAC5B,gEAA4D;AAG5D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mCAAmC;IAC1C,WAAW,EAAE,oEAAoE;IACjF,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,oEAAoE;YACjF,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,kDAAkD;YAC/D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,QAAQ;aAClB;SACF;QACD,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,4BAA4B;YACzC,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/acoustic/receiveEvents/index.ts"],"names":[],"mappings":";;;;;AAGA,wEAAqE;AACrE,qDAA4B;AAC5B,gEAA4D;AAG5D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mCAAmC;IAC1C,WAAW,EAAE,oEAAoE;IACjF,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,oEAAoE;YACjF,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,kDAAkD;YAC/D,IAAI,EAAE,QAAQ;YACd,O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AC,OAAO,EAAE,QAAQ,EAAG,IAAmB,IAAK,MAAqB,EAAE,WAAW,EAAE,cAAc,CAAC,CAAA;IACrH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/devrev/createRevUser/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("../utils");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Create Rev User',
|
|
6
|
+
defaultSubscription: 'type = "identify"',
|
|
7
|
+
description: 'Creates a RevUser, unless one already exists with the same email address. Posts the comment to the RevUser object if it is created or if it already exists.',
|
|
8
|
+
fields: {
|
|
9
|
+
email: {
|
|
10
|
+
label: 'Email',
|
|
11
|
+
description: "The user's email address.",
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
default: {
|
|
15
|
+
'@if': {
|
|
16
|
+
exists: { '@path': '$.traits.email' },
|
|
17
|
+
then: { '@path': '$.traits.email' },
|
|
18
|
+
else: { '@path': '$.properties.email' }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
fullName: {
|
|
23
|
+
label: 'Full Name',
|
|
24
|
+
description: "The user's full name.",
|
|
25
|
+
type: 'string',
|
|
26
|
+
required: false,
|
|
27
|
+
default: {
|
|
28
|
+
'@if': {
|
|
29
|
+
exists: { '@path': '$.traits.name' },
|
|
30
|
+
then: { '@path': '$.traits.name' },
|
|
31
|
+
else: { '@path': '$.properties.name' }
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
firstName: {
|
|
36
|
+
label: 'First Name',
|
|
37
|
+
description: "The user's first name.",
|
|
38
|
+
type: 'string',
|
|
39
|
+
required: false,
|
|
40
|
+
default: {
|
|
41
|
+
'@if': {
|
|
42
|
+
exists: { '@path': '$.traits.first_name' },
|
|
43
|
+
then: { '@path': '$.traits.first_name' },
|
|
44
|
+
else: { '@path': '$.properties.first_name' }
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
lastName: {
|
|
49
|
+
label: 'Last Name',
|
|
50
|
+
description: "The user's last name.",
|
|
51
|
+
type: 'string',
|
|
52
|
+
required: false,
|
|
53
|
+
default: {
|
|
54
|
+
'@if': {
|
|
55
|
+
exists: { '@path': '$.traits.last_name' },
|
|
56
|
+
then: { '@path': '$.traits.last_name' },
|
|
57
|
+
else: { '@path': '$.properties.last_name' }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
comment: {
|
|
62
|
+
label: 'Comment',
|
|
63
|
+
description: 'A comment to post to the RevUser. If empty, no comment will be posted on the RevUser, otherwise the comment will be posted to the RevUser. The comment will be posted even if the RevUser already exists on the RevDev platform',
|
|
64
|
+
type: 'string',
|
|
65
|
+
required: false
|
|
66
|
+
},
|
|
67
|
+
tag: {
|
|
68
|
+
label: 'Tag',
|
|
69
|
+
description: 'A tag to apply to created Accounts.',
|
|
70
|
+
type: 'string',
|
|
71
|
+
dynamic: true,
|
|
72
|
+
required: false
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
dynamicFields: {
|
|
76
|
+
tag: async (request) => {
|
|
77
|
+
try {
|
|
78
|
+
const result = await request(`${utils_1.devrevApiRoot}${utils_1.devrevApiPaths.tagsList}`, {
|
|
79
|
+
method: 'get',
|
|
80
|
+
skipResponseCloning: true
|
|
81
|
+
});
|
|
82
|
+
const choices = result.data.tags.map((tag) => {
|
|
83
|
+
return { value: tag.id, label: tag.name };
|
|
84
|
+
});
|
|
85
|
+
return {
|
|
86
|
+
choices,
|
|
87
|
+
nextPage: result.data.next_cursor
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
catch (err) {
|
|
91
|
+
return {
|
|
92
|
+
choices: [],
|
|
93
|
+
nextPage: '',
|
|
94
|
+
error: {
|
|
95
|
+
message: err.message ?? 'Unknown error',
|
|
96
|
+
code: err.status + '' ?? 'Unknown error'
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
perform: async (request, { settings, payload }) => {
|
|
103
|
+
const email = payload.email.toLowerCase();
|
|
104
|
+
const domain = utils_1.getDomain(settings, email);
|
|
105
|
+
const name = utils_1.getName(payload);
|
|
106
|
+
const existingUsers = await request(`${utils_1.devrevApiRoot}${utils_1.devrevApiPaths.revUsersList}?email="${email}"`);
|
|
107
|
+
let revUserId, accountId, revOrgId;
|
|
108
|
+
if (existingUsers.data.rev_users.length == 0) {
|
|
109
|
+
let requestUrl;
|
|
110
|
+
if (domain !== email)
|
|
111
|
+
requestUrl = `${utils_1.devrevApiRoot}${utils_1.devrevApiPaths.accountsList}?domains="${domain}"`;
|
|
112
|
+
else
|
|
113
|
+
requestUrl = `${utils_1.devrevApiRoot}${utils_1.devrevApiPaths.accountsList}?external_refs="${domain}"`;
|
|
114
|
+
const existingAccount = await request(requestUrl);
|
|
115
|
+
if (existingAccount.data.accounts.length == 0) {
|
|
116
|
+
const requestBody = {
|
|
117
|
+
display_name: domain,
|
|
118
|
+
external_refs: [domain]
|
|
119
|
+
};
|
|
120
|
+
if (payload.tag)
|
|
121
|
+
requestBody.tags = [{ id: payload.tag }];
|
|
122
|
+
if (domain != email)
|
|
123
|
+
requestBody.domains = [domain];
|
|
124
|
+
const createAccount = await request(`${utils_1.devrevApiRoot}${utils_1.devrevApiPaths.accountCreate}`, {
|
|
125
|
+
method: 'post',
|
|
126
|
+
json: requestBody
|
|
127
|
+
});
|
|
128
|
+
accountId = createAccount.data.account.id;
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
accountId = existingAccount.data.accounts[0].id;
|
|
132
|
+
}
|
|
133
|
+
const accountRevorgs = await request(`${utils_1.devrevApiRoot}${utils_1.devrevApiPaths.revOrgsList}?account=${accountId}`);
|
|
134
|
+
const filtered = accountRevorgs.data.rev_orgs.filter((revorg) => revorg.external_ref_issuer == 'devrev:platform:revorg:account');
|
|
135
|
+
revOrgId = filtered[0].id;
|
|
136
|
+
const createRevUser = await request(`${utils_1.devrevApiRoot}${utils_1.devrevApiPaths.revUsersCreate}`, {
|
|
137
|
+
method: 'post',
|
|
138
|
+
json: {
|
|
139
|
+
email,
|
|
140
|
+
full_name: name,
|
|
141
|
+
external_ref: email,
|
|
142
|
+
org_id: revOrgId
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
revUserId = createRevUser.data.rev_user.id;
|
|
146
|
+
}
|
|
147
|
+
else if (existingUsers.data.rev_users.length == 1) {
|
|
148
|
+
revUserId = existingUsers.data.rev_users[0].id;
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
const sorted = existingUsers.data.rev_users.sort((a, b) => {
|
|
152
|
+
return new Date(a.created_date).getTime() - new Date(b.created_date).getTime();
|
|
153
|
+
});
|
|
154
|
+
revUserId = sorted[0].id;
|
|
155
|
+
}
|
|
156
|
+
if (payload.comment) {
|
|
157
|
+
await request(`${utils_1.devrevApiRoot}${utils_1.devrevApiPaths.timelineEntriesCreate}`, {
|
|
158
|
+
method: 'post',
|
|
159
|
+
json: {
|
|
160
|
+
object: revUserId,
|
|
161
|
+
type: 'timeline_comment',
|
|
162
|
+
body_type: 'text',
|
|
163
|
+
body: payload.comment
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
exports.default = action;
|
|
171
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/devrev/createRevUser/index.ts"],"names":[],"mappings":";;AAIA,oCAYiB;AAGjB,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE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AC,YAAY,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAA;YAChF,CAAC,CAAC,CAAA;YACF,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;SACzB;QACD,IAAI,OAAO,CAAC,OAAO,EAAE;YACnB,MAAM,OAAO,CAAC,GAAG,qBAAa,GAAG,sBAAc,CAAC,qBAAqB,EAAE,EAAE;gBACvE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE;oBACJ,MAAM,EAAE,SAAS;oBACjB,IAAI,EAAE,kBAAkB;oBACxB,SAAS,EAAE,MAAM;oBACjB,IAAI,EAAE,OAAO,CAAC,OAAO;iBACtB;aACF,CAAC,CAAA;SACH;QACD,OAAM;IACR,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/devrev/createWork/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("../utils");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Create Work',
|
|
6
|
+
description: 'Creates a new work item',
|
|
7
|
+
defaultSubscription: 'type = "track" and event = "Work Requested"',
|
|
8
|
+
fields: {
|
|
9
|
+
partId: {
|
|
10
|
+
label: 'Part ID',
|
|
11
|
+
description: 'The ID of the part to create work for.',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
dynamic: true
|
|
15
|
+
},
|
|
16
|
+
title: {
|
|
17
|
+
label: 'Work Title',
|
|
18
|
+
description: 'The title of the work to create.',
|
|
19
|
+
type: 'string',
|
|
20
|
+
required: true,
|
|
21
|
+
default: {
|
|
22
|
+
'@if': {
|
|
23
|
+
exists: { '@path': '$.properties.work_title' },
|
|
24
|
+
then: { '@path': '$.properties.work_title' },
|
|
25
|
+
else: { '@path': '$.event' }
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
description: {
|
|
30
|
+
label: 'Work Description',
|
|
31
|
+
description: 'The description of the work to create.',
|
|
32
|
+
type: 'text',
|
|
33
|
+
required: true,
|
|
34
|
+
default: { '@path': '$.properties.description' }
|
|
35
|
+
},
|
|
36
|
+
email: {
|
|
37
|
+
label: 'Email',
|
|
38
|
+
description: 'User email address, will be added to the description',
|
|
39
|
+
type: 'string',
|
|
40
|
+
format: 'email',
|
|
41
|
+
required: false,
|
|
42
|
+
default: { '@path': '$.properties.email' }
|
|
43
|
+
},
|
|
44
|
+
assignTo: {
|
|
45
|
+
label: 'Assign to',
|
|
46
|
+
description: 'The user ID of the user to assign the work to.',
|
|
47
|
+
type: 'string',
|
|
48
|
+
required: true,
|
|
49
|
+
dynamic: true
|
|
50
|
+
},
|
|
51
|
+
priority: {
|
|
52
|
+
label: 'Priority',
|
|
53
|
+
description: 'The priority of the work to create.',
|
|
54
|
+
type: 'string',
|
|
55
|
+
required: true,
|
|
56
|
+
default: 'p2',
|
|
57
|
+
choices: [
|
|
58
|
+
{ value: 'p0', label: 'P0 - Critical' },
|
|
59
|
+
{ value: 'p1', label: 'P1 - High' },
|
|
60
|
+
{ value: 'p2', label: 'P2 - Medium' },
|
|
61
|
+
{ value: 'p3', label: 'P3 - Low' }
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
type: {
|
|
65
|
+
label: 'Type',
|
|
66
|
+
description: 'The type of the work to create.',
|
|
67
|
+
type: 'string',
|
|
68
|
+
required: true,
|
|
69
|
+
default: 'issue',
|
|
70
|
+
choices: [
|
|
71
|
+
{ value: 'issue', label: 'Issue - Work created by automations' },
|
|
72
|
+
{ value: 'ticket', label: 'Ticket - Customer request for assistance' }
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
dynamicFields: {
|
|
77
|
+
partId: async (request) => {
|
|
78
|
+
try {
|
|
79
|
+
const result = await request(`${utils_1.devrevApiRoot}${utils_1.devrevApiPaths.partsList}`, {
|
|
80
|
+
method: 'get',
|
|
81
|
+
skipResponseCloning: true
|
|
82
|
+
});
|
|
83
|
+
const choices = result.data.parts.map((part) => {
|
|
84
|
+
return { value: part.id, label: part.name };
|
|
85
|
+
});
|
|
86
|
+
return {
|
|
87
|
+
choices,
|
|
88
|
+
nextPage: result.data.next_cursor
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
catch (e) {
|
|
92
|
+
return {
|
|
93
|
+
choices: [],
|
|
94
|
+
nextPage: '',
|
|
95
|
+
error: {
|
|
96
|
+
message: e.message ?? 'Unknown error',
|
|
97
|
+
code: e.status + '' ?? 'Unknown error'
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
assignTo: async (request) => {
|
|
103
|
+
try {
|
|
104
|
+
const results = await request(`${utils_1.devrevApiRoot}${utils_1.devrevApiPaths.devUsersList}`, {
|
|
105
|
+
method: 'get',
|
|
106
|
+
skipResponseCloning: true
|
|
107
|
+
});
|
|
108
|
+
const choices = results.data.dev_users.map((user) => {
|
|
109
|
+
return { value: user.id, label: `${user.full_name} <${user.email}>` };
|
|
110
|
+
});
|
|
111
|
+
return {
|
|
112
|
+
choices,
|
|
113
|
+
nextPage: results.data.next_cursor
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
catch (e) {
|
|
117
|
+
return {
|
|
118
|
+
choices: [],
|
|
119
|
+
nextPage: '',
|
|
120
|
+
error: {
|
|
121
|
+
message: e.message ?? 'Unknown error',
|
|
122
|
+
code: e.status + '' ?? 'Unknown error'
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
perform: (request, { payload }) => {
|
|
129
|
+
const { partId, title, description, assignTo, type, priority } = payload;
|
|
130
|
+
const url = `${utils_1.devrevApiRoot}${utils_1.devrevApiPaths.worksCreate}`;
|
|
131
|
+
const options = {
|
|
132
|
+
method: 'POST',
|
|
133
|
+
json: {
|
|
134
|
+
applies_to_part: partId,
|
|
135
|
+
title,
|
|
136
|
+
body: description,
|
|
137
|
+
owned_by: [assignTo],
|
|
138
|
+
type,
|
|
139
|
+
priority
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
return request(url, options);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
exports.default = action;
|
|
146
|
+
//# sourceMappingURL=index.js.map
|