@segment/action-destinations 3.100.1-alpha.0 → 3.100.1-alpha.1
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/1plusx/sendEvent/generated-types.d.ts +1 -1
- package/dist/destinations/1plusx/sendEvent/index.js +2 -1
- package/dist/destinations/1plusx/sendEvent/index.js.map +1 -1
- package/dist/destinations/1plusx/sendPageview/generated-types.d.ts +1 -1
- package/dist/destinations/1plusx/sendPageview/index.js +2 -1
- package/dist/destinations/1plusx/sendPageview/index.js.map +1 -1
- package/dist/destinations/1plusx/sendUserData/generated-types.d.ts +1 -1
- package/dist/destinations/1plusx/sendUserData/index.js +2 -1
- package/dist/destinations/1plusx/sendUserData/index.js.map +1 -1
- package/dist/destinations/actions-pardot/index.js +1 -1
- package/dist/destinations/actions-pardot/index.js.map +1 -1
- package/dist/destinations/actions-pardot/pa-operations.d.ts +1 -1
- package/dist/destinations/actions-pardot/pa-operations.js +3 -3
- package/dist/destinations/actions-pardot/pa-operations.js.map +1 -1
- package/dist/destinations/actions-pardot/prospects/index.js +4 -5
- package/dist/destinations/actions-pardot/prospects/index.js.map +1 -1
- package/dist/destinations/cordial/addProductToCart/index.js +1 -1
- package/dist/destinations/cordial/addProductToCart/index.js.map +1 -1
- package/dist/destinations/cordial/index.js +1 -1
- package/dist/destinations/cordial/index.js.map +1 -1
- package/dist/destinations/cordial/removeProductFromCart/index.js.map +1 -1
- package/dist/destinations/cordial/upsertOrder/index.js +8 -8
- package/dist/destinations/cordial/upsertOrder/index.js.map +1 -1
- package/dist/destinations/customerio/trackEvent/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js +2 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/generated-types.d.ts +1 -1
- package/dist/destinations/google-enhanced-conversions/index.js +3 -7
- package/dist/destinations/google-enhanced-conversions/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js +7 -1
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js.map +1 -1
- package/dist/destinations/index.js +2 -1
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/intercom/groupIdentifyContact/generated-types.d.ts +0 -2
- package/dist/destinations/intercom/groupIdentifyContact/index.js +36 -44
- package/dist/destinations/intercom/groupIdentifyContact/index.js.map +1 -1
- package/dist/destinations/intercom/identifyContact/index.js +54 -24
- package/dist/destinations/intercom/identifyContact/index.js.map +1 -1
- package/dist/destinations/intercom/index.d.ts +1 -1
- package/dist/destinations/intercom/index.js +8 -24
- package/dist/destinations/intercom/index.js.map +1 -1
- package/dist/destinations/mixpanel/alias/index.js +1 -2
- package/dist/destinations/mixpanel/alias/index.js.map +1 -1
- package/dist/destinations/mixpanel/generated-types.d.ts +0 -1
- package/dist/destinations/mixpanel/groupIdentifyUser/index.js +1 -2
- package/dist/destinations/mixpanel/groupIdentifyUser/index.js.map +1 -1
- package/dist/destinations/mixpanel/identifyUser/index.js +2 -4
- package/dist/destinations/mixpanel/identifyUser/index.js.map +1 -1
- package/dist/destinations/mixpanel/index.js +0 -8
- package/dist/destinations/mixpanel/index.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/index.js +1 -1
- package/dist/destinations/mixpanel/trackEvent/index.js.map +1 -1
- package/dist/destinations/mixpanel/utils.d.ts +0 -5
- package/dist/destinations/mixpanel/utils.js +1 -13
- package/dist/destinations/mixpanel/utils.js.map +1 -1
- package/dist/destinations/salesforce/account/index.js +1 -1
- package/dist/destinations/salesforce/account/index.js.map +1 -1
- package/dist/destinations/salesforce/cases/index.js +1 -1
- package/dist/destinations/salesforce/cases/index.js.map +1 -1
- package/dist/destinations/salesforce/contact/index.js +1 -1
- package/dist/destinations/salesforce/contact/index.js.map +1 -1
- package/dist/destinations/salesforce/customObject/index.js +1 -1
- package/dist/destinations/salesforce/customObject/index.js.map +1 -1
- package/dist/destinations/salesforce/lead/index.js +3 -2
- package/dist/destinations/salesforce/lead/index.js.map +1 -1
- package/dist/destinations/salesforce/opportunity/index.js +1 -1
- package/dist/destinations/salesforce/opportunity/index.js.map +1 -1
- package/dist/destinations/salesforce-marketing-cloud/contact/generated-types.d.ts +2 -0
- package/dist/destinations/{intercom/trackEvent → salesforce-marketing-cloud/contact}/generated-types.js +0 -0
- package/dist/destinations/salesforce-marketing-cloud/contact/generated-types.js.map +1 -0
- package/dist/destinations/{intercom/trackEvent → salesforce-marketing-cloud/contact}/index.d.ts +1 -1
- package/dist/destinations/salesforce-marketing-cloud/contact/index.js +11 -0
- package/dist/destinations/salesforce-marketing-cloud/contact/index.js.map +1 -0
- package/dist/destinations/salesforce-marketing-cloud/generated-types.d.ts +2 -0
- package/dist/destinations/salesforce-marketing-cloud/generated-types.js +3 -0
- package/dist/destinations/salesforce-marketing-cloud/generated-types.js.map +1 -0
- package/dist/destinations/salesforce-marketing-cloud/index.d.ts +4 -0
- package/dist/destinations/salesforce-marketing-cloud/index.js +27 -0
- package/dist/destinations/salesforce-marketing-cloud/index.js.map +1 -0
- package/package.json +4 -4
- package/dist/destinations/intercom/trackEvent/generated-types.d.ts +0 -12
- package/dist/destinations/intercom/trackEvent/generated-types.js.map +0 -1
- package/dist/destinations/intercom/trackEvent/index.js +0 -111
- package/dist/destinations/intercom/trackEvent/index.js.map +0 -1
- package/dist/destinations/intercom/util.d.ts +0 -11
- package/dist/destinations/intercom/util.js +0 -48
- package/dist/destinations/intercom/util.js.map +0 -1
|
@@ -1,39 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
4
4
|
const action = {
|
|
5
|
-
title: 'Identify
|
|
6
|
-
description:
|
|
5
|
+
title: 'Group Identify Contact',
|
|
6
|
+
description: "Create or Update A Company. Note: Companies will be only visible in Intercom's Dashboard when there is at least one associated contact.",
|
|
7
7
|
defaultSubscription: 'type = "group"',
|
|
8
|
+
platform: 'web',
|
|
8
9
|
fields: {
|
|
9
10
|
remote_created_at: {
|
|
10
11
|
type: 'datetime',
|
|
11
12
|
description: 'The time the company was created by you.',
|
|
12
|
-
label: '
|
|
13
|
+
label: 'Remote Created At',
|
|
13
14
|
default: {
|
|
14
15
|
'@path': '$.traits.createdAt'
|
|
15
16
|
}
|
|
16
17
|
},
|
|
17
|
-
external_id: {
|
|
18
|
-
type: 'string',
|
|
19
|
-
description: 'A unique identifier for the contact generated outside Intercom. External ID is required to attach a contact to a company if no email or Contact ID is provided.',
|
|
20
|
-
label: 'External ID',
|
|
21
|
-
default: {
|
|
22
|
-
'@path': '$.userId'
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
email: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
description: "The contact's email address. Email is required to attach a contact to a company if no External ID or Contact ID is provided.",
|
|
28
|
-
label: 'Email Address',
|
|
29
|
-
format: 'email',
|
|
30
|
-
default: {
|
|
31
|
-
'@path': '$.traits.email'
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
18
|
company_id: {
|
|
35
19
|
type: 'string',
|
|
36
|
-
description: "The unique identifier of the company.
|
|
20
|
+
description: "The unique identifier of the company. Can't be updated.",
|
|
37
21
|
label: 'Company ID',
|
|
38
22
|
required: true,
|
|
39
23
|
default: {
|
|
@@ -42,52 +26,55 @@ const action = {
|
|
|
42
26
|
},
|
|
43
27
|
contact_id: {
|
|
44
28
|
type: 'string',
|
|
45
|
-
description: '
|
|
46
|
-
label: 'Contact ID'
|
|
29
|
+
description: 'Attach this contact to the company. This ID is NOT the external_id or email; it is the Intercom unique identifier.',
|
|
30
|
+
label: 'Contact ID',
|
|
31
|
+
default: {
|
|
32
|
+
'@path': '$.userId'
|
|
33
|
+
}
|
|
47
34
|
},
|
|
48
35
|
name: {
|
|
49
36
|
type: 'string',
|
|
50
37
|
description: 'The name of the company.',
|
|
51
|
-
label: '
|
|
38
|
+
label: 'Name',
|
|
52
39
|
default: {
|
|
53
40
|
'@path': '$.traits.name'
|
|
54
41
|
}
|
|
55
42
|
},
|
|
56
43
|
monthly_spend: {
|
|
57
44
|
type: 'number',
|
|
58
|
-
description: 'The monthly spend of the company
|
|
45
|
+
description: 'The monthly spend of the company.',
|
|
59
46
|
label: 'Monthly Spend',
|
|
60
47
|
default: {
|
|
61
|
-
'@path': '$.traits.
|
|
48
|
+
'@path': '$.traits.plan'
|
|
62
49
|
}
|
|
63
50
|
},
|
|
64
51
|
plan: {
|
|
65
52
|
type: 'string',
|
|
66
|
-
description: 'The
|
|
67
|
-
label: '
|
|
53
|
+
description: 'The plan of the company.',
|
|
54
|
+
label: 'Plan',
|
|
68
55
|
default: {
|
|
69
56
|
'@path': '$.traits.plan'
|
|
70
57
|
}
|
|
71
58
|
},
|
|
72
59
|
size: {
|
|
73
60
|
type: 'number',
|
|
74
|
-
description: 'The
|
|
75
|
-
label: '
|
|
61
|
+
description: 'The size of the company.',
|
|
62
|
+
label: 'Size',
|
|
76
63
|
default: {
|
|
77
64
|
'@path': '$.traits.employees'
|
|
78
65
|
}
|
|
79
66
|
},
|
|
80
67
|
website: {
|
|
81
68
|
type: 'string',
|
|
82
|
-
description:
|
|
83
|
-
label: '
|
|
69
|
+
description: 'The website of the company.',
|
|
70
|
+
label: 'Website',
|
|
84
71
|
default: {
|
|
85
72
|
'@path': '$.traits.website'
|
|
86
73
|
}
|
|
87
74
|
},
|
|
88
75
|
industry: {
|
|
89
76
|
type: 'string',
|
|
90
|
-
description: 'The industry
|
|
77
|
+
description: 'The industry of the company.',
|
|
91
78
|
label: 'Industry',
|
|
92
79
|
default: {
|
|
93
80
|
'@path': '$.traits.industry'
|
|
@@ -95,20 +82,25 @@ const action = {
|
|
|
95
82
|
},
|
|
96
83
|
custom_attributes: {
|
|
97
84
|
type: 'object',
|
|
98
|
-
description: '
|
|
99
|
-
label: 'Custom Attributes'
|
|
100
|
-
defaultObjectUI: 'keyvalue'
|
|
85
|
+
description: 'Passing any traits not mapped to individual fields as Custom Attributes. Note: Will throw an error if you pass an attribute that isn`t explicitly defined.',
|
|
86
|
+
label: 'Custom Attributes'
|
|
101
87
|
}
|
|
102
88
|
},
|
|
103
89
|
perform: async (request, { payload }) => {
|
|
104
|
-
const
|
|
105
|
-
delete payload.
|
|
106
|
-
delete payload.external_id;
|
|
90
|
+
const contactId = payload.contact_id;
|
|
91
|
+
delete payload.contact_id;
|
|
107
92
|
const response = await createOrUpdateIntercomCompany(request, payload);
|
|
108
|
-
if (
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
93
|
+
if (contactId) {
|
|
94
|
+
try {
|
|
95
|
+
const companyId = response.data.id;
|
|
96
|
+
return await attachContactToIntercomCompany(request, contactId, companyId);
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
if (error?.response?.status === 404) {
|
|
100
|
+
throw new actions_core_1.RetryableError(`Contact doesn't exist, retrying`);
|
|
101
|
+
}
|
|
102
|
+
throw error;
|
|
103
|
+
}
|
|
112
104
|
}
|
|
113
105
|
}
|
|
114
106
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/intercom/groupIdentifyContact/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/intercom/groupIdentifyContact/index.ts"],"names":[],"mappings":";;AAAA,wDAAyG;AAQzG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EACT,yIAAyI;IAC3I,mBAAmB,EAAE,gBAAgB;IACrC,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE;QACN,iBAAiB,EAAE;YACjB,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,0CAA0C;YACvD,KAAK,EAAE,mBAAmB;YAC1B,OAAO,EAAE;gBACP,OAAO,EAAE,oBAAoB;aAC9B;SACF;QACD,UAAU,EAAE;YACV,IAAI,EA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K,EAAE,mBAAmB;SAC3B;KACF;IAOD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACtC,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAA;QACpC,OAAO,OAAO,CAAC,UAAU,CAAA;QAEzB,MAAM,QAAQ,GAAG,MAAM,6BAA6B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QACtE,IAAI,SAAS,EAAE;YACb,IAAI;gBACF,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAA;gBAClC,OAAO,MAAM,8BAA8B,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAA;aAC3E;YAAC,OAAO,KAAK,EAAE;gBAEd,IAAI,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,GAAG,EAAE;oBACnC,MAAM,IAAI,6BAAc,CAAC,iCAAiC,CAAC,CAAA;iBAC5D;gBACD,MAAM,KAAK,CAAA;aACZ;SACF;IACH,CAAC;CACF,CAAA;AAED,SAAS,6BAA6B,CACpC,OAAsB,EACtB,OAAgB;IAEhB,OAAO,OAAO,CAAC,mCAAmC,EAAE;QAClD,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,OAAO;KACd,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,8BAA8B,CAAC,OAAsB,EAAE,SAAiB,EAAE,SAAiB;IAClG,OAAO,OAAO,CAAC,oCAAoC,SAAS,YAAY,EAAE;QACxE,MAAM,EAAE,MAAM;QACd,IAAI,EAAE;YACJ,EAAE,EAAE,SAAS;SACd;KACF,CAAC,CAAA;AACJ,CAAC;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
-
const util_1 = require("../util");
|
|
5
4
|
const action = {
|
|
6
5
|
title: 'Identify Contact',
|
|
7
|
-
description: 'Create or
|
|
6
|
+
description: 'Create or Update a Contact.',
|
|
8
7
|
defaultSubscription: 'type = "identify"',
|
|
8
|
+
platform: 'web',
|
|
9
9
|
fields: {
|
|
10
10
|
role: {
|
|
11
11
|
type: 'string',
|
|
12
12
|
required: true,
|
|
13
|
-
description: 'The role of the contact. Accepted values are `user` or `lead`.',
|
|
13
|
+
description: 'The role of the contact. Accepted values are `user` or `lead`. Can only be updated if `lead`.',
|
|
14
14
|
label: 'Role',
|
|
15
|
-
|
|
16
|
-
{ label: 'Lead', value: 'lead' },
|
|
17
|
-
{ label: 'User', value: 'user' }
|
|
18
|
-
]
|
|
15
|
+
default: 'lead'
|
|
19
16
|
},
|
|
20
17
|
external_id: {
|
|
21
18
|
type: 'string',
|
|
22
|
-
description: 'A unique identifier
|
|
19
|
+
description: 'A unique identifier generated outside Intercom. Required if role=user and email is blank.',
|
|
23
20
|
label: 'External ID',
|
|
24
21
|
default: {
|
|
25
22
|
'@path': '$.userId'
|
|
@@ -27,8 +24,8 @@ const action = {
|
|
|
27
24
|
},
|
|
28
25
|
email: {
|
|
29
26
|
type: 'string',
|
|
30
|
-
description: "The contact's email
|
|
31
|
-
label: 'Email
|
|
27
|
+
description: "The contact's email. Required if role=user and external_id is blank.",
|
|
28
|
+
label: 'Email',
|
|
32
29
|
format: 'email',
|
|
33
30
|
default: {
|
|
34
31
|
'@path': '$.traits.email'
|
|
@@ -52,7 +49,7 @@ const action = {
|
|
|
52
49
|
},
|
|
53
50
|
avatar: {
|
|
54
51
|
label: 'Avatar',
|
|
55
|
-
description: '
|
|
52
|
+
description: 'URL of image to be associated with contact profile.',
|
|
56
53
|
type: 'string',
|
|
57
54
|
format: 'uri',
|
|
58
55
|
default: {
|
|
@@ -60,40 +57,43 @@ const action = {
|
|
|
60
57
|
}
|
|
61
58
|
},
|
|
62
59
|
signed_up_at: {
|
|
63
|
-
label: 'Signed Up
|
|
60
|
+
label: 'Signed Up At',
|
|
64
61
|
type: 'datetime',
|
|
65
|
-
description: 'The
|
|
62
|
+
description: 'The timestamp when the contact was created.',
|
|
63
|
+
default: {
|
|
64
|
+
'@path': '$.createdAt'
|
|
65
|
+
}
|
|
66
66
|
},
|
|
67
67
|
last_seen_at: {
|
|
68
|
-
label: '
|
|
68
|
+
label: 'Timestamp',
|
|
69
69
|
type: 'datetime',
|
|
70
|
-
description: 'The
|
|
70
|
+
description: 'The timestamp the contact was last seen.',
|
|
71
71
|
default: {
|
|
72
72
|
'@path': '$.timestamp'
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
owner_id: {
|
|
76
|
-
label: 'Owner
|
|
76
|
+
label: 'Owner Id',
|
|
77
77
|
type: 'number',
|
|
78
|
-
description: 'The
|
|
78
|
+
description: 'The id of an admin that has been assigned account ownership of the contact.'
|
|
79
79
|
},
|
|
80
80
|
unsubscribed_from_emails: {
|
|
81
81
|
label: 'Unsubscribed From Emails',
|
|
82
82
|
type: 'boolean',
|
|
83
|
-
description:
|
|
83
|
+
description: 'Whether the contact is unsubscribed from emails.'
|
|
84
84
|
},
|
|
85
85
|
custom_attributes: {
|
|
86
86
|
label: 'Custom Attributes',
|
|
87
|
-
description: 'The custom attributes which are set for the contact.
|
|
87
|
+
description: 'The custom attributes which are set for the contact. Note: Will throw an error if the object has an attribute that isn`t explicitly defined on Intercom.',
|
|
88
88
|
type: 'object',
|
|
89
|
-
|
|
89
|
+
default: {
|
|
90
|
+
'@path': '$.traits.customAttributes'
|
|
91
|
+
}
|
|
90
92
|
}
|
|
91
93
|
},
|
|
92
94
|
perform: async (request, { payload }) => {
|
|
93
|
-
payload.signed_up_at = util_1.convertValidTimestamp(payload.signed_up_at);
|
|
94
|
-
payload.last_seen_at = util_1.convertValidTimestamp(payload.last_seen_at);
|
|
95
95
|
try {
|
|
96
|
-
const contact = await
|
|
96
|
+
const contact = await searchIntercomContact(request, payload);
|
|
97
97
|
if (contact) {
|
|
98
98
|
return updateIntercomContact(request, contact.id, payload);
|
|
99
99
|
}
|
|
@@ -113,10 +113,40 @@ async function createIntercomContact(request, payload) {
|
|
|
113
113
|
json: payload
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
+
async function searchIntercomContact(request, payload) {
|
|
117
|
+
const searchFields = {
|
|
118
|
+
email: payload.email,
|
|
119
|
+
external_id: payload.external_id,
|
|
120
|
+
role: payload.role
|
|
121
|
+
};
|
|
122
|
+
const value = [];
|
|
123
|
+
for (const [key, fieldValue] of Object.entries(searchFields)) {
|
|
124
|
+
if (fieldValue) {
|
|
125
|
+
value.push({
|
|
126
|
+
field: key,
|
|
127
|
+
operator: '=',
|
|
128
|
+
value: fieldValue
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
const query = {
|
|
133
|
+
operator: 'AND',
|
|
134
|
+
value
|
|
135
|
+
};
|
|
136
|
+
const response = await request('https://api.intercom.io/contacts/search', {
|
|
137
|
+
method: 'POST',
|
|
138
|
+
json: { query }
|
|
139
|
+
});
|
|
140
|
+
if (response.data.total_count === 1) {
|
|
141
|
+
return response.data.data[0];
|
|
142
|
+
}
|
|
143
|
+
}
|
|
116
144
|
async function updateIntercomContact(request, contactId, payload) {
|
|
117
145
|
return request(`https://api.intercom.io/contacts/${contactId}`, {
|
|
118
146
|
method: 'PUT',
|
|
119
|
-
json:
|
|
147
|
+
json: {
|
|
148
|
+
...payload
|
|
149
|
+
}
|
|
120
150
|
});
|
|
121
151
|
}
|
|
122
152
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/intercom/identifyContact/index.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/intercom/identifyContact/index.ts"],"names":[],"mappings":";;AAAA,wDAAyG;AAazG,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,6BAA6B;IAC1C,mBAA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AAC,WAAW;QAChC,IAAI,EAAE,OAAO,CAAC,IAAI;KACnB,CAAA;IACD,MAAM,KAAK,GAAG,EAAE,CAAA;IAChB,KAAK,MAAM,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;QAC5D,IAAI,UAAU,EAAE;YACd,KAAK,CAAC,IAAI,CAAC;gBACT,KAAK,EAAE,GAAG;gBACV,QAAQ,EAAE,GAAG;gBACb,KAAK,EAAE,UAAU;aAClB,CAAC,CAAA;SACH;KACF;IAED,MAAM,KAAK,GAAG;QACZ,QAAQ,EAAE,KAAK;QACf,KAAK;KACN,CAAA;IAED,MAAM,QAAQ,GAAyC,MAAM,OAAO,CAAC,yCAAyC,EAAE;QAC9G,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,EAAE,KAAK,EAAE;KAChB,CAAC,CAAA;IAEF,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,KAAK,CAAC,EAAE;QACnC,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KAC7B;AACH,CAAC;AAED,KAAK,UAAU,qBAAqB,CAAC,OAAsB,EAAE,SAAiB,EAAE,OAAgB;IAC9F,OAAO,OAAO,CAAC,oCAAoC,SAAS,EAAE,EAAE;QAC9D,MAAM,EAAE,KAAK;QACb,IAAI,EAAE;YACJ,GAAG,OAAO;SACX;KACF,CAAC,CAAA;AACJ,CAAC;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DestinationDefinition } from '@segment/actions-core';
|
|
1
|
+
import type { DestinationDefinition } from '@segment/actions-core';
|
|
2
2
|
import type { Settings } from './generated-types';
|
|
3
3
|
declare const destination: DestinationDefinition<Settings>;
|
|
4
4
|
export default destination;
|
|
@@ -3,25 +3,17 @@ 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
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
7
6
|
const identifyContact_1 = __importDefault(require("./identifyContact"));
|
|
8
7
|
const groupIdentifyContact_1 = __importDefault(require("./groupIdentifyContact"));
|
|
9
|
-
const trackEvent_1 = __importDefault(require("./trackEvent"));
|
|
10
|
-
const util_1 = require("./util");
|
|
11
8
|
const destination = {
|
|
12
|
-
name: 'Intercom
|
|
13
|
-
slug: 'actions-intercom
|
|
9
|
+
name: 'Intercom (Actions)',
|
|
10
|
+
slug: 'actions-intercom',
|
|
14
11
|
mode: 'cloud',
|
|
15
12
|
authentication: {
|
|
16
13
|
scheme: 'oauth2',
|
|
17
14
|
fields: {},
|
|
18
|
-
testAuthentication:
|
|
19
|
-
|
|
20
|
-
return await request('https://api.intercom.io/admins');
|
|
21
|
-
}
|
|
22
|
-
catch (error) {
|
|
23
|
-
throw new Error('Test authentication failed');
|
|
24
|
-
}
|
|
15
|
+
testAuthentication: (request) => {
|
|
16
|
+
return request('https://api.intercom.io/admins');
|
|
25
17
|
}
|
|
26
18
|
},
|
|
27
19
|
extendRequest({ auth }) {
|
|
@@ -32,21 +24,13 @@ const destination = {
|
|
|
32
24
|
};
|
|
33
25
|
},
|
|
34
26
|
onDelete: async (request, { payload }) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return request(`https://api.intercom.io/contacts/${payload.userId}`, {
|
|
39
|
-
method: 'DELETE'
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
throw new actions_core_1.IntegrationError('No unique contact found', 'Contact not found', 404);
|
|
44
|
-
}
|
|
27
|
+
return request(`https://api.intercom.io/contacts/${payload.userId}`, {
|
|
28
|
+
method: 'DELETE'
|
|
29
|
+
});
|
|
45
30
|
},
|
|
46
31
|
actions: {
|
|
47
32
|
identifyContact: identifyContact_1.default,
|
|
48
|
-
groupIdentifyContact: groupIdentifyContact_1.default
|
|
49
|
-
trackEvent: trackEvent_1.default
|
|
33
|
+
groupIdentifyContact: groupIdentifyContact_1.default
|
|
50
34
|
}
|
|
51
35
|
};
|
|
52
36
|
exports.default = destination;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/intercom/index.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/intercom/index.ts"],"names":[],"mappings":";;;;;AAEA,wEAA+C;AAC/C,kFAAyD;AAEzD,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,EAAE;QACV,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;YAG9B,OAAO,OAAO,CAAC,gCAAgC,CAAC,CAAA;QAClD,CAAC;KACF;IACD,aAAa,CAAC,EAAE,IAAI,EAAE;QACpB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,EAAE,WAAW,EAAE;aAC7C;SACF,CAAA;IACH,CAAC;IAED,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACvC,OAAO,OAAO,CAAC,oCAAoC,OAAO,CAAC,MAAM,EAAE,EAAE;YACnE,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,EAAE;QACP,eAAe,EAAf,yBAAe;QACf,oBAAoB,EAApB,8BAAoB;KACrB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("../utils");
|
|
4
3
|
const action = {
|
|
5
4
|
title: 'Alias',
|
|
6
5
|
description: 'Create an alias to a distinct id. This action is primarily supported for the sake of customers using the legacy identity management in their Mixpanel project. For new customers or those who have [migrated](https://help.mixpanel.com/hc/en-us/articles/360039133851-Moving-to-Identity-Merge?source=segment-actions) to the [new identity management](https://help.mixpanel.com/hc/en-us/articles/360041039771-Getting-Started-with-Identity-Management?source=segment-actions) in Mixpanel should use `identify`.',
|
|
@@ -36,7 +35,7 @@ const action = {
|
|
|
36
35
|
token: settings.projectToken
|
|
37
36
|
}
|
|
38
37
|
};
|
|
39
|
-
return request(
|
|
38
|
+
return request('https://api.mixpanel.com/track', {
|
|
40
39
|
method: 'post',
|
|
41
40
|
body: new URLSearchParams({ data: JSON.stringify(data) })
|
|
42
41
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mixpanel/alias/index.ts"],"names":[],"mappings":";;AAIA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mixpanel/alias/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,OAAO;IACd,WAAW,EACT,ufAAuf;IACzf,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EACT,2GAA2G;YAC7G,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC7B,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;iBACnC;aACF;SACF;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,4CAA4C;YACzD,OAAO,EAAE;gBACP,OAAO,EAAE,cAAc;aACxB;SACF;KACF;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAChD,MAAM,IAAI,GAAG;YACX,KAAK,EAAE,eAAe;YACtB,UAAU,EAAE;gBACV,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,KAAK,EAAE,QAAQ,CAAC,YAAY;aAC7B;SACF,CAAA;QAED,OAAO,OAAO,CAAC,gCAAgC,EAAE;YAC/C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;SAC1D,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
-
const utils_1 = require("../utils");
|
|
5
4
|
const action = {
|
|
6
5
|
title: 'Group Identify User',
|
|
7
6
|
description: 'Updates or adds properties to a group profile. The profile is created if it does not exist. [Learn more about Group Analytics.](https://help.mixpanel.com/hc/en-us/articles/360025333632-Group-Analytics?source=segment-actions)',
|
|
@@ -42,7 +41,7 @@ const action = {
|
|
|
42
41
|
$group_id: group_id,
|
|
43
42
|
$set: payload.traits
|
|
44
43
|
};
|
|
45
|
-
return request(
|
|
44
|
+
return request('https://api.mixpanel.com/groups', {
|
|
46
45
|
method: 'post',
|
|
47
46
|
body: new URLSearchParams({ data: JSON.stringify(data) })
|
|
48
47
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mixpanel/groupIdentifyUser/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mix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I,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;SAC1D,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
-
const utils_1 = require("../utils");
|
|
5
4
|
const action = {
|
|
6
5
|
title: 'Identify User',
|
|
7
6
|
description: 'Set the user ID for a particular device ID or update user properties. Learn more about [User Profiles](https://help.mixpanel.com/hc/en-us/articles/115004501966?source=segment-actions) and [Identity Management](https://help.mixpanel.com/hc/en-us/articles/360041039771-Getting-Started-with-Identity-Management?source=segment-actions).',
|
|
@@ -38,7 +37,6 @@ const action = {
|
|
|
38
37
|
if (!settings.projectToken) {
|
|
39
38
|
throw new actions_core_1.IntegrationError('Missing project token', 'Missing required field', 400);
|
|
40
39
|
}
|
|
41
|
-
const apiServerUrl = utils_1.getApiServerUrl(settings.apiRegion);
|
|
42
40
|
const responses = [];
|
|
43
41
|
if (payload.anonymous_id) {
|
|
44
42
|
const identifyEvent = {
|
|
@@ -49,7 +47,7 @@ const action = {
|
|
|
49
47
|
token: settings.projectToken
|
|
50
48
|
}
|
|
51
49
|
};
|
|
52
|
-
const identifyResponse = await request(
|
|
50
|
+
const identifyResponse = await request('https://api.mixpanel.com/track', {
|
|
53
51
|
method: 'post',
|
|
54
52
|
body: new URLSearchParams({ data: JSON.stringify(identifyEvent) })
|
|
55
53
|
});
|
|
@@ -61,7 +59,7 @@ const action = {
|
|
|
61
59
|
$distinct_id: payload.user_id,
|
|
62
60
|
$set: payload.traits
|
|
63
61
|
};
|
|
64
|
-
const engageResponse = request(
|
|
62
|
+
const engageResponse = request('https://api.mixpanel.com/engage', {
|
|
65
63
|
method: 'post',
|
|
66
64
|
body: new URLSearchParams({ data: JSON.stringify(data) })
|
|
67
65
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mixpanel/identifyUser/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAI1E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mixpanel/identifyUser/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAI1E,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,eAAe;IACtB,WAAW,EACT,8UAA8U;IAChV,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,uCAAuC;YACpD,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,yCAAyC;YACtD,OAAO,EAAE;gBACP,OAAO,EAAE,eAAe;aACzB;SACF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uCAAuC;YACpD,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;KACF;IAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAChD,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE;YAC1B,MAAM,IAAI,+BAAgB,CAAC,uBAAuB,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;SACnF;QACD,MAAM,SAAS,GAAG,EAAE,CAAA;QACpB,IAAI,OAAO,CAAC,YAAY,EAAE;YACxB,MAAM,aAAa,GAAG;gBACpB,KAAK,EAAE,WAAW;gBAClB,UAAU,EAAE;oBACV,cAAc,EAAE,OAAO,CAAC,OAAO;oBAC/B,QAAQ,EAAE,OAAO,CAAC,YAAY;oBAC9B,KAAK,EAAE,QAAQ,CAAC,YAAY;iBAC7B;aACF,CAAA;YAED,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,gCAAgC,EAAE;gBACvE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC;aACnE,CAAC,CAAA;YACF,SAAS,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;SACjC;QAED,IAAI,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5D,MAAM,IAAI,GAAG;gBACX,MAAM,EAAE,QAAQ,CAAC,YAAY;gBAC7B,YAAY,EAAE,OAAO,CAAC,OAAO;gBAC7B,IAAI,EAAE,OAAO,CAAC,MAAM;aACrB,CAAA;YAED,MAAM,cAAc,GAAG,OAAO,CAAC,iCAAiC,EAAE;gBAChE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;aAC1D,CAAC,CAAA;YACF,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;SAC/B;QACD,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IAC/B,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -8,7 +8,6 @@ const trackEvent_1 = __importDefault(require("./trackEvent"));
|
|
|
8
8
|
const identifyUser_1 = __importDefault(require("./identifyUser"));
|
|
9
9
|
const groupIdentifyUser_1 = __importDefault(require("./groupIdentifyUser"));
|
|
10
10
|
const alias_1 = __importDefault(require("./alias"));
|
|
11
|
-
const utils_1 = require("./utils");
|
|
12
11
|
const presets = [
|
|
13
12
|
{
|
|
14
13
|
name: 'Track Calls',
|
|
@@ -69,13 +68,6 @@ const destination = {
|
|
|
69
68
|
description: 'Mixpanel project secret.',
|
|
70
69
|
type: 'string',
|
|
71
70
|
required: true
|
|
72
|
-
},
|
|
73
|
-
apiRegion: {
|
|
74
|
-
label: 'Data Residency',
|
|
75
|
-
description: 'Learn about [EU data residency](https://help.mixpanel.com/hc/en-us/articles/360039135652-Data-Residency-in-EU)',
|
|
76
|
-
type: 'string',
|
|
77
|
-
choices: Object.values(utils_1.ApiRegions).map((apiRegion) => ({ label: apiRegion, value: apiRegion })),
|
|
78
|
-
default: utils_1.ApiRegions.US
|
|
79
71
|
}
|
|
80
72
|
},
|
|
81
73
|
testAuthentication: (request, { settings }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/mixpanel/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAqD;AACrD,8DAAqC;AAGrC,kEAAyC;AACzC,4EAAmD;AAEnD,oDAA2B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/mixpanel/index.ts"],"names":[],"mappings":";;;;;AACA,wDAAqD;AACrD,8DAAqC;AAGrC,kEAAyC;AACzC,4EAAmD;AAEnD,oDAA2B;AAG3B,MAAM,OAAO,GAAqC;IAChD;QACE,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,YAAY;QAC3B,OAAO,EAAE,4BAAa,CAAC,oBAAU,CAAC,MAAM,CAAC;KAC1C;IACD;QACE,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE,eAAe;QAC1B,aAAa,EAAE,YAAY;QAC3B,OAAO,EAAE;YACP,GAAG,4BAAa,CAAC,oBAAU,CAAC,MAAM,CAAC;YACnC,KAAK,EAAE;gBACL,WAAW,EAAE,iBAAiB;aAC/B;SACF;KACF;IACD;QACE,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE,iBAAiB;QAC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AAY,EAAZ,sBAAY;QACZ,iBAAiB,EAAjB,2BAAiB;QACjB,KAAK,EAAL,eAAK;KACN;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -385,7 +385,7 @@ const action = {
|
|
|
385
385
|
if (!settings.apiSecret) {
|
|
386
386
|
throw new actions_core_1.InvalidAuthenticationError('Missing api secret');
|
|
387
387
|
}
|
|
388
|
-
return request(
|
|
388
|
+
return request('https://api.mixpanel.com/import?strict=1', {
|
|
389
389
|
method: 'post',
|
|
390
390
|
json: [event],
|
|
391
391
|
headers: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mixpanel/trackEvent/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAoF;AAIpF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mixpanel/trackEvent/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAoF;AAIpF,oCAAmE;AACnE,+DAAsC;AAEtC,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,aAAa;IACpB,WAAW,EACT,4KAA4K;IAC9K,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yCAAyC;YACtD,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iCAAiC;YAC9C,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC7B,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;iBACnC;aACF;SACF;QACD,QAAQ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AO,CAAC,QAAQ;gBAC3B,cAAc,EAAE,OAAO,CAAC,aAAa;gBACrC,aAAa,EAAE,OAAO,CAAC,YAAY;gBACnC,eAAe,EAAE,OAAO,CAAC,cAAc;gBACvC,OAAO,EAAE,SAAS;gBAClB,aAAa,EAAE,OAAO,CAAC,IAAI;gBAC3B,eAAe,EAAE,OAAO,CAAC,OAAO;gBAChC,MAAM,EAAE,OAAO,CAAC,YAAY,IAAI,YAAY,OAAO,CAAC,YAAY,EAAE;gBAClE,YAAY,EAAE,GAAG,CAAC,YAAY;gBAC9B,WAAW,EAAE,GAAG,CAAC,WAAW;gBAC5B,UAAU,EAAE,GAAG,CAAC,UAAU;gBAC1B,UAAU,EAAE,GAAG,CAAC,UAAU;gBAC1B,QAAQ,EAAE,GAAG,CAAC,QAAQ;gBACtB,GAAG,OAAO,CAAC,gBAAgB;aAC5B;SACF,CAAA;QAED,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE;YACvB,MAAM,IAAI,yCAA0B,CAAC,oBAAoB,CAAC,CAAA;SAC3D;QACD,OAAO,OAAO,CAAC,0CAA0C,EAAE;YACzD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,CAAC,KAAK,CAAC;YACb,OAAO,EAAE;gBACP,aAAa,EAAE,SAAS,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,SAAS,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;aACnF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export declare enum ApiRegions {
|
|
2
|
-
US = "US \uD83C\uDDFA\uD83C\uDDF8",
|
|
3
|
-
EU = "EU \uD83C\uDDEA\uD83C\uDDFA"
|
|
4
|
-
}
|
|
5
|
-
export declare function getApiServerUrl(apiRegion: string | undefined): "https://api-eu.mixpanel.com" | "https://api.mixpanel.com";
|
|
6
1
|
export declare function getBrowser(userAgent: string, vendor: string | undefined): string;
|
|
7
2
|
export declare function getBrowserVersion(userAgent: string, vendor: string | undefined): string | undefined;
|
|
8
3
|
export declare function cheapGuid(maxlen?: number): string;
|