@segment/action-destinations 3.172.0 → 3.173.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.d.ts +1 -5
- package/dist/destinations/acoustic/Utility/eventprocessing.js +66 -62
- package/dist/destinations/acoustic/Utility/eventprocessing.js.map +1 -1
- package/dist/destinations/acoustic/Utility/tablemaintutilities.d.ts +13 -1
- package/dist/destinations/acoustic/Utility/tablemaintutilities.js +108 -59
- package/dist/destinations/acoustic/Utility/tablemaintutilities.js.map +1 -1
- package/dist/destinations/acoustic/generated-types.d.ts +5 -4
- package/dist/destinations/acoustic/index.js +18 -26
- package/dist/destinations/acoustic/index.js.map +1 -1
- package/dist/destinations/acoustic/receiveEvents/generated-types.d.ts +6 -0
- package/dist/destinations/acoustic/receiveEvents/index.js +33 -19
- package/dist/destinations/acoustic/receiveEvents/index.js.map +1 -1
- package/dist/destinations/canny-functions/constants/api.d.ts +1 -0
- package/dist/destinations/canny-functions/constants/api.js +5 -0
- package/dist/destinations/canny-functions/constants/api.js.map +1 -0
- package/dist/destinations/canny-functions/constants/traits.d.ts +2 -0
- package/dist/destinations/canny-functions/constants/traits.js +6 -0
- package/dist/destinations/canny-functions/constants/traits.js.map +1 -0
- package/dist/destinations/canny-functions/generated-types.d.ts +3 -0
- package/dist/destinations/canny-functions/generated-types.js +3 -0
- package/dist/destinations/canny-functions/generated-types.js.map +1 -0
- package/dist/destinations/canny-functions/group/generated-types.d.ts +7 -0
- package/dist/destinations/canny-functions/group/generated-types.js +3 -0
- package/dist/destinations/canny-functions/group/generated-types.js.map +1 -0
- package/dist/destinations/canny-functions/group/index.d.ts +5 -0
- package/dist/destinations/canny-functions/group/index.js +46 -0
- package/dist/destinations/canny-functions/group/index.js.map +1 -0
- package/dist/destinations/canny-functions/identify/generated-types.d.ts +15 -0
- package/dist/destinations/canny-functions/identify/generated-types.js +3 -0
- package/dist/destinations/canny-functions/identify/generated-types.js.map +1 -0
- package/dist/destinations/canny-functions/identify/index.d.ts +5 -0
- package/dist/destinations/canny-functions/identify/index.js +95 -0
- package/dist/destinations/canny-functions/identify/index.js.map +1 -0
- package/dist/destinations/canny-functions/index.d.ts +4 -0
- package/dist/destinations/canny-functions/index.js +60 -0
- package/dist/destinations/canny-functions/index.js.map +1 -0
- package/dist/destinations/heap/trackEvent/index.js +2 -2
- package/dist/destinations/heap/trackEvent/index.js.map +1 -1
- package/dist/destinations/index.js +1 -0
- package/dist/destinations/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { RequestClient } from '@segment/actions-core';
|
|
2
|
-
import { Settings } from '../generated-types';
|
|
3
1
|
import { Payload } from '../receiveEvents/generated-types';
|
|
4
|
-
import { AuthTokens } from '@segment/actions-core/src/destination-kit/parse-settings';
|
|
5
2
|
export declare function parseSections(section: {
|
|
6
3
|
[key: string]: string;
|
|
7
4
|
}, nestDepth: number): {
|
|
8
5
|
[key: string]: string;
|
|
9
6
|
};
|
|
10
|
-
export declare function addUpdateEvents(payload: Payload, email: string, limit: number): string
|
|
11
|
-
export declare const postUpdates: (request: RequestClient, settings: Settings, auth: AuthTokens, xmlRows: string, i: number) => Promise<Response>;
|
|
7
|
+
export declare function addUpdateEvents(payload: Payload, email: string, limit: number): string;
|
|
@@ -3,26 +3,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.addUpdateEvents = exports.parseSections = void 0;
|
|
7
7
|
const actions_core_1 = require("@segment/actions-core");
|
|
8
8
|
const get_1 = __importDefault(require("lodash/get"));
|
|
9
|
-
const tablemaintutilities_1 = require("./tablemaintutilities");
|
|
10
9
|
function parseSections(section, nestDepth) {
|
|
11
10
|
const parseResults = {};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
try {
|
|
12
|
+
if (nestDepth > 10)
|
|
13
|
+
throw new actions_core_1.IntegrationError('Event data exceeds nesting depth. Use Mapping to avoid nesting data attributes more than 3 levels deep', 'NESTING_DEPTH_EXCEEDED', 400);
|
|
14
|
+
for (const key of Object.keys(section)) {
|
|
15
|
+
if (typeof section[key] === 'object') {
|
|
16
|
+
nestDepth++;
|
|
17
|
+
const nested = parseSections(section[key], nestDepth);
|
|
18
|
+
for (const nestedKey of Object.keys(nested)) {
|
|
19
|
+
parseResults[`${key}.${nestedKey}`] = nested[nestedKey];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
parseResults[key] = section[key];
|
|
20
24
|
}
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
parseResults[key] = section[key];
|
|
24
25
|
}
|
|
25
26
|
}
|
|
27
|
+
catch (e) {
|
|
28
|
+
throw new actions_core_1.IntegrationError(`Unexpected Exception while parsing Event payload.\n ${e}`, 'UNEXPECTED_EVENT_PARSING_EXCEPTION', 400);
|
|
29
|
+
}
|
|
26
30
|
return parseResults;
|
|
27
31
|
}
|
|
28
32
|
exports.parseSections = parseSections;
|
|
@@ -33,32 +37,57 @@ function addUpdateEvents(payload, email, limit) {
|
|
|
33
37
|
const eventSource = get_1.default(payload, 'type', 'Null') + ' Event';
|
|
34
38
|
const timestamp = get_1.default(payload, 'timestamp', 'Null');
|
|
35
39
|
let propertiesTraitsKV = {};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
40
|
+
try {
|
|
41
|
+
if (payload.key_value_pairs)
|
|
42
|
+
propertiesTraitsKV = {
|
|
43
|
+
...propertiesTraitsKV,
|
|
44
|
+
...parseSections(payload.key_value_pairs, 0)
|
|
45
|
+
};
|
|
46
|
+
if (payload.array_data)
|
|
47
|
+
propertiesTraitsKV = {
|
|
48
|
+
...propertiesTraitsKV,
|
|
49
|
+
...parseSections(payload.array_data, 0)
|
|
50
|
+
};
|
|
51
|
+
if (payload.traits)
|
|
52
|
+
propertiesTraitsKV = {
|
|
53
|
+
...propertiesTraitsKV,
|
|
54
|
+
...parseSections(payload.traits, 0)
|
|
55
|
+
};
|
|
56
|
+
if (payload.properties)
|
|
57
|
+
propertiesTraitsKV = {
|
|
58
|
+
...propertiesTraitsKV,
|
|
59
|
+
...parseSections(payload.properties, 0)
|
|
60
|
+
};
|
|
61
|
+
if (payload.context)
|
|
62
|
+
propertiesTraitsKV = {
|
|
63
|
+
...propertiesTraitsKV,
|
|
64
|
+
...parseSections(payload.context, 0)
|
|
65
|
+
};
|
|
66
|
+
if (Object.keys(propertiesTraitsKV).length > limit) {
|
|
67
|
+
throw new actions_core_1.IntegrationError('Properties Exceed Max. Use Mapping to limit the number of Attributes (Properties, Traits) present and thereby reduce the Campaign Relational Table Rows consumed.', 'EXCEEDS_MAX_PROPERTIES_MAX', 400);
|
|
68
|
+
}
|
|
54
69
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
70
|
+
catch (e) {
|
|
71
|
+
throw new actions_core_1.IntegrationError('Unexpected Exception processing payload \n ${e}', 'UNEXPECTED_EXCEPTION_PROCESSING_PAYLOAD', 400);
|
|
72
|
+
}
|
|
73
|
+
let ak = '';
|
|
74
|
+
let av = '';
|
|
75
|
+
const getValue = (o, part) => Object.entries(o).find(([k, _v]) => k.includes(part))?.[1];
|
|
76
|
+
if (getValue(propertiesTraitsKV, 'computation_class')) {
|
|
77
|
+
ak = getValue(propertiesTraitsKV, 'computation_key');
|
|
78
|
+
av = getValue(propertiesTraitsKV, `${ak}`);
|
|
79
|
+
}
|
|
80
|
+
if (getValue(propertiesTraitsKV, 'audience_key')) {
|
|
81
|
+
ak = getValue(propertiesTraitsKV, 'audience_key');
|
|
82
|
+
av = getValue(propertiesTraitsKV, `${ak}`);
|
|
83
|
+
}
|
|
84
|
+
if (av !== '') {
|
|
85
|
+
let audiStatus = av;
|
|
86
|
+
eventValue = audiStatus;
|
|
87
|
+
audiStatus = audiStatus.toString().toLowerCase();
|
|
88
|
+
if (audiStatus === 'true')
|
|
60
89
|
eventValue = 'Audience Entered';
|
|
61
|
-
if (
|
|
90
|
+
if (audiStatus === 'false')
|
|
62
91
|
eventValue = 'Audience Exited';
|
|
63
92
|
eventName = ak;
|
|
64
93
|
xmlRows += `
|
|
@@ -85,29 +114,4 @@ function addUpdateEvents(payload, email, limit) {
|
|
|
85
114
|
return xmlRows;
|
|
86
115
|
}
|
|
87
116
|
exports.addUpdateEvents = addUpdateEvents;
|
|
88
|
-
const postUpdates = async (request, settings, auth, xmlRows, i) => {
|
|
89
|
-
const pup = await request(`https://api-campaign-${settings.a_region}-${settings.a_pod}.goacoustic.com/XMLAPI`, {
|
|
90
|
-
method: 'POST',
|
|
91
|
-
headers: {
|
|
92
|
-
Authorization: `Bearer ${auth?.accessToken}`,
|
|
93
|
-
'Content-Type': 'text/xml',
|
|
94
|
-
'user-agent': `Segment Action (Acoustic Destination) ${i}`,
|
|
95
|
-
Connection: 'keep-alive',
|
|
96
|
-
'Accept-Encoding': 'gzip, deflate, br',
|
|
97
|
-
Accept: '*/*'
|
|
98
|
-
},
|
|
99
|
-
body: `<Envelope>
|
|
100
|
-
<Body>
|
|
101
|
-
<InsertUpdateRelationalTable>
|
|
102
|
-
<TABLE_ID>${tablemaintutilities_1.eventTableListId} </TABLE_ID>
|
|
103
|
-
<ROWS>
|
|
104
|
-
${xmlRows}
|
|
105
|
-
</ROWS>
|
|
106
|
-
</InsertUpdateRelationalTable>
|
|
107
|
-
</Body>
|
|
108
|
-
</Envelope>`
|
|
109
|
-
});
|
|
110
|
-
return pup;
|
|
111
|
-
};
|
|
112
|
-
exports.postUpdates = postUpdates;
|
|
113
117
|
//# sourceMappingURL=eventprocessing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventprocessing.js","sourceRoot":"","sources":["../../../../src/destinations/acoustic/Utility/eventprocessing.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAwD;
|
|
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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OAAO;YAAE,UAAU,GAAG,iBAAiB,CAAA;QAC1D,SAAS,GAAG,EAAE,CAAA;QAEd,OAAO,IAAI;;iDAEkC,KAAK;iDACL,WAAW;iDACX,SAAS;iDACT,UAAU;iDACV,SAAS;aAC7C,CAAA;KACV;IAGD,KAAK,MAAM,CAAC,IAAI,kBAAkB,EAAE;QAClC,MAAM,SAAS,GAAG,CAAC,CAAA;QACnB,MAAM,UAAU,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAA;QAExC,OAAO,IAAI;;gDAEiC,KAAK;gDACL,WAAW;gDACX,SAAS;gDACT,UAAU;gDACV,SAAS;YAC7C,CAAA;KACT;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AA7HD,0CA6HC"}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
import { OAuth2ClientCredentials, RefreshAccessTokenResult } from '@segment/actions-core';
|
|
1
2
|
import { RequestClient } from '@segment/actions-core';
|
|
2
3
|
import { Settings } from '../generated-types';
|
|
3
4
|
import { AuthTokens } from '@segment/actions-core/src/destination-kit/parse-settings';
|
|
4
5
|
export declare let eventTableListId: string;
|
|
6
|
+
export interface accessResp {
|
|
7
|
+
access_token: string;
|
|
8
|
+
token_type: string;
|
|
9
|
+
refresh_token: string;
|
|
10
|
+
expires_in: number;
|
|
11
|
+
}
|
|
12
|
+
export declare let authCreds: OAuth2ClientCredentials;
|
|
13
|
+
export declare function getAuthCreds(): OAuth2ClientCredentials;
|
|
14
|
+
export declare function getEventTableListId(): string;
|
|
15
|
+
export declare function getAccessToken(request: RequestClient, settings: Settings): Promise<RefreshAccessTokenResult>;
|
|
16
|
+
export declare function doPOST(request: RequestClient, settings: Settings, auth: AuthTokens, body: string, action: string): Promise<string>;
|
|
5
17
|
export declare function preChecksAndMaint(request: RequestClient, settings: Settings, auth: AuthTokens): Promise<string>;
|
|
6
18
|
export declare function checkRTExist(request: RequestClient, settings: Settings, auth: AuthTokens): Promise<string>;
|
|
7
|
-
export declare function createSegmentEventsTable(request: RequestClient, settings: Settings, auth: AuthTokens): Promise<
|
|
19
|
+
export declare function createSegmentEventsTable(request: RequestClient, settings: Settings, auth: AuthTokens): Promise<string>;
|
|
@@ -1,8 +1,91 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createSegmentEventsTable = exports.checkRTExist = exports.preChecksAndMaint = exports.eventTableListId = void 0;
|
|
3
|
+
exports.createSegmentEventsTable = exports.checkRTExist = exports.preChecksAndMaint = exports.doPOST = exports.getAccessToken = exports.getEventTableListId = exports.getAuthCreds = exports.authCreds = exports.eventTableListId = void 0;
|
|
4
4
|
const actions_core_1 = require("@segment/actions-core");
|
|
5
5
|
exports.eventTableListId = '';
|
|
6
|
+
exports.authCreds = {
|
|
7
|
+
accessToken: '',
|
|
8
|
+
clientId: '',
|
|
9
|
+
clientSecret: '',
|
|
10
|
+
refreshToken: '',
|
|
11
|
+
refreshTokenUrl: ''
|
|
12
|
+
};
|
|
13
|
+
function getAuthCreds() {
|
|
14
|
+
return exports.authCreds;
|
|
15
|
+
}
|
|
16
|
+
exports.getAuthCreds = getAuthCreds;
|
|
17
|
+
function getEventTableListId() {
|
|
18
|
+
return exports.eventTableListId;
|
|
19
|
+
}
|
|
20
|
+
exports.getEventTableListId = getEventTableListId;
|
|
21
|
+
async function getAccessToken(request, settings) {
|
|
22
|
+
exports.authCreds = getAuthCreds();
|
|
23
|
+
exports.authCreds.accessToken = '';
|
|
24
|
+
exports.authCreds.clientId = settings.a_clientId;
|
|
25
|
+
exports.authCreds.clientSecret = settings.a_clientSecret;
|
|
26
|
+
exports.authCreds.refreshToken = settings.a_refreshToken;
|
|
27
|
+
exports.authCreds.refreshTokenUrl = `https://api-campaign-${settings.region}-${settings.pod}.goacoustic.com/oauth/token`;
|
|
28
|
+
const requestAToken = await request(exports.authCreds.refreshTokenUrl, {
|
|
29
|
+
method: 'POST',
|
|
30
|
+
body: new URLSearchParams({
|
|
31
|
+
refresh_token: exports.authCreds.refreshToken,
|
|
32
|
+
client_id: exports.authCreds.clientId,
|
|
33
|
+
client_secret: exports.authCreds.clientSecret,
|
|
34
|
+
grant_type: 'refresh_token'
|
|
35
|
+
}),
|
|
36
|
+
headers: {
|
|
37
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
38
|
+
'User-Agent': 'Segment Action (Acoustic Destination) "GetAccessToken"'
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const ratResp = (await requestAToken.data);
|
|
42
|
+
exports.authCreds.accessToken = ratResp.access_token;
|
|
43
|
+
return { accessToken: exports.authCreds.accessToken, refreshToken: exports.authCreds.refreshToken };
|
|
44
|
+
}
|
|
45
|
+
exports.getAccessToken = getAccessToken;
|
|
46
|
+
async function doPOST(request, settings, auth, body, action) {
|
|
47
|
+
if (!auth.accessToken) {
|
|
48
|
+
if (!exports.authCreds.accessToken) {
|
|
49
|
+
const ratr = await getAccessToken(request, settings);
|
|
50
|
+
auth = {
|
|
51
|
+
accessToken: ratr.accessToken,
|
|
52
|
+
refreshToken: ratr.refreshToken,
|
|
53
|
+
refreshTokenURL: `https://api-campaign-${settings.region}-${settings.pod}.goacoustic.com/XMLAPI`
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
else
|
|
57
|
+
auth.accessToken = exports.authCreds.accessToken;
|
|
58
|
+
}
|
|
59
|
+
let resultTxt = '';
|
|
60
|
+
try {
|
|
61
|
+
const postResults = await request(`https://api-campaign-${settings.region}-${settings.pod}.goacoustic.com/XMLAPI`, {
|
|
62
|
+
method: 'POST',
|
|
63
|
+
headers: {
|
|
64
|
+
Authorization: `Bearer ${auth?.accessToken}`,
|
|
65
|
+
'Content-Type': 'text/xml',
|
|
66
|
+
'user-agent': `Segment Action (Acoustic Destination) ${action}`,
|
|
67
|
+
Connection: 'keep-alive',
|
|
68
|
+
'Accept-Encoding': 'gzip, deflate, br',
|
|
69
|
+
Accept: '*/*'
|
|
70
|
+
},
|
|
71
|
+
body: `${body}`
|
|
72
|
+
});
|
|
73
|
+
const res = await postResults.data;
|
|
74
|
+
resultTxt = res;
|
|
75
|
+
if (resultTxt.indexOf('<SUCCESS>FALSE</SUCCESS>') > -1 || resultTxt.indexOf('<SUCCESS>false</SUCCESS>') > -1) {
|
|
76
|
+
const rx = /<FaultString>(.*)<\/FaultString>/gm;
|
|
77
|
+
const r = rx.exec(resultTxt);
|
|
78
|
+
if (r.indexOf('max number of concurrent') > -1)
|
|
79
|
+
throw new actions_core_1.RetryableError('Currently exceeding Max number of concurrent authenticated requests via API, retrying', 429);
|
|
80
|
+
resultTxt = '';
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
catch (e) {
|
|
84
|
+
throw new actions_core_1.IntegrationError(`Unexpected Request Exception \n${e}`, 'UNEXPECTED_REQUEST_EXCEPTION', 400);
|
|
85
|
+
}
|
|
86
|
+
return resultTxt;
|
|
87
|
+
}
|
|
88
|
+
exports.doPOST = doPOST;
|
|
6
89
|
async function preChecksAndMaint(request, settings, auth) {
|
|
7
90
|
exports.eventTableListId = await checkRTExist(request, settings, auth);
|
|
8
91
|
if (exports.eventTableListId === '') {
|
|
@@ -15,24 +98,13 @@ async function preChecksAndMaint(request, settings, auth) {
|
|
|
15
98
|
}
|
|
16
99
|
exports.preChecksAndMaint = preChecksAndMaint;
|
|
17
100
|
async function checkRTExist(request, settings, auth) {
|
|
18
|
-
if (settings.
|
|
19
|
-
const
|
|
20
|
-
method: 'POST',
|
|
21
|
-
headers: {
|
|
22
|
-
Authorization: `Bearer ${auth?.accessToken}`,
|
|
23
|
-
'Content-Type': 'text/xml',
|
|
24
|
-
'user-agent': `Segment Action (Acoustic Destination)`,
|
|
25
|
-
Connection: 'keep-alive',
|
|
26
|
-
'Accept-Encoding': 'gzip, deflate, br',
|
|
27
|
-
Accept: '*/*'
|
|
28
|
-
},
|
|
29
|
-
body: `
|
|
101
|
+
if (settings.tableListId != '') {
|
|
102
|
+
const checkDefinedTableId = `
|
|
30
103
|
<Envelope> <Body>
|
|
31
|
-
<GetListMetaData> <LIST_ID>${settings.
|
|
104
|
+
<GetListMetaData> <LIST_ID>${settings.tableListId}</LIST_ID>
|
|
32
105
|
</GetListMetaData> </Body>
|
|
33
|
-
</Envelope
|
|
34
|
-
|
|
35
|
-
const respText = await chkListId.text();
|
|
106
|
+
</Envelope>`;
|
|
107
|
+
const respText = (await doPOST(request, settings, auth, checkDefinedTableId, 'CheckDefinedTable')) ?? '';
|
|
36
108
|
const rx = /<SUCCESS>TRUE<\/SUCCESS>(?:\s)*<ID>(.*)<\/ID/gm;
|
|
37
109
|
if (respText != null) {
|
|
38
110
|
const r = rx.exec(respText);
|
|
@@ -43,28 +115,17 @@ async function checkRTExist(request, settings, auth) {
|
|
|
43
115
|
}
|
|
44
116
|
}
|
|
45
117
|
else {
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<Body>
|
|
58
|
-
<GetLists>
|
|
59
|
-
<VISIBILITY>1 </VISIBILITY>
|
|
60
|
-
<LIST_TYPE> 15 </LIST_TYPE>
|
|
61
|
-
<INCLUDE_ALL_LISTS> True </INCLUDE_ALL_LISTS>
|
|
62
|
-
</GetLists>
|
|
63
|
-
</Body>
|
|
64
|
-
</Envelope>`
|
|
65
|
-
});
|
|
66
|
-
await chkExist.data;
|
|
67
|
-
const lists = chkExist.content;
|
|
118
|
+
const getTableList = `<Envelope>
|
|
119
|
+
<Body>
|
|
120
|
+
<GetLists>
|
|
121
|
+
<VISIBILITY>1 </VISIBILITY>
|
|
122
|
+
<LIST_TYPE> 15 </LIST_TYPE>
|
|
123
|
+
<INCLUDE_ALL_LISTS> True </INCLUDE_ALL_LISTS>
|
|
124
|
+
</GetLists>
|
|
125
|
+
</Body>
|
|
126
|
+
</Envelope>`;
|
|
127
|
+
const respText = (await doPOST(request, settings, auth, getTableList, 'GetTableList')) ?? '';
|
|
128
|
+
const lists = respText;
|
|
68
129
|
if (lists.indexOf('Segment Events Table') > 0) {
|
|
69
130
|
const simplify = lists.substring(lists.indexOf('Segment Events Table') - 40, lists.indexOf('Segment Events Table') + 40);
|
|
70
131
|
const rx = /<ID>(.*)<\/ID>/gm;
|
|
@@ -80,13 +141,13 @@ async function checkRTExist(request, settings, auth) {
|
|
|
80
141
|
}
|
|
81
142
|
exports.checkRTExist = checkRTExist;
|
|
82
143
|
async function createSegmentEventsTable(request, settings, auth) {
|
|
83
|
-
const
|
|
144
|
+
const createSET = `<Envelope>
|
|
84
145
|
<Body>
|
|
85
146
|
<CreateTable>
|
|
86
|
-
<TABLE_NAME
|
|
147
|
+
<TABLE_NAME>${settings.tableName}</TABLE_NAME>
|
|
87
148
|
<COLUMNS>
|
|
88
149
|
<COLUMN>
|
|
89
|
-
<NAME>
|
|
150
|
+
<NAME>EmailId</NAME>
|
|
90
151
|
<TYPE>EMAIL</TYPE>
|
|
91
152
|
<IS_REQUIRED>true</IS_REQUIRED>
|
|
92
153
|
<KEY_COLUMN>TRUE</KEY_COLUMN>
|
|
@@ -110,7 +171,7 @@ async function createSegmentEventsTable(request, settings, auth) {
|
|
|
110
171
|
<KEY_COLUMN>FALSE</KEY_COLUMN>
|
|
111
172
|
</COLUMN>
|
|
112
173
|
<COLUMN>
|
|
113
|
-
<NAME>
|
|
174
|
+
<NAME>EventTimestamp</NAME>
|
|
114
175
|
<TYPE>DATE_TIME</TYPE>
|
|
115
176
|
<IS_REQUIRED>TRUE</IS_REQUIRED>
|
|
116
177
|
<KEY_COLUMN>FALSE</KEY_COLUMN>
|
|
@@ -119,28 +180,16 @@ async function createSegmentEventsTable(request, settings, auth) {
|
|
|
119
180
|
</CreateTable>
|
|
120
181
|
</Body>
|
|
121
182
|
</Envelope>`;
|
|
122
|
-
const
|
|
123
|
-
method: 'POST',
|
|
124
|
-
headers: {
|
|
125
|
-
Authorization: `Bearer ${auth?.accessToken}`,
|
|
126
|
-
'Content-Type': 'text/xml',
|
|
127
|
-
'user-agent': `Segment Action (Acoustic Destination)`,
|
|
128
|
-
Connection: 'keep-alive',
|
|
129
|
-
'Accept-Encoding': 'gzip, deflate, br',
|
|
130
|
-
Accept: '*/*'
|
|
131
|
-
},
|
|
132
|
-
body: createEventsXML
|
|
133
|
-
});
|
|
134
|
-
const respText = await createSegmentEventsTable.text();
|
|
183
|
+
const cset = (await doPOST(request, settings, auth, createSET, 'CreateSegmentEventsTable')) ?? '';
|
|
135
184
|
const rx = /<SUCCESS>TRUE<\/SUCCESS>(?:\s)*<TABLE_ID>(.*)<\/TABLE_ID/gm;
|
|
136
185
|
let tid = '';
|
|
137
|
-
if (
|
|
138
|
-
const r = rx.exec(
|
|
186
|
+
if (cset != null) {
|
|
187
|
+
const r = rx.exec(cset);
|
|
139
188
|
if (r)
|
|
140
189
|
tid = r[1];
|
|
141
190
|
}
|
|
142
191
|
exports.eventTableListId = tid;
|
|
143
|
-
return
|
|
192
|
+
return exports.eventTableListId;
|
|
144
193
|
}
|
|
145
194
|
exports.createSegmentEventsTable = createSegmentEventsTable;
|
|
146
195
|
//# sourceMappingURL=tablemaintutilities.js.map
|
|
@@ -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,wDAK8B;AAKnB,QAAA,gBAAgB,GAAG,EAAE,CAAA;AAOrB,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,OAA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,IAAI,EAAE,SAAS,EAAE,0BAA0B,CAAC,CAAC,IAAI,EAAE,CAAA;IAEjG,MAAM,EAAE,GAAG,4DAA4D,CAAA;IACvE,IAAI,GAAG,GAAG,EAAE,CAAA;IACZ,IAAI,IAAI,IAAI,IAAI,EAAE;QAChB,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACvB,IAAI,CAAC;YAAE,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;KAClB;IACD,wBAAgB,GAAG,GAAG,CAAA;IACtB,OAAO,wBAAgB,CAAA;AACzB,CAAC;AAnDD,4DAmDC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export interface Settings {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
pod: string;
|
|
3
|
+
region: string;
|
|
4
|
+
tableName: string;
|
|
5
|
+
tableListId: string;
|
|
5
6
|
a_clientId: string;
|
|
6
7
|
a_clientSecret: string;
|
|
7
8
|
a_refreshToken: string;
|
|
8
|
-
|
|
9
|
+
attributesMax?: number;
|
|
9
10
|
}
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
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
|
+
const tablemaintutilities_1 = require("./Utility/tablemaintutilities");
|
|
8
9
|
const presets = [
|
|
9
10
|
{
|
|
10
11
|
name: 'Track Calls',
|
|
@@ -44,14 +45,14 @@ const destination = {
|
|
|
44
45
|
authentication: {
|
|
45
46
|
scheme: 'oauth2',
|
|
46
47
|
fields: {
|
|
47
|
-
|
|
48
|
+
pod: {
|
|
48
49
|
label: 'Pod',
|
|
49
50
|
description: 'Pod Number of Campaign Instance',
|
|
50
51
|
default: '2',
|
|
51
52
|
type: 'string',
|
|
52
53
|
required: true
|
|
53
54
|
},
|
|
54
|
-
|
|
55
|
+
region: {
|
|
55
56
|
label: 'Region',
|
|
56
57
|
description: 'Region where Pod is hosted, either US, EU, AP, or CA',
|
|
57
58
|
choices: [
|
|
@@ -64,12 +65,19 @@ const destination = {
|
|
|
64
65
|
type: 'string',
|
|
65
66
|
required: true
|
|
66
67
|
},
|
|
67
|
-
|
|
68
|
-
label: 'Acoustic Segment
|
|
69
|
-
description: 'The Segment
|
|
70
|
-
default: '',
|
|
68
|
+
tableName: {
|
|
69
|
+
label: 'Acoustic Segment Table Name',
|
|
70
|
+
description: 'The Segment Table Name in Acoustic Campaign Data dialog.',
|
|
71
|
+
default: 'Segment Events Table',
|
|
71
72
|
type: 'string',
|
|
72
|
-
required:
|
|
73
|
+
required: true
|
|
74
|
+
},
|
|
75
|
+
tableListId: {
|
|
76
|
+
label: 'Acoustic Segment Table List Id',
|
|
77
|
+
description: 'The Segment Table List Id from the Database-Relational Table dialog in Acoustic Campaign',
|
|
78
|
+
default: ' ',
|
|
79
|
+
type: 'string',
|
|
80
|
+
required: true
|
|
73
81
|
},
|
|
74
82
|
a_clientId: {
|
|
75
83
|
label: 'Acoustic app definition ClientId',
|
|
@@ -92,32 +100,16 @@ const destination = {
|
|
|
92
100
|
type: 'password',
|
|
93
101
|
required: true
|
|
94
102
|
},
|
|
95
|
-
|
|
103
|
+
attributesMax: {
|
|
96
104
|
label: 'Properties Max',
|
|
97
|
-
description: 'Note: Before increasing the default max number, consult the Acoustic Destination documentation.',
|
|
105
|
+
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.',
|
|
98
106
|
default: 30,
|
|
99
107
|
type: 'number',
|
|
100
108
|
required: false
|
|
101
109
|
}
|
|
102
110
|
},
|
|
103
111
|
refreshAccessToken: async (request, { settings }) => {
|
|
104
|
-
|
|
105
|
-
method: 'POST',
|
|
106
|
-
body: new URLSearchParams({
|
|
107
|
-
refresh_token: settings.a_refreshToken,
|
|
108
|
-
client_id: settings.a_clientId,
|
|
109
|
-
client_secret: settings.a_clientSecret,
|
|
110
|
-
grant_type: 'refresh_token'
|
|
111
|
-
}),
|
|
112
|
-
headers: {
|
|
113
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
114
|
-
'user-agent': `Segment Action (Acoustic Destination)`,
|
|
115
|
-
Connection: 'keep-alive',
|
|
116
|
-
'Accept-Encoding': 'gzip, deflate, br',
|
|
117
|
-
Accept: '*/*'
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
return { accessToken: at.data.access_token };
|
|
112
|
+
return await tablemaintutilities_1.getAccessToken(request, settings);
|
|
121
113
|
}
|
|
122
114
|
},
|
|
123
115
|
presets,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/acoustic/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAE5E,oEAA2C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/acoustic/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAE5E,oEAA2C;AAC3C,uEAA8D;AAW9D,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,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AAE,GAAG;gBACZ,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,UAAU,EAAE;gBACV,KAAK,EAAE,kCAAkC;gBACzC,WAAW,EAAE,mEAAmE;gBAChF,OAAO,EAAE,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,cAAc,EAAE;gBACd,KAAK,EAAE,sCAAsC;gBAC7C,WAAW,EAAE,uEAAuE;gBACpF,OAAO,EAAE,EAAE;gBACX,IAAI,EAAE,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;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"}
|
|
@@ -36,36 +36,50 @@ const action = {
|
|
|
36
36
|
'@path': '$.timestamp'
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
+
key_value_pairs: {
|
|
40
|
+
label: 'Key-Value pairs',
|
|
41
|
+
description: 'Map simple Key-Value pairs of Event data here.',
|
|
42
|
+
type: 'object'
|
|
43
|
+
},
|
|
44
|
+
array_data: {
|
|
45
|
+
label: 'Arrays',
|
|
46
|
+
description: 'Map Arrays of data into flattened data attributes here.',
|
|
47
|
+
type: 'object',
|
|
48
|
+
multiple: true,
|
|
49
|
+
additionalProperties: true
|
|
50
|
+
},
|
|
39
51
|
context: {
|
|
40
52
|
label: 'Context',
|
|
41
|
-
description: 'Parses all properties provided via a Context Section ',
|
|
42
|
-
type: 'object'
|
|
43
|
-
default: {
|
|
44
|
-
'@path': '$.context'
|
|
45
|
-
}
|
|
53
|
+
description: 'Deprecated - Parses all properties provided via a Context Section ',
|
|
54
|
+
type: 'object'
|
|
46
55
|
},
|
|
47
56
|
properties: {
|
|
48
57
|
label: 'Properties',
|
|
49
|
-
description: 'Parses all properties provided via a Properties Section',
|
|
50
|
-
type: 'object'
|
|
51
|
-
default: {
|
|
52
|
-
'@path': '$.properties'
|
|
53
|
-
}
|
|
58
|
+
description: 'Deprecated - Parses all properties provided via a Properties Section',
|
|
59
|
+
type: 'object'
|
|
54
60
|
},
|
|
55
61
|
traits: {
|
|
56
62
|
label: 'Traits',
|
|
57
|
-
description: 'Parses all properties provided via a Traits Section',
|
|
58
|
-
type: 'object'
|
|
59
|
-
default: {
|
|
60
|
-
'@path': '$.traits'
|
|
61
|
-
}
|
|
63
|
+
description: 'Deprecated - Parses all properties provided via a Traits Section',
|
|
64
|
+
type: 'object'
|
|
62
65
|
}
|
|
63
66
|
},
|
|
64
67
|
perform: async (request, { settings, payload, auth }) => {
|
|
65
|
-
const email = get_1.default(payload, 'email', '
|
|
66
|
-
await tablemaintutilities_1.preChecksAndMaint(request, settings, auth);
|
|
67
|
-
const rows = eventprocessing_1.addUpdateEvents(payload, email, settings.
|
|
68
|
-
|
|
68
|
+
const email = get_1.default(payload, 'email', '');
|
|
69
|
+
const tableId = await tablemaintutilities_1.preChecksAndMaint(request, settings, auth);
|
|
70
|
+
const rows = eventprocessing_1.addUpdateEvents(payload, email, settings.attributesMax);
|
|
71
|
+
let a_Auth = {};
|
|
72
|
+
if (!auth)
|
|
73
|
+
a_Auth = tablemaintutilities_1.getAuthCreds();
|
|
74
|
+
const POSTUpdates = `<Envelope>
|
|
75
|
+
<Body>
|
|
76
|
+
<InsertUpdateRelationalTable>
|
|
77
|
+
<TABLE_ID>${tableId} </TABLE_ID>
|
|
78
|
+
<ROWS>${rows}</ROWS>
|
|
79
|
+
</InsertUpdateRelationalTable>
|
|
80
|
+
</Body>
|
|
81
|
+
</Envelope>`;
|
|
82
|
+
return await tablemaintutilities_1.doPOST(request, settings, auth ?? a_Auth, POSTUpdates, 'POST_Updates');
|
|
69
83
|
}
|
|
70
84
|
};
|
|
71
85
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/acoustic/receiveEvents/index.ts"],"names":[],"mappings":";;;;;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/acoustic/receiveEvents/index.ts"],"names":[],"mappings":";;;;;AAGA,wEAAwF;AACxF,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;QACD,eAAe,EAAE;YACf,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,g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.io/api/segment";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../src/destinations/canny-functions/constants/api.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG,8BAA8B,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DefaultFields = void 0;
|
|
4
|
+
const DefaultFields = ['avatar', 'company', 'createdAt', 'email', 'id', 'name'];
|
|
5
|
+
exports.DefaultFields = DefaultFields;
|
|
6
|
+
//# sourceMappingURL=traits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traits.js","sourceRoot":"","sources":["../../../../src/destinations/canny-functions/constants/traits.ts"],"names":[],"mappings":";;;AAAA,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;AAEtE,sCAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/canny-functions/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/canny-functions/group/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const api_1 = require("../constants/api");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Group',
|
|
6
|
+
description: 'Updates or adds properties to a company. Company is created if it does not exist.',
|
|
7
|
+
defaultSubscription: 'type = "group"',
|
|
8
|
+
fields: {
|
|
9
|
+
groupId: {
|
|
10
|
+
label: 'Group ID',
|
|
11
|
+
type: 'string',
|
|
12
|
+
required: true,
|
|
13
|
+
description: 'The unique identifier of the group.',
|
|
14
|
+
default: {
|
|
15
|
+
'@path': '$.groupId'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
traits: {
|
|
19
|
+
label: 'Group Properties',
|
|
20
|
+
type: 'object',
|
|
21
|
+
description: 'Properties to set on the group profile',
|
|
22
|
+
default: {
|
|
23
|
+
'@path': '$.traits'
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
type: {
|
|
27
|
+
label: 'Type',
|
|
28
|
+
type: 'string',
|
|
29
|
+
required: true,
|
|
30
|
+
description: 'The type of the event',
|
|
31
|
+
default: {
|
|
32
|
+
'@path': '$.type'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
perform: (request, { payload }) => {
|
|
37
|
+
const { groupId, type, traits } = payload;
|
|
38
|
+
const body = JSON.stringify({ groupId, traits, type });
|
|
39
|
+
return request(`${api_1.BASE_API_URL}/group`, {
|
|
40
|
+
method: 'post',
|
|
41
|
+
body
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.default = action;
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/canny-functions/group/index.ts"],"names":[],"mappings":";;AACA,0CAA+C;AAI/C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,mFAAmF;IAChG,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,qCAAqC;YAClD,OAAO,EAAE;gBACP,OAAO,EAAE,WAAW;aACrB;SACF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,kBAAkB;YACzB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,wCAAwC;YACrD,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,uBAAuB;YACpC,OAAO,EAAE;gBACP,OAAO,EAAE,QAAQ;aAClB;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;QAEzC,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAA;QACtD,OAAO,OAAO,CAAC,GAAG,kBAAY,QAAQ,EAAE;YACtC,MAAM,EAAE,MAAM;YACd,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/canny-functions/identify/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const api_1 = require("../constants/api");
|
|
4
|
+
const traits_1 = require("../constants/traits");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Identify',
|
|
7
|
+
description: 'Create or update a user profile in Canny.',
|
|
8
|
+
fields: {
|
|
9
|
+
userId: {
|
|
10
|
+
label: 'User ID',
|
|
11
|
+
type: 'string',
|
|
12
|
+
required: true,
|
|
13
|
+
description: 'A distinct ID of an identified (logged in) user.',
|
|
14
|
+
default: {
|
|
15
|
+
'@path': '$.userId'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
traits: {
|
|
19
|
+
label: 'User Properties',
|
|
20
|
+
type: 'object',
|
|
21
|
+
description: 'Properties to set on the user profile',
|
|
22
|
+
additionalProperties: true,
|
|
23
|
+
defaultObjectUI: 'keyvalue',
|
|
24
|
+
properties: {
|
|
25
|
+
avatar: {
|
|
26
|
+
label: 'Avatar',
|
|
27
|
+
description: 'URL to an avatar image for the user',
|
|
28
|
+
type: 'string'
|
|
29
|
+
},
|
|
30
|
+
company: {
|
|
31
|
+
label: 'Company',
|
|
32
|
+
description: 'Company the user represents. Should contain: name (String), id (String or Number)',
|
|
33
|
+
type: 'object'
|
|
34
|
+
},
|
|
35
|
+
createdAt: {
|
|
36
|
+
label: 'Create At Date',
|
|
37
|
+
description: "Date the user's account was first created. Segment recommends using ISO-8601 date strings",
|
|
38
|
+
type: 'string'
|
|
39
|
+
},
|
|
40
|
+
id: {
|
|
41
|
+
label: 'User ID',
|
|
42
|
+
description: 'A distinct identifier of the user in your application.',
|
|
43
|
+
type: 'string'
|
|
44
|
+
},
|
|
45
|
+
name: {
|
|
46
|
+
label: 'Name',
|
|
47
|
+
description: "The user's name",
|
|
48
|
+
type: 'string'
|
|
49
|
+
},
|
|
50
|
+
email: {
|
|
51
|
+
label: 'Email',
|
|
52
|
+
description: "The user's email",
|
|
53
|
+
type: 'string'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
default: {
|
|
57
|
+
avatar: { '@path': '$.traits.avatar' },
|
|
58
|
+
company: { '@path': '$.traits.company' },
|
|
59
|
+
createdAt: { '@path': '$.traits.createdAt' },
|
|
60
|
+
id: { '@path': '$.traits.id' },
|
|
61
|
+
name: { '@path': '$.traits.name' },
|
|
62
|
+
email: { '@path': '$.traits.email' }
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
type: {
|
|
66
|
+
label: 'Type',
|
|
67
|
+
type: 'string',
|
|
68
|
+
required: true,
|
|
69
|
+
description: 'The type of the event',
|
|
70
|
+
default: {
|
|
71
|
+
'@path': '$.type'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
perform: async (request, { payload }) => {
|
|
76
|
+
const { type, userId } = payload;
|
|
77
|
+
const traits = payload.traits ? { ...payload.traits } : {};
|
|
78
|
+
const customFields = {};
|
|
79
|
+
Object.entries(traits).forEach(([key, value]) => {
|
|
80
|
+
if (!traits_1.DefaultFields.includes(key)) {
|
|
81
|
+
customFields[key] = value;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
if (Object.keys(customFields).length) {
|
|
85
|
+
traits.customFields = customFields;
|
|
86
|
+
}
|
|
87
|
+
const body = JSON.stringify({ traits, type, userId });
|
|
88
|
+
return request(`${api_1.BASE_API_URL}/v2/identify`, {
|
|
89
|
+
method: 'post',
|
|
90
|
+
body
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
exports.default = action;
|
|
95
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/canny-functions/identify/index.ts"],"names":[],"mappings":";;AACA,0CAA+C;AAC/C,gDAAmD;AAInD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,2CAA2C;IACxD,MAAM,EAAE;QACN,MAAM,EAAE;YACN,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,kDAAkD;YAC/D,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uCAAuC;YACpD,oBAAoB,EAAE,IAAI;YAC1B,eAAe,EAAE,UAAU;YAC3B,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,KAAK,EAAE,QAAQ;oBACf,WAAW,EAAE,qCAAqC;oBAClD,IAAI,EAAE,QAAQ;iBACf;gBACD,OAAO,EAAE;oBACP,KAAK,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CAAC,CAAC,EAAE,CAAA;QACnF,MAAM,YAAY,GAA4B,EAAE,CAAA;QAEhD,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC9C,IAAI,CAAC,sBAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAChC,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;aAC1B;QACH,CAAC,CAAC,CAAA;QAEF,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,EAAE;YACpC,MAAM,CAAC,YAAY,GAAG,YAAY,CAAA;SACnC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;QACrD,OAAO,OAAO,CAAC,GAAG,kBAAY,cAAc,EAAE;YAC5C,MAAM,EAAE,MAAM;YACd,IAAI;SACL,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 api_1 = require("./constants/api");
|
|
8
|
+
const identify_1 = __importDefault(require("./identify"));
|
|
9
|
+
const group_1 = __importDefault(require("./group"));
|
|
10
|
+
const destination = {
|
|
11
|
+
name: 'Canny (Actions)',
|
|
12
|
+
slug: 'actions-canny',
|
|
13
|
+
mode: 'cloud',
|
|
14
|
+
authentication: {
|
|
15
|
+
scheme: 'custom',
|
|
16
|
+
fields: {
|
|
17
|
+
apiKey: {
|
|
18
|
+
label: 'API Key',
|
|
19
|
+
description: 'You can find your API Key in the Segment Integration page in your admin settings.',
|
|
20
|
+
type: 'string',
|
|
21
|
+
required: true
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
testAuthentication(request) {
|
|
25
|
+
return request(`${api_1.BASE_API_URL}/validateAPIKey`, {
|
|
26
|
+
method: 'post'
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
extendRequest({ settings }) {
|
|
31
|
+
const auth = Buffer.from(settings.apiKey + ':').toString('base64');
|
|
32
|
+
return {
|
|
33
|
+
headers: {
|
|
34
|
+
Accept: 'application/json',
|
|
35
|
+
Authorization: `Basic ${auth}`,
|
|
36
|
+
'Content-Type': 'application/json'
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
presets: [
|
|
41
|
+
{
|
|
42
|
+
name: 'Create or update a Company',
|
|
43
|
+
subscribe: 'type = "group"',
|
|
44
|
+
partnerAction: 'group',
|
|
45
|
+
mapping: actions_core_1.defaultValues(group_1.default.fields)
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'Create or update a User',
|
|
49
|
+
subscribe: 'type = "identify"',
|
|
50
|
+
partnerAction: 'identify',
|
|
51
|
+
mapping: actions_core_1.defaultValues(identify_1.default.fields)
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
actions: {
|
|
55
|
+
identify: identify_1.default,
|
|
56
|
+
group: group_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/canny-functions/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA4E;AAE5E,yCAA8C;AAE9C,0DAAiC;AAEjC,oDAA2B;AAE3B,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,OAAO;IACb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,mFAAmF;gBAChG,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QAED,kBAAkB,CAAC,OAAO;YACxB,OAAO,OAAO,CAAC,GAAG,kBAAY,iBAAiB,EAAE;gBAC/C,MAAM,EAAE,MAAM;aACf,CAAC,CAAA;QACJ,CAAC;KACF;IAED,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;QAClE,OAAO;YACL,OAAO,EAAE;gBACP,MAAM,EAAE,kBAAkB;gBAC1B,aAAa,EAAE,SAAS,IAAI,EAAE;gBAC9B,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAA;IACH,CAAC;IAED,OAAO,EAAE;QACP;YACE,IAAI,EAAE,4BAA4B;YAClC,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,OAAO;YACtB,OAAO,EAAE,4BAAa,CAAC,eAAK,CAAC,MAAM,CAAC;SACrC;QACD;YACE,IAAI,EAAE,yBAAyB;YAC/B,SAAS,EAAE,mBAAmB;YAC9B,aAAa,EAAE,UAAU;YACzB,OAAO,EAAE,4BAAa,CAAC,kBAAQ,CAAC,MAAM,CAAC;SACxC;KACF;IAED,OAAO,EAAE;QACP,QAAQ,EAAR,kBAAQ;QACR,KAAK,EAAL,eAAK;KACN;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -94,7 +94,7 @@ const action = {
|
|
|
94
94
|
const flattenedProperties = flat_1.flat(payload.properties || {});
|
|
95
95
|
const event = {
|
|
96
96
|
event: heapUtils_1.getEventName(payload),
|
|
97
|
-
|
|
97
|
+
custom_properties: {
|
|
98
98
|
segment_library: constants_1.HEAP_SEGMENT_CLOUD_LIBRARY_NAME,
|
|
99
99
|
...flattenedProperties,
|
|
100
100
|
...(heapUtils_1.isDefined(payload.name) && { name: payload.name })
|
|
@@ -108,7 +108,7 @@ const action = {
|
|
|
108
108
|
const trackPayload = {
|
|
109
109
|
app_id: settings.appId,
|
|
110
110
|
events: [event],
|
|
111
|
-
library: '
|
|
111
|
+
library: 'server'
|
|
112
112
|
};
|
|
113
113
|
if (heapUtils_1.isDefined(payload.identity) && (heapUtils_1.isDefined(payload.anonymous_id) || heapUtils_1.isDefined(payload.traits))) {
|
|
114
114
|
const userPropertiesPayload = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/heap/trackEvent/index.ts"],"names":[],"mappings":";;;;;AAGA,+DAAsC;AACtC,4CAA8D;AAC9D,kCAA8B;AAC9B,4CAAyE;AACzE,wDAAwD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/heap/trackEvent/index.ts"],"names":[],"mappings":";;;;;AAGA,+DAAsC;AACtC,4CAA8D;AAC9D,kCAA8B;AAC9B,4CAAyE;AACzE,wDAAwD;AAoBxD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,wBAAwB;IACrC,mBAAmB,EAAE,oDAAoD;IACzE,MAAM,EAAE;QACN,UAAU,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,aAAa;aACvB;SACF;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EACT,2NAA2N;SAC9N;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,QAAQ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AAY,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC;oBAC9E,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,WAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;iBACxF;aACF,CAAA;YACD,MAAM,wBAAwB,GAAG,OAAO,CAAC,mDAAmD,EAAE;gBAC5F,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,qBAAqB;aAC5B,CAAC,CAAA;YAEF,QAAQ,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;SACxC;QAED,QAAQ,CAAC,IAAI,CACX,OAAO,CAAC,kDAAkD,EAAE;YAC1D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,YAAY;SACnB,CAAC,CACH,CAAA;QAED,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAC9B,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -111,6 +111,7 @@ register('6470d73d82dfbc7129fc5975', './noop');
|
|
|
111
111
|
register('6475c5c14f7db4914bcd512f', './airship');
|
|
112
112
|
register('647f2f7ce3b561ab931c2b77', './ambee');
|
|
113
113
|
register('647f30a35eedd03afde0a1c3', './userpilot');
|
|
114
|
+
register('6489bbade6fe3eb57c13bd6a', './canny-functions');
|
|
114
115
|
function register(id, destinationPath) {
|
|
115
116
|
const definition = require(destinationPath).default;
|
|
116
117
|
const resolvedPath = require.resolve(destinationPath);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/destinations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,wDAAmD;AACnD,gDAAuB;AAWV,QAAA,YAAY,GAA0C,EAAE,CAAA;AACxD,QAAA,QAAQ,GAAsC,EAAE,CAAA;AAU7D,QAAQ,CAA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AAI,IAAI,OAAO,WAAW,EAAE,OAAO,KAAK,QAAQ,EAAE;QAClE,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,WAAW,CAAA;AACpB,CAAC;AAED,KAAK,UAAU,uBAAuB,CAAC,GAAW;IAChD,MAAM,WAAW,GAAG,oBAAY,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAA;IAExE,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,IAAI,CAAA;KACZ;IAGD,OAAO,IAAI,0BAAW,CAAC,WAAyC,CAAC,CAAA;AACnE,CAAC;AAED,SAAgB,kBAAkB,CAAC,EAAU;IAC3C,MAAM,WAAW,GAAG,gBAAQ,CAAC,EAAE,CAAC,CAAA;IAEhC,IAAI,CAAC,WAAW,EAAE,UAAU,EAAE;QAC5B,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,IAAI,0BAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAA;AAChD,CAAC;AARD,gDAQC;AAEM,KAAK,UAAU,uBAAuB,CAAC,WAAmB;IAC/D,OAAO,kBAAkB,CAAC,WAAW,CAAC,IAAI,uBAAuB,CAAC,WAAW,CAAC,CAAA;AAChF,CAAC;AAFD,0DAEC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segment/action-destinations",
|
|
3
3
|
"description": "Destination Actions engine and definitions.",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.173.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"lcov"
|
|
72
72
|
]
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "bd016dfd9d03342a1139302c547e4f8a96c5b901"
|
|
75
75
|
}
|