-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
322 lines (294 loc) · 7.08 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
declare module "tomba" {
export class Client {
/**
* Set endpoint.
*
* @param {string} endpoint
*
* @return {this}
*/
setEndpoint(endpoint: string): Client;
/**
* Set self signed.
*
* @param {bool} status
*
* @return {this}
*/
setSelfSigned(status?: boolean): Client;
/**
* Set Key
*
* Your Key
*
* @param {string} value
*
* @returns {this}
*/
setKey(key: string): Client;
/**
* Set Secret
*
* Your Secret
*
* @param {string} value
*
* @returns {this}
*/
setSecret(secret: string): Client;
}
export class TombaException extends Error {
public code: number | null;
public response: string | null;
constructor(message: string, code?: number, response?: string);
}
export class Service {
public client: Client;
constructor(client: Client);
}
export class Account extends Service {
/**
* Get Account
*
* Returns information about the current account.
*
* @throws {TombaException}
* @returns {Promise}
*/
getAccount<T extends unknown>(): Promise<T>;
}
export class Domain extends Service {
/**
* Domain Search
*
* You can use this endpoint to show different browser icons to your users.
* The code argument receives the browser code as it appears in your user
* /account/sessions endpoint. Use width, height and quality arguments to
* change the output settings.
*
* @param {string} domain
* @param {number} page
* @param {number} limit
* @param {string} department
* @throws {TombaException}
* @returns {Promise}
*/
domainSearch<T extends unknown>(domain: string, page?: number, limit?: number, department?: string): Promise<T>;
}
export class Finder extends Service {
/**
* Email Finder
*
* generates or retrieves the most likely email address from a domain name, a
* first name and a last name.
*
* @param {string} domain
* @param {string} firstName
* @param {string} lastName
* @throws {TombaException}
* @returns {Promise}
*/
emailFinder<T extends unknown>(domain: string, firstName: string, lastName: string): Promise<T>;
}
export class Verifier extends Service {
/**
* Email Verifier
*
* verify the deliverability of an email address.
*
* @param {string} email
* @throws {TombaException}
* @returns {Promise}
*/
emailVerifier<T extends unknown>(email: string): Promise<T>;
}
export class Sources extends Service {
/**
* Email Sources
*
* Find email address source somewhere on the web.
*
* @param {string} email
* @throws {TombaException}
* @returns {Promise}
*/
emailSources<T extends unknown>(email: string): Promise<T>;
}
export class Status extends Service {
/**
* Domain status
*
* Returns domain status if is webmail or disposable.
*
* @param {string} domain
* @throws {TombaException}
* @returns {Promise}
*/
domainStatus<T extends unknown>(domain: string): Promise<T>;
/**
* get Company Autocomplete
*
* Company Autocomplete is an API that lets you auto-complete company names
* and retrieve logo and domain information.
*
* @param {string} query
* @throws {TombaException}
* @returns {Promise}
*/
autoComplete<T extends unknown>(query: string): Promise<T>;
}
export class Count extends Service {
/**
* get Email Count
*
* Domain name from which you want to find the email addresses.
*
* @param {string} domain
* @throws {TombaException}
* @returns {Promise}
*/
emailCount<T extends unknown>(domain: string): Promise<T>;
}
export class Usage extends Service {
/**
* get Usage
*
* Returns a your monthly requests
*
* @throws {TombaException}
* @returns {Promise}
*/
getUsage<T extends unknown>(): Promise<T>;
}
export class Logs extends Service {
/**
* get Logs
*
* Returns a your last 1,000 requests you made during the last 3 months.
*
* @throws {TombaException}
* @returns {Promise}
*/
getLogs<T extends unknown>(): Promise<T>;
}
export class Keys extends Service {
/**
* Get your keys.
*
* Returns a list of your keys.
*
* @throws {TombaException}
* @returns {Promise}
*/
getKeys<T extends unknown>(): Promise<T>;
/**
* Delete key
*
* Delete key
*
* @param {string} id
* @throws {TombaException}
* @returns {Promise}
*/
deleteKey<T extends unknown>(id: string): Promise<T>;
/**
* Create Key
*
* Create a new Key.
*
* @throws {TombaException}
* @returns {Promise}
*/
createKey<T extends unknown>(): Promise<T>;
/**
* Reset a key
*
* Rest your key.
*
* @param {string} id
* @throws {TombaException}
* @returns {Promise}
*/
resetKey<T extends unknown>(id: string): Promise<T>;
}
export class LeadsLists extends Service {
/**
* Get Leads Lists
*
* Returns a list of leads lists..
*
* @throws {TombaException}
* @returns {Promise}
*/
getLists<T extends unknown>(): Promise<T>;
/**
* Delete List ID
*
* Delete a specific list by passing id.
*
* @param {string} id
* @throws {TombaException}
* @returns {Promise}
*/
deleteListId<T extends unknown>(id: string): Promise<T>;
/**
* Create new List
*
* Create a new leads list with the name request parameter
*
* @throws {TombaException}
* @returns {Promise}
*/
createList<T extends unknown>(): Promise<T>;
/**
* Update List ID
*
* Update the fields of a list using id.
*
* @param {string} id
* @throws {TombaException}
* @returns {Promise}
*/
updateListId<T extends unknown>(id: string): Promise<T>;
}
export class LeadsAttributes extends Service {
/**
* Get Lead Attributes
*
* Returns a list of Lead Attributes.
*
* @throws {TombaException}
* @returns {Promise}
*/
getLeadAttributes<T extends unknown>(): Promise<T>;
/**
* Delete Lead Attribute
*
* Delete a specific Attributes by passing id.
*
* @param {string} id
* @throws {TombaException}
* @returns {Promise}
*/
deleteLeadAttribute<T extends unknown>(id: string): Promise<T>;
/**
* Create Lead Attribute
*
* Create a new Attributes with the name and type request parameter.
*
* @throws {TombaException}
* @returns {Promise}
*/
createLeadAttribute<T extends unknown>(): Promise<T>;
/**
* Update Lead Attribute
*
* Update the fields of a Attributes using id.
*
* @param {string} id
* @throws {TombaException}
* @returns {Promise}
*/
updateLeadAttribute<T extends unknown>(id: string): Promise<T>;
}
}