@segment/action-destinations 3.251.1-staging.3 → 3.251.2-staging.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/chartmogul/common_fields.d.ts +7 -0
- package/dist/destinations/chartmogul/common_fields.js +49 -0
- package/dist/destinations/chartmogul/common_fields.js.map +1 -0
- package/dist/destinations/chartmogul/generated-types.d.ts +3 -0
- package/dist/destinations/chartmogul/generated-types.js +3 -0
- package/dist/destinations/chartmogul/generated-types.js.map +1 -0
- package/dist/destinations/chartmogul/index.d.ts +4 -0
- package/dist/destinations/chartmogul/index.js +42 -0
- package/dist/destinations/chartmogul/index.js.map +1 -0
- package/dist/destinations/chartmogul/sendContact/generated-types.d.ts +20 -0
- package/dist/destinations/chartmogul/sendContact/generated-types.js +3 -0
- package/dist/destinations/chartmogul/sendContact/generated-types.js.map +1 -0
- package/dist/destinations/chartmogul/sendContact/index.d.ts +5 -0
- package/dist/destinations/chartmogul/sendContact/index.js +106 -0
- package/dist/destinations/chartmogul/sendContact/index.js.map +1 -0
- package/dist/destinations/chartmogul/sendCustomer/generated-types.d.ts +20 -0
- package/dist/destinations/chartmogul/sendCustomer/generated-types.js +3 -0
- package/dist/destinations/chartmogul/sendCustomer/generated-types.js.map +1 -0
- package/dist/destinations/chartmogul/sendCustomer/index.d.ts +5 -0
- package/dist/destinations/chartmogul/sendCustomer/index.js +102 -0
- package/dist/destinations/chartmogul/sendCustomer/index.js.map +1 -0
- package/dist/destinations/mantle/config.d.ts +1 -0
- package/dist/destinations/mantle/config.js +5 -0
- package/dist/destinations/mantle/config.js.map +1 -0
- package/dist/destinations/mantle/generated-types.d.ts +4 -0
- package/dist/destinations/mantle/generated-types.js +3 -0
- package/dist/destinations/mantle/generated-types.js.map +1 -0
- package/dist/destinations/mantle/identify/generated-types.d.ts +9 -0
- package/dist/destinations/mantle/identify/generated-types.js +3 -0
- package/dist/destinations/mantle/identify/generated-types.js.map +1 -0
- package/dist/destinations/mantle/identify/index.d.ts +5 -0
- package/dist/destinations/mantle/identify/index.js +61 -0
- package/dist/destinations/mantle/identify/index.js.map +1 -0
- package/dist/destinations/mantle/index.d.ts +4 -0
- package/dist/destinations/mantle/index.js +50 -0
- package/dist/destinations/mantle/index.js.map +1 -0
- package/dist/destinations/mantle/pushEvent/generated-types.d.ts +9 -0
- package/dist/destinations/mantle/pushEvent/generated-types.js +3 -0
- package/dist/destinations/mantle/pushEvent/generated-types.js.map +1 -0
- package/dist/destinations/mantle/pushEvent/index.d.ts +5 -0
- package/dist/destinations/mantle/pushEvent/index.js +74 -0
- package/dist/destinations/mantle/pushEvent/index.js.map +1 -0
- package/dist/destinations/marketo-static-lists/addToList/generated-types.d.ts +1 -4
- package/dist/destinations/marketo-static-lists/addToList/index.js +1 -1
- package/dist/destinations/marketo-static-lists/addToList/index.js.map +1 -1
- package/dist/destinations/marketo-static-lists/functions.js +2 -1
- package/dist/destinations/marketo-static-lists/functions.js.map +1 -1
- package/dist/destinations/marketo-static-lists/properties.js +1 -37
- package/dist/destinations/marketo-static-lists/properties.js.map +1 -1
- package/dist/destinations/responsys/index.js +0 -12
- package/dist/destinations/responsys/index.js.map +1 -1
- package/dist/destinations/responsys/sendAudience/generated-types.d.ts +1 -0
- package/dist/destinations/responsys/sendAudience/index.js +12 -5
- package/dist/destinations/responsys/sendAudience/index.js.map +1 -1
- package/dist/destinations/responsys/sendCustomTraits/generated-types.d.ts +1 -0
- package/dist/destinations/responsys/sendCustomTraits/index.js +12 -5
- package/dist/destinations/responsys/sendCustomTraits/index.js.map +1 -1
- package/dist/destinations/responsys/upsertListMember/generated-types.d.ts +1 -0
- package/dist/destinations/responsys/upsertListMember/index.js +8 -1
- package/dist/destinations/responsys/upsertListMember/index.js.map +1 -1
- package/dist/destinations/responsys/utils.d.ts +3 -2
- package/dist/destinations/responsys/utils.js +23 -6
- package/dist/destinations/responsys/utils.js.map +1 -1
- package/dist/destinations/schematic/identifyUser/generated-types.d.ts +2 -1
- package/dist/destinations/schematic/trackEvent/generated-types.d.ts +1 -0
- package/dist/destinations/segment-profiles/segment-properties.d.ts +1 -0
- package/dist/destinations/segment-profiles/segment-properties.js +6 -1
- package/dist/destinations/segment-profiles/segment-properties.js.map +1 -1
- package/dist/destinations/segment-profiles/sendGroup/generated-types.d.ts +1 -0
- package/dist/destinations/segment-profiles/sendGroup/index.js +3 -1
- package/dist/destinations/segment-profiles/sendGroup/index.js.map +1 -1
- package/dist/destinations/segment-profiles/sendIdentify/generated-types.d.ts +1 -0
- package/dist/destinations/segment-profiles/sendIdentify/index.js +3 -1
- package/dist/destinations/segment-profiles/sendIdentify/index.js.map +1 -1
- package/dist/destinations/segment-profiles/sendSubscription/generated-types.d.ts +1 -0
- package/dist/destinations/segment-profiles/sendSubscription/index.js +3 -1
- package/dist/destinations/segment-profiles/sendSubscription/index.js.map +1 -1
- package/dist/destinations/segment-profiles/sendSubscription/subscription-properties.d.ts +1 -0
- package/dist/destinations/segment-profiles/sendSubscription/subscription-properties.js +6 -1
- package/dist/destinations/segment-profiles/sendSubscription/subscription-properties.js.map +1 -1
- package/dist/destinations/yotpo/generated-types.d.ts +3 -0
- package/dist/destinations/yotpo/generated-types.js +3 -0
- package/dist/destinations/yotpo/generated-types.js.map +1 -0
- package/dist/destinations/yotpo/index.d.ts +4 -0
- package/dist/destinations/yotpo/index.js +53 -0
- package/dist/destinations/yotpo/index.js.map +1 -0
- package/dist/destinations/yotpo/sendData/generated-types.d.ts +5 -0
- package/dist/destinations/yotpo/sendData/generated-types.js +3 -0
- package/dist/destinations/yotpo/sendData/generated-types.js.map +1 -0
- package/dist/destinations/yotpo/sendData/index.d.ts +5 -0
- package/dist/destinations/yotpo/sendData/index.js +22 -0
- package/dist/destinations/yotpo/sendData/index.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InputField } from '@segment/actions-core/destination-kit/types';
|
|
2
|
+
export declare const message_id: InputField;
|
|
3
|
+
export declare const timestamp: InputField;
|
|
4
|
+
export declare const sent_at: InputField;
|
|
5
|
+
export declare const event_type: InputField;
|
|
6
|
+
export declare const user_id: InputField;
|
|
7
|
+
export declare const anonymous_id: InputField;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.anonymous_id = exports.user_id = exports.event_type = exports.sent_at = exports.timestamp = exports.message_id = void 0;
|
|
4
|
+
exports.message_id = {
|
|
5
|
+
label: 'MessageId',
|
|
6
|
+
description: 'The Segment message id',
|
|
7
|
+
type: 'string',
|
|
8
|
+
required: true,
|
|
9
|
+
default: { '@path': '$.messageId' }
|
|
10
|
+
};
|
|
11
|
+
exports.timestamp = {
|
|
12
|
+
label: 'Event Timestamp',
|
|
13
|
+
description: 'The timestamp at which the event was created',
|
|
14
|
+
type: 'datetime',
|
|
15
|
+
required: true,
|
|
16
|
+
default: { '@path': '$.timestamp' }
|
|
17
|
+
};
|
|
18
|
+
exports.sent_at = {
|
|
19
|
+
label: 'Sent At',
|
|
20
|
+
description: 'When the event was sent',
|
|
21
|
+
type: 'datetime',
|
|
22
|
+
required: true,
|
|
23
|
+
default: { '@path': '$.sentAt' }
|
|
24
|
+
};
|
|
25
|
+
exports.event_type = {
|
|
26
|
+
label: 'Event Type',
|
|
27
|
+
description: 'The type of event',
|
|
28
|
+
type: 'string',
|
|
29
|
+
default: 'Send ...',
|
|
30
|
+
required: true,
|
|
31
|
+
unsafe_hidden: true
|
|
32
|
+
};
|
|
33
|
+
exports.user_id = {
|
|
34
|
+
label: 'User Id',
|
|
35
|
+
description: 'Segment User Id',
|
|
36
|
+
type: 'string',
|
|
37
|
+
readOnly: true,
|
|
38
|
+
required: false,
|
|
39
|
+
default: { '@path': '$.userId' }
|
|
40
|
+
};
|
|
41
|
+
exports.anonymous_id = {
|
|
42
|
+
label: 'Anonymous Id',
|
|
43
|
+
description: 'Segment Anonymous Id',
|
|
44
|
+
type: 'string',
|
|
45
|
+
readOnly: true,
|
|
46
|
+
required: false,
|
|
47
|
+
default: { '@path': '$.anonymousId' }
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=common_fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common_fields.js","sourceRoot":"","sources":["../../../src/destinations/chartmogul/common_fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,wBAAwB;IACrC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;CACpC,CAAA;AAEY,QAAA,SAAS,GAAe;IACnC,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,8CAA8C;IAC3D,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;CACpC,CAAA;AAEY,QAAA,OAAO,GAAe;IACjC,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,yBAAyB;IACtC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;CACjC,CAAA;AAEY,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,mBAAmB;IAChC,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,IAAI;IACd,aAAa,EAAE,IAAI;CACpB,CAAA;AAEY,QAAA,OAAO,GAAe;IACjC,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,iBAAiB;IAC9B,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;CACjC,CAAA;AAEY,QAAA,YAAY,GAAe;IACtC,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,sBAAsB;IACnC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;CACtC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/chartmogul/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 sendContact_1 = __importDefault(require("./sendContact"));
|
|
8
|
+
const sendCustomer_1 = __importDefault(require("./sendCustomer"));
|
|
9
|
+
const destination = {
|
|
10
|
+
name: 'Chart Mogul',
|
|
11
|
+
slug: 'actions-chartmogul',
|
|
12
|
+
mode: 'cloud',
|
|
13
|
+
description: 'Send Contacts and Customers to ChartMogul.',
|
|
14
|
+
authentication: {
|
|
15
|
+
scheme: 'custom',
|
|
16
|
+
fields: {
|
|
17
|
+
chartmogul_webhook_url: {
|
|
18
|
+
label: 'ChartMogul webhook URL',
|
|
19
|
+
description: 'Copy the webhook URL from ChartMogul and paste it here',
|
|
20
|
+
type: 'string',
|
|
21
|
+
format: 'uri',
|
|
22
|
+
required: true
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
testAuthentication: (request, auth) => {
|
|
26
|
+
const targetUrl = auth?.settings?.chartmogul_webhook_url;
|
|
27
|
+
if (!targetUrl || !targetUrl.startsWith('https://')) {
|
|
28
|
+
throw new actions_core_1.InvalidAuthenticationError('Please configure the ChartMogul webhook URL.');
|
|
29
|
+
}
|
|
30
|
+
return request(targetUrl, {
|
|
31
|
+
method: 'post',
|
|
32
|
+
json: {}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
actions: {
|
|
37
|
+
sendContact: sendContact_1.default,
|
|
38
|
+
sendCustomer: sendCustomer_1.default
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
exports.default = destination;
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/chartmogul/index.ts"],"names":[],"mappings":";;;;;AAEA,wDAAkE;AAElE,gEAAuC;AAEvC,kEAAyC;AAEzC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,4CAA4C;IACzD,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,sBAAsB,EAAE;gBACtB,KAAK,EAAE,wBAAwB;gBAC/B,WAAW,EAAE,wDAAwD;gBACrE,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,KAAK;gBACb,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;YACpC,MAAM,SAAS,GAAG,IAAI,EAAE,QAAQ,EAAE,sBAAsB,CAAA;YACxD,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;gBACnD,MAAM,IAAI,yCAA0B,CAAC,8CAA8C,CAAC,CAAA;aACrF;YAED,OAAO,OAAO,CAAC,SAAS,EAAE;gBACxB,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,EAAE;aACT,CAAC,CAAA;QACJ,CAAC;KACF;IAED,OAAO,EAAE;QACP,WAAW,EAAX,qBAAW;QACX,YAAY,EAAZ,sBAAY;KACb;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
type: string;
|
|
3
|
+
message_id: string;
|
|
4
|
+
timestamp: string | number;
|
|
5
|
+
sent_at: string | number;
|
|
6
|
+
user_id?: string;
|
|
7
|
+
anonymous_id?: string;
|
|
8
|
+
email?: string;
|
|
9
|
+
first_name?: string;
|
|
10
|
+
last_name?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
phone?: string;
|
|
14
|
+
linked_in?: string;
|
|
15
|
+
twitter?: string;
|
|
16
|
+
company?: {
|
|
17
|
+
id: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/chartmogul/sendContact/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
+
const common_fields_1 = require("../common_fields");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Send Contact',
|
|
7
|
+
description: 'Send a Contact to ChartMogul CRM',
|
|
8
|
+
defaultSubscription: 'type = "identify"',
|
|
9
|
+
fields: {
|
|
10
|
+
type: { ...common_fields_1.event_type, default: 'Send Contact' },
|
|
11
|
+
message_id: common_fields_1.message_id,
|
|
12
|
+
timestamp: common_fields_1.timestamp,
|
|
13
|
+
sent_at: common_fields_1.sent_at,
|
|
14
|
+
user_id: common_fields_1.user_id,
|
|
15
|
+
anonymous_id: common_fields_1.anonymous_id,
|
|
16
|
+
email: {
|
|
17
|
+
label: 'Email',
|
|
18
|
+
description: "The user's email",
|
|
19
|
+
type: 'string',
|
|
20
|
+
format: 'email',
|
|
21
|
+
default: { '@path': '$.traits.email' }
|
|
22
|
+
},
|
|
23
|
+
first_name: {
|
|
24
|
+
label: 'First Name',
|
|
25
|
+
description: `The contact's first name`,
|
|
26
|
+
type: 'string',
|
|
27
|
+
default: { '@path': '$.traits.first_name' }
|
|
28
|
+
},
|
|
29
|
+
last_name: {
|
|
30
|
+
label: 'Last Name',
|
|
31
|
+
description: "The contact's last name",
|
|
32
|
+
type: 'string',
|
|
33
|
+
default: { '@path': '$.traits.last_name' }
|
|
34
|
+
},
|
|
35
|
+
name: {
|
|
36
|
+
label: 'Full Name',
|
|
37
|
+
description: "The contact's full name. It is used if first_name and last_name are not provided.",
|
|
38
|
+
type: 'string',
|
|
39
|
+
default: { '@path': '$.traits.name' }
|
|
40
|
+
},
|
|
41
|
+
title: {
|
|
42
|
+
label: 'Title',
|
|
43
|
+
description: `The contact's job or personal title`,
|
|
44
|
+
type: 'string',
|
|
45
|
+
default: { '@path': '$.traits.title' }
|
|
46
|
+
},
|
|
47
|
+
phone: {
|
|
48
|
+
label: 'Phone Number',
|
|
49
|
+
description: "The contact's phone number",
|
|
50
|
+
type: 'string',
|
|
51
|
+
default: { '@path': '$.traits.phone' }
|
|
52
|
+
},
|
|
53
|
+
linked_in: {
|
|
54
|
+
label: 'LinkedIn',
|
|
55
|
+
description: "The contact's LinkedIn URL",
|
|
56
|
+
type: 'string',
|
|
57
|
+
format: 'uri',
|
|
58
|
+
default: { '@path': '$.traits.linkedIn' }
|
|
59
|
+
},
|
|
60
|
+
twitter: {
|
|
61
|
+
label: 'Twitter (X)',
|
|
62
|
+
description: "The contact's Twitter (X) URL or handle",
|
|
63
|
+
type: 'string',
|
|
64
|
+
default: { '@path': '$.traits.twitter' }
|
|
65
|
+
},
|
|
66
|
+
company: {
|
|
67
|
+
label: 'Company',
|
|
68
|
+
description: "The contact's Company. It creates a Customer in ChartMogul if the company id is present.",
|
|
69
|
+
type: 'object',
|
|
70
|
+
additionalProperties: false,
|
|
71
|
+
defaultObjectUI: 'keyvalue',
|
|
72
|
+
properties: {
|
|
73
|
+
id: {
|
|
74
|
+
label: 'Company Id',
|
|
75
|
+
type: 'string',
|
|
76
|
+
required: true
|
|
77
|
+
},
|
|
78
|
+
name: {
|
|
79
|
+
label: 'Company Name',
|
|
80
|
+
type: 'string'
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
default: {
|
|
84
|
+
id: { '@path': '$.traits.company.id' },
|
|
85
|
+
name: { '@path': '$.traits.company.name' }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
perform: (request, data) => {
|
|
90
|
+
if (!data.payload.user_id && !data.payload.anonymous_id) {
|
|
91
|
+
throw new actions_core_1.PayloadValidationError(`The user_id and/or anonymous_id must be present.`);
|
|
92
|
+
}
|
|
93
|
+
if (data.payload.company && !data.payload.company.id) {
|
|
94
|
+
delete data.payload.company;
|
|
95
|
+
}
|
|
96
|
+
if (Object.keys(data.payload).length <= 5) {
|
|
97
|
+
throw new actions_core_1.PayloadValidationError('The event contains no information of interest to Chartmogul.');
|
|
98
|
+
}
|
|
99
|
+
return request(data.settings.chartmogul_webhook_url, {
|
|
100
|
+
method: 'post',
|
|
101
|
+
json: data.payload
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
exports.default = action;
|
|
106
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/chartmogul/sendContact/index.ts"],"names":[],"mappings":";;AAAA,wDAAgF;AAGhF,oDAAoG;AAEpG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,kCAAkC;IAC/C,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,IAAI,EAAE,EAAE,GAAG,0BAAU,EAAE,OAAO,EAAE,cAAc,EAAE;QAChD,UAAU,EAAV,0BAAU;QACV,SAAS,EAAT,yBAAS;QACT,OAAO,EAAP,uBAAO;QACP,OAAO,EAAP,uBAAO;QACP,YAAY,EAAZ,4BAA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type: string;
|
|
3
|
+
message_id: string;
|
|
4
|
+
timestamp: string | number;
|
|
5
|
+
sent_at: string | number;
|
|
6
|
+
user_id: string;
|
|
7
|
+
group_id: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
email?: string;
|
|
11
|
+
website?: string;
|
|
12
|
+
created_at?: string | number;
|
|
13
|
+
address?: {
|
|
14
|
+
street?: string;
|
|
15
|
+
city?: string;
|
|
16
|
+
state?: string;
|
|
17
|
+
postal_code?: string;
|
|
18
|
+
country?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/chartmogul/sendCustomer/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const common_fields_1 = require("../common_fields");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Send Customer',
|
|
6
|
+
description: 'Send a Customer (company) to ChartMogul CRM',
|
|
7
|
+
defaultSubscription: 'type = "group"',
|
|
8
|
+
fields: {
|
|
9
|
+
type: { ...common_fields_1.event_type, default: 'Send Customer' },
|
|
10
|
+
message_id: common_fields_1.message_id,
|
|
11
|
+
timestamp: common_fields_1.timestamp,
|
|
12
|
+
sent_at: common_fields_1.sent_at,
|
|
13
|
+
user_id: { ...common_fields_1.user_id, required: true },
|
|
14
|
+
group_id: {
|
|
15
|
+
label: 'Group Id',
|
|
16
|
+
description: 'Segment Group Id',
|
|
17
|
+
type: 'string',
|
|
18
|
+
required: true,
|
|
19
|
+
default: { '@path': '$.groupId' }
|
|
20
|
+
},
|
|
21
|
+
name: {
|
|
22
|
+
label: 'Name',
|
|
23
|
+
description: "The company's name",
|
|
24
|
+
type: 'string',
|
|
25
|
+
default: { '@path': '$.traits.name' }
|
|
26
|
+
},
|
|
27
|
+
description: {
|
|
28
|
+
label: 'Description',
|
|
29
|
+
description: "The company's name",
|
|
30
|
+
type: 'string',
|
|
31
|
+
default: { '@path': '$.traits.description' }
|
|
32
|
+
},
|
|
33
|
+
email: {
|
|
34
|
+
label: 'Email',
|
|
35
|
+
description: "The company's email",
|
|
36
|
+
type: 'string',
|
|
37
|
+
format: 'email',
|
|
38
|
+
default: { '@path': '$.traits.email' }
|
|
39
|
+
},
|
|
40
|
+
website: {
|
|
41
|
+
label: 'Website',
|
|
42
|
+
description: "The company's website URL",
|
|
43
|
+
type: 'string',
|
|
44
|
+
format: 'uri-reference',
|
|
45
|
+
default: { '@path': '$.traits.website' }
|
|
46
|
+
},
|
|
47
|
+
created_at: {
|
|
48
|
+
label: 'Created at',
|
|
49
|
+
description: 'Date the group’s account was first created',
|
|
50
|
+
type: 'datetime',
|
|
51
|
+
default: { '@path': '$.traits.createdAt' }
|
|
52
|
+
},
|
|
53
|
+
address: {
|
|
54
|
+
label: 'Address',
|
|
55
|
+
type: 'object',
|
|
56
|
+
description: 'The company’s address details',
|
|
57
|
+
defaultObjectUI: 'keyvalue',
|
|
58
|
+
properties: {
|
|
59
|
+
street: {
|
|
60
|
+
label: 'Street',
|
|
61
|
+
type: 'string',
|
|
62
|
+
description: 'The company’s street address'
|
|
63
|
+
},
|
|
64
|
+
city: {
|
|
65
|
+
label: 'City',
|
|
66
|
+
type: 'string',
|
|
67
|
+
description: 'The company’s city'
|
|
68
|
+
},
|
|
69
|
+
state: {
|
|
70
|
+
label: 'State',
|
|
71
|
+
type: 'string',
|
|
72
|
+
description: 'The company’s state or region'
|
|
73
|
+
},
|
|
74
|
+
postal_code: {
|
|
75
|
+
label: 'Postal code',
|
|
76
|
+
type: 'string',
|
|
77
|
+
description: 'The company’s zip or postal code'
|
|
78
|
+
},
|
|
79
|
+
country: {
|
|
80
|
+
label: 'Country',
|
|
81
|
+
type: 'string',
|
|
82
|
+
description: 'The company’s country'
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
default: {
|
|
86
|
+
street: { '@path': '$.traits.address.street' },
|
|
87
|
+
city: { '@path': '$.traits.address.city' },
|
|
88
|
+
state: { '@path': '$.traits.address.state' },
|
|
89
|
+
postal_code: { '@path': '$.traits.address.postalCode' },
|
|
90
|
+
country: { '@path': '$.traits.address.country' }
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
perform: (request, data) => {
|
|
95
|
+
return request(data.settings.chartmogul_webhook_url, {
|
|
96
|
+
method: 'post',
|
|
97
|
+
json: data.payload
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
exports.default = action;
|
|
102
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/chartmogul/sendCustomer/index.ts"],"names":[],"mappings":";;AAGA,oDAAsF;AAEtF,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,6CAA6C;IAC1D,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,IAAI,EAAE,EAAE,GAAG,0BAAU,EAAE,OAAO,EAAE,eAAe,EAAE;QACjD,UAAU,EAAV,0BAAU;QACV,SAAS,EAAT,yBAAS;QACT,OAAO,EAAP,uBAAO;QACP,OAAO,EAAE,EAAE,GAAG,uBAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;QACvC,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;SAClC;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;SACtC;QACD,WAAW,EAAE;Y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BACd,WAAW,EAAE,uBAAuB;iBACrC;aACF;YACD,OAAO,EAAE;gBACP,MAAM,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAE;gBAC9C,IAAI,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE;gBAC1C,KAAK,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE;gBAC5C,WAAW,EAAE,EAAE,OAAO,EAAE,6BAA6B,EAAE;gBACvD,OAAO,EAAE,EAAE,OAAO,EAAE,0BAA0B,EAAE;aACjD;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,sBAAsB,EAAE;YACnD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,OAAO;SACnB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const API_URL = "https://appapi.heymantle.com/v1";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/destinations/mantle/config.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,iCAAiC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/mantle/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/mantle/identify/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const config_1 = require("../config");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Identify',
|
|
6
|
+
description: 'Identify (create or update) a customer for your app in Mantle, including any additional information about the customer',
|
|
7
|
+
defaultSubscription: 'type = "identify"',
|
|
8
|
+
fields: {
|
|
9
|
+
platformId: {
|
|
10
|
+
label: 'Shopify Shop ID',
|
|
11
|
+
description: 'The unique identifier for the Shopify shop. This is used to associate the customer with a Shopify shop in Mantle',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true
|
|
14
|
+
},
|
|
15
|
+
myshopifyDomain: {
|
|
16
|
+
label: 'Shopify Shop Domain',
|
|
17
|
+
description: 'The unique .myshopify.com domain of the Shopify shop. This is used to associate the customer with a Shopify shop in Mantle',
|
|
18
|
+
type: 'string',
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
name: {
|
|
22
|
+
label: 'Name',
|
|
23
|
+
description: 'The name of the customer / shop',
|
|
24
|
+
type: 'string',
|
|
25
|
+
required: false,
|
|
26
|
+
default: { '@path': '$.traits.name' }
|
|
27
|
+
},
|
|
28
|
+
email: {
|
|
29
|
+
label: 'Email',
|
|
30
|
+
description: 'The email of the customer',
|
|
31
|
+
type: 'string',
|
|
32
|
+
required: false,
|
|
33
|
+
default: { '@path': '$.traits.email' }
|
|
34
|
+
},
|
|
35
|
+
customFields: {
|
|
36
|
+
label: 'Custom Fields',
|
|
37
|
+
description: 'The custom fields of the customer / shop',
|
|
38
|
+
type: 'object',
|
|
39
|
+
required: false,
|
|
40
|
+
defaultObjectUI: 'keyvalue',
|
|
41
|
+
default: {
|
|
42
|
+
'@path': '$.traits.custom_fields'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
perform: (request, data) => {
|
|
47
|
+
return request(`${config_1.API_URL}/identify`, {
|
|
48
|
+
method: 'post',
|
|
49
|
+
json: {
|
|
50
|
+
platform: 'shopify',
|
|
51
|
+
platformId: data.payload.platformId,
|
|
52
|
+
myshopifyDomain: data.payload.myshopifyDomain,
|
|
53
|
+
name: data.payload.name,
|
|
54
|
+
email: data.payload.email,
|
|
55
|
+
...(data.payload.customFields ? { customFields: data.payload.customFields } : {})
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
exports.default = action;
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mantle/identify/index.ts"],"names":[],"mappings":";;AAIA,sCAAmC;AAEnC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,UAAU;IACjB,WAAW,EACT,wHAAwH;IAC1H,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,UAAU,EAAE;YACV,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,kHAAkH;YACpH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,eAAe,EAAE;YACf,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EACT,4HAA4H;YAC9H,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,iCAAiC;YAC9C,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;SACtC;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,2BAA2B;YACxC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;SACvC;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,eAAe;YACtB,WAAW,EAAE,0CAA0C;YACvD,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,eAAe,EAAE,UAAU;YAC3B,OAAO,EAAE;gBACP,OAAO,EAAE,wBAAwB;aAClC;SACF;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;QACzB,OAAO,OAAO,CAAC,GAAG,gBAAO,WAAW,EAAE;YACpC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,SAAS;gBACnB,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU;gBACnC,eAAe,EAAE,IAAI,CAAC,OAAO,CAAC,eAAe;gBAC7C,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;gBACvB,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK;gBACzB,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAClF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 pushEvent_1 = __importDefault(require("./pushEvent"));
|
|
7
|
+
const identify_1 = __importDefault(require("./identify"));
|
|
8
|
+
const config_1 = require("./config");
|
|
9
|
+
const destination = {
|
|
10
|
+
name: 'Mantle (Actions)',
|
|
11
|
+
description: 'Track important revenue metrics for your Shopify apps. Manage plans and pricing. Improve customer relationships. Focus on growing your business.',
|
|
12
|
+
slug: 'actions-mantle',
|
|
13
|
+
mode: 'cloud',
|
|
14
|
+
authentication: {
|
|
15
|
+
scheme: 'custom',
|
|
16
|
+
fields: {
|
|
17
|
+
appId: {
|
|
18
|
+
label: 'App ID',
|
|
19
|
+
description: 'The unique identifier for the app in Mantle. Get this from the API Keys section for your app in Mantle.',
|
|
20
|
+
type: 'string',
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
apiKey: {
|
|
24
|
+
label: 'API Key',
|
|
25
|
+
description: 'The API key for the app in Mantle. Get this from the API Keys section for your app in Mantle.',
|
|
26
|
+
type: 'string',
|
|
27
|
+
required: true
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
testAuthentication: (request) => {
|
|
31
|
+
return request(`${config_1.API_URL}/app`, {
|
|
32
|
+
method: 'GET'
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
extendRequest: ({ settings }) => {
|
|
37
|
+
return {
|
|
38
|
+
headers: {
|
|
39
|
+
'x-mantle-app-id': settings.appId,
|
|
40
|
+
'x-mantle-app-api-key': settings.apiKey
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
actions: {
|
|
45
|
+
pushEvent: pushEvent_1.default,
|
|
46
|
+
identify: identify_1.default
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
exports.default = destination;
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/mantle/index.ts"],"names":[],"mappings":";;;;;AAGA,4DAAmC;AACnC,0DAAiC;AACjC,qCAAkC;AAElC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,kBAAkB;IACxB,WAAW,EACT,kJAAkJ;IACpJ,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,KAAK,EAAE;gBACL,KAAK,EAAE,QAAQ;gBACf,WAAW,EACT,yGAAyG;gBAC3G,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,+FAA+F;gBAC5G,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;YAC9B,OAAO,OAAO,CAAC,GAAG,gBAAO,MAAM,EAAE;gBAC/B,MAAM,EAAE,KAAK;aACd,CAAC,CAAA;QACJ,CAAC;KACF;IAED,aAAa,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC9B,OAAO;YACL,OAAO,EAAE;gBACP,iBAAiB,EAAE,QAAQ,CAAC,KAAK;gBACjC,sBAAsB,EAAE,QAAQ,CAAC,MAAM;aACxC;SACF,CAAA;IACH,CAAC;IAED,OAAO,EAAE;QACP,SAAS,EAAT,mBAAS;QACT,QAAQ,EAAR,kBAAQ;KACT;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/mantle/pushEvent/generated-types.ts"],"names":[],"mappings":""}
|