@segment/action-destinations 3.41.1-alpha.3 → 3.42.1-alpha.4
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/friendbuy/trackCustomEvent/index.js +17 -17
- package/dist/destinations/friendbuy/trackCustomEvent/index.js.map +1 -1
- package/dist/destinations/friendbuy/trackCustomer/index.js +22 -22
- package/dist/destinations/friendbuy/trackCustomer/index.js.map +1 -1
- package/dist/destinations/friendbuy/trackPurchase/index.js +30 -30
- package/dist/destinations/friendbuy/trackPurchase/index.js.map +1 -1
- package/dist/destinations/friendbuy/trackSignUp/index.js +20 -20
- package/dist/destinations/friendbuy/trackSignUp/index.js.map +1 -1
- package/package.json +5 -3
- package/dist/destinations/cordial/addContactToList/generated-types.d.ts +0 -6
- package/dist/destinations/cordial/addContactToList/generated-types.js +0 -3
- package/dist/destinations/cordial/addContactToList/generated-types.js.map +0 -1
- package/dist/destinations/cordial/addContactToList/index.d.ts +0 -5
- package/dist/destinations/cordial/addContactToList/index.js +0 -45
- package/dist/destinations/cordial/addContactToList/index.js.map +0 -1
- package/dist/destinations/cordial/common-fields.d.ts +0 -2
- package/dist/destinations/cordial/common-fields.js +0 -21
- package/dist/destinations/cordial/common-fields.js.map +0 -1
- package/dist/destinations/cordial/cordial-client.d.ts +0 -36
- package/dist/destinations/cordial/cordial-client.js +0 -121
- package/dist/destinations/cordial/cordial-client.js.map +0 -1
- package/dist/destinations/cordial/createContactactivity/generated-types.d.ts +0 -9
- package/dist/destinations/cordial/createContactactivity/generated-types.js +0 -3
- package/dist/destinations/cordial/createContactactivity/generated-types.js.map +0 -1
- package/dist/destinations/cordial/createContactactivity/index.d.ts +0 -5
- package/dist/destinations/cordial/createContactactivity/index.js +0 -46
- package/dist/destinations/cordial/createContactactivity/index.js.map +0 -1
- package/dist/destinations/cordial/generated-types.d.ts +0 -4
- package/dist/destinations/cordial/generated-types.js +0 -3
- package/dist/destinations/cordial/generated-types.js.map +0 -1
- package/dist/destinations/cordial/index.d.ts +0 -4
- package/dist/destinations/cordial/index.js +0 -53
- package/dist/destinations/cordial/index.js.map +0 -1
- package/dist/destinations/cordial/removeContactFromList/generated-types.d.ts +0 -6
- package/dist/destinations/cordial/removeContactFromList/generated-types.js +0 -3
- package/dist/destinations/cordial/removeContactFromList/generated-types.js.map +0 -1
- package/dist/destinations/cordial/removeContactFromList/index.d.ts +0 -5
- package/dist/destinations/cordial/removeContactFromList/index.js +0 -47
- package/dist/destinations/cordial/removeContactFromList/index.js.map +0 -1
- package/dist/destinations/cordial/upsertContact/generated-types.d.ts +0 -7
- package/dist/destinations/cordial/upsertContact/generated-types.js +0 -3
- package/dist/destinations/cordial/upsertContact/generated-types.js.map +0 -1
- package/dist/destinations/cordial/upsertContact/index.d.ts +0 -5
- package/dist/destinations/cordial/upsertContact/index.js +0 -33
- package/dist/destinations/cordial/upsertContact/index.js.map +0 -1
- package/dist/destinations/cordial/user-identifier.d.ts +0 -5
- package/dist/destinations/cordial/user-identifier.js +0 -11
- package/dist/destinations/cordial/user-identifier.js.map +0 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const cloudUtil_1 = require("../cloudUtil");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
4
|
+
const actions_shared_1 = require("@segment/actions-shared");
|
|
5
|
+
const actions_shared_2 = require("@segment/actions-shared");
|
|
6
|
+
const actions_shared_3 = require("@segment/actions-shared");
|
|
7
|
+
const actions_shared_4 = require("@segment/actions-shared");
|
|
8
8
|
const trackCustomEventMapi = {
|
|
9
9
|
fields: {
|
|
10
|
-
eventType:
|
|
11
|
-
deduplicationId:
|
|
10
|
+
eventType: actions_shared_2.COPY,
|
|
11
|
+
deduplicationId: actions_shared_2.COPY,
|
|
12
12
|
coupon: { name: 'couponCode' },
|
|
13
|
-
attributionId:
|
|
14
|
-
referralCode:
|
|
15
|
-
email:
|
|
16
|
-
firstName:
|
|
17
|
-
lastName:
|
|
18
|
-
isNewCustomer:
|
|
19
|
-
ipAddress:
|
|
20
|
-
userAgent:
|
|
13
|
+
attributionId: actions_shared_2.COPY,
|
|
14
|
+
referralCode: actions_shared_2.COPY,
|
|
15
|
+
email: actions_shared_2.COPY,
|
|
16
|
+
firstName: actions_shared_2.COPY,
|
|
17
|
+
lastName: actions_shared_2.COPY,
|
|
18
|
+
isNewCustomer: actions_shared_2.COPY,
|
|
19
|
+
ipAddress: actions_shared_2.COPY,
|
|
20
|
+
userAgent: actions_shared_2.COPY
|
|
21
21
|
},
|
|
22
22
|
unmappedFieldObject: 'additionalProperties'
|
|
23
23
|
};
|
|
24
24
|
const action = {
|
|
25
25
|
title: 'Track Custom Event',
|
|
26
26
|
description: 'Record when a customer completes any custom event.',
|
|
27
|
-
fields: Object.assign({},
|
|
27
|
+
fields: Object.assign({}, actions_shared_3.trackCustomEventFields, actions_shared_1.contextFields),
|
|
28
28
|
perform: async (request, { settings, payload }) => {
|
|
29
|
-
const payload1 =
|
|
30
|
-
const friendbuyPayload =
|
|
29
|
+
const payload1 = actions_shared_4.moveEventPropertiesToRoot(payload);
|
|
30
|
+
const friendbuyPayload = actions_shared_2.mapEvent(trackCustomEventMapi, payload1);
|
|
31
31
|
const requestParams = await cloudUtil_1.createRequestParams(request, settings, friendbuyPayload);
|
|
32
32
|
return request(`${cloudUtil_1.mapiUrl}/v1/event/custom`, requestParams);
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/friendbuy/trackCustomEvent/index.ts"],"names":[],"mappings":";;AAKA,4CAA2D;AAC3D,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/friendbuy/trackCustomEvent/index.ts"],"names":[],"mappings":";;AAKA,4CAA2D;AAC3D,4DAAuD;AACvD,4DAA0E;AAC1E,4DAAgE;AAChE,4DAAmE;AAEnE,MAAM,oBAAoB,GAAa;IACrC,MAAM,EAAE;QACN,SAAS,EAAE,qBAAI;QACf,eAAe,EAAE,qBAAI;QACrB,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE;QAC9B,aAAa,EAAE,qBAAI;QACnB,YAAY,EAAE,qBAAI;QAIlB,KAAK,EAAE,qBAAI;QACX,SAAS,EAAE,qBAAI;QACf,QAAQ,EAAE,qBAAI;QACd,aAAa,EAAE,qBAAI;QAGnB,SAAS,EAAE,qBAAI;QACf,SAAS,EAAE,qBAAI;KAGhB;IACD,mBAAmB,EAAE,sBAAsB;CAC5C,CAAA;AAED,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,oDAAoD;IACjE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,uCAAsB,EAAE,8BAAa,CAAC;IAEhE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,MAAM,QAAQ,GAAG,0CAAyB,CAAC,OAAsC,CAAC,CAAA;QAClF,MAAM,gBAAgB,GAAG,yBAAQ,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAA;QACjE,MAAM,aAAa,GAAG,MAAM,+BAAmB,CAAC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAA;QACpF,OAAO,OAAO,CAAC,GAAG,mBAAO,kBAAkB,EAAE,aAAa,CAAC,CAAA;IAC7D,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const cloudUtil_1 = require("../cloudUtil");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
4
|
+
const actions_shared_1 = require("@segment/actions-shared");
|
|
5
|
+
const actions_shared_2 = require("@segment/actions-shared");
|
|
6
|
+
const actions_shared_3 = require("@segment/actions-shared");
|
|
7
|
+
const actions_shared_4 = require("@segment/actions-shared");
|
|
8
8
|
const trackCustomerMapi = {
|
|
9
9
|
fields: {
|
|
10
|
-
customerId:
|
|
11
|
-
email:
|
|
12
|
-
isNewCustomer:
|
|
13
|
-
loyaltyStatus:
|
|
14
|
-
category:
|
|
15
|
-
firstName:
|
|
16
|
-
lastName:
|
|
17
|
-
gender:
|
|
18
|
-
age:
|
|
19
|
-
birthday: { convert:
|
|
20
|
-
language:
|
|
21
|
-
timezone:
|
|
10
|
+
customerId: actions_shared_2.COPY,
|
|
11
|
+
email: actions_shared_2.COPY,
|
|
12
|
+
isNewCustomer: actions_shared_2.COPY,
|
|
13
|
+
loyaltyStatus: actions_shared_2.COPY,
|
|
14
|
+
category: actions_shared_2.COPY,
|
|
15
|
+
firstName: actions_shared_2.COPY,
|
|
16
|
+
lastName: actions_shared_2.COPY,
|
|
17
|
+
gender: actions_shared_2.COPY,
|
|
18
|
+
age: actions_shared_2.COPY,
|
|
19
|
+
birthday: { convert: actions_shared_4.parseDate },
|
|
20
|
+
language: actions_shared_2.COPY,
|
|
21
|
+
timezone: actions_shared_2.COPY,
|
|
22
22
|
addressCountry: { name: 'country' },
|
|
23
23
|
addressState: { name: 'state' },
|
|
24
24
|
addressCity: { name: 'city' },
|
|
25
25
|
addressPostalCode: { name: 'zipCode' },
|
|
26
|
-
ipAddress:
|
|
27
|
-
userAgent:
|
|
28
|
-
pageUrl:
|
|
29
|
-
pageTitle:
|
|
26
|
+
ipAddress: actions_shared_2.COPY,
|
|
27
|
+
userAgent: actions_shared_2.COPY,
|
|
28
|
+
pageUrl: actions_shared_2.DROP,
|
|
29
|
+
pageTitle: actions_shared_2.DROP
|
|
30
30
|
},
|
|
31
31
|
unmappedFieldObject: 'additionalProperties'
|
|
32
32
|
};
|
|
33
33
|
const action = {
|
|
34
34
|
title: 'Track Customer',
|
|
35
35
|
description: 'Create a new customer profile or update an existing customer profile.',
|
|
36
|
-
fields: Object.assign({},
|
|
36
|
+
fields: Object.assign({}, actions_shared_3.trackCustomerFields, actions_shared_1.contextFields),
|
|
37
37
|
perform: async (request, { settings, payload }) => {
|
|
38
|
-
const friendbuyPayload =
|
|
38
|
+
const friendbuyPayload = actions_shared_2.mapEvent(trackCustomerMapi, payload);
|
|
39
39
|
const requestParams = await cloudUtil_1.createRequestParams(request, settings, friendbuyPayload);
|
|
40
40
|
return request(`${cloudUtil_1.mapiUrl}/v1/customer`, requestParams);
|
|
41
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/friendbuy/trackCustomer/index.ts"],"names":[],"mappings":";;AAKA,4CAA2D;AAC3D,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/friendbuy/trackCustomer/index.ts"],"names":[],"mappings":";;AAKA,4CAA2D;AAC3D,4DAAuD;AACvD,4DAA8D;AAC9D,4DAA6D;AAC7D,4DAAmD;AAEnD,MAAM,iBAAiB,GAAa;IAClC,MAAM,EAAE;QACN,UAAU,EAAE,qBAAI;QAEhB,KAAK,EAAE,qBAAI;QACX,aAAa,EAAE,qBAAI;QACnB,aAAa,EAAE,qBAAI;QACnB,QAAQ,EAAE,qBAAI;QACd,SAAS,EAAE,qBAAI;QACf,QAAQ,EAAE,qBAAI;QAEd,MAAM,EAAE,qBAAI;QACZ,GAAG,EAAE,qBAAI;QACT,QAAQ,EAAE,EAAE,OAAO,EAAE,0BAAuB,EAAE;QAC9C,QAAQ,EAAE,qBAAI;QACd,QAAQ,EAAE,qBAAI;QACd,cAAc,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QACnC,YAAY,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QAC/B,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QAC7B,iBAAiB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QAGtC,SAAS,EAAE,qBAAI;QACf,SAAS,EAAE,qBAAI;QACf,OAAO,EAAE,qBAAI;QACb,SAAS,EAAE,qBAAI;KAChB;IACD,mBAAmB,EAAE,sBAAsB;CAC5C,CAAA;AAED,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,uEAAuE;IACpF,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,oCAAmB,EAAE,8BAAa,CAAC;IAE7D,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,MAAM,gBAAgB,GAAG,yBAAQ,CAAC,iBAAiB,EAAE,OAAsC,CAAC,CAAA;QAC5F,MAAM,aAAa,GAAG,MAAM,+BAAmB,CAAC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAA;QACpF,OAAO,OAAO,CAAC,GAAG,mBAAO,cAAc,EAAE,aAAa,CAAC,CAAA;IACzD,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const cloudUtil_1 = require("../cloudUtil");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
4
|
+
const actions_shared_1 = require("@segment/actions-shared");
|
|
5
|
+
const actions_shared_2 = require("@segment/actions-shared");
|
|
6
|
+
const actions_shared_3 = require("@segment/actions-shared");
|
|
7
|
+
const actions_shared_4 = require("@segment/actions-shared");
|
|
8
8
|
const trackPurchaseMapi = {
|
|
9
9
|
fields: {
|
|
10
|
-
orderId:
|
|
11
|
-
amount:
|
|
12
|
-
currency:
|
|
10
|
+
orderId: actions_shared_3.COPY,
|
|
11
|
+
amount: actions_shared_3.COPY,
|
|
12
|
+
currency: actions_shared_3.COPY,
|
|
13
13
|
coupon: { name: 'couponCode' },
|
|
14
|
-
attributionId:
|
|
15
|
-
referralCode:
|
|
16
|
-
giftCardCodes:
|
|
14
|
+
attributionId: actions_shared_3.COPY,
|
|
15
|
+
referralCode: actions_shared_3.COPY,
|
|
16
|
+
giftCardCodes: actions_shared_3.COPY,
|
|
17
17
|
products: {
|
|
18
18
|
type: 'array',
|
|
19
19
|
defaultObject: { sku: 'unknown', name: 'unknown', quantity: 1 },
|
|
20
20
|
fields: {
|
|
21
|
-
sku:
|
|
22
|
-
name:
|
|
23
|
-
quantity:
|
|
24
|
-
price:
|
|
25
|
-
description:
|
|
26
|
-
category:
|
|
27
|
-
url:
|
|
21
|
+
sku: actions_shared_3.COPY,
|
|
22
|
+
name: actions_shared_3.COPY,
|
|
23
|
+
quantity: actions_shared_3.COPY,
|
|
24
|
+
price: actions_shared_3.COPY,
|
|
25
|
+
description: actions_shared_3.COPY,
|
|
26
|
+
category: actions_shared_3.COPY,
|
|
27
|
+
url: actions_shared_3.COPY,
|
|
28
28
|
image_url: { name: 'imageUrl' }
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
|
-
customerId:
|
|
32
|
-
email:
|
|
33
|
-
firstName:
|
|
34
|
-
lastName:
|
|
35
|
-
isNewCustomer:
|
|
36
|
-
age:
|
|
37
|
-
birthday:
|
|
38
|
-
ipAddress:
|
|
39
|
-
userAgent:
|
|
40
|
-
pageUrl:
|
|
41
|
-
pageTitle:
|
|
31
|
+
customerId: actions_shared_3.COPY,
|
|
32
|
+
email: actions_shared_3.COPY,
|
|
33
|
+
firstName: actions_shared_3.COPY,
|
|
34
|
+
lastName: actions_shared_3.COPY,
|
|
35
|
+
isNewCustomer: actions_shared_3.COPY,
|
|
36
|
+
age: actions_shared_3.DROP,
|
|
37
|
+
birthday: actions_shared_3.DROP,
|
|
38
|
+
ipAddress: actions_shared_3.COPY,
|
|
39
|
+
userAgent: actions_shared_3.COPY,
|
|
40
|
+
pageUrl: actions_shared_3.DROP,
|
|
41
|
+
pageTitle: actions_shared_3.DROP
|
|
42
42
|
},
|
|
43
43
|
unmappedFieldObject: 'additionalProperties'
|
|
44
44
|
};
|
|
45
45
|
const action = {
|
|
46
46
|
title: 'Track Purchase',
|
|
47
47
|
description: 'Record when a customer makes a purchase.',
|
|
48
|
-
fields: Object.assign({},
|
|
48
|
+
fields: Object.assign({}, actions_shared_4.trackPurchaseFields, actions_shared_1.commonCustomerFields(false), actions_shared_2.contextFields),
|
|
49
49
|
perform: async (request, { settings, payload }) => {
|
|
50
|
-
const friendbuyPayload =
|
|
50
|
+
const friendbuyPayload = actions_shared_3.mapEvent(trackPurchaseMapi, payload);
|
|
51
51
|
const requestParams = await cloudUtil_1.createRequestParams(request, settings, friendbuyPayload);
|
|
52
52
|
return request(`${cloudUtil_1.mapiUrl}/v1/event/purchase`, requestParams);
|
|
53
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/friendbuy/trackPurchase/index.ts"],"names":[],"mappings":";;AAKA,4CAA2D;AAC3D,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/friendbuy/trackPurchase/index.ts"],"names":[],"mappings":";;AAKA,4CAA2D;AAC3D,4DAA8D;AAC9D,4DAAuD;AACvD,4DAA8D;AAC9D,4DAA6D;AAE7D,MAAM,iBAAiB,GAAa;IAClC,MAAM,EAAE;QACN,OAAO,EAAE,qBAAI;QACb,MAAM,EAAE,qBAAI;QACZ,QAAQ,EAAE,qBAAI;QACd,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE;QAC9B,aAAa,EAAE,qBAAI;QACnB,YAAY,EAAE,qBAAI;QAClB,aAAa,EAAE,qBAAI;QAEnB,QAAQ,EAAE;YACR,IAAI,EAAE,OAAO;YACb,aAAa,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,EAAE;YAC/D,MAAM,EAAE;gBACN,GAAG,EAAE,qBAAI;gBACT,IAAI,EAAE,qBAAI;gBACV,QAAQ,EAAE,qBAAI;gBACd,KAAK,EAAE,qBAAI;gBACX,WAAW,EAAE,qBAAI;gBACjB,QAAQ,EAAE,qBAAI;gBACd,GAAG,EAAE,qBAAI;gBACT,SAAS,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;aAChC;SACF;QAGD,UAAU,EAAE,qBAAI;QAEhB,KAAK,EAAE,qBAAI;QACX,SAAS,EAAE,qBAAI;QACf,QAAQ,EAAE,qBAAI;QAEd,aAAa,EAAE,qBAAI;QAEnB,GAAG,EAAE,qBAAI;QACT,QAAQ,EAAE,qBAAI;QAGd,SAAS,EAAE,qBAAI;QACf,SAAS,EAAE,qBAAI;QACf,OAAO,EAAE,qBAAI;QACb,SAAS,EAAE,qBAAI;KAChB;IACD,mBAAmB,EAAE,sBAAsB;CAC5C,CAAA;AAED,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,0CAA0C;IACvD,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,oCAAmB,EAAE,qCAAoB,CAAC,KAAK,CAAC,EAAE,8BAAa,CAAC;IAE1F,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,MAAM,gBAAgB,GAAG,yBAAQ,CAAC,iBAAiB,EAAE,OAAsC,CAAC,CAAA;QAC5F,MAAM,aAAa,GAAG,MAAM,+BAAmB,CAAC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAA;QACpF,OAAO,OAAO,CAAC,GAAG,mBAAO,oBAAoB,EAAE,aAAa,CAAC,CAAA;IAC/D,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const cloudUtil_1 = require("../cloudUtil");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
4
|
+
const actions_shared_1 = require("@segment/actions-shared");
|
|
5
|
+
const actions_shared_2 = require("@segment/actions-shared");
|
|
6
|
+
const actions_shared_3 = require("@segment/actions-shared");
|
|
7
|
+
const actions_shared_4 = require("@segment/actions-shared");
|
|
8
8
|
const trackSignUpMapi = {
|
|
9
9
|
fields: {
|
|
10
10
|
coupon: { name: 'couponCode' },
|
|
11
|
-
attributionId:
|
|
12
|
-
referralCode:
|
|
13
|
-
customerId:
|
|
14
|
-
email:
|
|
15
|
-
isNewCustomer:
|
|
16
|
-
loyaltyStatus:
|
|
17
|
-
firstName:
|
|
18
|
-
lastName:
|
|
19
|
-
age:
|
|
20
|
-
birthday: { convert:
|
|
21
|
-
ipAddress:
|
|
22
|
-
userAgent:
|
|
23
|
-
pageUrl:
|
|
24
|
-
pageTitle:
|
|
11
|
+
attributionId: actions_shared_2.COPY,
|
|
12
|
+
referralCode: actions_shared_2.COPY,
|
|
13
|
+
customerId: actions_shared_2.COPY,
|
|
14
|
+
email: actions_shared_2.COPY,
|
|
15
|
+
isNewCustomer: actions_shared_2.COPY,
|
|
16
|
+
loyaltyStatus: actions_shared_2.COPY,
|
|
17
|
+
firstName: actions_shared_2.COPY,
|
|
18
|
+
lastName: actions_shared_2.COPY,
|
|
19
|
+
age: actions_shared_2.COPY,
|
|
20
|
+
birthday: { convert: actions_shared_4.parseDate },
|
|
21
|
+
ipAddress: actions_shared_2.COPY,
|
|
22
|
+
userAgent: actions_shared_2.COPY,
|
|
23
|
+
pageUrl: actions_shared_2.DROP,
|
|
24
|
+
pageTitle: actions_shared_2.DROP
|
|
25
25
|
},
|
|
26
26
|
unmappedFieldObject: 'additionalProperties'
|
|
27
27
|
};
|
|
28
28
|
const action = {
|
|
29
29
|
title: 'Track Sign Up',
|
|
30
30
|
description: 'Record when a customer signs up for a service.',
|
|
31
|
-
fields: Object.assign({},
|
|
31
|
+
fields: Object.assign({}, actions_shared_3.trackSignUpFields, actions_shared_1.contextFields),
|
|
32
32
|
perform: async (request, { settings, payload }) => {
|
|
33
|
-
const friendbuyPayload =
|
|
33
|
+
const friendbuyPayload = actions_shared_2.mapEvent(trackSignUpMapi, payload);
|
|
34
34
|
const requestParams = await cloudUtil_1.createRequestParams(request, settings, friendbuyPayload);
|
|
35
35
|
return request(`${cloudUtil_1.mapiUrl}/v1/event/account-sign-up`, requestParams);
|
|
36
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/friendbuy/trackSignUp/index.ts"],"names":[],"mappings":";;AAKA,4CAA2D;AAC3D,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/friendbuy/trackSignUp/index.ts"],"names":[],"mappings":";;AAKA,4CAA2D;AAC3D,4DAAuD;AACvD,4DAA8D;AAC9D,4DAA2D;AAC3D,4DAAmD;AAEnD,MAAM,eAAe,GAAa;IAChC,MAAM,EAAE;QACN,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE;QAC9B,aAAa,EAAE,qBAAI;QACnB,YAAY,EAAE,qBAAI;QAGlB,UAAU,EAAE,qBAAI;QAEhB,KAAK,EAAE,qBAAI;QACX,aAAa,EAAE,qBAAI;QACnB,aAAa,EAAE,qBAAI;QACnB,SAAS,EAAE,qBAAI;QACf,QAAQ,EAAE,qBAAI;QAEd,GAAG,EAAE,qBAAI;QACT,QAAQ,EAAE,EAAE,OAAO,EAAE,0BAAuB,EAAE;QAG9C,SAAS,EAAE,qBAAI;QACf,SAAS,EAAE,qBAAI;QACf,OAAO,EAAE,qBAAI;QACb,SAAS,EAAE,qBAAI;KAChB;IACD,mBAAmB,EAAE,sBAAsB;CAC5C,CAAA;AAED,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,gDAAgD;IAC7D,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,kCAAiB,EAAE,8BAAa,CAAC;IAE3D,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,MAAM,gBAAgB,GAAG,yBAAQ,CAAC,eAAe,EAAE,OAAsC,CAAC,CAAA;QAC1F,MAAM,aAAa,GAAG,MAAM,+BAAmB,CAAC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAA;QACpF,OAAO,OAAO,CAAC,GAAG,mBAAO,2BAA2B,EAAE,aAAa,CAAC,CAAA;IACtE,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,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.42.1-alpha.4",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@amplitude/ua-parser-js": "^0.7.25",
|
|
41
|
-
"@segment/actions-core": "^3.21.2-alpha.
|
|
41
|
+
"@segment/actions-core": "^3.21.2-alpha.4",
|
|
42
|
+
"@segment/actions-shared": "^1.1.1-alpha.4",
|
|
42
43
|
"cheerio": "^1.0.0-rc.10",
|
|
43
44
|
"dayjs": "^1.10.7",
|
|
44
45
|
"escape-goat": "^3",
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
"moduleNameMapper": {
|
|
55
56
|
"@segment/ajv-human-errors": "<rootDir>/../ajv-human-errors/src",
|
|
56
57
|
"@segment/actions-core": "<rootDir>/../core/src",
|
|
58
|
+
"@segment/actions-shared": "<rootDir>/../actions-shared/src",
|
|
57
59
|
"@segment/destination-subscriptions": "<rootDir>/../destination-subscriptions/src",
|
|
58
60
|
"@friendbuy/shared(.*)": "<rootDir>/../browser-destinations/src/destinations/friendbuy/shared$1"
|
|
59
61
|
},
|
|
@@ -61,5 +63,5 @@
|
|
|
61
63
|
"<rootDir>/test/setup-after-env.ts"
|
|
62
64
|
]
|
|
63
65
|
},
|
|
64
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "414026b16af2fa5a384f3e35a4e0d2b38e6f57db"
|
|
65
67
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/addContactToList/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const cordial_client_1 = __importDefault(require("../cordial-client"));
|
|
7
|
-
const user_identifier_1 = require("../user-identifier");
|
|
8
|
-
const common_fields_1 = require("../common-fields");
|
|
9
|
-
const action = {
|
|
10
|
-
title: 'Add Contact to List',
|
|
11
|
-
description: 'Add Contact to Cordial List',
|
|
12
|
-
defaultSubscription: 'type = "group"',
|
|
13
|
-
fields: {
|
|
14
|
-
...common_fields_1.commonFields,
|
|
15
|
-
groupId: {
|
|
16
|
-
label: 'Group ID',
|
|
17
|
-
description: 'Segment Group ID',
|
|
18
|
-
type: 'string',
|
|
19
|
-
required: true,
|
|
20
|
-
default: {
|
|
21
|
-
'@path': '$.groupId'
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
listName: {
|
|
25
|
-
label: 'List Name',
|
|
26
|
-
description: 'Cordial List Name',
|
|
27
|
-
type: 'string',
|
|
28
|
-
default: {
|
|
29
|
-
'@if': {
|
|
30
|
-
exists: { '@path': '$.traits.name' },
|
|
31
|
-
then: { '@path': '$.traits.name' },
|
|
32
|
-
else: { '@path': '$.groupId' }
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
perform: async (request, { settings, payload }) => {
|
|
38
|
-
const client = new cordial_client_1.default(settings, request);
|
|
39
|
-
const list = await client.upsertList(payload.groupId, payload.listName);
|
|
40
|
-
const userIdentifier = user_identifier_1.getUserIdentifier(payload.identifyByKey, payload.identifyByValue);
|
|
41
|
-
return client.addContactToList(userIdentifier, list);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
exports.default = action;
|
|
45
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/addContactToList/index.ts"],"names":[],"mappings":";;;;;AAGA,uEAA6C;AAC7C,wDAAsD;AACtD,oDAA+C;AAE/C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,6BAA6B;IAC1C,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,GAAG,4BAAY;QACf,OAAO,EAAE;YACP,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,WAAW;aACrB;SACF;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;oBACpC,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;oBAClC,IAAI,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;iBAC/B;aACF;SACF;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QACnD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;QACvE,MAAM,cAAc,GAAG,mCAAiB,CAAC,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;QACxF,OAAO,MAAM,CAAC,gBAAgB,CAAC,cAAc,EAAE,IAAI,CAAC,CAAA;IACtD,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.commonFields = void 0;
|
|
4
|
-
exports.commonFields = {
|
|
5
|
-
identifyByKey: {
|
|
6
|
-
label: 'Contact IdentifyBy key',
|
|
7
|
-
description: 'Property key by which Cordial contact should be identified. May be any primary or secondary key (e.g. cID, email, segment_id etc.)',
|
|
8
|
-
type: 'string',
|
|
9
|
-
required: true
|
|
10
|
-
},
|
|
11
|
-
identifyByValue: {
|
|
12
|
-
label: 'Contact IdentifyBy value',
|
|
13
|
-
description: 'Value for defined key',
|
|
14
|
-
type: 'string',
|
|
15
|
-
required: true,
|
|
16
|
-
default: {
|
|
17
|
-
'@path': '$.userId'
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=common-fields.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common-fields.js","sourceRoot":"","sources":["../../../src/destinations/cordial/common-fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAA+B;IACtD,aAAa,EAAE;QACb,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EACT,oIAAoI;QACtI,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACf;IACD,eAAe,EAAE;QACf,KAAK,EAAE,0BAA0B;QACjC,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE;YACP,OAAO,EAAE,UAAU;SACpB;KACF;CACF,CAAA"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Settings } from './generated-types';
|
|
2
|
-
import { RequestClient } from '@segment/actions-core';
|
|
3
|
-
import { Payload as ContactActivityPayload } from './createContactactivity/generated-types';
|
|
4
|
-
import { UserIdentifier } from "./user-identifier";
|
|
5
|
-
interface Attribute {
|
|
6
|
-
name: string;
|
|
7
|
-
type: string;
|
|
8
|
-
key: string;
|
|
9
|
-
}
|
|
10
|
-
interface ContactAttributes {
|
|
11
|
-
[key: string]: string | number;
|
|
12
|
-
}
|
|
13
|
-
interface List {
|
|
14
|
-
id: number;
|
|
15
|
-
name: string;
|
|
16
|
-
segment_group_id: string;
|
|
17
|
-
}
|
|
18
|
-
declare class CordialClient {
|
|
19
|
-
private readonly apiUrl;
|
|
20
|
-
private readonly request;
|
|
21
|
-
constructor(settings: Settings, request: RequestClient);
|
|
22
|
-
addContactActivity(payload: ContactActivityPayload): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
|
|
23
|
-
upsertContact(userIdentifier: UserIdentifier, attributes?: ContactAttributes): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
|
|
24
|
-
getList(segmentGroupId: string, listName?: string): Promise<List | null>;
|
|
25
|
-
upsertList(segmentGroupId: string, listName?: string): Promise<List>;
|
|
26
|
-
addContactToList(userIdentifier: UserIdentifier, list: List): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
|
|
27
|
-
removeContactFromList(userIdentifier: UserIdentifier, list: List): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
|
|
28
|
-
transformAttributes(rawAttributes: {
|
|
29
|
-
[key: string]: any;
|
|
30
|
-
}): Promise<ContactAttributes>;
|
|
31
|
-
protected getAttributes(): Promise<{
|
|
32
|
-
[key: string]: Attribute;
|
|
33
|
-
}>;
|
|
34
|
-
protected prepareListName(listName: string): string;
|
|
35
|
-
}
|
|
36
|
-
export default CordialClient;
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class CordialClient {
|
|
4
|
-
constructor(settings, request) {
|
|
5
|
-
this.apiUrl = `${settings.endpoint}/v2`;
|
|
6
|
-
this.request = request;
|
|
7
|
-
}
|
|
8
|
-
addContactActivity(payload) {
|
|
9
|
-
return this.request(`${this.apiUrl}/contactactivities`, {
|
|
10
|
-
method: 'post',
|
|
11
|
-
json: {
|
|
12
|
-
[payload.identifyByKey]: payload.identifyByValue,
|
|
13
|
-
a: payload.action,
|
|
14
|
-
time: payload.time,
|
|
15
|
-
properties: payload.properties
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
async upsertContact(userIdentifier, attributes) {
|
|
20
|
-
return this.request(`${this.apiUrl}/contacts`, {
|
|
21
|
-
method: 'post',
|
|
22
|
-
json: {
|
|
23
|
-
...userIdentifier,
|
|
24
|
-
...attributes,
|
|
25
|
-
request_source: 'integration-segment'
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
async getList(segmentGroupId, listName) {
|
|
30
|
-
let result = null;
|
|
31
|
-
try {
|
|
32
|
-
const lists = await this.request(`${this.apiUrl}/accountlists`, {
|
|
33
|
-
method: 'get'
|
|
34
|
-
});
|
|
35
|
-
for (const list of lists.data) {
|
|
36
|
-
if (list.segment_group_id == segmentGroupId) {
|
|
37
|
-
result = list;
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
if (!result && listName) {
|
|
42
|
-
listName = this.prepareListName(listName);
|
|
43
|
-
for (const list of lists.data) {
|
|
44
|
-
if (list.name == listName) {
|
|
45
|
-
result = list;
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
catch (e) {
|
|
52
|
-
return result;
|
|
53
|
-
}
|
|
54
|
-
return result;
|
|
55
|
-
}
|
|
56
|
-
async upsertList(segmentGroupId, listName) {
|
|
57
|
-
const list = await this.getList(segmentGroupId, listName);
|
|
58
|
-
if (list) {
|
|
59
|
-
return list;
|
|
60
|
-
}
|
|
61
|
-
if (!listName) {
|
|
62
|
-
listName = 'segment_' + segmentGroupId;
|
|
63
|
-
}
|
|
64
|
-
listName = this.prepareListName(listName);
|
|
65
|
-
const response = await this.request(`${this.apiUrl}/accountlists`, {
|
|
66
|
-
method: 'post',
|
|
67
|
-
json: {
|
|
68
|
-
name: listName,
|
|
69
|
-
enhanced: true,
|
|
70
|
-
segment_group_id: segmentGroupId
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
return {
|
|
74
|
-
id: response.data.id,
|
|
75
|
-
name: listName,
|
|
76
|
-
segment_group_id: segmentGroupId
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
async addContactToList(userIdentifier, list) {
|
|
80
|
-
return this.request(`${this.apiUrl}/contacts`, {
|
|
81
|
-
method: 'post',
|
|
82
|
-
json: {
|
|
83
|
-
...userIdentifier,
|
|
84
|
-
[list.name]: true
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
async removeContactFromList(userIdentifier, list) {
|
|
89
|
-
return this.request(`${this.apiUrl}/contacts`, {
|
|
90
|
-
method: 'post',
|
|
91
|
-
json: {
|
|
92
|
-
...userIdentifier,
|
|
93
|
-
[list.name]: false
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
async transformAttributes(rawAttributes) {
|
|
98
|
-
const attributes = {};
|
|
99
|
-
const availableAttributes = await this.getAttributes();
|
|
100
|
-
for (const key in availableAttributes) {
|
|
101
|
-
if (key in rawAttributes) {
|
|
102
|
-
const value = rawAttributes[key];
|
|
103
|
-
if (typeof value !== 'object') {
|
|
104
|
-
attributes[key] = value;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return attributes;
|
|
109
|
-
}
|
|
110
|
-
async getAttributes() {
|
|
111
|
-
const response = await this.request(`${this.apiUrl}/accountcontactattributes`, {
|
|
112
|
-
method: 'get'
|
|
113
|
-
});
|
|
114
|
-
return response.data;
|
|
115
|
-
}
|
|
116
|
-
prepareListName(listName) {
|
|
117
|
-
return listName.replace(' ', '-');
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
exports.default = CordialClient;
|
|
121
|
-
//# sourceMappingURL=cordial-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cordial-client.js","sourceRoot":"","sources":["../../../src/destinations/cordial/cordial-client.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/createContactactivity/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const cordial_client_1 = __importDefault(require("../cordial-client"));
|
|
7
|
-
const common_fields_1 = require("../common-fields");
|
|
8
|
-
const action = {
|
|
9
|
-
title: 'Create Contactactivity',
|
|
10
|
-
description: "Create Cordial Contactactivity from Segment's track and page events",
|
|
11
|
-
defaultSubscription: 'type = "track" or type = "page"',
|
|
12
|
-
fields: {
|
|
13
|
-
...common_fields_1.commonFields,
|
|
14
|
-
action: {
|
|
15
|
-
label: 'Event name',
|
|
16
|
-
description: 'Segment event name',
|
|
17
|
-
type: 'string',
|
|
18
|
-
required: true,
|
|
19
|
-
default: {
|
|
20
|
-
'@path': '$.event'
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
time: {
|
|
24
|
-
label: 'Event sentAt',
|
|
25
|
-
description: 'Segment event sentAt',
|
|
26
|
-
type: 'datetime',
|
|
27
|
-
default: {
|
|
28
|
-
'@path': '$.sentAt'
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
properties: {
|
|
32
|
-
label: 'Event properties',
|
|
33
|
-
description: 'Segment event properties',
|
|
34
|
-
type: 'object',
|
|
35
|
-
default: {
|
|
36
|
-
'@path': '$.properties'
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
perform: (request, { settings, payload }) => {
|
|
41
|
-
const client = new cordial_client_1.default(settings, request);
|
|
42
|
-
return client.addContactActivity(payload);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
exports.default = action;
|
|
46
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/createContactactivity/index.ts"],"names":[],"mappings":";;;;;AAGA,uEAA6C;AAC7C,oDAA+C;AAE/C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EAAE,qEAAqE;IAClF,mBAAmB,EAAE,iCAAiC;IACtD,MAAM,EAAE;QACN,GAAG,4BAAY;QACf,MAAM,EAAE;YACN,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,sBAAsB;YACnC,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,UAAU,EAAE;YACV,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;aACxB;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,MAAM,MAAM,GAAG,IAAI,wBAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QACnD,OAAO,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAC3C,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/cordial/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const createContactactivity_1 = __importDefault(require("./createContactactivity"));
|
|
7
|
-
const upsertContact_1 = __importDefault(require("./upsertContact"));
|
|
8
|
-
const addContactToList_1 = __importDefault(require("./addContactToList"));
|
|
9
|
-
const removeContactFromList_1 = __importDefault(require("./removeContactFromList"));
|
|
10
|
-
const destination = {
|
|
11
|
-
name: 'Cordial',
|
|
12
|
-
description: 'Sync Segment Users, Groups and Events to Cordial',
|
|
13
|
-
slug: 'actions-cordial',
|
|
14
|
-
mode: 'cloud',
|
|
15
|
-
authentication: {
|
|
16
|
-
scheme: 'basic',
|
|
17
|
-
fields: {
|
|
18
|
-
apiKey: {
|
|
19
|
-
label: 'API Key',
|
|
20
|
-
description: 'Your Cordial API Key',
|
|
21
|
-
type: 'string',
|
|
22
|
-
required: true
|
|
23
|
-
},
|
|
24
|
-
endpoint: {
|
|
25
|
-
label: 'Endpoint',
|
|
26
|
-
description: "Cordial API endpoint. Leave default, unless you've been provided with another one. [See more details](https://support.cordial.com/hc/en-us/sections/200553578-REST-API-Introduction-and-Overview)",
|
|
27
|
-
type: 'string',
|
|
28
|
-
required: true,
|
|
29
|
-
format: 'uri',
|
|
30
|
-
choices: [
|
|
31
|
-
{ label: 'US-EAST (https://api.cordial.io)', value: 'https://api.cordial.io' },
|
|
32
|
-
{ label: 'US-WEST (https://api.usw2.cordial.io)', value: 'https://api.usw2.cordial.io' },
|
|
33
|
-
{ label: 'Staging (https://api.stg.cordialdev.com)', value: 'https://api.stg.cordialdev.com' }
|
|
34
|
-
],
|
|
35
|
-
default: 'https://api.cordial.io'
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
testAuthentication: (request, { settings }) => {
|
|
39
|
-
return request(settings.endpoint + '/v2/health');
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
extendRequest({ settings }) {
|
|
43
|
-
return { username: settings.apiKey };
|
|
44
|
-
},
|
|
45
|
-
actions: {
|
|
46
|
-
createContactactivity: createContactactivity_1.default,
|
|
47
|
-
upsertContact: upsertContact_1.default,
|
|
48
|
-
addContactToList: addContactToList_1.default,
|
|
49
|
-
removeContactFromList: removeContactFromList_1.default
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
exports.default = destination;
|
|
53
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/cordial/index.ts"],"names":[],"mappings":";;;;;AAGA,oFAA2D;AAC3D,oEAA2C;AAC3C,0EAAiD;AACjD,oFAA2D;AAE3D,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,kDAAkD;IAC/D,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,OAAO;QACf,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,sBAAsB;gBACnC,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,mMAAmM;gBAChN,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,kCAAkC,EAAE,KAAK,EAAE,wBAAwB,EAAE;oBAC9E,EAAE,KAAK,EAAE,uCAAuC,EAAE,KAAK,EAAE,6BAA6B,EAAE;oBACxF,EAAE,KAAK,EAAE,0CAA0C,EAAE,KAAK,EAAE,gCAAgC,EAAE;iBAC/F;gBACD,OAAO,EAAE,wBAAwB;aAClC;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC5C,OAAO,OAAO,CAAC,QAAQ,CAAC,QAAQ,GAAG,YAAY,CAAC,CAAA;QAClD,CAAC;KACF;IAED,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAA;IACtC,CAAC;IAED,OAAO,EAAE;QACP,qBAAqB,EAArB,+BAAqB;QACrB,aAAa,EAAb,uBAAa;QACb,gBAAgB,EAAhB,0BAAgB;QAChB,qBAAqB,EAArB,+BAAqB;KACtB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/removeContactFromList/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const cordial_client_1 = __importDefault(require("../cordial-client"));
|
|
7
|
-
const user_identifier_1 = require("../user-identifier");
|
|
8
|
-
const common_fields_1 = require("../common-fields");
|
|
9
|
-
const action = {
|
|
10
|
-
title: 'Remove Contact from List',
|
|
11
|
-
description: 'Remove Contact from Cordial List',
|
|
12
|
-
fields: {
|
|
13
|
-
...common_fields_1.commonFields,
|
|
14
|
-
groupId: {
|
|
15
|
-
label: 'Group ID',
|
|
16
|
-
description: 'Segment Group ID',
|
|
17
|
-
type: 'string',
|
|
18
|
-
required: true,
|
|
19
|
-
default: {
|
|
20
|
-
'@path': '$.groupId'
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
listName: {
|
|
24
|
-
label: 'List Name',
|
|
25
|
-
description: 'Cordial List Name',
|
|
26
|
-
type: 'string',
|
|
27
|
-
default: {
|
|
28
|
-
'@if': {
|
|
29
|
-
exists: { '@path': '$.traits.name' },
|
|
30
|
-
then: { '@path': '$.traits.name' },
|
|
31
|
-
else: { '@path': '$.groupId' }
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
perform: async (request, { settings, payload }) => {
|
|
37
|
-
const client = new cordial_client_1.default(settings, request);
|
|
38
|
-
const list = await client.getList(payload.groupId, payload.listName);
|
|
39
|
-
if (!list) {
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
const userIdentifier = user_identifier_1.getUserIdentifier(payload.identifyByKey, payload.identifyByValue);
|
|
43
|
-
return client.removeContactFromList(userIdentifier, list);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
exports.default = action;
|
|
47
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/removeContactFromList/index.ts"],"names":[],"mappings":";;;;;AAGA,uEAA6C;AAC7C,wDAAsD;AACtD,oDAA+C;AAE/C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,0BAA0B;IACjC,WAAW,EAAE,kCAAkC;IAC/C,MAAM,EAAE;QACN,GAAG,4BAAY;QACf,OAAO,EAAE;YACP,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,WAAW;aACrB;SACF;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;oBACpC,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;oBAClC,IAAI,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;iBAC/B;aACF;SACF;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QACnD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;QAEpE,IAAI,CAAC,IAAI,EAAE;YACT,OAAO,IAAI,CAAA;SACZ;QACD,MAAM,cAAc,GAAG,mCAAiB,CAAC,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;QACxF,OAAO,MAAM,CAAC,qBAAqB,CAAC,cAAc,EAAE,IAAI,CAAC,CAAA;IAC3D,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/upsertContact/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const cordial_client_1 = __importDefault(require("../cordial-client"));
|
|
7
|
-
const user_identifier_1 = require("../user-identifier");
|
|
8
|
-
const common_fields_1 = require("../common-fields");
|
|
9
|
-
const action = {
|
|
10
|
-
title: 'Upsert Contact',
|
|
11
|
-
description: "Upsert Cordial Contact from Segment's identify events",
|
|
12
|
-
defaultSubscription: 'type = "identify"',
|
|
13
|
-
fields: {
|
|
14
|
-
...common_fields_1.commonFields,
|
|
15
|
-
attributes: {
|
|
16
|
-
label: 'Contact Attributes',
|
|
17
|
-
description: 'Contact Attributes',
|
|
18
|
-
type: 'object',
|
|
19
|
-
required: false,
|
|
20
|
-
default: {
|
|
21
|
-
'@path': '$.traits'
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
perform: async (request, { settings, payload }) => {
|
|
26
|
-
const client = new cordial_client_1.default(settings, request);
|
|
27
|
-
const attributes = payload.attributes ? await client.transformAttributes(payload.attributes) : undefined;
|
|
28
|
-
const userIdentifier = user_identifier_1.getUserIdentifier(payload.identifyByKey, payload.identifyByValue);
|
|
29
|
-
return client.upsertContact(userIdentifier, attributes);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
exports.default = action;
|
|
33
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/cordial/upsertContact/index.ts"],"names":[],"mappings":";;;;;AAGA,uEAA6C;AAC7C,wDAAsD;AACtD,oDAA+C;AAE/C,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,uDAAuD;IACpE,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,GAAG,4BAAY;QACf,UAAU,EAAE;YACV,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QACnD,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,mBAAmB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;QACxG,MAAM,cAAc,GAAG,mCAAiB,CAAC,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;QACxF,OAAO,MAAM,CAAC,aAAa,CAAC,cAAc,EAAE,UAAU,CAAC,CAAA;IACzD,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getUserIdentifier = void 0;
|
|
4
|
-
function getUserIdentifier(identifyByKey, identifyByValue) {
|
|
5
|
-
return {
|
|
6
|
-
[identifyByKey]: identifyByValue,
|
|
7
|
-
identifyBy: [identifyByKey]
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
exports.getUserIdentifier = getUserIdentifier;
|
|
11
|
-
//# sourceMappingURL=user-identifier.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user-identifier.js","sourceRoot":"","sources":["../../../src/destinations/cordial/user-identifier.ts"],"names":[],"mappings":";;;AAKA,SAAgB,iBAAiB,CAAC,aAAqB,EAAE,eAAuB;IAC9E,OAAO;QACL,CAAC,aAAa,CAAC,EAAE,eAAe;QAChC,UAAU,EAAE,CAAC,aAAa,CAAC;KAC5B,CAAA;AACH,CAAC;AALD,8CAKC"}
|