@bubblelab/bubble-core 0.1.36 → 0.1.38
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/bubble-bundle.d.ts +179 -101
- package/dist/bubble-factory.d.ts.map +1 -1
- package/dist/bubble-factory.js +8 -0
- package/dist/bubble-factory.js.map +1 -1
- package/dist/bubbles/service-bubble/agi-inc.d.ts +66 -66
- package/dist/bubbles/service-bubble/airtable.d.ts +178 -178
- package/dist/bubbles/service-bubble/apify/apify.d.ts +12 -12
- package/dist/bubbles/service-bubble/ashby/ashby.d.ts +1363 -0
- package/dist/bubbles/service-bubble/ashby/ashby.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/ashby/ashby.js +399 -0
- package/dist/bubbles/service-bubble/ashby/ashby.js.map +1 -0
- package/dist/bubbles/service-bubble/ashby/ashby.schema.d.ts +1789 -0
- package/dist/bubbles/service-bubble/ashby/ashby.schema.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/ashby/ashby.schema.js +445 -0
- package/dist/bubbles/service-bubble/ashby/ashby.schema.js.map +1 -0
- package/dist/bubbles/service-bubble/ashby/index.d.ts +3 -0
- package/dist/bubbles/service-bubble/ashby/index.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/ashby/index.js +3 -0
- package/dist/bubbles/service-bubble/ashby/index.js.map +1 -0
- package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts +22 -22
- package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts +51 -51
- package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts +1421 -27
- package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/crustdata/crustdata.js +139 -0
- package/dist/bubbles/service-bubble/crustdata/crustdata.js.map +1 -1
- package/dist/bubbles/service-bubble/crustdata/crustdata.schema.d.ts +4211 -1857
- package/dist/bubbles/service-bubble/crustdata/crustdata.schema.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/crustdata/crustdata.schema.js +198 -0
- package/dist/bubbles/service-bubble/crustdata/crustdata.schema.js.map +1 -1
- package/dist/bubbles/service-bubble/crustdata/index.d.ts +1 -1
- package/dist/bubbles/service-bubble/crustdata/index.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/crustdata/index.js +3 -1
- package/dist/bubbles/service-bubble/crustdata/index.js.map +1 -1
- package/dist/bubbles/service-bubble/eleven-labs.d.ts +28 -28
- package/dist/bubbles/service-bubble/firecrawl.d.ts +192 -192
- package/dist/bubbles/service-bubble/followupboss.d.ts +401 -401
- package/dist/bubbles/service-bubble/fullenrich/fullenrich.d.ts +1269 -0
- package/dist/bubbles/service-bubble/fullenrich/fullenrich.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/fullenrich/fullenrich.js +299 -0
- package/dist/bubbles/service-bubble/fullenrich/fullenrich.js.map +1 -0
- package/dist/bubbles/service-bubble/fullenrich/fullenrich.schema.d.ts +2089 -0
- package/dist/bubbles/service-bubble/fullenrich/fullenrich.schema.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/fullenrich/fullenrich.schema.js +390 -0
- package/dist/bubbles/service-bubble/fullenrich/fullenrich.schema.js.map +1 -0
- package/dist/bubbles/service-bubble/fullenrich/index.d.ts +4 -0
- package/dist/bubbles/service-bubble/fullenrich/index.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/fullenrich/index.js +3 -0
- package/dist/bubbles/service-bubble/fullenrich/index.js.map +1 -0
- package/dist/bubbles/service-bubble/github.d.ts +164 -164
- package/dist/bubbles/service-bubble/gmail.d.ts +473 -473
- package/dist/bubbles/service-bubble/google-calendar.d.ts +212 -212
- package/dist/bubbles/service-bubble/google-drive.d.ts +96 -96
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.d.ts +38 -38
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.d.ts +54 -54
- package/dist/bubbles/service-bubble/http.d.ts +12 -12
- package/dist/bubbles/service-bubble/insforge-db.d.ts +6 -6
- package/dist/bubbles/service-bubble/jira/jira.d.ts +105 -105
- package/dist/bubbles/service-bubble/jira/jira.schema.d.ts +84 -84
- package/dist/bubbles/service-bubble/notion/notion.d.ts +184 -184
- package/dist/bubbles/service-bubble/postgresql.d.ts +6 -6
- package/dist/bubbles/service-bubble/resend.d.ts +12 -12
- package/dist/bubbles/service-bubble/slack/slack.d.ts +394 -394
- package/dist/bubbles/service-bubble/storage.d.ts +52 -52
- package/dist/bubbles/service-bubble/telegram.d.ts +514 -514
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts +12 -12
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts +35 -35
- package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts +144 -144
- package/dist/bubbles/tool-bubble/google-maps-tool.d.ts +24 -24
- package/dist/bubbles/tool-bubble/instagram-tool.d.ts +8 -8
- package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +306 -306
- package/dist/bubbles/tool-bubble/list-bubbles-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/people-search-tool.d.ts +422 -216
- package/dist/bubbles/tool-bubble/people-search-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/people-search-tool.js +201 -2
- package/dist/bubbles/tool-bubble/people-search-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts +20 -20
- package/dist/bubbles/tool-bubble/research-agent-tool.d.ts.map +1 -1
- package/dist/bubbles/tool-bubble/research-agent-tool.js +3 -4
- package/dist/bubbles/tool-bubble/research-agent-tool.js.map +1 -1
- package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +48 -48
- package/dist/bubbles/tool-bubble/twitter-tool.d.ts +92 -92
- package/dist/bubbles/tool-bubble/web-search-tool.d.ts +8 -8
- package/dist/bubbles/tool-bubble/youtube-tool.d.ts +24 -24
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +60 -60
- package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +4 -4
- package/dist/bubbles.json +4768 -1722
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullenrich.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/fullenrich/fullenrich.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EAOtB,MAAM,wBAAwB,CAAC;AAUhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,gBAAgB,CAC3B,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,CACvD,SAAQ,aAAa,CACrB,CAAC,EACD,OAAO,CAAC,gBAAgB,EAAE;IAAE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAA;CAAE,CAAC,CACzD;IACC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAG,SAAS,CAAU;IAC1C,MAAM,CAAC,QAAQ,CAAC,OAAO,gBAAgB;IACvC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAG,QAAQ,CAAU;IAC7C,MAAM,CAAC,QAAQ,CAAC,UAAU,gBAAgB;IAC1C,MAAM,CAAC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAA0B;IACtD,MAAM,CAAC,QAAQ,CAAC,gBAAgB,kEACiC;IACjE,MAAM,CAAC,QAAQ,CAAC,eAAe,wgCA2B7B;IACF,MAAM,CAAC,QAAQ,CAAC,KAAK,YAAY;IAEjC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAuC;gBAGrE,MAAM,GAAE,CAEF,EACN,OAAO,CAAC,EAAE,aAAa,EACvB,UAAU,CAAC,EAAE,MAAM;IAKrB;;OAEG;IACU,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IAuB/C;;OAEG;YACW,cAAc;IA6C5B;;OAEG;cACa,aAAa,CAC3B,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,OAAO,CAAC,gBAAgB,EAAE;QAAE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAA;KAAE,CAAC,CAAC;IAiDpE;;OAEG;YACW,mBAAmB;IAyCjC;;OAEG;YACW,mBAAmB;IA6CjC;;OAEG;YACW,uBAAuB;IAiCrC;;OAEG;YACW,qBAAqB;IAqCnC;;OAEG;YACW,gBAAgB;IAgB9B;;OAEG;YACW,WAAW;IAgBzB;;OAEG;IACH,SAAS,CAAC,gBAAgB,IAAI,MAAM,GAAG,SAAS;CAWjD"}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { ServiceBubble } from '../../../types/service-bubble-class.js';
|
|
2
|
+
import { CredentialType } from '@bubblelab/shared-schemas';
|
|
3
|
+
import { FullEnrichParamsSchema, FullEnrichResultSchema, } from './fullenrich.schema.js';
|
|
4
|
+
/**
|
|
5
|
+
* FullEnrich Service Bubble
|
|
6
|
+
*
|
|
7
|
+
* B2B contact enrichment service for finding work emails, mobile phones,
|
|
8
|
+
* and personal emails from contact information or LinkedIn profiles.
|
|
9
|
+
*
|
|
10
|
+
* Features:
|
|
11
|
+
* - Bulk enrichment for up to 100 contacts at once
|
|
12
|
+
* - Reverse email lookup to find contact info from email addresses
|
|
13
|
+
* - LinkedIn profile enrichment for enhanced data
|
|
14
|
+
* - Webhook support for real-time result delivery
|
|
15
|
+
* - Credit-based pricing with balance tracking
|
|
16
|
+
*
|
|
17
|
+
* Use cases:
|
|
18
|
+
* - Enrich leads with work emails and phone numbers
|
|
19
|
+
* - Build sales prospecting pipelines
|
|
20
|
+
* - Verify and update CRM contact data
|
|
21
|
+
* - Find decision makers from LinkedIn profiles
|
|
22
|
+
*
|
|
23
|
+
* Credit Costs:
|
|
24
|
+
* - Work email: 1 credit
|
|
25
|
+
* - Personal email: 3 credits
|
|
26
|
+
* - Mobile phone: 10 credits
|
|
27
|
+
* - Reverse email lookup: 1 credit per match
|
|
28
|
+
*
|
|
29
|
+
* Security Features:
|
|
30
|
+
* - API key authentication (Bearer token)
|
|
31
|
+
* - Workspace-based access control
|
|
32
|
+
* - Rate limiting protection
|
|
33
|
+
*/
|
|
34
|
+
export class FullEnrichBubble extends ServiceBubble {
|
|
35
|
+
static type = 'service';
|
|
36
|
+
static service = 'fullenrich';
|
|
37
|
+
static authType = 'apikey';
|
|
38
|
+
static bubbleName = 'fullenrich';
|
|
39
|
+
static schema = FullEnrichParamsSchema;
|
|
40
|
+
static resultSchema = FullEnrichResultSchema;
|
|
41
|
+
static shortDescription = 'B2B contact enrichment for emails, phones, and LinkedIn data';
|
|
42
|
+
static longDescription = `
|
|
43
|
+
FullEnrich B2B contact enrichment service for finding work emails,
|
|
44
|
+
mobile phones, and personal emails from contact information or LinkedIn profiles.
|
|
45
|
+
|
|
46
|
+
Features:
|
|
47
|
+
- Bulk enrichment for up to 100 contacts at once
|
|
48
|
+
- Reverse email lookup to find contact info from email addresses
|
|
49
|
+
- LinkedIn profile enrichment for enhanced data (+5-20% better email rates, +10-60% better phone rates)
|
|
50
|
+
- Webhook support for real-time result delivery
|
|
51
|
+
- Credit-based pricing with balance tracking
|
|
52
|
+
|
|
53
|
+
Use cases:
|
|
54
|
+
- Enrich leads with work emails and phone numbers
|
|
55
|
+
- Build sales prospecting pipelines
|
|
56
|
+
- Verify and update CRM contact data
|
|
57
|
+
- Find decision makers from LinkedIn profiles
|
|
58
|
+
|
|
59
|
+
Credit Costs:
|
|
60
|
+
- Work email: 1 credit
|
|
61
|
+
- Personal email: 3 credits
|
|
62
|
+
- Mobile phone: 10 credits
|
|
63
|
+
- Reverse email lookup: 1 credit per match
|
|
64
|
+
|
|
65
|
+
Security Features:
|
|
66
|
+
- API key authentication (Bearer token)
|
|
67
|
+
- Workspace-based access control
|
|
68
|
+
- Rate limiting protection
|
|
69
|
+
`;
|
|
70
|
+
static alias = 'enrich';
|
|
71
|
+
static BASE_URL = 'https://app.fullenrich.com/api/v1';
|
|
72
|
+
constructor(params = {
|
|
73
|
+
operation: 'get_credit_balance',
|
|
74
|
+
}, context, instanceId) {
|
|
75
|
+
super(params, context, instanceId);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Test if the API key is valid
|
|
79
|
+
*/
|
|
80
|
+
async testCredential() {
|
|
81
|
+
const credential = this.chooseCredential();
|
|
82
|
+
if (!credential) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
try {
|
|
86
|
+
const response = await fetch(`${FullEnrichBubble.BASE_URL}/account/keys/verify`, {
|
|
87
|
+
method: 'GET',
|
|
88
|
+
headers: {
|
|
89
|
+
Authorization: `Bearer ${credential}`,
|
|
90
|
+
'Content-Type': 'application/json',
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
return response.ok;
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Make an API request to FullEnrich
|
|
101
|
+
*/
|
|
102
|
+
async makeApiRequest(endpoint, method = 'GET', body) {
|
|
103
|
+
const credential = this.chooseCredential();
|
|
104
|
+
if (!credential) {
|
|
105
|
+
throw new Error('FullEnrich API key is required');
|
|
106
|
+
}
|
|
107
|
+
const url = `${FullEnrichBubble.BASE_URL}${endpoint}`;
|
|
108
|
+
const headers = {
|
|
109
|
+
Authorization: `Bearer ${credential}`,
|
|
110
|
+
'Content-Type': 'application/json',
|
|
111
|
+
};
|
|
112
|
+
const requestInit = {
|
|
113
|
+
method,
|
|
114
|
+
headers,
|
|
115
|
+
};
|
|
116
|
+
if (body && method !== 'GET') {
|
|
117
|
+
requestInit.body = JSON.stringify(body);
|
|
118
|
+
}
|
|
119
|
+
const response = await fetch(url, requestInit);
|
|
120
|
+
if (!response.ok) {
|
|
121
|
+
let errorMessage = `FullEnrich API error: ${response.status} ${response.statusText}`;
|
|
122
|
+
try {
|
|
123
|
+
const errorData = (await response.json());
|
|
124
|
+
if (errorData.message) {
|
|
125
|
+
errorMessage = `FullEnrich API error: ${errorData.message} (${errorData.code})`;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
// If we can't parse the error response, use the default message
|
|
130
|
+
}
|
|
131
|
+
throw new Error(errorMessage);
|
|
132
|
+
}
|
|
133
|
+
return (await response.json());
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Main action handler - routes to appropriate operation
|
|
137
|
+
*/
|
|
138
|
+
async performAction(context) {
|
|
139
|
+
void context;
|
|
140
|
+
const { operation } = this.params;
|
|
141
|
+
try {
|
|
142
|
+
const result = await (async () => {
|
|
143
|
+
// Cast to output type since base class already parsed input through Zod
|
|
144
|
+
const parsedParams = this.params;
|
|
145
|
+
switch (operation) {
|
|
146
|
+
case 'start_bulk_enrichment':
|
|
147
|
+
return await this.startBulkEnrichment(parsedParams);
|
|
148
|
+
case 'get_enrichment_result':
|
|
149
|
+
return await this.getEnrichmentResult(parsedParams);
|
|
150
|
+
case 'start_reverse_email_lookup':
|
|
151
|
+
return await this.startReverseEmailLookup(parsedParams);
|
|
152
|
+
case 'get_reverse_email_result':
|
|
153
|
+
return await this.getReverseEmailResult(parsedParams);
|
|
154
|
+
case 'get_credit_balance':
|
|
155
|
+
return await this.getCreditBalance(parsedParams);
|
|
156
|
+
case 'check_api_key':
|
|
157
|
+
return await this.checkApiKey(parsedParams);
|
|
158
|
+
default:
|
|
159
|
+
throw new Error(`Unsupported operation: ${operation}`);
|
|
160
|
+
}
|
|
161
|
+
})();
|
|
162
|
+
return result;
|
|
163
|
+
}
|
|
164
|
+
catch (error) {
|
|
165
|
+
return {
|
|
166
|
+
operation,
|
|
167
|
+
success: false,
|
|
168
|
+
error: error instanceof Error ? error.message : 'Unknown error occurred',
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Start bulk enrichment for contacts
|
|
174
|
+
*/
|
|
175
|
+
async startBulkEnrichment(params) {
|
|
176
|
+
const { name, webhook_url, contacts } = params;
|
|
177
|
+
// Transform contacts to API format
|
|
178
|
+
const datas = contacts.map((contact) => ({
|
|
179
|
+
firstname: contact.firstname,
|
|
180
|
+
lastname: contact.lastname,
|
|
181
|
+
domain: contact.domain,
|
|
182
|
+
company_name: contact.company_name,
|
|
183
|
+
linkedin_url: contact.linkedin_url,
|
|
184
|
+
enrich_fields: contact.enrich_fields,
|
|
185
|
+
custom: contact.custom,
|
|
186
|
+
}));
|
|
187
|
+
const body = {
|
|
188
|
+
name,
|
|
189
|
+
datas,
|
|
190
|
+
};
|
|
191
|
+
if (webhook_url) {
|
|
192
|
+
body.webhook_url = webhook_url;
|
|
193
|
+
}
|
|
194
|
+
const response = await this.makeApiRequest('/contact/enrich/bulk', 'POST', body);
|
|
195
|
+
return {
|
|
196
|
+
operation: 'start_bulk_enrichment',
|
|
197
|
+
success: true,
|
|
198
|
+
enrichment_id: response.enrichment_id,
|
|
199
|
+
error: '',
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Get enrichment result by ID
|
|
204
|
+
*/
|
|
205
|
+
async getEnrichmentResult(params) {
|
|
206
|
+
const { enrichment_id, force_results } = params;
|
|
207
|
+
const queryParams = new URLSearchParams();
|
|
208
|
+
if (force_results) {
|
|
209
|
+
queryParams.set('forceResults', 'true');
|
|
210
|
+
}
|
|
211
|
+
const queryString = queryParams.toString();
|
|
212
|
+
const endpoint = `/contact/enrich/bulk/${enrichment_id}${queryString ? `?${queryString}` : ''}`;
|
|
213
|
+
const response = await this.makeApiRequest(endpoint, 'GET');
|
|
214
|
+
return {
|
|
215
|
+
operation: 'get_enrichment_result',
|
|
216
|
+
success: true,
|
|
217
|
+
id: response.id,
|
|
218
|
+
name: response.name,
|
|
219
|
+
status: response.status,
|
|
220
|
+
results: response.datas,
|
|
221
|
+
cost: response.cost,
|
|
222
|
+
error: '',
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Start reverse email lookup
|
|
227
|
+
*/
|
|
228
|
+
async startReverseEmailLookup(params) {
|
|
229
|
+
const { name, webhook_url, emails } = params;
|
|
230
|
+
// Transform emails to API format
|
|
231
|
+
const data = emails.map((email) => ({ email }));
|
|
232
|
+
const body = {
|
|
233
|
+
name,
|
|
234
|
+
data,
|
|
235
|
+
};
|
|
236
|
+
if (webhook_url) {
|
|
237
|
+
body.webhook_url = webhook_url;
|
|
238
|
+
}
|
|
239
|
+
const response = await this.makeApiRequest('/contact/reverse/email/bulk', 'POST', body);
|
|
240
|
+
return {
|
|
241
|
+
operation: 'start_reverse_email_lookup',
|
|
242
|
+
success: true,
|
|
243
|
+
enrichment_id: response.enrichment_id,
|
|
244
|
+
error: '',
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Get reverse email lookup result
|
|
249
|
+
*/
|
|
250
|
+
async getReverseEmailResult(params) {
|
|
251
|
+
const { reverse_email_id } = params;
|
|
252
|
+
const response = await this.makeApiRequest(`/contact/reverse/email/bulk/${reverse_email_id}`, 'GET');
|
|
253
|
+
return {
|
|
254
|
+
operation: 'get_reverse_email_result',
|
|
255
|
+
success: true,
|
|
256
|
+
id: response.id,
|
|
257
|
+
name: response.name,
|
|
258
|
+
status: response.status,
|
|
259
|
+
results: response.datas,
|
|
260
|
+
cost: response.cost,
|
|
261
|
+
error: '',
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Get current credit balance
|
|
266
|
+
*/
|
|
267
|
+
async getCreditBalance(_params) {
|
|
268
|
+
const response = await this.makeApiRequest('/account/credits', 'GET');
|
|
269
|
+
return {
|
|
270
|
+
operation: 'get_credit_balance',
|
|
271
|
+
success: true,
|
|
272
|
+
balance: response.balance,
|
|
273
|
+
error: '',
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Check if API key is valid
|
|
278
|
+
*/
|
|
279
|
+
async checkApiKey(_params) {
|
|
280
|
+
const response = await this.makeApiRequest('/account/keys/verify', 'GET');
|
|
281
|
+
return {
|
|
282
|
+
operation: 'check_api_key',
|
|
283
|
+
success: true,
|
|
284
|
+
workspace_id: response.workspace_id,
|
|
285
|
+
error: '',
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Choose the appropriate credential for FullEnrich
|
|
290
|
+
*/
|
|
291
|
+
chooseCredential() {
|
|
292
|
+
const { credentials } = this.params;
|
|
293
|
+
if (!credentials || typeof credentials !== 'object') {
|
|
294
|
+
return undefined;
|
|
295
|
+
}
|
|
296
|
+
return credentials[CredentialType.FULLENRICH_API_KEY];
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
//# sourceMappingURL=fullenrich.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullenrich.js","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/fullenrich/fullenrich.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,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