@segment/action-destinations 3.129.1-node-18.14 → 3.130.1-add-error-classes.13
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/braze-cohorts/syncAudiences/index.js +1 -1
- package/dist/destinations/braze-cohorts/syncAudiences/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/index.js +3 -1
- package/dist/destinations/engage-messaging-twilio/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js +2 -104
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.d.ts +14 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js +65 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.d.ts +23 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.d.ts +5 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js +122 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.d.ts +14 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js +67 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.d.ts +22 -0
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js +97 -0
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.d.ts +2 -2
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.js +2 -2
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/purchase/index.js +3 -3
- package/dist/destinations/facebook-conversions-api/purchase/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js +4 -4
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToCart/index.js +1 -1
- package/dist/destinations/google-analytics-4/addToCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToWishlist/index.js +3 -3
- package/dist/destinations/google-analytics-4/addToWishlist/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/beginCheckout/index.js +1 -1
- package/dist/destinations/google-analytics-4/beginCheckout/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-functions.js +6 -6
- package/dist/destinations/google-analytics-4/ga4-functions.js.map +1 -1
- package/dist/destinations/google-analytics-4/generateLead/index.js +1 -1
- package/dist/destinations/google-analytics-4/generateLead/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/purchase/index.js +1 -1
- package/dist/destinations/google-analytics-4/purchase/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/refund/index.js +3 -3
- package/dist/destinations/google-analytics-4/refund/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/removeFromCart/index.js +3 -3
- package/dist/destinations/google-analytics-4/removeFromCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectItem/index.js +1 -1
- package/dist/destinations/google-analytics-4/selectItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectPromotion/index.js +1 -1
- package/dist/destinations/google-analytics-4/selectPromotion/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewCart/index.js +3 -3
- package/dist/destinations/google-analytics-4/viewCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItem/index.js +1 -1
- package/dist/destinations/google-analytics-4/viewItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItemList/index.js +1 -1
- package/dist/destinations/google-analytics-4/viewItemList/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewPromotion/index.js +1 -1
- package/dist/destinations/google-analytics-4/viewPromotion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js +2 -2
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js.map +1 -1
- package/dist/destinations/hubspot/errors.d.ts +2 -1
- package/dist/destinations/hubspot/errors.js +2 -1
- package/dist/destinations/hubspot/errors.js.map +1 -1
- package/dist/destinations/ironclad/RecordAction/generated-types.d.ts +1 -1
- package/dist/destinations/ironclad/RecordAction/index.js +3 -4
- package/dist/destinations/ironclad/RecordAction/index.js.map +1 -1
- package/dist/destinations/ironclad/generated-types.d.ts +2 -2
- package/dist/destinations/ironclad/index.js +0 -3
- package/dist/destinations/ironclad/index.js.map +1 -1
- package/dist/destinations/linkedin-audiences/index.js +2 -2
- package/dist/destinations/linkedin-audiences/index.js.map +1 -1
- package/dist/destinations/qualtrics/addContactToXmd/index.js +7 -5
- package/dist/destinations/qualtrics/addContactToXmd/index.js.map +1 -1
- package/dist/destinations/qualtrics/dynamicFields.d.ts +5 -0
- package/dist/destinations/qualtrics/dynamicFields.js +39 -0
- package/dist/destinations/qualtrics/dynamicFields.js.map +1 -0
- package/dist/destinations/qualtrics/index.js +7 -3
- package/dist/destinations/qualtrics/index.js.map +1 -1
- package/dist/destinations/qualtrics/qualtricsApiClient.d.ts +41 -2
- package/dist/destinations/qualtrics/qualtricsApiClient.js +47 -4
- package/dist/destinations/qualtrics/qualtricsApiClient.js.map +1 -1
- package/dist/destinations/qualtrics/triggerXflowWorkflow/index.js +2 -2
- package/dist/destinations/qualtrics/triggerXflowWorkflow/index.js.map +1 -1
- package/dist/destinations/qualtrics/upsertContactTransaction/generated-types.d.ts +19 -0
- package/dist/destinations/qualtrics/upsertContactTransaction/generated-types.js +3 -0
- package/dist/destinations/qualtrics/upsertContactTransaction/generated-types.js.map +1 -0
- package/dist/destinations/qualtrics/upsertContactTransaction/index.d.ts +5 -0
- package/dist/destinations/qualtrics/upsertContactTransaction/index.js +186 -0
- package/dist/destinations/qualtrics/upsertContactTransaction/index.js.map +1 -0
- package/dist/destinations/qualtrics/utils.d.ts +5 -0
- package/dist/destinations/qualtrics/utils.js +57 -0
- package/dist/destinations/qualtrics/utils.js.map +1 -0
- package/dist/destinations/salesforce/sf-operations.js +2 -1
- package/dist/destinations/salesforce/sf-operations.js.map +1 -1
- package/dist/destinations/salesforce/sf-utils.d.ts +1 -0
- package/dist/destinations/salesforce/sf-utils.js +13 -1
- package/dist/destinations/salesforce/sf-utils.js.map +1 -1
- package/dist/destinations/segment/errors.d.ts +3 -3
- package/dist/destinations/segment/errors.js +2 -2
- package/dist/destinations/segment/errors.js.map +1 -1
- package/dist/destinations/segment-profiles/errors.d.ts +3 -3
- package/dist/destinations/segment-profiles/errors.js +2 -2
- package/dist/destinations/segment-profiles/errors.js.map +1 -1
- package/package.json +6 -4
|
@@ -8,18 +8,61 @@ class QualtricsApiClient {
|
|
|
8
8
|
}
|
|
9
9
|
async whoaAmI() {
|
|
10
10
|
const endpoint = `/API/v3/whoami`;
|
|
11
|
-
return (await this.makeRequest(endpoint, 'get')).
|
|
12
|
-
|
|
11
|
+
return (await this.makeRequest(endpoint, 'get')).result;
|
|
12
|
+
}
|
|
13
|
+
async listDirectories() {
|
|
14
|
+
const endpoint = `/API/v3/directories/`;
|
|
15
|
+
return (await this.makeRequest(endpoint, 'get')).result;
|
|
13
16
|
}
|
|
14
17
|
async createDirectoryContact(directoryId, body) {
|
|
15
18
|
const endpoint = `/API/v3/directories/${directoryId}/contacts`;
|
|
16
|
-
return await this.makeRequest(endpoint, 'post', body);
|
|
19
|
+
return (await this.makeRequest(endpoint, 'post', body)).result;
|
|
20
|
+
}
|
|
21
|
+
async createContactTransaction(directoryId, body) {
|
|
22
|
+
const endpoint = `/API/v3/directories/${directoryId}/transactions`;
|
|
23
|
+
return (await this.makeRequest(endpoint, 'post', body)).result;
|
|
24
|
+
}
|
|
25
|
+
async searchDirectoryForContact(directoryId, body) {
|
|
26
|
+
const endpoint = `/API/v3/directories/${directoryId}/contacts/search`;
|
|
27
|
+
const filterBody = this.createFilterBody(body);
|
|
28
|
+
if (!filterBody) {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
return (await this.makeRequest(endpoint, 'post', filterBody)).result?.elements;
|
|
17
32
|
}
|
|
18
33
|
async makeRequest(endpoint, method, body) {
|
|
19
|
-
|
|
34
|
+
const response = await this.request(this.buildUrl(endpoint), {
|
|
20
35
|
...this.buildRequestParams(method),
|
|
21
36
|
json: body
|
|
22
37
|
});
|
|
38
|
+
return response.data;
|
|
39
|
+
}
|
|
40
|
+
createFilterBody(body) {
|
|
41
|
+
const filterArray = [];
|
|
42
|
+
const bodyKeys = Object.keys(body);
|
|
43
|
+
['extRef', 'phone', 'email'].forEach((key) => {
|
|
44
|
+
if (bodyKeys.includes(key) && body[key] !== undefined) {
|
|
45
|
+
filterArray.push({
|
|
46
|
+
filterType: key,
|
|
47
|
+
comparison: 'eq',
|
|
48
|
+
value: body[key]
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
if (filterArray.length === 1) {
|
|
53
|
+
return {
|
|
54
|
+
filter: filterArray[0]
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
else if (filterArray.length > 1) {
|
|
58
|
+
return {
|
|
59
|
+
filter: {
|
|
60
|
+
conjunction: 'and',
|
|
61
|
+
filters: filterArray
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
return;
|
|
23
66
|
}
|
|
24
67
|
buildUrl(endpoint) {
|
|
25
68
|
let parsedEndpoint = endpoint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qualtricsApiClient.js","sourceRoot":"","sources":["../../../src/destinations/qualtrics/qualtricsApiClient.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"qualtricsApiClient.js","sourceRoot":"","sources":["../../../src/destinations/qualtrics/qualtricsApiClient.ts"],"names":[],"mappings":";;AAyHA,MAAqB,kBAAkB;IAKrC,YAAY,EAAU,EAAE,QAAgB,EAAE,OAAsB;QAC9D,IAAI,CAAC,OAAO,GAAG,WAAW,EAAE,IAAI,MAAM,gBAAgB,CAAA;QACtD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAEM,KAAK,CAAC,OAAO;QAClB,MAAM,QAAQ,GAAG,gBAAgB,CAAA;QACjC,OAAO,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,MAAwB,CAAA;IAC3E,CAAC;IAEM,KAAK,CAAC,eAAe;QAC1B,MAAM,QAAQ,GAAG,sBAAsB,CAAA;QACvC,OAAO,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,MAAiC,CAAA;IACpF,CAAC;IAEM,KAAK,CAAC,sBAAsB,CACjC,WAAmB,EACnB,IAAmC;QAEnC,MAAM,QAAQ,GAAG,uBAAuB,WAAW,WAAW,CAAA;QAC9D,OAAO,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAwC,CAAA;IAClG,CAAC;IAEM,KAAK,CAAC,wBAAwB,CACnC,WAAmB,EACnB,IAAqC;QAErC,MAAM,QAAQ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E,IAAI;oBAChB,KAAK,EAAE,IAAI,CAAC,GAA6C,CAAW;iBACrE,CAAC,CAAA;aACH;QACH,CAAC,CAAC,CAAA;QACF,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,OAAO;gBACL,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;aACvB,CAAA;SACF;aAAM,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YACjC,OAAO;gBACL,MAAM,EAAE;oBACN,WAAW,EAAE,KAAK;oBAClB,OAAO,EAAE,WAAW;iBACrB;aACF,CAAA;SACF;QACD,OAAM;IACR,CAAC;IAEO,QAAQ,CAAC,QAAgB;QAC/B,IAAI,cAAc,GAAG,QAAQ,CAAA;QAC7B,IAAI,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YAClC,cAAc,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;SAC7C;QACD,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,cAAc,EAAE,CAAA;IAC5C,CAAC;IAEO,kBAAkB,CAAC,MAAwB;QACjD,OAAO;YACL,MAAM;YACN,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,IAAI,CAAC,QAAQ;aAC7B;SACF,CAAA;IACH,CAAC;CACF;AAzGD,qCAyGC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const action = {
|
|
4
|
-
title: '
|
|
5
|
-
description: 'This action
|
|
4
|
+
title: 'Start a workflow in Qualtrics',
|
|
5
|
+
description: 'This action is used to kick off a workflow in Qualtrics',
|
|
6
6
|
fields: {
|
|
7
7
|
workflowUrl: {
|
|
8
8
|
label: 'Workflow URL',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/qualtrics/triggerXflowWorkflow/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/qualtrics/triggerXflowWorkflow/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,+BAA+B;IACtC,WAAW,EAAE,yDAAyD;IACtE,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,KAAK;YACb,WAAW,EACT,mPAAmP;YACrP,QAAQ,EAAE,IAAI;SACf;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qDAAqD;YAClE,eAAe,EAAE,UAAU;YAC3B,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,OAAO,EAAE,SAAS;iBACnB;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;gBACD,MAAM,EAAE;oBACN,OAAO,EAAE,UAAU;iBACpB;gBACD,UAAU,EAAE;oBACV,OAAO,EAAE,cAAc;iBACxB;gBACD,MAAM,EAAE;oBACN,OAAO,EAAE,UAAU;iBACpB;gBACD,OAAO,EAAE;oBACP,OAAO,EAAE,WAAW;iBACrB;aACF;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;YACvC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY;YAC/B,OAAO,EAAE;gBACP,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ;gBACrC,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
directoryId: string;
|
|
3
|
+
mailingListId: string;
|
|
4
|
+
contactId?: string;
|
|
5
|
+
extRef: string;
|
|
6
|
+
email?: string;
|
|
7
|
+
phone?: string;
|
|
8
|
+
firstName?: string;
|
|
9
|
+
lastName?: string;
|
|
10
|
+
language?: string;
|
|
11
|
+
unsubscribed?: boolean;
|
|
12
|
+
embeddedData?: {
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
transactionDate?: string | number;
|
|
16
|
+
transactionData?: {
|
|
17
|
+
[k: string]: unknown;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/qualtrics/upsertContactTransaction/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,186 @@
|
|
|
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 qualtricsApiClient_1 = __importDefault(require("../qualtricsApiClient"));
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
const dynamicFields_1 = require("../dynamicFields");
|
|
10
|
+
async function searchOrCreateContact(payload, apiClient) {
|
|
11
|
+
const contacts = await searchContact(payload, apiClient);
|
|
12
|
+
if (contacts.length === 0) {
|
|
13
|
+
const contact = await createContact(payload, apiClient);
|
|
14
|
+
return contact.id;
|
|
15
|
+
}
|
|
16
|
+
else if (contacts.length !== 1) {
|
|
17
|
+
throw new actions_core_1.IntegrationError('Unable to located one and only one contact in directory search', 'directory_lookup_error', 400);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return contacts[0].id;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async function searchContact(payload, apiClient) {
|
|
24
|
+
if (!payload.email && !payload.extRef && !payload.phone) {
|
|
25
|
+
throw new actions_core_1.IntegrationError('Unable to lookup contact. At least 1 field is required: contactId, external data reference, email or phone', 'directory_lookup_error', 400);
|
|
26
|
+
}
|
|
27
|
+
return await apiClient.searchDirectoryForContact(payload.directoryId, {
|
|
28
|
+
email: payload?.email,
|
|
29
|
+
extRef: payload?.extRef,
|
|
30
|
+
phone: payload?.phone
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async function createContact(payload, apiClient) {
|
|
34
|
+
const requestPayload = {
|
|
35
|
+
firstName: payload.firstName,
|
|
36
|
+
lastName: payload.lastName,
|
|
37
|
+
phone: payload.phone,
|
|
38
|
+
email: payload.email,
|
|
39
|
+
extRef: payload.extRef,
|
|
40
|
+
unsubscribed: payload.unsubscribed,
|
|
41
|
+
language: payload.language,
|
|
42
|
+
embeddedData: payload.embeddedData
|
|
43
|
+
};
|
|
44
|
+
return await apiClient.createDirectoryContact(payload.directoryId, requestPayload);
|
|
45
|
+
}
|
|
46
|
+
const action = {
|
|
47
|
+
title: 'Upsert contact transaction',
|
|
48
|
+
description: 'Add a transaction to a contact in Qualtrics directory. If the contact already exists, add the transaction. If the contact does not exist, create the contact first, then add the transaction record.',
|
|
49
|
+
defaultSubscription: 'type = "track", event = "Transaction Created"',
|
|
50
|
+
fields: {
|
|
51
|
+
directoryId: {
|
|
52
|
+
label: 'Directory ID',
|
|
53
|
+
type: 'string',
|
|
54
|
+
description: 'Directory id. Also known as the Pool ID. POOL_XXX',
|
|
55
|
+
required: true,
|
|
56
|
+
dynamic: true
|
|
57
|
+
},
|
|
58
|
+
mailingListId: {
|
|
59
|
+
label: 'Mailing list ID',
|
|
60
|
+
type: 'string',
|
|
61
|
+
description: 'ID of the mailing list the contact belongs too. If not part of the event payload, create / use an existing mailing list from Qualtrics. Will have the form CG_xxx',
|
|
62
|
+
required: true,
|
|
63
|
+
default: {
|
|
64
|
+
'@path': '$.traits.qualtricsMailingListId'
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
contactId: {
|
|
68
|
+
label: 'Contact ID',
|
|
69
|
+
type: 'string',
|
|
70
|
+
description: 'The id of the contact to add the transaction. if this field is not supplied, you must supply an external data reference, email and/or phone so a look can be performed. If the lookup does not find a contact, one will be created with these fields and including the optionally supplied firstName, lastName, language, subscribed and embeddedData',
|
|
71
|
+
default: {
|
|
72
|
+
'@path': '$.traits.qualtricsContactId'
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
extRef: {
|
|
76
|
+
label: 'External Data Reference',
|
|
77
|
+
type: 'string',
|
|
78
|
+
description: 'The external data reference which is a unique identifier for the user. This is only used to search for the contact and if a new contact needs to be created, it is not added to the transaction data.',
|
|
79
|
+
required: true,
|
|
80
|
+
default: {
|
|
81
|
+
'@if': {
|
|
82
|
+
exists: { '@path': '$.userId' },
|
|
83
|
+
then: { '@path': '$.userId' },
|
|
84
|
+
else: { '@path': '$.anonymousId' }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
email: {
|
|
89
|
+
label: 'Email',
|
|
90
|
+
type: 'string',
|
|
91
|
+
description: 'Email of contact. This is only used to search for the contact and if a new contact needs to be created, it is not added to the transaction data.',
|
|
92
|
+
default: {
|
|
93
|
+
'@if': {
|
|
94
|
+
exists: { '@path': '$.email' },
|
|
95
|
+
then: { '@path': '$.email' },
|
|
96
|
+
else: { '@path': '$.traits.email' }
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
phone: {
|
|
101
|
+
label: 'Phone number',
|
|
102
|
+
type: 'string',
|
|
103
|
+
description: 'Phone number of contact. This is only used to search for the contact and if a new contact needs to be created, it is not added to the transaction data.',
|
|
104
|
+
default: {
|
|
105
|
+
'@path': '$.traits.phone'
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
firstName: {
|
|
109
|
+
label: 'First name',
|
|
110
|
+
type: 'string',
|
|
111
|
+
description: 'First name of contact. This is only used if a new contact needs to be created and is not added to the transaction data.',
|
|
112
|
+
default: {
|
|
113
|
+
'@path': '$.traits.firstName'
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
lastName: {
|
|
117
|
+
label: 'Last name',
|
|
118
|
+
type: 'string',
|
|
119
|
+
description: 'Last name of contact. This is only used if a new contact needs to be created and is not added to the transaction data.',
|
|
120
|
+
default: {
|
|
121
|
+
'@path': '$.traits.lastName'
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
language: {
|
|
125
|
+
label: 'Language',
|
|
126
|
+
type: 'string',
|
|
127
|
+
description: 'Language code of the contact. This is only used if a new contact needs to be created and is not added to the transaction data.',
|
|
128
|
+
default: {
|
|
129
|
+
'@if': {
|
|
130
|
+
exists: { '@path': '$.traits.language' },
|
|
131
|
+
then: { '@path': '$.traits.language' },
|
|
132
|
+
else: 'EN'
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
unsubscribed: {
|
|
137
|
+
label: 'Contact is unsubscribed',
|
|
138
|
+
type: 'boolean',
|
|
139
|
+
description: 'Should the contact be unsubscribed from correspondence. This is only used if a new contact needs to be created and is not added to the transaction.',
|
|
140
|
+
default: false
|
|
141
|
+
},
|
|
142
|
+
embeddedData: {
|
|
143
|
+
label: 'Contact embedded data',
|
|
144
|
+
type: 'object',
|
|
145
|
+
description: 'Contact embedded data (properties of the contact). These are added to the contact only if a new contact needs to be created not added to the transaction.',
|
|
146
|
+
defaultObjectUI: 'keyvalue'
|
|
147
|
+
},
|
|
148
|
+
transactionDate: {
|
|
149
|
+
label: 'Date & time of transaction',
|
|
150
|
+
type: 'datetime',
|
|
151
|
+
description: 'Date and time of when the transaction occurred.',
|
|
152
|
+
default: {
|
|
153
|
+
'@path': '$.timestamp'
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
transactionData: {
|
|
157
|
+
label: 'Transaction data',
|
|
158
|
+
type: 'object',
|
|
159
|
+
description: 'Properties of the transaction too add to the users record',
|
|
160
|
+
defaultObjectUI: 'keyvalue'
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
dynamicFields: {
|
|
164
|
+
directoryId: dynamicFields_1.getDirectoryIds
|
|
165
|
+
},
|
|
166
|
+
perform: async (request, data) => {
|
|
167
|
+
let contactId = data.payload.contactId;
|
|
168
|
+
const apiClient = new qualtricsApiClient_1.default(data.settings.datacenter, data.settings.apiToken, request);
|
|
169
|
+
if (!contactId) {
|
|
170
|
+
contactId = await searchOrCreateContact(data.payload, apiClient);
|
|
171
|
+
}
|
|
172
|
+
const parsedData = utils_1.parsedEmbeddedData(data.payload?.transactionData);
|
|
173
|
+
const transactionDate = utils_1.parsedTransactionDate(data.payload?.transactionDate);
|
|
174
|
+
const payload = {
|
|
175
|
+
[utils_1.generateRandomId(16)]: {
|
|
176
|
+
contactId,
|
|
177
|
+
mailingListId: data.payload.mailingListId,
|
|
178
|
+
data: parsedData,
|
|
179
|
+
transactionDate
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
return apiClient.createContactTransaction(data.payload.directoryId, payload);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
exports.default = action;
|
|
186
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/qualtrics/upsertContactTransaction/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAwD;AAExD,+EAI8B;AAC9B,oCAAsF;AAEtF,oDAAkD;AAElD,KAAK,UAAU,qBAAqB,CAAC,OAAgB,EAAE,SAA6B;IAClF,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;IACxD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACzB,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;QACvD,OAAO,OAAO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EAAE;QAC/B,IAAI,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAA;QACtC,MAAM,SAAS,GAAG,IAAI,4BAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QACnG,IAAI,CAAC,SAAS,EAAE;YACd,SAAS,GAAG,MAAM,qBAAqB,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;SACjE;QACD,MAAM,UAAU,GAAG,0BAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAA;QACpE,MAAM,eAAe,GAAG,6BAAqB,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAA;QAC5E,MAAM,OAAO,GAAG;YACd,CAAC,wBAAgB,CAAC,EAAE,CAAC,CAAC,EAAE;gBACtB,SAAS;gBACT,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa;gBACzC,IAAI,EAAE,UAAU;gBAChB,eAAe;aAChB;SACF,CAAA;QACD,OAAO,SAAS,CAAC,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,CAAA;IAC9E,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function parsedEmbeddedData(data: {
|
|
2
|
+
[key: string]: unknown;
|
|
3
|
+
} | undefined): Record<string, string | number | boolean>;
|
|
4
|
+
export declare function generateRandomId(length?: number): string;
|
|
5
|
+
export declare function parsedTransactionDate(transactionDate: string | number | undefined): string;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parsedTransactionDate = exports.generateRandomId = exports.parsedEmbeddedData = void 0;
|
|
4
|
+
function parsedEmbeddedData(data) {
|
|
5
|
+
const parsedData = {};
|
|
6
|
+
Object.keys(data || {}).forEach((key) => {
|
|
7
|
+
if (!data) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (typeof data[key] === 'string') {
|
|
11
|
+
parsedData[key] = data[key];
|
|
12
|
+
}
|
|
13
|
+
else if (typeof data[key] === 'number') {
|
|
14
|
+
parsedData[key] = data[key];
|
|
15
|
+
}
|
|
16
|
+
else if (typeof data[key] === 'boolean') {
|
|
17
|
+
parsedData[key] = data[key];
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
try {
|
|
21
|
+
parsedData[key] = JSON.stringify(data);
|
|
22
|
+
}
|
|
23
|
+
catch (err) {
|
|
24
|
+
parsedData[key] = data.toString();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return parsedData;
|
|
29
|
+
}
|
|
30
|
+
exports.parsedEmbeddedData = parsedEmbeddedData;
|
|
31
|
+
function generateRandomId(length = 16) {
|
|
32
|
+
const patternList = 'abcdefghijklmnopqrstuvwxyz123456789';
|
|
33
|
+
const result = [];
|
|
34
|
+
for (let i = 0; i < length; i++) {
|
|
35
|
+
result.push(patternList[Math.floor(Math.random() * patternList.length)]);
|
|
36
|
+
}
|
|
37
|
+
return result.join('');
|
|
38
|
+
}
|
|
39
|
+
exports.generateRandomId = generateRandomId;
|
|
40
|
+
function parsedTransactionDate(transactionDate) {
|
|
41
|
+
let dateObject = new Date();
|
|
42
|
+
if (typeof transactionDate === 'number') {
|
|
43
|
+
dateObject = new Date(transactionDate);
|
|
44
|
+
}
|
|
45
|
+
else if (typeof transactionDate === 'string') {
|
|
46
|
+
const parsedDate = Date.parse(transactionDate);
|
|
47
|
+
if (!isNaN(parsedDate)) {
|
|
48
|
+
dateObject = new Date(parsedDate);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return dateObject
|
|
52
|
+
.toISOString()
|
|
53
|
+
.replace('T', ' ')
|
|
54
|
+
.replace(/\.\d{3}Z/, '');
|
|
55
|
+
}
|
|
56
|
+
exports.parsedTransactionDate = parsedTransactionDate;
|
|
57
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/destinations/qualtrics/utils.ts"],"names":[],"mappings":";;;AAAA,SAAgB,kBAAkB,CAChC,IAA4C;IAE5C,MAAM,UAAU,GAA8C,EAAE,CAAA;IAChE,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,GAAW,EAAE,EAAE;QAC9C,IAAI,CAAC,IAAI,EAAE;YACT,OAAM;SACP;QACD,IAAI,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;YACjC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAW,CAAA;SACtC;aAAM,IAAI,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;YACxC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAW,CAAA;SACtC;aAAM,IAAI,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;YACzC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAY,CAAA;SACvC;aAAM;YACL,IAAI;gBACF,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;aACvC;YAAC,OAAO,GAAG,EAAE;gBACZ,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAA;aAClC;SACF;IACH,CAAC,CAAC,CAAA;IACF,OAAO,UAAU,CAAA;AACnB,CAAC;AAvBD,gDAuBC;AAED,SAAgB,gBAAgB,CAAC,MAAM,GAAG,EAAE;IAC1C,MAAM,WAAW,GAAG,qCAAqC,CAAA;IACzD,MAAM,MAAM,GAAG,EAAE,CAAA;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;QAC/B,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;KACzE;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxB,CAAC;AAPD,4CAOC;AAED,SAAgB,qBAAqB,CAAC,eAA4C;IAChF,IAAI,UAAU,GAAS,IAAI,IAAI,EAAE,CAAA;IACjC,IAAI,OAAO,eAAe,KAAK,QAAQ,EAAE;QACvC,UAAU,GAAG,IAAI,IAAI,CAAC,eAAe,CAAC,CAAA;KACvC;SAAM,IAAI,OAAO,eAAe,KAAK,QAAQ,EAAE;QAC9C,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAA;QAC9C,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE;YACtB,UAAU,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,CAAA;SAClC;KACF;IACD,OAAO,UAAU;SACd,WAAW,EAAE;SACb,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;SACjB,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;AAC5B,CAAC;AAdD,sDAcC"}
|
|
@@ -211,7 +211,8 @@ class Salesforce {
|
|
|
211
211
|
}
|
|
212
212
|
return [res.data.records[0].Id, undefined];
|
|
213
213
|
};
|
|
214
|
-
this.instanceUrl =
|
|
214
|
+
this.instanceUrl = sf_utils_1.validateInstanceURL(instanceUrl);
|
|
215
|
+
this.instanceUrl = this.instanceUrl.concat(instanceUrl.slice(-1) === '/' ? '' : '/');
|
|
215
216
|
this.request = request;
|
|
216
217
|
}
|
|
217
218
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sf-operations.js","sourceRoot":"","sources":["../../../src/destinations/salesforce/sf-operations.ts"],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E,EAAE;gBACxE,OAAO,CAAC,EAAE,EAAE,IAAI,+BAAgB,CAAC,kCAAkC,EAAE,cAAc,EAAE,GAAG,CAAC,CAAC,CAAA;aAC3F;YAED,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,CAAC,CAAA;QAC5C,CAAC,CAAA;QAxRC,IAAI,CAAC,WAAW,GAAG,8BAAmB,CAAC,WAAW,CAAC,CAAA;QAInD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;QACpF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;CAmRF;AA9RD,6BA8RC"}
|
|
@@ -3,7 +3,7 @@ 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.buildCSVData = void 0;
|
|
6
|
+
exports.validateInstanceURL = exports.buildCSVData = void 0;
|
|
7
7
|
const actions_core_1 = require("@segment/actions-core");
|
|
8
8
|
const camelCase_1 = __importDefault(require("lodash/camelCase"));
|
|
9
9
|
const isSettingsKey = new Set([
|
|
@@ -111,4 +111,16 @@ const snakeCaseToPascalCase = (key) => {
|
|
|
111
111
|
const token = camelCase_1.default(key);
|
|
112
112
|
return token.charAt(0).toUpperCase() + token.slice(1);
|
|
113
113
|
};
|
|
114
|
+
const validateInstanceURL = (instanceUrl) => {
|
|
115
|
+
if (instanceUrl === undefined || instanceUrl === '') {
|
|
116
|
+
throw new actions_core_1.IntegrationError('Empty Salesforce instance URL. Please login through OAuth.', 'INVALID_INSTANCE_URL', 400);
|
|
117
|
+
}
|
|
118
|
+
const salesforceRegex = /^(https):\/\/.*\.salesforce\.com/;
|
|
119
|
+
const isValid = salesforceRegex.test(instanceUrl);
|
|
120
|
+
if (isValid) {
|
|
121
|
+
return instanceUrl;
|
|
122
|
+
}
|
|
123
|
+
throw new actions_core_1.IntegrationError('Invalid Salesforce instance URL. Please login through OAuth again.', 'INVALID_INSTANCE_URL', 400);
|
|
124
|
+
};
|
|
125
|
+
exports.validateInstanceURL = validateInstanceURL;
|
|
114
126
|
//# sourceMappingURL=sf-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sf-utils.js","sourceRoot":"","sources":["../../../src/destinations/salesforce/sf-utils.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAwD;AAExD,iEAAwC;AAIxC,MAAM,aAAa,GAAG,IAAI,GAAG,CAAS;IACpC,WAAW;IACX,QAAQ;IACR,iBAAiB;IACjB,cAAc;IACd,sBAAsB;IACtB,oBAAoB;CACrB,CAAC,CAAA;AAEF,MAAM,QAAQ,GAAG,MAAM,CAAA;AAEvB,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAQ,EAAE;IAClD,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACvB,MAAM,IAAI,+BAAgB,CACxB,oCAAoC,KAAK,EAAE,EAC3C,oCAAoC,KAAK,EAAE,EAC3C,GAAG,CACJ,CAAA;KACF;AACH,CAAC,CAAA;AAID,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAAW,EAAE;IACrD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAE3C,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AAClC,CAAC,CAAA;AAUD,MAAM,cAAc,GAAG,CAAC,QAA0B,EAAoC,EAAE;IACtF,MAAM,SAAS,GAAG,IAAI,GAAG,EAA+B,CAAA;IAGxD,KAAK,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC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MAAM,eAAe,GAAG,kCAAkC,CAAA;IAC1D,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IAEjD,IAAI,OAAO,EAAE;QACX,OAAO,WAAW,CAAA;KACnB;IAED,MAAM,IAAI,+BAAgB,CACxB,oEAAoE,EACpE,sBAAsB,EACtB,GAAG,CACJ,CAAA;AACH,CAAC,CAAA;AArBY,QAAA,mBAAmB,uBAqB/B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const MissingUserOrAnonymousIdThrowableError:
|
|
3
|
-
export declare const InvalidEndpointSelectedThrowableError:
|
|
1
|
+
import { ValidationError } from '@segment/actions-core';
|
|
2
|
+
export declare const MissingUserOrAnonymousIdThrowableError: ValidationError;
|
|
3
|
+
export declare const InvalidEndpointSelectedThrowableError: ValidationError;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InvalidEndpointSelectedThrowableError = exports.MissingUserOrAnonymousIdThrowableError = void 0;
|
|
4
4
|
const actions_core_1 = require("@segment/actions-core");
|
|
5
|
-
exports.MissingUserOrAnonymousIdThrowableError = new actions_core_1.
|
|
6
|
-
exports.InvalidEndpointSelectedThrowableError = new actions_core_1.
|
|
5
|
+
exports.MissingUserOrAnonymousIdThrowableError = new actions_core_1.ValidationError('Either `Anonymous ID` or `User ID` must be defined.');
|
|
6
|
+
exports.InvalidEndpointSelectedThrowableError = new actions_core_1.ValidationError('A valid endpoint must be selected. Please check your Segment settings.');
|
|
7
7
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/destinations/segment/errors.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/destinations/segment/errors.ts"],"names":[],"mappings":";;;AAAA,wDAAuD;AAE1C,QAAA,sCAAsC,GAAG,IAAI,8BAAe,CACvE,qDAAqD,CACtD,CAAA;AAEY,QAAA,qCAAqC,GAAG,IAAI,8BAAe,CACtE,wEAAwE,CACzE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTTPError,
|
|
1
|
+
import { HTTPError, ValidationError } from '@segment/actions-core';
|
|
2
2
|
export declare class SegmentPublicAPIError extends HTTPError {
|
|
3
3
|
response: Response & {
|
|
4
4
|
errors: {
|
|
@@ -10,5 +10,5 @@ export declare class SegmentPublicAPIError extends HTTPError {
|
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
export declare const MissingUserOrAnonymousIdThrowableError:
|
|
14
|
-
export declare const InvalidEndpointSelectedThrowableError:
|
|
13
|
+
export declare const MissingUserOrAnonymousIdThrowableError: ValidationError;
|
|
14
|
+
export declare const InvalidEndpointSelectedThrowableError: ValidationError;
|
|
@@ -5,6 +5,6 @@ const actions_core_1 = require("@segment/actions-core");
|
|
|
5
5
|
class SegmentPublicAPIError extends actions_core_1.HTTPError {
|
|
6
6
|
}
|
|
7
7
|
exports.SegmentPublicAPIError = SegmentPublicAPIError;
|
|
8
|
-
exports.MissingUserOrAnonymousIdThrowableError = new actions_core_1.
|
|
9
|
-
exports.InvalidEndpointSelectedThrowableError = new actions_core_1.
|
|
8
|
+
exports.MissingUserOrAnonymousIdThrowableError = new actions_core_1.ValidationError('Either `Anonymous ID` or `User ID` must be defined.');
|
|
9
|
+
exports.InvalidEndpointSelectedThrowableError = new actions_core_1.ValidationError('A valid endpoint must be selected. Please check your Segment settings.');
|
|
10
10
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/destinations/segment-profiles/errors.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/destinations/segment-profiles/errors.ts"],"names":[],"mappings":";;;AAAA,wDAAkE;AAElE,MAAa,qBAAsB,SAAQ,wBAAS;CAUnD;AAVD,sDAUC;AAEY,QAAA,sCAAsC,GAAG,IAAI,8BAAe,CACvE,qDAAqD,CACtD,CAAA;AAEY,QAAA,qCAAqC,GAAG,IAAI,8BAAe,CACtE,wEAAwE,CACzE,CAAA"}
|
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.130.1-add-error-classes.13+6a18719e",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"typecheck": "tsc -p tsconfig.build.json --noEmit"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
+
"@types/google-libphonenumber": "^7.4.23",
|
|
34
35
|
"@types/jest": "^27.0.0",
|
|
35
36
|
"jest": "^27.3.1",
|
|
36
37
|
"nock": "^13.1.4"
|
|
@@ -38,12 +39,13 @@
|
|
|
38
39
|
"dependencies": {
|
|
39
40
|
"@amplitude/ua-parser-js": "^0.7.25",
|
|
40
41
|
"@segment/a1-notation": "^2.1.4",
|
|
41
|
-
"@segment/actions-core": "^3.50.1-
|
|
42
|
-
"@segment/actions-shared": "^1.32.1-
|
|
42
|
+
"@segment/actions-core": "^3.50.1-add-error-classes.16+6a18719e",
|
|
43
|
+
"@segment/actions-shared": "^1.32.1-add-error-classes.16+6a18719e",
|
|
43
44
|
"@types/node": "^18.11.15",
|
|
44
45
|
"cheerio": "^1.0.0-rc.10",
|
|
45
46
|
"dayjs": "^1.10.7",
|
|
46
47
|
"escape-goat": "^3",
|
|
48
|
+
"google-libphonenumber": "^3.2.31",
|
|
47
49
|
"liquidjs": "^9.37.0",
|
|
48
50
|
"lodash": "^4.17.21"
|
|
49
51
|
},
|
|
@@ -66,5 +68,5 @@
|
|
|
66
68
|
"lcov"
|
|
67
69
|
]
|
|
68
70
|
},
|
|
69
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "6a18719ea70d48bdca9bbd4ba6e4443617bf1b80"
|
|
70
72
|
}
|