@segment/action-destinations 3.200.2-staging.9 → 3.201.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/canny-functions/group/generated-types.d.ts +1 -0
- package/dist/destinations/canny-functions/group/index.js +10 -2
- package/dist/destinations/canny-functions/group/index.js.map +1 -1
- package/dist/destinations/devrev/createRevUser/index.js +9 -9
- package/dist/destinations/devrev/createRevUser/index.js.map +1 -1
- package/dist/destinations/devrev/createWork/index.js +6 -6
- package/dist/destinations/devrev/createWork/index.js.map +1 -1
- package/dist/destinations/devrev/index.js +2 -2
- package/dist/destinations/devrev/index.js.map +1 -1
- package/dist/destinations/devrev/streamEvent/index.js +4 -3
- package/dist/destinations/devrev/streamEvent/index.js.map +1 -1
- package/dist/destinations/devrev/utils/constants.d.ts +0 -1
- package/dist/destinations/devrev/utils/constants.js +1 -2
- package/dist/destinations/devrev/utils/constants.js.map +1 -1
- package/dist/destinations/devrev/utils/helpers.d.ts +4 -2
- package/dist/destinations/devrev/utils/helpers.js +15 -10
- package/dist/destinations/devrev/utils/helpers.js.map +1 -1
- package/dist/destinations/devrev/utils/types.d.ts +18 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +10 -2
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +0 -2
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +1 -1
- package/dist/destinations/engage/utils/EngageStats.js.map +1 -1
- package/dist/destinations/engage/utils/MessageSendPerformer.js +1 -7
- package/dist/destinations/engage/utils/MessageSendPerformer.js.map +1 -1
- package/dist/destinations/gameball/util.js +1 -1
- package/dist/destinations/gameball/util.js.map +1 -1
- package/dist/destinations/hubspot/upsertContact/generated-types.d.ts +0 -1
- package/dist/destinations/hubspot/upsertContact/index.d.ts +0 -19
- package/dist/destinations/hubspot/upsertContact/index.js +0 -127
- package/dist/destinations/hubspot/upsertContact/index.js.map +1 -1
- package/dist/destinations/index.js +2 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/launchdarkly-audiences/constants.d.ts +7 -0
- package/dist/destinations/launchdarkly-audiences/constants.js +11 -0
- package/dist/destinations/launchdarkly-audiences/constants.js.map +1 -0
- package/dist/destinations/launchdarkly-audiences/generated-types.d.ts +4 -0
- package/dist/destinations/launchdarkly-audiences/generated-types.js.map +1 -0
- package/dist/destinations/launchdarkly-audiences/index.d.ts +4 -0
- package/dist/destinations/launchdarkly-audiences/index.js +66 -0
- package/dist/destinations/launchdarkly-audiences/index.js.map +1 -0
- package/dist/destinations/launchdarkly-audiences/syncAudience/custom-audience-operations.d.ts +5 -0
- package/dist/destinations/launchdarkly-audiences/syncAudience/custom-audience-operations.js +78 -0
- package/dist/destinations/launchdarkly-audiences/syncAudience/custom-audience-operations.js.map +1 -0
- package/dist/destinations/launchdarkly-audiences/syncAudience/generated-types.d.ts +13 -0
- package/dist/destinations/launchdarkly-audiences/syncAudience/generated-types.js.map +1 -0
- package/dist/destinations/launchdarkly-audiences/syncAudience/index.d.ts +5 -0
- package/dist/destinations/launchdarkly-audiences/syncAudience/index.js +111 -0
- package/dist/destinations/launchdarkly-audiences/syncAudience/index.js.map +1 -0
- package/dist/destinations/launchdarkly-audiences/types.d.ts +8 -0
- package/dist/destinations/launchdarkly-audiences/types.js +12 -0
- package/dist/destinations/launchdarkly-audiences/types.js.map +1 -0
- package/dist/destinations/linkedin-audiences/updateAudience/index.js +2 -1
- package/dist/destinations/linkedin-audiences/updateAudience/index.js.map +1 -1
- package/dist/destinations/listrak/updateEmailContactProfileFields/index.js.map +1 -1
- package/dist/destinations/liveramp-audiences/audienceEnteredSFTP.types.d.ts +16 -0
- package/dist/destinations/liveramp-audiences/audienceEnteredSFTP.types.js +3 -0
- package/dist/destinations/liveramp-audiences/audienceEnteredSFTP.types.js.map +1 -0
- package/dist/destinations/liveramp-audiences/operations.js +13 -25
- package/dist/destinations/liveramp-audiences/operations.js.map +1 -1
- package/dist/destinations/m3ter/auth.js.map +1 -1
- package/dist/destinations/m3ter/submitMeasurements/index.js +3 -3
- package/dist/destinations/m3ter/submitMeasurements/index.js.map +1 -1
- package/dist/destinations/playerzero-cloud/identifyUser/index.js +3 -3
- package/dist/destinations/pushwoosh/generated-types.d.ts +4 -0
- package/dist/destinations/pushwoosh/generated-types.js +3 -0
- package/dist/destinations/pushwoosh/generated-types.js.map +1 -0
- package/dist/destinations/pushwoosh/index.d.ts +4 -0
- package/dist/destinations/pushwoosh/index.js +83 -0
- package/dist/destinations/pushwoosh/index.js.map +1 -0
- package/dist/destinations/pushwoosh/trackEvent/generated-types.d.ts +11 -0
- package/dist/destinations/pushwoosh/trackEvent/generated-types.js +3 -0
- package/dist/destinations/pushwoosh/trackEvent/generated-types.js.map +1 -0
- package/dist/destinations/pushwoosh/trackEvent/index.d.ts +5 -0
- package/dist/destinations/pushwoosh/trackEvent/index.js +81 -0
- package/dist/destinations/pushwoosh/trackEvent/index.js.map +1 -0
- package/dist/destinations/pushwoosh/updateUserProfile/generated-types.d.ts +22 -0
- package/dist/destinations/pushwoosh/updateUserProfile/generated-types.js +3 -0
- package/dist/destinations/pushwoosh/updateUserProfile/generated-types.js.map +1 -0
- package/dist/destinations/pushwoosh/updateUserProfile/index.d.ts +5 -0
- package/dist/destinations/pushwoosh/updateUserProfile/index.js +182 -0
- package/dist/destinations/pushwoosh/updateUserProfile/index.js.map +1 -0
- package/dist/destinations/pushwoosh/utilities.d.ts +7 -0
- package/dist/destinations/pushwoosh/utilities.js +61 -0
- package/dist/destinations/pushwoosh/utilities.js.map +1 -0
- package/dist/destinations/segment/properties.js +4 -4
- package/dist/destinations/segment/properties.js.map +1 -1
- package/dist/destinations/segment/sendGroup/index.js +1 -4
- package/dist/destinations/segment/sendGroup/index.js.map +1 -1
- package/dist/destinations/segment/sendIdentify/index.js +1 -4
- package/dist/destinations/segment/sendIdentify/index.js.map +1 -1
- package/dist/destinations/segment/sendPage/index.js +1 -4
- package/dist/destinations/segment/sendPage/index.js.map +1 -1
- package/dist/destinations/segment/sendScreen/index.js +1 -4
- package/dist/destinations/segment/sendScreen/index.js.map +1 -1
- package/dist/destinations/segment/sendTrack/index.js +1 -4
- package/dist/destinations/segment/sendTrack/index.js.map +1 -1
- package/dist/destinations/segment-profiles/sendGroup/index.js +1 -4
- package/dist/destinations/segment-profiles/sendGroup/index.js.map +1 -1
- package/dist/destinations/segment-profiles/sendIdentify/index.js +3 -6
- package/dist/destinations/segment-profiles/sendIdentify/index.js.map +1 -1
- package/dist/destinations/talon-one/index.js +8 -2
- package/dist/destinations/talon-one/index.js.map +1 -1
- package/dist/destinations/talon-one/t1-properties.d.ts +1 -0
- package/dist/destinations/talon-one/t1-properties.js +8 -1
- package/dist/destinations/talon-one/t1-properties.js.map +1 -1
- package/dist/destinations/talon-one/trackEvent/index.js +2 -2
- package/dist/destinations/talon-one/trackEvent/index.js.map +1 -1
- package/dist/destinations/talon-one/trackEventV2/generated-types.d.ts +8 -0
- package/dist/destinations/talon-one/trackEventV2/generated-types.js +3 -0
- package/dist/destinations/talon-one/trackEventV2/generated-types.js.map +1 -0
- package/dist/destinations/talon-one/trackEventV2/index.d.ts +5 -0
- package/dist/destinations/talon-one/trackEventV2/index.js +52 -0
- package/dist/destinations/talon-one/trackEventV2/index.js.map +1 -0
- package/dist/destinations/talon-one/updateCustomerProfile/index.js +2 -2
- package/dist/destinations/talon-one/updateCustomerProfile/index.js.map +1 -1
- package/dist/destinations/talon-one/updateCustomerProfileV2/index.js +2 -2
- package/dist/destinations/talon-one/updateCustomerProfileV2/index.js.map +1 -1
- package/dist/destinations/talon-one/updateCustomerProfileV3/generated-types.d.ts +10 -0
- package/dist/destinations/talon-one/updateCustomerProfileV3/generated-types.js +3 -0
- package/dist/destinations/talon-one/updateCustomerProfileV3/generated-types.js.map +1 -0
- package/dist/destinations/talon-one/updateCustomerProfileV3/index.d.ts +5 -0
- package/dist/destinations/talon-one/updateCustomerProfileV3/index.js +45 -0
- package/dist/destinations/talon-one/updateCustomerProfileV3/index.js.map +1 -0
- package/dist/destinations/talon-one/updateCustomerSession/index.js +2 -2
- package/dist/destinations/talon-one/updateCustomerSession/index.js.map +1 -1
- package/dist/destinations/talon-one/updateCustomerSessionV2/generated-types.d.ts +39 -0
- package/dist/destinations/talon-one/updateCustomerSessionV2/generated-types.js +3 -0
- package/dist/destinations/talon-one/updateCustomerSessionV2/generated-types.js.map +1 -0
- package/dist/destinations/talon-one/updateCustomerSessionV2/index.d.ts +5 -0
- package/dist/destinations/talon-one/updateCustomerSessionV2/index.js +120 -0
- package/dist/destinations/talon-one/updateCustomerSessionV2/index.js.map +1 -0
- package/dist/destinations/the-trade-desk-crm/functions.js +2 -2
- package/dist/destinations/the-trade-desk-crm/functions.js.map +1 -1
- package/dist/destinations/the-trade-desk-crm/index.js +1 -1
- package/dist/destinations/the-trade-desk-crm/syncAudience/generated-types.d.ts +0 -1
- package/dist/destinations/the-trade-desk-crm/syncAudience/index.js +0 -1
- package/dist/destinations/the-trade-desk-crm/syncAudience/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/addUser/index.js +1 -10
- package/dist/destinations/tiktok-audiences/addUser/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/createAudience/index.js +1 -10
- package/dist/destinations/tiktok-audiences/createAudience/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/functions.d.ts +2 -6
- package/dist/destinations/tiktok-audiences/functions.js +5 -27
- package/dist/destinations/tiktok-audiences/functions.js.map +1 -1
- package/dist/destinations/tiktok-audiences/generated-types.d.ts +1 -1
- package/dist/destinations/tiktok-audiences/index.js +2 -6
- package/dist/destinations/tiktok-audiences/index.js.map +1 -1
- package/dist/destinations/tiktok-audiences/properties.d.ts +0 -1
- package/dist/destinations/tiktok-audiences/properties.js +1 -9
- package/dist/destinations/tiktok-audiences/properties.js.map +1 -1
- package/dist/destinations/tiktok-audiences/removeUser/index.js +1 -10
- package/dist/destinations/tiktok-audiences/removeUser/index.js.map +1 -1
- package/dist/destinations/webhook-audiences/index.js +1 -13
- package/dist/destinations/webhook-audiences/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/destinations/tiktok-audiences/addToAudience/generated-types.d.ts +0 -9
- package/dist/destinations/tiktok-audiences/addToAudience/generated-types.js.map +0 -1
- package/dist/destinations/tiktok-audiences/addToAudience/index.d.ts +0 -5
- package/dist/destinations/tiktok-audiences/addToAudience/index.js +0 -33
- package/dist/destinations/tiktok-audiences/addToAudience/index.js.map +0 -1
- package/dist/destinations/tiktok-audiences/removeFromAudience/generated-types.d.ts +0 -9
- package/dist/destinations/tiktok-audiences/removeFromAudience/generated-types.js.map +0 -1
- package/dist/destinations/tiktok-audiences/removeFromAudience/index.d.ts +0 -5
- package/dist/destinations/tiktok-audiences/removeFromAudience/index.js +0 -33
- package/dist/destinations/tiktok-audiences/removeFromAudience/index.js.map +0 -1
- /package/dist/destinations/{tiktok-audiences/addToAudience → launchdarkly-audiences}/generated-types.js +0 -0
- /package/dist/destinations/{tiktok-audiences/removeFromAudience → launchdarkly-audiences/syncAudience}/generated-types.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/talon-one/trackEventV2/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const t1_properties_1 = require("../t1-properties");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Track event',
|
|
6
|
+
description: 'This records a custom event in Talon.One. Create the event and all the required attributes before using this Action.',
|
|
7
|
+
fields: {
|
|
8
|
+
skipNonExistingAttributes: {
|
|
9
|
+
type: 'boolean',
|
|
10
|
+
label: 'Skip Non-existing Attributes Flag',
|
|
11
|
+
description: 'Indicates whether to skip non-existing attributes. If `Yes`, the non-existing attributes are skipped and a 400 error is not returned. If `No`, a 400 error is returned in case of non-existing attributes.',
|
|
12
|
+
default: false,
|
|
13
|
+
required: false
|
|
14
|
+
},
|
|
15
|
+
customerProfileId: {
|
|
16
|
+
...t1_properties_1.customerProfileId,
|
|
17
|
+
description: 'The customer profile integration ID to use in Talon.One. It is the identifier of the customer profile associated to the event.'
|
|
18
|
+
},
|
|
19
|
+
eventType: {
|
|
20
|
+
label: 'Event Type',
|
|
21
|
+
description: 'The name of the event sent to Talon.One.',
|
|
22
|
+
type: 'string',
|
|
23
|
+
required: true,
|
|
24
|
+
default: {
|
|
25
|
+
'@path': '$.event'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
attributes: {
|
|
29
|
+
...t1_properties_1.attribute,
|
|
30
|
+
default: {
|
|
31
|
+
'@path': '$.properties.attributes'
|
|
32
|
+
},
|
|
33
|
+
description: 'Extra attributes associated with the event. [See more info](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes).'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
perform: (request, { payload }) => {
|
|
37
|
+
let requestUrl = `https://integration.talon.one/segment/v2/events`;
|
|
38
|
+
if (payload.skipNonExistingAttributes) {
|
|
39
|
+
requestUrl += '?skipNonExistingAttributes=true';
|
|
40
|
+
}
|
|
41
|
+
return request(requestUrl, {
|
|
42
|
+
method: 'put',
|
|
43
|
+
json: {
|
|
44
|
+
customerProfileId: payload.customerProfileId,
|
|
45
|
+
eventType: payload.eventType,
|
|
46
|
+
eventAttributes: payload.attributes
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.default = action;
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/talon-one/trackEventV2/index.ts"],"names":[],"mappings":";;AAGA,oDAA+D;AAE/D,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EACT,sHAAsH;IACxH,MAAM,EAAE;QACN,yBAAyB,EAAE;YACzB,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,mCAAmC;YAC1C,WAAW,EACT,4MAA4M;YAC9M,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,KAAK;SAChB;QACD,iBAAiB,EAAE;YACjB,GAAG,iCAAiB;YACpB,WAAW,EACT,gIAAgI;SACnI;QACD,SAAS,EAAE;YACT,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,0CAA0C;YACvD,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,UAAU,EAAE;YACV,GAAG,yBAAS;YACZ,OAAO,EAAE;gBACP,OAAO,EAAE,yBAAyB;aACnC;YACD,WAAW,EACT,yIAAyI;SAC5I;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,IAAI,UAAU,GAAG,iDAAiD,CAAA;QAClE,IAAI,OAAO,CAAC,yBAAyB,EAAE;YACrC,UAAU,IAAI,iCAAiC,CAAA;SAChD;QACD,OAAO,OAAO,CAAC,UAAU,EAAE;YACzB,MAAM,EAAE,KAAK;YACb,IAAI,EAAE;gBACJ,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;gBAC5C,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,eAAe,EAAE,OAAO,CAAC,UAAU;aACpC;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const t1_properties_1 = require("../t1-properties");
|
|
4
4
|
const action = {
|
|
5
|
-
title: '
|
|
6
|
-
description:
|
|
5
|
+
title: '[Deprecated] Upsert customer profile',
|
|
6
|
+
description: `This updates attributes and audiences for a single customer profile. **Important:** This Action is deprecated. Use the **Update customer profile** Action instead.`,
|
|
7
7
|
fields: {
|
|
8
8
|
attributes: { ...t1_properties_1.attribute },
|
|
9
9
|
customerProfileId: { ...t1_properties_1.customerProfileId },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/talon-one/updateCustomerProfile/index.ts"],"names":[],"mappings":";;AAGA,oDAAgG;AAEhG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/talon-one/updateCustomerProfile/index.ts"],"names":[],"mappings":";;AAGA,oDAAgG;AAEhG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,sCAAsC;IAC7C,WAAW,EAAE,oKAAoK;IACjL,MAAM,EAAE;QACN,UAAU,EAAE,EAAE,GAAG,yBAAS,EAAE;QAC5B,iBAAiB,EAAE,EAAE,GAAG,iCAAiB,EAAE;QAC3C,iBAAiB,EAAE,EAAE,GAAG,gCAAgB,EAAE;QAC1C,cAAc,EAAE,EAAE,GAAG,6BAAa,EAAE;QACpC,aAAa,EAAE;YACb,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,0OAA0O;YAC5O,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,KAAK;SACf;QACD,cAAc,EAAE;YACd,KAAK,EAAE,uBAAuB;YAC9B,WAAW,EAAE,0EAA0E;YACvF,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,KAAK,EAAE,MAAM;oBACb,WAAW,EAAE,gBAAgB;oBAC7B,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;iBACf;gBACD,IAAI,EAAE;oBACJ,KAAK,EAAE,MAAM;oBACb,WAAW,EAAE,+EAA+E;oBAC5F,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;iBACf;aACF;YACD,OAAO,EAAE;gBACP,YAAY,EAAE;oBACZ,yBAAyB;oBACzB;wBACE,IAAI,EAAE;4BACJ,OAAO,EAAE,QAAQ;yBAClB;wBACD,IAAI,EAAE;4BACJ,OAAO,EAAE,QAAQ;yBAClB;qBACF;iBACF;aACF;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAEhC,OAAO,OAAO,CAAC,0DAA0D,OAAO,CAAC,iBAAiB,EAAE,EAAE;YACpG,MAAM,EAAE,KAAK;YACb,IAAI,EAAE;gBACJ,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,gBAAgB,EAAE;oBAChB,IAAI,EAAE,OAAO,CAAC,cAAc;oBAC5B,OAAO,EAAE,OAAO,CAAC,iBAAiB;iBACnC;gBACD,aAAa,EAAE,OAAO,CAAC,aAAa;gBACpC,cAAc,EAAE,OAAO,CAAC,cAAc;aACvC;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const t1_properties_1 = require("../t1-properties");
|
|
4
4
|
const action = {
|
|
5
|
-
title: '
|
|
6
|
-
description:
|
|
5
|
+
title: '[Deprecated] Upsert customer profile V2',
|
|
6
|
+
description: `You do not have to create attributes or audiences before using this Action. **Important:** This Action is deprecated. Use the **Update customer profile** Action instead.`,
|
|
7
7
|
fields: {
|
|
8
8
|
customerProfileId: { ...t1_properties_1.customerProfileId },
|
|
9
9
|
audiencesToAdd: { ...t1_properties_1.audiencesToAdd },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/talon-one/updateCustomerProfileV2/index.ts"],"names":[],"mappings":";;AAGA,oDAAkH;AAElH,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/talon-one/updateCustomerProfileV2/index.ts"],"names":[],"mappings":";;AAGA,oDAAkH;AAElH,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yCAAyC;IAChD,WAAW,EAAE,2KAA2K;IACxL,MAAM,EAAE;QACN,iBAAiB,EAAE,EAAE,GAAG,iCAAiB,EAAE;QAC3C,cAAc,EAAE,EAAE,GAAG,8BAAc,EAAE;QACrC,iBAAiB,EAAE,EAAE,GAAG,iCAAiB,EAAE;QAC3C,aAAa,EAAE;YACb,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,kGAAkG;YAC/G,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,IAAI;SACd;QACD,UAAU,EAAE,EAAE,GAAG,yBAAS,EAAE;QAC5B,cAAc,EAAE,EAAE,GAAG,8BAAc,EAAE;KACtC;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAEhC,OAAO,OAAO,CAAC,6DAA6D,OAAO,CAAC,iBAAiB,EAAE,EAAE;YACvG,MAAM,EAAE,KAAK;YACb,IAAI,EAAE;gBACJ,gBAAgB,EAAE;oBAChB,IAAI,EAAE,OAAO,CAAC,cAAc;oBAC5B,OAAO,EAAE,OAAO,CAAC,iBAAiB;iBACnC;gBACD,aAAa,EAAE,OAAO,CAAC,aAAa;gBACpC,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,cAAc,EAAE,OAAO,CAAC,cAAc;aACvC;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/talon-one/updateCustomerProfileV3/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const t1_properties_1 = require("../t1-properties");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Update customer profile',
|
|
6
|
+
description: 'This updates attributes and audiences for a single customer profile. Create all the required attributes and audiences before using this Action.',
|
|
7
|
+
fields: {
|
|
8
|
+
customerProfileId: { ...t1_properties_1.customerProfileId },
|
|
9
|
+
skipNonExistingAttributes: {
|
|
10
|
+
type: 'boolean',
|
|
11
|
+
label: 'Skip Non-existing Attributes Flag',
|
|
12
|
+
description: 'Indicates whether to skip non-existing attributes. If `Yes`, the non-existing attributes are skipped and a 400 error is not returned. If `No`, a 400 error is returned in case of non-existing attributes.',
|
|
13
|
+
default: false,
|
|
14
|
+
required: false
|
|
15
|
+
},
|
|
16
|
+
deleteAudienceIds: { ...t1_properties_1.deleteAudienceId },
|
|
17
|
+
addAudienceIds: { ...t1_properties_1.addAudienceId },
|
|
18
|
+
runRuleEngine: {
|
|
19
|
+
label: 'Run rule engine',
|
|
20
|
+
description: 'This runs rule engine in Talon.One upon updating customer profile. Set to true to trigger rules.',
|
|
21
|
+
type: 'boolean',
|
|
22
|
+
default: true
|
|
23
|
+
},
|
|
24
|
+
attributes: { ...t1_properties_1.attribute }
|
|
25
|
+
},
|
|
26
|
+
perform: (request, { payload }) => {
|
|
27
|
+
let requestUrl = `https://integration.talon.one/segment/v2/customer_profiles/${payload.customerProfileId}`;
|
|
28
|
+
if (payload.skipNonExistingAttributes) {
|
|
29
|
+
requestUrl += '?skipNonExistingAttributes=true';
|
|
30
|
+
}
|
|
31
|
+
return request(requestUrl, {
|
|
32
|
+
method: 'put',
|
|
33
|
+
json: {
|
|
34
|
+
audiencesChanges: {
|
|
35
|
+
adds: payload.addAudienceIds,
|
|
36
|
+
deletes: payload.deleteAudienceIds
|
|
37
|
+
},
|
|
38
|
+
runRuleEngine: payload.runRuleEngine,
|
|
39
|
+
attributes: payload.attributes
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
exports.default = action;
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/talon-one/updateCustomerProfileV3/index.ts"],"names":[],"mappings":";;AAGA,oDAAgG;AAEhG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EACT,iJAAiJ;IACnJ,MAAM,EAAE;QACN,iBAAiB,EAAE,EAAE,GAAG,iCAAiB,EAAE;QAC3C,yBAAyB,EAAE;YACzB,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,mCAAmC;YAC1C,WAAW,EACT,4MAA4M;YAC9M,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,KAAK;SAChB;QACD,iBAAiB,EAAE,EAAE,GAAG,gCAAgB,EAAE;QAC1C,cAAc,EAAE,EAAE,GAAG,6BAAa,EAAE;QACpC,aAAa,EAAE;YACb,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,kGAAkG;YAC/G,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,IAAI;SACd;QACD,UAAU,EAAE,EAAE,GAAG,yBAAS,EAAE;KAC7B;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,IAAI,UAAU,GAAG,8DAA8D,OAAO,CAAC,iBAAiB,EAAE,CAAA;QAC1G,IAAI,OAAO,CAAC,yBAAyB,EAAE;YACrC,UAAU,IAAI,iCAAiC,CAAA;SAChD;QACD,OAAO,OAAO,CAAC,UAAU,EAAE;YACzB,MAAM,EAAE,KAAK;YACb,IAAI,EAAE;gBACJ,gBAAgB,EAAE;oBAChB,IAAI,EAAE,OAAO,CAAC,cAAc;oBAC5B,OAAO,EAAE,OAAO,CAAC,iBAAiB;iBACnC;gBACD,aAAa,EAAE,OAAO,CAAC,aAAa;gBACpC,UAAU,EAAE,OAAO,CAAC,UAAU;aAC/B;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const t1_properties_1 = require("../t1-properties");
|
|
4
4
|
const action = {
|
|
5
|
-
title: 'Update
|
|
6
|
-
description:
|
|
5
|
+
title: '[Deprecated] Update customer session',
|
|
6
|
+
description: `This updates a customer session. **Important:** This Action is deprecated. Use the **Update customer session** Action instead.`,
|
|
7
7
|
fields: {
|
|
8
8
|
customerSessionId: {
|
|
9
9
|
label: 'Customer Session ID',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/talon-one/updateCustomerSession/index.ts"],"names":[],"mappings":";;AAGA,oDAA0F;AAE1F,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/talon-one/updateCustomerSession/index.ts"],"names":[],"mappings":";;AAGA,oDAA0F;AAE1F,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,sCAAsC;IAC7C,WAAW,EAAE,gIAAgI;IAC7I,MAAM,EAAE;QACN,iBAAiB,EAAE;YACjB,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EAAE,kEAAkE;YAC/E,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,mBAAmB,EAAE;YACnB,KAAK,EAAE,0BAA0B;YACjC,WAAW,EAAE,oFAAoF;YACjG,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uCAAuC;SACrD;QACD,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,gFAAgF;YAC7F,WAAW,EAAE,gDAAgD;SAC9D;QACD,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,gBAAgB;YACvB,WAAW,EACT,sMAAsM;YAC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G,IAAI,EAAE,QAAQ;iBACf;gBACD,UAAU,EAAE;oBACV,GAAG,yBAAS;oBACZ,OAAO,EAAE;wBACP,OAAO,EAAE,yBAAyB;qBACnC;oBACD,WAAW,EACT,yPAAyP;iBAC5P;aACF;SACF;QACD,qBAAqB,EAAE;YACrB,GAAG,8BAAc;YACjB,KAAK,EAAE,yBAAyB;YAChC,WAAW,EAAE,iFAAiF;SAC/F;QACD,uBAAuB,EAAE;YACvB,GAAG,8BAAc;YACjB,KAAK,EAAE,4BAA4B;YACnC,WAAW,EAAE,mFAAmF;SACjG;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAehC,OAAO,OAAO,CAAC,2DAA2D,OAAO,CAAC,iBAAiB,EAAE,EAAE;YACrG,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,4BAA4B,EAAE,GAAG,OAAO,CAAC,mBAAmB,EAAE;gBAC9D,oBAAoB,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE;gBACjD,kBAAkB,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE;gBAC9C,kBAAkB,EAAE,GAAG,OAAO,CAAC,qBAAqB,EAAE;aACvD;YACD,IAAI,EAAE;gBACJ,eAAe,EAAE,OAAO,CAAC,eAAe;gBACxC,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;gBACpD,sBAAsB,EAAE,OAAO,CAAC,uBAAuB;aACxD;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
customerSessionId: string;
|
|
3
|
+
callbackDestination?: string;
|
|
4
|
+
callbackAPIKey?: string;
|
|
5
|
+
contentFields?: string;
|
|
6
|
+
callbackCorrelationId?: string;
|
|
7
|
+
skipNonExistingAttributes?: boolean;
|
|
8
|
+
profileId?: string;
|
|
9
|
+
couponCodes?: string[];
|
|
10
|
+
referralCode?: string;
|
|
11
|
+
loyaltyCards?: string[];
|
|
12
|
+
state?: string;
|
|
13
|
+
cartItems?: {
|
|
14
|
+
name?: string;
|
|
15
|
+
sku?: string;
|
|
16
|
+
quantity?: number;
|
|
17
|
+
price?: number;
|
|
18
|
+
returnedQuantity?: string;
|
|
19
|
+
remainingQuantity?: string;
|
|
20
|
+
category?: string;
|
|
21
|
+
weight?: string;
|
|
22
|
+
height?: string;
|
|
23
|
+
length?: string;
|
|
24
|
+
position?: string;
|
|
25
|
+
attributes?: {
|
|
26
|
+
[k: string]: unknown;
|
|
27
|
+
};
|
|
28
|
+
additionalCosts?: {
|
|
29
|
+
[k: string]: unknown;
|
|
30
|
+
};
|
|
31
|
+
}[];
|
|
32
|
+
additionalCosts?: {
|
|
33
|
+
[k: string]: unknown;
|
|
34
|
+
};
|
|
35
|
+
identifiers?: string[];
|
|
36
|
+
attributes?: {
|
|
37
|
+
[k: string]: unknown;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/talon-one/updateCustomerSessionV2/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const t1_properties_1 = require("../t1-properties");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Update customer session',
|
|
6
|
+
description: 'This updates a customer session. Create all the required attributes before using this Action.',
|
|
7
|
+
fields: {
|
|
8
|
+
customerSessionId: {
|
|
9
|
+
label: 'Customer Session ID',
|
|
10
|
+
description: 'The customer session integration identifier to use in Talon.One.',
|
|
11
|
+
type: 'string',
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
callbackDestination: {
|
|
15
|
+
label: 'Callback Destination URI',
|
|
16
|
+
description: 'This specifies the address of the service and its endpoint to do callback request.',
|
|
17
|
+
type: 'string',
|
|
18
|
+
placeholder: 'http://mydomain.com/api/callback_here'
|
|
19
|
+
},
|
|
20
|
+
callbackAPIKey: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
label: 'Callback API Key',
|
|
23
|
+
description: 'This specifies API key and relative header. The header is specified optionally',
|
|
24
|
+
placeholder: 'X-API-Key 123456789123456789123456789123456789'
|
|
25
|
+
},
|
|
26
|
+
contentFields: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
label: 'Content Fields',
|
|
29
|
+
description: 'This specifies a list of the fields from the response you need to receive. Comma character is separator. If omitted, all the fields will be forwarded from the response to the callback destination.',
|
|
30
|
+
placeholder: 'effects,customerProfile',
|
|
31
|
+
default: 'effects'
|
|
32
|
+
},
|
|
33
|
+
callbackCorrelationId: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
label: 'Correlation ID',
|
|
36
|
+
description: 'This specifies ID of the request that will be forwarded to the destination URI with the callback request with the same header name. If omitted, the X-Correlation-ID will not be in the callback request.'
|
|
37
|
+
},
|
|
38
|
+
skipNonExistingAttributes: {
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
label: 'Skip Non-existing Attributes Flag',
|
|
41
|
+
description: 'Indicates whether to skip non-existing attributes. If `Yes`, the non-existing attributes are skipped and a 400 error is not returned. If `No`, a 400 error is returned in case of non-existing attributes.',
|
|
42
|
+
default: false,
|
|
43
|
+
required: false
|
|
44
|
+
},
|
|
45
|
+
profileId: { ...t1_properties_1.customerProfileId, required: false },
|
|
46
|
+
couponCodes: {
|
|
47
|
+
label: 'Coupon Codes',
|
|
48
|
+
description: 'Any coupon codes entered. Up to 100 coupons.`',
|
|
49
|
+
type: 'string',
|
|
50
|
+
multiple: true
|
|
51
|
+
},
|
|
52
|
+
referralCode: {
|
|
53
|
+
label: 'Referral Codes',
|
|
54
|
+
description: 'Any referral code entered.`',
|
|
55
|
+
type: 'string'
|
|
56
|
+
},
|
|
57
|
+
loyaltyCards: {
|
|
58
|
+
label: 'Loyalty Cards',
|
|
59
|
+
description: 'Any loyalty cards used. Up to 1 loyalty cards.`',
|
|
60
|
+
type: 'string',
|
|
61
|
+
multiple: true
|
|
62
|
+
},
|
|
63
|
+
state: {
|
|
64
|
+
label: 'State',
|
|
65
|
+
description: 'Indicates the current state of the session. `',
|
|
66
|
+
type: 'string',
|
|
67
|
+
choices: [
|
|
68
|
+
{ label: 'Open', value: 'open' },
|
|
69
|
+
{ label: 'Closed', value: 'closed' },
|
|
70
|
+
{ label: 'Partially returned', value: 'partially_returned' },
|
|
71
|
+
{ label: 'Cancelled', value: 'cancelled' }
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
cartItems: { ...t1_properties_1.cartItems },
|
|
75
|
+
additionalCosts: {
|
|
76
|
+
label: 'Additional Costs',
|
|
77
|
+
description: 'Use this property to set a value for the additional costs of this session, such as a shipping cost.`',
|
|
78
|
+
type: 'object'
|
|
79
|
+
},
|
|
80
|
+
identifiers: {
|
|
81
|
+
...t1_properties_1.identifier,
|
|
82
|
+
label: 'Identifiers'
|
|
83
|
+
},
|
|
84
|
+
attributes: {
|
|
85
|
+
...t1_properties_1.attribute,
|
|
86
|
+
default: {
|
|
87
|
+
'@path': '$.properties.attributes'
|
|
88
|
+
},
|
|
89
|
+
description: 'Use this property to set a value for the attributes of your choice. Attributes represent any information to attach to your session, like the shipping city. [See more info](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes).'
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
perform: (request, { payload }) => {
|
|
93
|
+
let requestUrl = `https://integration.talon.one/segment/v2/customer_sessions/${payload.customerSessionId}`;
|
|
94
|
+
if (payload.skipNonExistingAttributes) {
|
|
95
|
+
requestUrl += '?skipNonExistingAttributes=true';
|
|
96
|
+
}
|
|
97
|
+
return request(requestUrl, {
|
|
98
|
+
method: 'put',
|
|
99
|
+
headers: {
|
|
100
|
+
'X-Callback-Destination-URI': `${payload.callbackDestination}`,
|
|
101
|
+
'X-Callback-API-Key': `${payload.callbackAPIKey}`,
|
|
102
|
+
'X-Content-Fields': `${payload.contentFields}`,
|
|
103
|
+
'X-Correlation-ID': `${payload.callbackCorrelationId}`
|
|
104
|
+
},
|
|
105
|
+
json: {
|
|
106
|
+
profileId: payload.profileId,
|
|
107
|
+
couponCodes: payload.couponCodes,
|
|
108
|
+
referralCode: payload.referralCode,
|
|
109
|
+
loyaltyCards: payload.loyaltyCards,
|
|
110
|
+
state: payload.state,
|
|
111
|
+
cartItems: payload.cartItems,
|
|
112
|
+
additionalCosts: payload.additionalCosts,
|
|
113
|
+
identifiers: payload.identifiers,
|
|
114
|
+
attributes: payload.attributes
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
exports.default = action;
|
|
120
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/talon-one/updateCustomerSessionV2/index.ts"],"names":[],"mappings":";;AAGA,oDAAsF;AAEtF,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,+FAA+F;IAC5G,MAAM,EAAE;QACN,iBAAiB,EAAE;YACjB,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EAAE,kEAAkE;YAC/E,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,mBAAmB,EAAE;YACnB,KAAK,EAAE,0BAA0B;YACjC,WAAW,EAAE,oFAAoF;YACjG,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uCAAuC;SACrD;QACD,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,gFAAgF;YAC7F,WAAW,EAAE,gDAAgD;SAC9D;QACD,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,gBAAgB;YACvB,WAAW,EACT,sMAAsM;YACxM,WAAW,EAAE,yBAAyB;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X,GAAG,0BAAU;YACb,KAAK,EAAE,aAAa;SACrB;QACD,UAAU,EAAE;YACV,GAAG,yBAAS;YACZ,OAAO,EAAE;gBACP,OAAO,EAAE,yBAAyB;aACnC;YACD,WAAW,EACT,yPAAyP;SAC5P;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,IAAI,UAAU,GAAG,8DAA8D,OAAO,CAAC,iBAAiB,EAAE,CAAA;QAC1G,IAAI,OAAO,CAAC,yBAAyB,EAAE;YACrC,UAAU,IAAI,iCAAiC,CAAA;SAChD;QACD,OAAO,OAAO,CAAC,UAAU,EAAE;YACzB,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,4BAA4B,EAAE,GAAG,OAAO,CAAC,mBAAmB,EAAE;gBAC9D,oBAAoB,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE;gBACjD,kBAAkB,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE;gBAC9C,kBAAkB,EAAE,GAAG,OAAO,CAAC,qBAAqB,EAAE;aACvD;YACD,IAAI,EAAE;gBACJ,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,eAAe,EAAE,OAAO,CAAC,eAAe;gBACxC,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,UAAU,EAAE,OAAO,CAAC,UAAU;aAC/B;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -27,7 +27,7 @@ async function processPayload(input) {
|
|
|
27
27
|
UsersFormatted: usersFormatted,
|
|
28
28
|
DropOptions: {
|
|
29
29
|
PiiType: input.payloads[0].pii_type,
|
|
30
|
-
MergeMode:
|
|
30
|
+
MergeMode: 'Replace'
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
}
|
|
@@ -135,7 +135,7 @@ async function getCRMDataDropEndpoint(request, settings, payload, crmId) {
|
|
|
135
135
|
},
|
|
136
136
|
json: {
|
|
137
137
|
PiiType: payload.pii_type,
|
|
138
|
-
MergeMode:
|
|
138
|
+
MergeMode: 'Replace'
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
141
|
return response.data.Url;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/destinations/the-trade-desk-crm/functions.ts"],"names":[],"mappings":";;;AAAA,wDAAiH;AAGjH,mCAAmC;AAEnC,2CAA4C;AAsC5C,MAAM,WAAW,GAAG,IAAI,CAAA;AACxB,MAAM,QAAQ,GAAG,gCAAgC,WAAW,EAAE,CAAA;AAC9D,MAAM,oBAAoB,GAAG,IAAI,CAAA;AAEpB,QAAA,yBAAyB,GAAG,wCAAwC,CAAA;AAE1E,KAAK,UAAU,cAAc,CAAC,KAA0B;IAC7D,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,oBAAoB,EAAE;QAChD,MAAM,IAAI,qCAAsB,CAC9B,+EAA+E,oBAAoB,YAAY,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,CACvI,CAAA;KACF;IACD,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;IAGhF,MAAM,cAAc,GAAG,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAGnD,IAAI,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,iCAAyB,CAAC,EAAE;QAM/D,MAAM,YAAY,GAAG,MAAM,sBAAsB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,QAA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"}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const syncAudience_1 = __importDefault(require("./syncAudience"));
|
|
7
7
|
const destination = {
|
|
8
|
-
name: 'The Trade Desk
|
|
8
|
+
name: 'The Trade Desk CRM',
|
|
9
9
|
slug: 'actions-the-trade-desk-crm',
|
|
10
10
|
mode: 'cloud',
|
|
11
11
|
authentication: {
|
|
@@ -11,7 +11,6 @@ const action = {
|
|
|
11
11
|
region: { ...properties_1.region },
|
|
12
12
|
pii_type: { ...properties_1.pii_type },
|
|
13
13
|
email: { ...properties_1.email },
|
|
14
|
-
merge_mode: { ...properties_1.merge_mode },
|
|
15
14
|
enable_batching: { ...properties_1.enable_batching },
|
|
16
15
|
event_name: { ...properties_1.event_name },
|
|
17
16
|
batch_size: { ...properties_1.batch_size }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/the-trade-desk-crm/syncAudience/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/the-trade-desk-crm/syncAudience/index.ts"],"names":[],"mappings":";;AAGA,8CAAsG;AACtG,4CAA6C;AAE7C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mCAAmC;IAC1C,WAAW,EAAE,4CAA4C;IACzD,mBAAmB,EAAE,4BAA4B;IACjD,MAAM,EAAE;QACN,IAAI,EAAE,EAAE,GAAG,iBAAI,EAAE;QACjB,MAAM,EAAE,EAAE,GAAG,mBAAM,EAAE;QACrB,QAAQ,EAAE,EAAE,GAAG,qBAAQ,EAAE;QACzB,KAAK,EAAE,EAAE,GAAG,kBAAK,EAAE;QACnB,eAAe,EAAE,EAAE,GAAG,4BAAe,EAAE;QACvC,UAAU,EAAE,EAAE,GAAG,uBAAU,EAAE;QAC7B,UAAU,EAAE,EAAE,GAAG,uBAAU,EAAE;KAC9B;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1D,OAAO,0BAAc,CAAC;YACpB,OAAO;YACP,QAAQ;YACR,QAAQ,EAAE,CAAC,OAAO,CAAC;YACnB,QAAQ;SACT,CAAC,CAAA;IACJ,CAAC;IACD,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC/D,OAAO,0BAAc,CAAC;YACpB,OAAO;YACP,QAAQ;YACR,QAAQ,EAAE,OAAO;YACjB,QAAQ;SACT,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -21,16 +21,7 @@ const action = {
|
|
|
21
21
|
selected_advertiser_id: async (request, { settings }) => {
|
|
22
22
|
try {
|
|
23
23
|
const tiktok = new api_1.TikTokAudiences(request);
|
|
24
|
-
|
|
25
|
-
return tiktok.fetchAdvertisers(settings.advertiser_ids);
|
|
26
|
-
}
|
|
27
|
-
return {
|
|
28
|
-
choices: [],
|
|
29
|
-
error: {
|
|
30
|
-
message: JSON.stringify('BAD REQUEST - expected settings.advertiser_ids and got nothing!'),
|
|
31
|
-
code: '400'
|
|
32
|
-
}
|
|
33
|
-
};
|
|
24
|
+
return tiktok.fetchAdvertisers(settings.advertiser_ids);
|
|
34
25
|
}
|
|
35
26
|
catch (err) {
|
|
36
27
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-audiences/addUser/index.ts"],"names":[],"mappings":";;AAGA,4CAA6C;AAC7C,8CASsB;AACtB,gCAAwC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-audiences/addUser/index.ts"],"names":[],"mappings":";;AAGA,4CAA6C;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AAE,EAAE;oBACX,KAAK,EAAE;wBACL,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;wBAC5B,IAAI,EAAE,KAAK;qBACZ;iBACF,CAAA;aACF;QACH,CAAC;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,OAAO,0BAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CAAA;IAC5D,CAAC;IACD,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QACrD,OAAO,0BAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;IAC1D,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -16,16 +16,7 @@ const action = {
|
|
|
16
16
|
selected_advertiser_id: async (request, { settings }) => {
|
|
17
17
|
try {
|
|
18
18
|
const tiktok = new api_1.TikTokAudiences(request);
|
|
19
|
-
|
|
20
|
-
return tiktok.fetchAdvertisers(settings.advertiser_ids);
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
choices: [],
|
|
24
|
-
error: {
|
|
25
|
-
message: JSON.stringify('BAD REQUEST - expected settings.advertiser_ids and got nothing!'),
|
|
26
|
-
code: '400'
|
|
27
|
-
}
|
|
28
|
-
};
|
|
19
|
+
return tiktok.fetchAdvertisers(settings.advertiser_ids);
|
|
29
20
|
}
|
|
30
21
|
catch (err) {
|
|
31
22
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-audiences/createAudience/index.ts"],"names":[],"mappings":";;AAGA,4CAA6C;AAC7C,8CAAqF;AACrF,gCAAwC;AAMxC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,oDAAoD;IACjE,mBAAmB,EAAE,2BAA2B;IAChD,MAAM,EAAE;QACN,sBAAsB,EAAE,EAAE,GAAG,mCAAsB,EAAE;QACrD,oBAAoB,EAAE,EAAE,GAAG,iCAAoB,EAAE;QACjD,OAAO,EAAE,EAAE,GAAG,oBAAO,EAAE;KACxB;IACD,aAAa,EAAE;QACb,sBAAsB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YACtD,IAAI;gBACF,MAAM,MAAM,GAAG,IAAI,qBAAe,CAAC,OAAO,CAAC,CAAA;gBAE3C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/tiktok-audiences/createAudience/index.ts"],"names":[],"mappings":";;AAGA,4CAA6C;AAC7C,8CAAqF;AACrF,gCAAwC;AAMxC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,oDAAoD;IACjE,mBAAmB,EAAE,2BAA2B;IAChD,MAAM,EAAE;QACN,sBAAsB,EAAE,EAAE,GAAG,mCAAsB,EAAE;QACrD,oBAAoB,EAAE,EAAE,GAAG,iCAAoB,EAAE;QACjD,OAAO,EAAE,EAAE,GAAG,oBAAO,EAAE;KACxB;IACD,aAAa,EAAE;QACb,sBAAsB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YACtD,IAAI;gBACF,MAAM,MAAM,GAAG,IAAI,qBAAe,CAAC,OAAO,CAAC,CAAA;gBAE3C,OAAO,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAA;aACxD;YAAC,OAAO,GAAG,EAAE;gBACZ,OAAO;oBACL,OAAO,EAAE,EAAE;oBACX,KAAK,EAAE;wBACL,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;wBAC5B,IAAI,EAAE,KAAK;qBACZ;iBACF,CAAA;aACF;QACH,CAAC;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;QACpD,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,gDAAgD,EAAE,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,CAAA;QACxG,OAAO,0BAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IACzC,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { RequestClient, ModifiedResponse } from '@segment/actions-core';
|
|
2
2
|
import { Payload as AddUserPayload } from './addUser/generated-types';
|
|
3
|
-
import { Payload as AddToAudiencePayload } from './addToAudience/generated-types';
|
|
4
3
|
import { Payload as RemoveUserPayload } from './removeUser/generated-types';
|
|
5
4
|
import { Payload as CreateAudiencePayload } from './createAudience/generated-types';
|
|
6
5
|
import { Settings } from './generated-types';
|
|
7
6
|
import { CreateAudienceAPIResponse } from './types';
|
|
8
|
-
|
|
9
|
-
declare
|
|
10
|
-
declare type GenericPayload = LegacyPayload | AddToAudiencePayload;
|
|
11
|
-
declare type GenericSettings = Settings | AudienceSettings;
|
|
12
|
-
export declare function processPayload(request: RequestClient, settings: GenericSettings, payloads: GenericPayload[], action: string): Promise<ModifiedResponse<unknown>>;
|
|
7
|
+
declare type GenericPayload = AddUserPayload | RemoveUserPayload;
|
|
8
|
+
export declare function processPayload(request: RequestClient, settings: Settings, payloads: GenericPayload[], action: string): Promise<ModifiedResponse<unknown>>;
|
|
13
9
|
export declare function createAudience(request: RequestClient, payload: CreateAudiencePayload): Promise<ModifiedResponse<CreateAudienceAPIResponse>>;
|
|
14
10
|
export declare function validate(payloads: GenericPayload[]): void;
|
|
15
11
|
export declare function getIDSchema(payload: GenericPayload): string[];
|