@taskmagic/apps-hunter 0.1.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/README.md +3 -0
- package/package.json +47 -0
- package/src/index.d.ts +3 -0
- package/src/index.js +39 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/add-recipients.d.ts +5 -0
- package/src/lib/actions/add-recipients.js +57 -0
- package/src/lib/actions/add-recipients.js.map +1 -0
- package/src/lib/actions/count-emails.d.ts +5 -0
- package/src/lib/actions/count-emails.js +70 -0
- package/src/lib/actions/count-emails.js.map +1 -0
- package/src/lib/actions/create-lead.d.ts +20 -0
- package/src/lib/actions/create-lead.js +57 -0
- package/src/lib/actions/create-lead.js.map +1 -0
- package/src/lib/actions/delete-lead.d.ts +3 -0
- package/src/lib/actions/delete-lead.js +30 -0
- package/src/lib/actions/delete-lead.js.map +1 -0
- package/src/lib/actions/find-email.d.ts +8 -0
- package/src/lib/actions/find-email.js +106 -0
- package/src/lib/actions/find-email.js.map +1 -0
- package/src/lib/actions/get-lead.d.ts +3 -0
- package/src/lib/actions/get-lead.js +30 -0
- package/src/lib/actions/get-lead.js.map +1 -0
- package/src/lib/actions/search-leads.d.ts +25 -0
- package/src/lib/actions/search-leads.js +101 -0
- package/src/lib/actions/search-leads.js.map +1 -0
- package/src/lib/actions/update-lead.d.ts +21 -0
- package/src/lib/actions/update-lead.js +64 -0
- package/src/lib/actions/update-lead.js.map +1 -0
- package/src/lib/actions/verify-email.d.ts +3 -0
- package/src/lib/actions/verify-email.js +82 -0
- package/src/lib/actions/verify-email.js.map +1 -0
- package/src/lib/auth.d.ts +1 -0
- package/src/lib/auth.js +10 -0
- package/src/lib/auth.js.map +1 -0
- package/src/lib/common/index.d.ts +8 -0
- package/src/lib/common/index.js +19 -0
- package/src/lib/common/index.js.map +1 -0
- package/src/lib/common/props.d.ts +54 -0
- package/src/lib/common/props.js +361 -0
- package/src/lib/common/props.js.map +1 -0
- package/src/lib/common/types.d.ts +32 -0
- package/src/lib/common/types.js +3 -0
- package/src/lib/common/types.js.map +1 -0
- package/src/lib/triggers/new-lead.d.ts +2 -0
- package/src/lib/triggers/new-lead.js +83 -0
- package/src/lib/triggers/new-lead.js.map +1 -0
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dateFilterProp = exports.verificationStatusProp = exports.sendingStatusProp = exports.arrayStringProp = exports.syncStatusProp = exports.phoneNumberFilterProp = exports.linkedinUrlFilterProp = exports.twitterFilterProp = exports.sourceFilterProp = exports.companySizeFilterProp = exports.countryCodeFilterProp = exports.websiteFilterProp = exports.industryFilterProp = exports.companyFilterProp = exports.positionFilterProp = exports.lastNameFilterProp = exports.firstNameFilterProp = exports.emailFilterProp = exports.filterProp = exports.maxDurationProp = exports.fullNameProp = exports.leadDeleteDropdownProp = exports.leadSelectDropdownProp = exports.leadIdProp = exports.customAttributesProp = exports.leadsListDropdownProp = exports.leadsListIdsProp = exports.leadsListIdProp = exports.sourceProp = exports.notesProp = exports.twitterProp = exports.phoneNumberProp = exports.linkedinUrlProp = exports.countryCodeProp = exports.websiteProp = exports.confidenceScoreProp = exports.companySizeProp = exports.companyIndustryProp = exports.positionProp = exports.lastNameProp = exports.firstNameProp = exports.emailProp = exports.emailTypeProp = exports.companyLeadProp = exports.companyProp = exports.domainProp = exports.leadIdsDropdownProp = exports.leadIdsProp = exports.emailsProp = exports.campaignIdProp = void 0;
|
|
4
|
+
exports.offsetProp = exports.limitProp = exports.queryProp = exports.customAttributesFilterProp = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const pieces_framework_1 = require("@taskmagic/pieces-framework");
|
|
7
|
+
const pieces_common_1 = require("@taskmagic/pieces-common");
|
|
8
|
+
const index_1 = require("./index");
|
|
9
|
+
exports.campaignIdProp = pieces_framework_1.Property.Dropdown({
|
|
10
|
+
displayName: 'Campaign',
|
|
11
|
+
required: true,
|
|
12
|
+
refreshers: [],
|
|
13
|
+
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
14
|
+
var _b;
|
|
15
|
+
if (!auth) {
|
|
16
|
+
return {
|
|
17
|
+
disabled: true,
|
|
18
|
+
placeholder: 'Connect your Hunter account first.',
|
|
19
|
+
options: [],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
const resp = yield (0, index_1.hunterApiCall)({
|
|
23
|
+
apiKey: auth,
|
|
24
|
+
endpoint: '/campaigns',
|
|
25
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
26
|
+
});
|
|
27
|
+
const campaigns = (_b = resp.data) === null || _b === void 0 ? void 0 : _b.campaigns;
|
|
28
|
+
return {
|
|
29
|
+
disabled: false,
|
|
30
|
+
options: campaigns.map((c) => ({
|
|
31
|
+
label: c.name,
|
|
32
|
+
value: c.id,
|
|
33
|
+
})),
|
|
34
|
+
};
|
|
35
|
+
}),
|
|
36
|
+
});
|
|
37
|
+
exports.emailsProp = pieces_framework_1.Property.Array({
|
|
38
|
+
displayName: 'Emails',
|
|
39
|
+
required: false,
|
|
40
|
+
description: 'Email addresses to add as recipients. At least one email or lead ID is required.',
|
|
41
|
+
defaultValue: [],
|
|
42
|
+
});
|
|
43
|
+
exports.leadIdsProp = pieces_framework_1.Property.Array({
|
|
44
|
+
displayName: 'Lead IDs',
|
|
45
|
+
required: false,
|
|
46
|
+
description: 'Existing lead IDs from your Hunter account to add as recipients.',
|
|
47
|
+
defaultValue: [],
|
|
48
|
+
});
|
|
49
|
+
exports.leadIdsDropdownProp = pieces_framework_1.Property.MultiSelectDropdown({
|
|
50
|
+
displayName: 'Leads',
|
|
51
|
+
required: false,
|
|
52
|
+
description: 'Select leads from your Hunter account to add as recipients.',
|
|
53
|
+
refreshers: [],
|
|
54
|
+
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
55
|
+
var _b;
|
|
56
|
+
if (!auth) {
|
|
57
|
+
return {
|
|
58
|
+
disabled: true,
|
|
59
|
+
placeholder: 'Connect your Hunter account first.',
|
|
60
|
+
options: [],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
const resp = yield (0, index_1.hunterApiCall)({
|
|
64
|
+
apiKey: auth,
|
|
65
|
+
endpoint: '/leads',
|
|
66
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
67
|
+
qparams: { limit: '100' },
|
|
68
|
+
});
|
|
69
|
+
const leads = ((_b = resp.data) === null || _b === void 0 ? void 0 : _b.leads) || [];
|
|
70
|
+
return {
|
|
71
|
+
disabled: false,
|
|
72
|
+
options: leads.map((lead) => ({
|
|
73
|
+
label: `${lead.first_name || ''} ${lead.last_name || ''} (${lead.email})`.trim(),
|
|
74
|
+
value: lead.id,
|
|
75
|
+
})),
|
|
76
|
+
};
|
|
77
|
+
}),
|
|
78
|
+
});
|
|
79
|
+
exports.domainProp = pieces_framework_1.Property.ShortText({
|
|
80
|
+
displayName: 'Domain',
|
|
81
|
+
required: false,
|
|
82
|
+
description: 'Domain name to count addresses for (e.g., "stripe.com"). At least one of domain or company is required.',
|
|
83
|
+
});
|
|
84
|
+
exports.companyProp = pieces_framework_1.Property.ShortText({
|
|
85
|
+
displayName: 'Company',
|
|
86
|
+
required: false,
|
|
87
|
+
description: 'Company name to count addresses for (e.g., "Stripe"). At least one of domain or company is required.',
|
|
88
|
+
});
|
|
89
|
+
exports.companyLeadProp = pieces_framework_1.Property.ShortText({
|
|
90
|
+
displayName: 'Company',
|
|
91
|
+
required: false,
|
|
92
|
+
description: 'Name of the company the lead is working in.',
|
|
93
|
+
});
|
|
94
|
+
exports.emailTypeProp = pieces_framework_1.Property.Dropdown({
|
|
95
|
+
displayName: 'Type',
|
|
96
|
+
required: false,
|
|
97
|
+
description: 'Count only "personal" or "generic" email addresses. Leave blank for both.',
|
|
98
|
+
options: () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
99
|
+
return ({
|
|
100
|
+
disabled: false,
|
|
101
|
+
options: [
|
|
102
|
+
{ label: 'Personal', value: 'personal' },
|
|
103
|
+
{ label: 'Generic', value: 'generic' },
|
|
104
|
+
],
|
|
105
|
+
});
|
|
106
|
+
}),
|
|
107
|
+
refreshers: [],
|
|
108
|
+
});
|
|
109
|
+
exports.emailProp = pieces_framework_1.Property.ShortText({
|
|
110
|
+
displayName: 'Email',
|
|
111
|
+
required: true,
|
|
112
|
+
description: 'The email address of the lead.',
|
|
113
|
+
});
|
|
114
|
+
exports.firstNameProp = pieces_framework_1.Property.ShortText({
|
|
115
|
+
displayName: 'First Name',
|
|
116
|
+
required: false,
|
|
117
|
+
});
|
|
118
|
+
exports.lastNameProp = pieces_framework_1.Property.ShortText({
|
|
119
|
+
displayName: 'Last Name',
|
|
120
|
+
required: false,
|
|
121
|
+
});
|
|
122
|
+
exports.positionProp = pieces_framework_1.Property.ShortText({
|
|
123
|
+
displayName: 'Position',
|
|
124
|
+
required: false,
|
|
125
|
+
});
|
|
126
|
+
exports.companyIndustryProp = pieces_framework_1.Property.ShortText({
|
|
127
|
+
displayName: 'Company Industry',
|
|
128
|
+
required: false,
|
|
129
|
+
description: 'Sector of the company (e.g. Finance, Technology, Education, etc.).',
|
|
130
|
+
});
|
|
131
|
+
exports.companySizeProp = pieces_framework_1.Property.ShortText({
|
|
132
|
+
displayName: 'Company Size',
|
|
133
|
+
required: false,
|
|
134
|
+
description: 'Size of the company (e.g. 1-10, 201-500 employees).',
|
|
135
|
+
});
|
|
136
|
+
exports.confidenceScoreProp = pieces_framework_1.Property.Number({
|
|
137
|
+
displayName: 'Confidence Score',
|
|
138
|
+
required: false,
|
|
139
|
+
description: 'Probability the email is correct (0–100).',
|
|
140
|
+
});
|
|
141
|
+
exports.websiteProp = pieces_framework_1.Property.ShortText({
|
|
142
|
+
displayName: 'Website',
|
|
143
|
+
required: false,
|
|
144
|
+
description: 'Domain name of the company.',
|
|
145
|
+
});
|
|
146
|
+
exports.countryCodeProp = pieces_framework_1.Property.ShortText({
|
|
147
|
+
displayName: 'Country Code',
|
|
148
|
+
required: false,
|
|
149
|
+
description: 'ISO 3166-1 alpha-2 country code.',
|
|
150
|
+
});
|
|
151
|
+
exports.linkedinUrlProp = pieces_framework_1.Property.ShortText({
|
|
152
|
+
displayName: 'LinkedIn URL',
|
|
153
|
+
required: false,
|
|
154
|
+
});
|
|
155
|
+
exports.phoneNumberProp = pieces_framework_1.Property.ShortText({
|
|
156
|
+
displayName: 'Phone Number',
|
|
157
|
+
required: false,
|
|
158
|
+
});
|
|
159
|
+
exports.twitterProp = pieces_framework_1.Property.ShortText({
|
|
160
|
+
displayName: 'Twitter Handle',
|
|
161
|
+
required: false,
|
|
162
|
+
});
|
|
163
|
+
exports.notesProp = pieces_framework_1.Property.ShortText({
|
|
164
|
+
displayName: 'Notes',
|
|
165
|
+
required: false,
|
|
166
|
+
description: 'Personal notes about the lead.',
|
|
167
|
+
});
|
|
168
|
+
exports.sourceProp = pieces_framework_1.Property.ShortText({
|
|
169
|
+
displayName: 'Source',
|
|
170
|
+
required: false,
|
|
171
|
+
description: 'Origin where the lead was found.',
|
|
172
|
+
});
|
|
173
|
+
exports.leadsListIdProp = pieces_framework_1.Property.Number({
|
|
174
|
+
displayName: 'Leads List ID',
|
|
175
|
+
required: false,
|
|
176
|
+
description: 'ID of the list to add the lead to; defaults to your most recent list.',
|
|
177
|
+
});
|
|
178
|
+
exports.leadsListIdsProp = pieces_framework_1.Property.Array({
|
|
179
|
+
displayName: 'Leads List IDs',
|
|
180
|
+
required: false,
|
|
181
|
+
description: 'Array of list IDs to add the lead to; defaults to your most recent list.',
|
|
182
|
+
defaultValue: [],
|
|
183
|
+
});
|
|
184
|
+
exports.leadsListDropdownProp = pieces_framework_1.Property.Dropdown({
|
|
185
|
+
displayName: 'Leads List',
|
|
186
|
+
required: false,
|
|
187
|
+
description: 'Select which list to add the lead to; defaults to your most recent list.',
|
|
188
|
+
refreshers: [],
|
|
189
|
+
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
190
|
+
var _b;
|
|
191
|
+
if (!auth) {
|
|
192
|
+
return {
|
|
193
|
+
disabled: true,
|
|
194
|
+
placeholder: 'Connect your Hunter account first.',
|
|
195
|
+
options: [],
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
const resp = yield (0, index_1.hunterApiCall)({
|
|
199
|
+
apiKey: auth,
|
|
200
|
+
endpoint: '/leads',
|
|
201
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
202
|
+
qparams: { limit: '100' },
|
|
203
|
+
});
|
|
204
|
+
const leads = ((_b = resp.data) === null || _b === void 0 ? void 0 : _b.leads) || [];
|
|
205
|
+
const uniqueLists = new Map();
|
|
206
|
+
leads.forEach((lead) => {
|
|
207
|
+
if (lead.leads_list) {
|
|
208
|
+
uniqueLists.set(lead.leads_list.id, lead.leads_list);
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
return {
|
|
212
|
+
disabled: false,
|
|
213
|
+
options: Array.from(uniqueLists.values()).map((list) => ({
|
|
214
|
+
label: `${list.name} (${list.leads_count} leads)`,
|
|
215
|
+
value: list.id,
|
|
216
|
+
})),
|
|
217
|
+
};
|
|
218
|
+
}),
|
|
219
|
+
});
|
|
220
|
+
exports.customAttributesProp = pieces_framework_1.Property.Json({
|
|
221
|
+
displayName: 'Custom Attributes',
|
|
222
|
+
required: false,
|
|
223
|
+
description: 'Key/value map of any custom attributes, e.g. { "customer_id": "cus-1234abcd" }.',
|
|
224
|
+
});
|
|
225
|
+
exports.leadIdProp = pieces_framework_1.Property.Number({
|
|
226
|
+
displayName: 'Lead ID',
|
|
227
|
+
required: true,
|
|
228
|
+
description: 'Identifier of the lead to delete.',
|
|
229
|
+
});
|
|
230
|
+
exports.leadSelectDropdownProp = pieces_framework_1.Property.Dropdown({
|
|
231
|
+
displayName: 'Lead',
|
|
232
|
+
required: true,
|
|
233
|
+
description: 'Select a lead from your Hunter account.',
|
|
234
|
+
refreshers: [],
|
|
235
|
+
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
236
|
+
var _b;
|
|
237
|
+
if (!auth) {
|
|
238
|
+
return {
|
|
239
|
+
disabled: true,
|
|
240
|
+
placeholder: 'Connect your Hunter account first.',
|
|
241
|
+
options: [],
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
const resp = yield (0, index_1.hunterApiCall)({
|
|
245
|
+
apiKey: auth,
|
|
246
|
+
endpoint: '/leads',
|
|
247
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
248
|
+
qparams: { limit: '100' },
|
|
249
|
+
});
|
|
250
|
+
const leads = ((_b = resp.data) === null || _b === void 0 ? void 0 : _b.leads) || [];
|
|
251
|
+
return {
|
|
252
|
+
disabled: false,
|
|
253
|
+
options: leads.map((lead) => ({
|
|
254
|
+
label: `${lead.first_name || ''} ${lead.last_name || ''} (${lead.email})`.trim(),
|
|
255
|
+
value: lead.id,
|
|
256
|
+
})),
|
|
257
|
+
};
|
|
258
|
+
}),
|
|
259
|
+
});
|
|
260
|
+
exports.leadDeleteDropdownProp = pieces_framework_1.Property.Dropdown({
|
|
261
|
+
displayName: 'Lead to Delete',
|
|
262
|
+
required: true,
|
|
263
|
+
description: 'Select the lead to delete from your Hunter account.',
|
|
264
|
+
refreshers: [],
|
|
265
|
+
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
266
|
+
var _b;
|
|
267
|
+
if (!auth) {
|
|
268
|
+
return {
|
|
269
|
+
disabled: true,
|
|
270
|
+
placeholder: 'Connect your Hunter account first.',
|
|
271
|
+
options: [],
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
const resp = yield (0, index_1.hunterApiCall)({
|
|
275
|
+
apiKey: auth,
|
|
276
|
+
endpoint: '/leads',
|
|
277
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
278
|
+
qparams: { limit: '100' },
|
|
279
|
+
});
|
|
280
|
+
const leads = ((_b = resp.data) === null || _b === void 0 ? void 0 : _b.leads) || [];
|
|
281
|
+
return {
|
|
282
|
+
disabled: false,
|
|
283
|
+
options: leads.map((lead) => ({
|
|
284
|
+
label: `${lead.first_name || ''} ${lead.last_name || ''} (${lead.email})`.trim(),
|
|
285
|
+
value: lead.id,
|
|
286
|
+
})),
|
|
287
|
+
};
|
|
288
|
+
}),
|
|
289
|
+
});
|
|
290
|
+
exports.fullNameProp = pieces_framework_1.Property.ShortText({
|
|
291
|
+
displayName: 'Full Name',
|
|
292
|
+
required: false,
|
|
293
|
+
description: "The person's full name (if you can't supply both first and last name).",
|
|
294
|
+
});
|
|
295
|
+
exports.maxDurationProp = pieces_framework_1.Property.Number({
|
|
296
|
+
displayName: 'Max Duration (seconds)',
|
|
297
|
+
required: false,
|
|
298
|
+
description: 'How long Hunter should spend refining results (3-20, default 10).',
|
|
299
|
+
});
|
|
300
|
+
const filterProp = (name, description) => pieces_framework_1.Property.ShortText({ displayName: name, required: false, description });
|
|
301
|
+
exports.filterProp = filterProp;
|
|
302
|
+
exports.emailFilterProp = (0, exports.filterProp)('Email', 'Filter by email (use "*" for any, "~" for empty, or substring).');
|
|
303
|
+
exports.firstNameFilterProp = (0, exports.filterProp)('First Name', 'Filter by first name.');
|
|
304
|
+
exports.lastNameFilterProp = (0, exports.filterProp)('Last Name', 'Filter by last name.');
|
|
305
|
+
exports.positionFilterProp = (0, exports.filterProp)('Position', 'Filter by position.');
|
|
306
|
+
exports.companyFilterProp = (0, exports.filterProp)('Company', 'Filter by company.');
|
|
307
|
+
exports.industryFilterProp = (0, exports.filterProp)('Industry', 'Filter by industry.');
|
|
308
|
+
exports.websiteFilterProp = (0, exports.filterProp)('Website', 'Filter by website.');
|
|
309
|
+
exports.countryCodeFilterProp = (0, exports.filterProp)('Country Code', 'Filter by ISO 3166‑1 alpha‑2 country code.');
|
|
310
|
+
exports.companySizeFilterProp = (0, exports.filterProp)('Company Size', 'Filter by company size.');
|
|
311
|
+
exports.sourceFilterProp = (0, exports.filterProp)('Source', 'Filter by source.');
|
|
312
|
+
exports.twitterFilterProp = (0, exports.filterProp)('Twitter Handle', 'Filter by Twitter handle.');
|
|
313
|
+
exports.linkedinUrlFilterProp = (0, exports.filterProp)('LinkedIn URL', 'Filter by LinkedIn URL.');
|
|
314
|
+
exports.phoneNumberFilterProp = (0, exports.filterProp)('Phone Number', 'Filter by phone number.');
|
|
315
|
+
exports.syncStatusProp = pieces_framework_1.Property.Dropdown({
|
|
316
|
+
displayName: 'Sync Status',
|
|
317
|
+
required: false,
|
|
318
|
+
description: 'Filter by synchronization status.',
|
|
319
|
+
options: () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
320
|
+
return ({
|
|
321
|
+
disabled: false,
|
|
322
|
+
options: [
|
|
323
|
+
{ label: 'Pending', value: 'pending' },
|
|
324
|
+
{ label: 'Error', value: 'error' },
|
|
325
|
+
{ label: 'Success', value: 'success' },
|
|
326
|
+
],
|
|
327
|
+
});
|
|
328
|
+
}),
|
|
329
|
+
refreshers: [],
|
|
330
|
+
});
|
|
331
|
+
const arrayStringProp = (name, description) => pieces_framework_1.Property.Array({
|
|
332
|
+
displayName: name,
|
|
333
|
+
required: false,
|
|
334
|
+
description,
|
|
335
|
+
defaultValue: [],
|
|
336
|
+
});
|
|
337
|
+
exports.arrayStringProp = arrayStringProp;
|
|
338
|
+
exports.sendingStatusProp = (0, exports.arrayStringProp)('Sending Status(es)', 'Filter by sending status(es): clicked, opened, sent, pending, error, bounced, unsubscribed, replied, or "~" (unset).');
|
|
339
|
+
exports.verificationStatusProp = (0, exports.arrayStringProp)('Verification Status(es)', 'Filter by verification status(es): accept_all, disposable, invalid, unknown, valid, webmail, or "pending".');
|
|
340
|
+
exports.dateFilterProp = (0, exports.filterProp)('Activity/Contact Date', 'Use "*" for any value or "~" for unset.');
|
|
341
|
+
exports.customAttributesFilterProp = pieces_framework_1.Property.Json({
|
|
342
|
+
displayName: 'Custom Attributes Filter',
|
|
343
|
+
required: false,
|
|
344
|
+
description: 'JSON object of slug→filterValue (use "*", "~", or substrings).',
|
|
345
|
+
});
|
|
346
|
+
exports.queryProp = pieces_framework_1.Property.ShortText({
|
|
347
|
+
displayName: 'Query',
|
|
348
|
+
required: false,
|
|
349
|
+
description: 'Search first_name, last_name or email containing this substring.',
|
|
350
|
+
});
|
|
351
|
+
exports.limitProp = pieces_framework_1.Property.Number({
|
|
352
|
+
displayName: 'Limit',
|
|
353
|
+
required: false,
|
|
354
|
+
description: 'Max leads to return (1-1000). Defaults to 20.',
|
|
355
|
+
});
|
|
356
|
+
exports.offsetProp = pieces_framework_1.Property.Number({
|
|
357
|
+
displayName: 'Offset',
|
|
358
|
+
required: false,
|
|
359
|
+
description: 'Number of leads to skip (0-100000). Defaults to 0.',
|
|
360
|
+
});
|
|
361
|
+
//# sourceMappingURL=props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/hunter/src/lib/common/props.ts"],"names":[],"mappings":";;;;;AAAA,kEAAuD;AACvD,4DAAsD;AACtD,mCAAwC;AAE3B,QAAA,cAAc,GAAG,2BAAQ,CAAC,QAAQ,CAAC;IAC9C,WAAW,EAAE,UAAU;IACvB,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,EAAE;IACd,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;;QACtB,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO;gBACL,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,oCAAoC;gBACjD,OAAO,EAAE,EAAE;aACZ,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,IAAA,qBAAa,EAAC;YAC/B,MAAM,EAAE,IAAc;YACtB,QAAQ,EAAE,YAAY;YACtB,MAAM,EAAE,0BAAU,CAAC,GAAG;SACvB,CAAC,CAAC;QACH,MAAM,SAAS,GAAG,MAAC,IAAY,CAAC,IAAI,0CAAE,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AC;AAEU,QAAA,UAAU,GAAG,2BAAQ,CAAC,MAAM,CAAC;IACxC,WAAW,EAAE,QAAQ;IACrB,QAAQ,EAAE,KAAK;IACf,WAAW,EAAE,oDAAoD;CAClE,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface Lead {
|
|
2
|
+
id: number;
|
|
3
|
+
email: string;
|
|
4
|
+
first_name?: string | null;
|
|
5
|
+
last_name?: string | null;
|
|
6
|
+
position?: string | null;
|
|
7
|
+
company?: string | null;
|
|
8
|
+
company_industry?: string | null;
|
|
9
|
+
company_size?: string | null;
|
|
10
|
+
confidence_score?: number | null;
|
|
11
|
+
website?: string | null;
|
|
12
|
+
country_code?: string | null;
|
|
13
|
+
source?: string | null;
|
|
14
|
+
linkedin_url?: string | null;
|
|
15
|
+
phone_number?: string | null;
|
|
16
|
+
twitter?: string | null;
|
|
17
|
+
sync_status?: string | null;
|
|
18
|
+
notes?: string | null;
|
|
19
|
+
sending_status?: string | null;
|
|
20
|
+
last_activity_at?: string | null;
|
|
21
|
+
last_contacted_at?: string | null;
|
|
22
|
+
verification?: {
|
|
23
|
+
date: string | null;
|
|
24
|
+
status: string | null;
|
|
25
|
+
};
|
|
26
|
+
leads_list?: {
|
|
27
|
+
id: number;
|
|
28
|
+
name: string;
|
|
29
|
+
leads_count: number;
|
|
30
|
+
};
|
|
31
|
+
created_at: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/hunter/src/lib/common/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@taskmagic/pieces-framework';
|
|
2
|
+
export declare const newLeadTrigger: import("@taskmagic/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@taskmagic/pieces-framework").SecretTextProperty<true>, {}> | import("@taskmagic/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@taskmagic/pieces-framework").SecretTextProperty<true>, {}> | import("@taskmagic/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@taskmagic/pieces-framework").SecretTextProperty<true>, {}>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newLeadTrigger = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const auth_1 = require("../auth");
|
|
6
|
+
const pieces_framework_1 = require("@taskmagic/pieces-framework");
|
|
7
|
+
const pieces_common_1 = require("@taskmagic/pieces-common");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
const polling = {
|
|
10
|
+
strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
|
|
11
|
+
items(_a) {
|
|
12
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth }) {
|
|
13
|
+
var _b;
|
|
14
|
+
const response = yield (0, common_1.hunterApiCall)({
|
|
15
|
+
apiKey: auth,
|
|
16
|
+
endpoint: '/leads',
|
|
17
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
18
|
+
qparams: { limit: '100' },
|
|
19
|
+
});
|
|
20
|
+
const leads = (_b = response.data) === null || _b === void 0 ? void 0 : _b.leads;
|
|
21
|
+
return leads.map((lead) => ({
|
|
22
|
+
epochMilliSeconds: new Date(lead.created_at).valueOf(),
|
|
23
|
+
data: lead,
|
|
24
|
+
}));
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
exports.newLeadTrigger = (0, pieces_framework_1.createTrigger)({
|
|
29
|
+
auth: auth_1.hunterAuth,
|
|
30
|
+
name: 'new-lead',
|
|
31
|
+
displayName: 'New Lead',
|
|
32
|
+
description: 'Fires when a new lead is created.',
|
|
33
|
+
type: pieces_framework_1.TriggerStrategy.POLLING,
|
|
34
|
+
props: {},
|
|
35
|
+
onEnable(context) {
|
|
36
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
yield pieces_common_1.pollingHelper.onEnable(polling, {
|
|
38
|
+
auth: context.auth,
|
|
39
|
+
store: context.store,
|
|
40
|
+
propsValue: context.propsValue,
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
onDisable(context) {
|
|
45
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
yield pieces_common_1.pollingHelper.onDisable(polling, {
|
|
47
|
+
auth: context.auth,
|
|
48
|
+
store: context.store,
|
|
49
|
+
propsValue: context.propsValue,
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
test(context) {
|
|
54
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
return yield pieces_common_1.pollingHelper.test(polling, {
|
|
56
|
+
auth: context.auth,
|
|
57
|
+
store: context.store,
|
|
58
|
+
propsValue: context.propsValue,
|
|
59
|
+
files: context.files,
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
run(context) {
|
|
64
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
return yield pieces_common_1.pollingHelper.poll(polling, {
|
|
66
|
+
auth: context.auth,
|
|
67
|
+
store: context.store,
|
|
68
|
+
propsValue: context.propsValue,
|
|
69
|
+
files: context.files,
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
sampleData: {
|
|
74
|
+
id: 123,
|
|
75
|
+
email: 'john.doe@example.com',
|
|
76
|
+
first_name: 'John',
|
|
77
|
+
last_name: 'Doe',
|
|
78
|
+
company: 'Example Inc.',
|
|
79
|
+
position: 'CEO',
|
|
80
|
+
created_at: '2025-07-24T12:00:00Z',
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
//# sourceMappingURL=new-lead.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-lead.js","sourceRoot":"","sources":["../../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