@dealcrawl/sdk 2.1.1 → 2.1.3

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.
Files changed (84) hide show
  1. package/dist/index.d.mts +2335 -0
  2. package/dist/index.d.ts +2314 -37
  3. package/dist/index.js +2280 -64
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +2260 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +14 -7
  8. package/dist/client.d.ts +0 -285
  9. package/dist/client.d.ts.map +0 -1
  10. package/dist/client.js +0 -336
  11. package/dist/client.js.map +0 -1
  12. package/dist/error.d.ts +0 -55
  13. package/dist/error.d.ts.map +0 -1
  14. package/dist/error.js +0 -128
  15. package/dist/error.js.map +0 -1
  16. package/dist/index.d.ts.map +0 -1
  17. package/dist/resources/account.d.ts +0 -143
  18. package/dist/resources/account.d.ts.map +0 -1
  19. package/dist/resources/account.js +0 -186
  20. package/dist/resources/account.js.map +0 -1
  21. package/dist/resources/crawl.d.ts +0 -101
  22. package/dist/resources/crawl.d.ts.map +0 -1
  23. package/dist/resources/crawl.js +0 -234
  24. package/dist/resources/crawl.js.map +0 -1
  25. package/dist/resources/data.d.ts +0 -157
  26. package/dist/resources/data.d.ts.map +0 -1
  27. package/dist/resources/data.js +0 -245
  28. package/dist/resources/data.js.map +0 -1
  29. package/dist/resources/dork.d.ts +0 -104
  30. package/dist/resources/dork.d.ts.map +0 -1
  31. package/dist/resources/dork.js +0 -163
  32. package/dist/resources/dork.js.map +0 -1
  33. package/dist/resources/extract.d.ts +0 -105
  34. package/dist/resources/extract.d.ts.map +0 -1
  35. package/dist/resources/extract.js +0 -246
  36. package/dist/resources/extract.js.map +0 -1
  37. package/dist/resources/index.d.ts +0 -14
  38. package/dist/resources/index.d.ts.map +0 -1
  39. package/dist/resources/index.js +0 -14
  40. package/dist/resources/index.js.map +0 -1
  41. package/dist/resources/keys.d.ts +0 -124
  42. package/dist/resources/keys.d.ts.map +0 -1
  43. package/dist/resources/keys.js +0 -168
  44. package/dist/resources/keys.js.map +0 -1
  45. package/dist/resources/scrape.d.ts +0 -53
  46. package/dist/resources/scrape.d.ts.map +0 -1
  47. package/dist/resources/scrape.js +0 -85
  48. package/dist/resources/scrape.js.map +0 -1
  49. package/dist/resources/status.d.ts +0 -100
  50. package/dist/resources/status.d.ts.map +0 -1
  51. package/dist/resources/status.js +0 -133
  52. package/dist/resources/status.js.map +0 -1
  53. package/dist/resources/webhooks.d.ts +0 -126
  54. package/dist/resources/webhooks.d.ts.map +0 -1
  55. package/dist/resources/webhooks.js +0 -167
  56. package/dist/resources/webhooks.js.map +0 -1
  57. package/dist/types/config.d.ts +0 -45
  58. package/dist/types/config.d.ts.map +0 -1
  59. package/dist/types/config.js +0 -10
  60. package/dist/types/config.js.map +0 -1
  61. package/dist/types/index.d.ts +0 -8
  62. package/dist/types/index.d.ts.map +0 -1
  63. package/dist/types/index.js +0 -8
  64. package/dist/types/index.js.map +0 -1
  65. package/dist/types/options.d.ts +0 -328
  66. package/dist/types/options.d.ts.map +0 -1
  67. package/dist/types/options.js +0 -6
  68. package/dist/types/options.js.map +0 -1
  69. package/dist/types/responses.d.ts +0 -422
  70. package/dist/types/responses.d.ts.map +0 -1
  71. package/dist/types/responses.js +0 -6
  72. package/dist/types/responses.js.map +0 -1
  73. package/dist/types/shared.d.ts +0 -234
  74. package/dist/types/shared.d.ts.map +0 -1
  75. package/dist/types/shared.js +0 -37
  76. package/dist/types/shared.js.map +0 -1
  77. package/dist/utils/polling.d.ts +0 -57
  78. package/dist/utils/polling.d.ts.map +0 -1
  79. package/dist/utils/polling.js +0 -110
  80. package/dist/utils/polling.js.map +0 -1
  81. package/dist/utils/request.d.ts +0 -47
  82. package/dist/utils/request.d.ts.map +0 -1
  83. package/dist/utils/request.js +0 -192
  84. package/dist/utils/request.js.map +0 -1
package/dist/client.js DELETED
@@ -1,336 +0,0 @@
1
- /**
2
- * DealCrawl SDK Client
3
- * Main entry point for the SDK
4
- *
5
- * @example
6
- * ```ts
7
- * import { DealCrawl } from "@dealcrawl/sdk";
8
- *
9
- * const client = new DealCrawl({ apiKey: "sk_xxx" });
10
- *
11
- * // Scrape a page
12
- * const job = await client.scrape.create({
13
- * url: "https://example.com/product",
14
- * extractDeal: true
15
- * });
16
- *
17
- * // Wait for result
18
- * const result = await client.waitForResult(job.jobId);
19
- * console.log(result);
20
- * ```
21
- */
22
- import { DEFAULT_CONFIG } from "./types/config";
23
- import { waitForAll, waitForAny, waitForResult } from "./utils/polling";
24
- // Import resources
25
- import { AccountResource } from "./resources/account";
26
- import { CrawlResource } from "./resources/crawl";
27
- import { DataResource } from "./resources/data";
28
- import { DorkResource } from "./resources/dork";
29
- import { ExtractResource } from "./resources/extract";
30
- import { KeysResource } from "./resources/keys";
31
- import { ScrapeResource } from "./resources/scrape";
32
- import { StatusResource } from "./resources/status";
33
- import { WebhooksResource } from "./resources/webhooks";
34
- /**
35
- * DealCrawl SDK Client
36
- *
37
- * Provides access to all DealCrawl API endpoints through
38
- * organized resource classes following a Stripe-like pattern.
39
- *
40
- * @example
41
- * ```ts
42
- * const client = new DealCrawl({ apiKey: "sk_xxx" });
43
- *
44
- * // Core operations
45
- * await client.scrape.create({ url: "..." });
46
- * await client.crawl.create({ url: "...", maxPages: 100 });
47
- * await client.extract.create({ url: "...", schema: {...} });
48
- * await client.dork.create({ query: "..." });
49
- *
50
- * // Status & polling
51
- * await client.status.get(jobId);
52
- * await client.waitForResult(jobId);
53
- *
54
- * // Data access
55
- * await client.data.listJobs();
56
- * await client.data.listDeals();
57
- *
58
- * // Management
59
- * await client.webhooks.create({...});
60
- * await client.keys.create({...});
61
- * await client.account.get();
62
- * ```
63
- */
64
- export class DealCrawl {
65
- /** Internal request context */
66
- ctx;
67
- // ============================================
68
- // RESOURCES
69
- // ============================================
70
- /**
71
- * Scrape resource - Single page scraping
72
- *
73
- * @example
74
- * ```ts
75
- * const job = await client.scrape.create({
76
- * url: "https://example.com",
77
- * extractDeal: true
78
- * });
79
- * ```
80
- */
81
- scrape;
82
- /**
83
- * Crawl resource - Website crawling
84
- *
85
- * @example
86
- * ```ts
87
- * const job = await client.crawl.create({
88
- * url: "https://shop.example.com",
89
- * maxPages: 100
90
- * });
91
- *
92
- * // With template
93
- * const job = await client.crawl.withTemplate("ecommerce", {
94
- * url: "https://shop.example.com"
95
- * });
96
- * ```
97
- */
98
- crawl;
99
- /**
100
- * Extract resource - LLM-based structured data extraction
101
- *
102
- * @example
103
- * ```ts
104
- * const job = await client.extract.create({
105
- * url: "https://example.com/product",
106
- * schema: { type: "object", properties: {...} }
107
- * });
108
- * ```
109
- */
110
- extract;
111
- /**
112
- * Dork resource - Google Dork searches
113
- *
114
- * @example
115
- * ```ts
116
- * const job = await client.dork.create({
117
- * query: "discount coupon",
118
- * site: "amazon.com"
119
- * });
120
- * ```
121
- */
122
- dork;
123
- /**
124
- * Status resource - Job status management
125
- *
126
- * @example
127
- * ```ts
128
- * const status = await client.status.get(jobId);
129
- * const deals = await client.status.getDeals(jobId);
130
- * await client.status.cancel(jobId);
131
- * ```
132
- */
133
- status;
134
- /**
135
- * Data resource - Jobs and deals data access
136
- *
137
- * @example
138
- * ```ts
139
- * const jobs = await client.data.listJobs();
140
- * const deals = await client.data.listDeals({ minScore: 70 });
141
- * const stats = await client.data.getStats();
142
- * ```
143
- */
144
- data;
145
- /**
146
- * Webhooks resource - Webhook management
147
- *
148
- * @example
149
- * ```ts
150
- * await client.webhooks.create({
151
- * event: "deal.found",
152
- * url: "https://..."
153
- * });
154
- * ```
155
- */
156
- webhooks;
157
- /**
158
- * Keys resource - API key management
159
- *
160
- * @example
161
- * ```ts
162
- * const newKey = await client.keys.create({
163
- * name: "Production",
164
- * scopes: ["scrape", "status"]
165
- * });
166
- * ```
167
- */
168
- keys;
169
- /**
170
- * Account resource - Account info and preferences
171
- *
172
- * @example
173
- * ```ts
174
- * const account = await client.account.get();
175
- * await client.account.updatePreferences({
176
- * minDealScore: 70
177
- * });
178
- * ```
179
- */
180
- account;
181
- // ============================================
182
- // CONSTRUCTOR
183
- // ============================================
184
- /**
185
- * Create a new DealCrawl client
186
- *
187
- * @param config - Client configuration
188
- *
189
- * @example
190
- * ```ts
191
- * // Minimal config
192
- * const client = new DealCrawl({ apiKey: "sk_xxx" });
193
- *
194
- * // Full config
195
- * const client = new DealCrawl({
196
- * apiKey: "sk_xxx",
197
- * baseUrl: "https://api.dealcrawl.dev",
198
- * timeout: 30000,
199
- * maxRetries: 3,
200
- * retryDelay: 1000,
201
- * onRateLimit: (info) => console.log("Rate limited!", info)
202
- * });
203
- * ```
204
- */
205
- constructor(config) {
206
- if (!config.apiKey || !config.apiKey.trim()) {
207
- throw new Error("API key is required");
208
- }
209
- // Build request context
210
- this.ctx = {
211
- apiKey: config.apiKey,
212
- baseUrl: config.baseUrl ?? DEFAULT_CONFIG.baseUrl,
213
- timeout: config.timeout ?? DEFAULT_CONFIG.timeout,
214
- maxRetries: config.maxRetries ?? DEFAULT_CONFIG.maxRetries,
215
- retryDelay: config.retryDelay ?? DEFAULT_CONFIG.retryDelay,
216
- onRateLimit: config.onRateLimit,
217
- };
218
- // Initialize resources
219
- this.scrape = new ScrapeResource(this.ctx);
220
- this.crawl = new CrawlResource(this.ctx);
221
- this.extract = new ExtractResource(this.ctx);
222
- this.dork = new DorkResource(this.ctx);
223
- this.status = new StatusResource(this.ctx);
224
- this.data = new DataResource(this.ctx);
225
- this.webhooks = new WebhooksResource(this.ctx);
226
- this.keys = new KeysResource(this.ctx);
227
- this.account = new AccountResource(this.ctx);
228
- }
229
- // ============================================
230
- // POLLING METHODS
231
- // ============================================
232
- /**
233
- * Wait for a job to complete
234
- * Polls the status endpoint until the job finishes
235
- *
236
- * @example
237
- * ```ts
238
- * const job = await client.scrape.create({ url: "..." });
239
- *
240
- * // Simple wait
241
- * const result = await client.waitForResult(job.jobId);
242
- *
243
- * // With options
244
- * const result = await client.waitForResult(job.jobId, {
245
- * pollInterval: 1000,
246
- * timeout: 60000,
247
- * onProgress: (status) => console.log(status.progress)
248
- * });
249
- * ```
250
- */
251
- async waitForResult(jobId, options) {
252
- return waitForResult(this.ctx, jobId, options);
253
- }
254
- /**
255
- * Wait for multiple jobs to complete
256
- * Returns when all jobs are done
257
- *
258
- * @example
259
- * ```ts
260
- * const jobs = await Promise.all([
261
- * client.scrape.create({ url: "url1" }),
262
- * client.scrape.create({ url: "url2" }),
263
- * ]);
264
- *
265
- * const results = await client.waitForAll(jobs.map(j => j.jobId));
266
- * ```
267
- */
268
- async waitForAll(jobIds, options) {
269
- return waitForAll(this.ctx, jobIds, options);
270
- }
271
- /**
272
- * Wait for any job to complete
273
- * Returns as soon as one job finishes
274
- *
275
- * @example
276
- * ```ts
277
- * const jobIds = ["job1", "job2", "job3"];
278
- * const firstResult = await client.waitForAny(jobIds);
279
- * ```
280
- */
281
- async waitForAny(jobIds, options) {
282
- return waitForAny(this.ctx, jobIds, options);
283
- }
284
- // ============================================
285
- // CONVENIENCE METHODS
286
- // ============================================
287
- /**
288
- * Scrape a URL and wait for result
289
- * Combines create and waitForResult
290
- *
291
- * @example
292
- * ```ts
293
- * const result = await client.scrapeAndWait({
294
- * url: "https://example.com",
295
- * extractDeal: true
296
- * });
297
- * ```
298
- */
299
- async scrapeAndWait(options, waitOptions) {
300
- const job = await this.scrape.create(options);
301
- return this.waitForResult(job.jobId, waitOptions);
302
- }
303
- /**
304
- * Crawl a URL and wait for result
305
- * Combines create and waitForResult
306
- *
307
- * @example
308
- * ```ts
309
- * const result = await client.crawlAndWait({
310
- * url: "https://shop.example.com",
311
- * maxPages: 50
312
- * });
313
- * ```
314
- */
315
- async crawlAndWait(options, waitOptions) {
316
- const job = await this.crawl.create(options);
317
- return this.waitForResult(job.jobId, waitOptions);
318
- }
319
- /**
320
- * Extract data and wait for result
321
- * Combines create and waitForResult
322
- *
323
- * @example
324
- * ```ts
325
- * const result = await client.extractAndWait({
326
- * url: "https://example.com/product",
327
- * schema: { type: "object", properties: {...} }
328
- * });
329
- * ```
330
- */
331
- async extractAndWait(options, waitOptions) {
332
- const job = await this.extract.create(options);
333
- return this.waitForResult(job.jobId, waitOptions);
334
- }
335
- }
336
- //# sourceMappingURL=client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAExE,mBAAmB;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,OAAO,SAAS;IACpB,+BAA+B;IACd,GAAG,CAAiB;IAErC,+CAA+C;IAC/C,YAAY;IACZ,+CAA+C;IAE/C;;;;;;;;;;OAUG;IACM,MAAM,CAAiB;IAEhC;;;;;;;;;;;;;;;OAeG;IACM,KAAK,CAAgB;IAE9B;;;;;;;;;;OAUG;IACM,OAAO,CAAkB;IAElC;;;;;;;;;;OAUG;IACM,IAAI,CAAe;IAE5B;;;;;;;;;OASG;IACM,MAAM,CAAiB;IAEhC;;;;;;;;;OASG;IACM,IAAI,CAAe;IAE5B;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AAC,CAAC;QAC7C,OAAO,IAAI,CAAC,aAAa,CAAI,GAAG,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,cAAc,CAClB,OAAiD,EACjD,WAAyB;QAEzB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC,aAAa,CAAI,GAAG,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IACvD,CAAC;CACF"}
package/dist/error.d.ts DELETED
@@ -1,55 +0,0 @@
1
- import { ERROR_CODES, type LegacyErrorCode as ErrorCode } from "./types/shared";
2
- /**
3
- * Custom error class for DealCrawl SDK
4
- * Provides structured error handling with error codes
5
- */
6
- export declare class DealCrawlError extends Error {
7
- /** Error code from ERROR_CODES */
8
- readonly code: ErrorCode;
9
- /** HTTP status code from the API response */
10
- readonly statusCode: number;
11
- /** Additional error details */
12
- readonly details?: Record<string, unknown>;
13
- /** Retry-After header value in seconds (for rate limiting) */
14
- readonly retryAfter?: number;
15
- constructor(options: {
16
- code: ErrorCode;
17
- message: string;
18
- statusCode?: number;
19
- details?: Record<string, unknown>;
20
- retryAfter?: number;
21
- });
22
- /**
23
- * Check if the error is retryable
24
- * Rate limits and transient errors are retryable
25
- */
26
- isRetryable(): boolean;
27
- /**
28
- * Check if the error is due to authentication issues
29
- */
30
- isAuthError(): boolean;
31
- /**
32
- * Check if the error is due to rate limiting
33
- */
34
- isRateLimited(): boolean;
35
- /**
36
- * Check if the error is due to quota exceeded
37
- */
38
- isQuotaExceeded(): boolean;
39
- /**
40
- * Convert error to JSON-serializable object
41
- */
42
- toJSON(): Record<string, unknown>;
43
- /**
44
- * Create a DealCrawlError from an API error response
45
- */
46
- static fromResponse(statusCode: number, body: {
47
- code?: string;
48
- message?: string;
49
- error?: string;
50
- details?: Record<string, unknown>;
51
- retryAfter?: number;
52
- }, retryAfter?: number | string | null): DealCrawlError;
53
- }
54
- export { ERROR_CODES, type ErrorCode };
55
- //# sourceMappingURL=error.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,KAAK,eAAe,IAAI,SAAS,EAClC,MAAM,gBAAgB,CAAC;AAExB;;;GAGG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAEzB,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,+BAA+B;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE3C,8DAA8D;IAC9D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;gBAEjB,OAAO,EAAE;QACnB,IAAI,EAAE,SAAS,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAClC,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB;IAcD;;;OAGG;IACH,WAAW,IAAI,OAAO;IAUtB;;OAEG;IACH,WAAW,IAAI,OAAO;IAUtB;;OAEG;IACH,aAAa,IAAI,OAAO;IAIxB;;OAEG;IACH,eAAe,IAAI,OAAO;IAI1B;;OAEG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAWjC;;OAEG;IACH,MAAM,CAAC,YAAY,CACjB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAClC,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,EACD,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAClC,cAAc;CAyBlB;AA0BD,OAAO,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,CAAC"}
package/dist/error.js DELETED
@@ -1,128 +0,0 @@
1
- import { ERROR_CODES, } from "./types/shared";
2
- /**
3
- * Custom error class for DealCrawl SDK
4
- * Provides structured error handling with error codes
5
- */
6
- export class DealCrawlError extends Error {
7
- /** Error code from ERROR_CODES */
8
- code;
9
- /** HTTP status code from the API response */
10
- statusCode;
11
- /** Additional error details */
12
- details;
13
- /** Retry-After header value in seconds (for rate limiting) */
14
- retryAfter;
15
- constructor(options) {
16
- super(options.message);
17
- this.name = "DealCrawlError";
18
- this.code = options.code;
19
- this.statusCode = options.statusCode ?? 500;
20
- this.details = options.details;
21
- this.retryAfter = options.retryAfter;
22
- // Maintains proper stack trace for where our error was thrown
23
- if (Error.captureStackTrace) {
24
- Error.captureStackTrace(this, DealCrawlError);
25
- }
26
- }
27
- /**
28
- * Check if the error is retryable
29
- * Rate limits and transient errors are retryable
30
- */
31
- isRetryable() {
32
- const retryableCodes = [
33
- ERROR_CODES.RATE_LIMIT_EXCEEDED,
34
- ERROR_CODES.SERVICE_UNAVAILABLE,
35
- ERROR_CODES.REDIS_ERROR,
36
- ERROR_CODES.DATABASE_ERROR,
37
- ];
38
- return retryableCodes.includes(this.code);
39
- }
40
- /**
41
- * Check if the error is due to authentication issues
42
- */
43
- isAuthError() {
44
- const authCodes = [
45
- ERROR_CODES.INVALID_API_KEY,
46
- ERROR_CODES.MISSING_API_KEY,
47
- ERROR_CODES.API_KEY_EXPIRED,
48
- ERROR_CODES.ACCOUNT_SUSPENDED,
49
- ];
50
- return authCodes.includes(this.code);
51
- }
52
- /**
53
- * Check if the error is due to rate limiting
54
- */
55
- isRateLimited() {
56
- return this.code === ERROR_CODES.RATE_LIMIT_EXCEEDED;
57
- }
58
- /**
59
- * Check if the error is due to quota exceeded
60
- */
61
- isQuotaExceeded() {
62
- return this.code === ERROR_CODES.QUOTA_EXCEEDED;
63
- }
64
- /**
65
- * Convert error to JSON-serializable object
66
- */
67
- toJSON() {
68
- return {
69
- name: this.name,
70
- code: this.code,
71
- message: this.message,
72
- statusCode: this.statusCode,
73
- details: this.details,
74
- retryAfter: this.retryAfter,
75
- };
76
- }
77
- /**
78
- * Create a DealCrawlError from an API error response
79
- */
80
- static fromResponse(statusCode, body, retryAfter) {
81
- const code = body.code || mapStatusCodeToErrorCode(statusCode);
82
- const message = body.message || body.error || "An error occurred";
83
- // Parse retryAfter from parameter or body
84
- let parsedRetryAfter;
85
- if (retryAfter !== null && retryAfter !== undefined) {
86
- parsedRetryAfter =
87
- typeof retryAfter === "string" ? parseInt(retryAfter, 10) : retryAfter;
88
- if (isNaN(parsedRetryAfter)) {
89
- parsedRetryAfter = undefined;
90
- }
91
- }
92
- else if (body.retryAfter !== undefined) {
93
- parsedRetryAfter = body.retryAfter;
94
- }
95
- return new DealCrawlError({
96
- code,
97
- message,
98
- statusCode,
99
- details: body.details,
100
- retryAfter: parsedRetryAfter,
101
- });
102
- }
103
- }
104
- /**
105
- * Map HTTP status codes to error codes
106
- */
107
- function mapStatusCodeToErrorCode(statusCode) {
108
- switch (statusCode) {
109
- case 400:
110
- return ERROR_CODES.INVALID_REQUEST;
111
- case 401:
112
- return ERROR_CODES.INVALID_API_KEY;
113
- case 403:
114
- return ERROR_CODES.ACCOUNT_SUSPENDED;
115
- case 404:
116
- return ERROR_CODES.JOB_NOT_FOUND;
117
- case 429:
118
- return ERROR_CODES.RATE_LIMIT_EXCEEDED;
119
- case 500:
120
- return ERROR_CODES.INTERNAL_ERROR;
121
- case 503:
122
- return ERROR_CODES.SERVICE_UNAVAILABLE;
123
- default:
124
- return ERROR_CODES.INTERNAL_ERROR;
125
- }
126
- }
127
- export { ERROR_CODES };
128
- //# sourceMappingURL=error.js.map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U,EACV,UAAU,EACV,SAAS,GACV,MAAM,iBAAiB,CAAC;AAOzB,YAAY,EAEV,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,QAAQ,EAER,YAAY,EACZ,WAAW,EACX,UAAU,EAEV,aAAa,EACb,gBAAgB,EAEhB,MAAM,EACN,WAAW,EACX,cAAc,EAEd,UAAU,GACX,MAAM,gBAAgB,CAAC;AAMxB,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC"}
@@ -1,143 +0,0 @@
1
- /**
2
- * Account Resource
3
- * Handles account information and preferences
4
- */
5
- import type { RequestContext } from "../types/config";
6
- import type { UpdatePreferencesOptions } from "../types/options";
7
- import type { AccountInfoResponse, AccountMetricsResponse, DealUpMetricsResponse, RecommendationsResponse, PreferencesResponse, UpdatePreferencesResponse } from "../types/responses";
8
- /**
9
- * Account resource class
10
- * Provides methods for account information and preferences
11
- */
12
- export declare class AccountResource {
13
- private ctx;
14
- constructor(ctx: RequestContext);
15
- /**
16
- * Get current account information
17
- *
18
- * @example
19
- * ```ts
20
- * const account = await client.account.get();
21
- * console.log(account.name);
22
- * console.log(account.tier);
23
- * console.log(account.usage);
24
- * ```
25
- */
26
- get(): Promise<AccountInfoResponse>;
27
- /**
28
- * Get detailed account metrics
29
- *
30
- * @example
31
- * ```ts
32
- * const metrics = await client.account.getMetrics();
33
- * console.log(metrics.dealMetrics.totalDeals);
34
- * console.log(metrics.categoryPerformance);
35
- * ```
36
- */
37
- getMetrics(): Promise<AccountMetricsResponse>;
38
- /**
39
- * Get DealUp sync metrics (pro/enterprise only)
40
- *
41
- * @example
42
- * ```ts
43
- * const dealup = await client.account.getDealUpMetrics();
44
- * console.log(dealup.sync.totalSynced);
45
- * console.log(dealup.sync.clicksGenerated);
46
- * ```
47
- */
48
- getDealUpMetrics(): Promise<DealUpMetricsResponse>;
49
- /**
50
- * Get crawl recommendations
51
- * AI-suggested URLs to crawl based on past performance
52
- *
53
- * @example
54
- * ```ts
55
- * const recommendations = await client.account.getRecommendations();
56
- * recommendations.recommendations.forEach(r => {
57
- * console.log(r.url, r.reason, r.estimatedDeals);
58
- * });
59
- * ```
60
- */
61
- getRecommendations(): Promise<RecommendationsResponse>;
62
- /**
63
- * Get current preferences
64
- *
65
- * @example
66
- * ```ts
67
- * const prefs = await client.account.getPreferences();
68
- * console.log(prefs.preferences.minDealScore);
69
- * console.log(prefs.preferences.autoSync);
70
- * ```
71
- */
72
- getPreferences(): Promise<PreferencesResponse>;
73
- /**
74
- * Update account preferences
75
- *
76
- * @example
77
- * ```ts
78
- * const updated = await client.account.updatePreferences({
79
- * minDealScore: 70,
80
- * autoSync: true,
81
- * preferredCategories: ["software", "courses"]
82
- * });
83
- * ```
84
- */
85
- updatePreferences(options: UpdatePreferencesOptions): Promise<UpdatePreferencesResponse>;
86
- /**
87
- * Track a DealUp click (webhook endpoint)
88
- * Used internally by DealUp to track click-through
89
- *
90
- * @example
91
- * ```ts
92
- * await client.account.trackClick("deal_abc123", "homepage");
93
- * ```
94
- */
95
- trackClick(dealId: string, source?: string): Promise<{
96
- success: boolean;
97
- }>;
98
- /**
99
- * Get remaining quota for a resource
100
- *
101
- * @example
102
- * ```ts
103
- * const remaining = await client.account.getRemainingQuota("scrapes");
104
- * console.log(`${remaining} scrapes left this period`);
105
- * ```
106
- */
107
- getRemainingQuota(resource: "scrapes" | "crawls" | "dorks"): Promise<number>;
108
- /**
109
- * Check if account has quota for a resource
110
- *
111
- * @example
112
- * ```ts
113
- * if (await client.account.hasQuota("crawls", 5)) {
114
- * // Safe to start 5 crawls
115
- * }
116
- * ```
117
- */
118
- hasQuota(resource: "scrapes" | "crawls" | "dorks", needed?: number): Promise<boolean>;
119
- /**
120
- * Get account tier
121
- *
122
- * @example
123
- * ```ts
124
- * const tier = await client.account.getTier();
125
- * if (tier === "enterprise") {
126
- * // Enable advanced features
127
- * }
128
- * ```
129
- */
130
- getTier(): Promise<"free" | "pro" | "enterprise">;
131
- /**
132
- * Check if account is pro or enterprise tier
133
- *
134
- * @example
135
- * ```ts
136
- * if (await client.account.isPremium()) {
137
- * // Show premium features
138
- * }
139
- * ```
140
- */
141
- isPremium(): Promise<boolean>;
142
- }
143
- //# sourceMappingURL=account.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/resources/account.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,oBAAoB,CAAC;AAG5B;;;GAGG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,cAAc;IAEvC;;;;;;;;;;OAUG;IACG,GAAG,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAKzC;;;;;;;;;OASG;IACG,UAAU,IAAI,OAAO,CAAC,sBAAsB,CAAC;IAQnD;;;;;;;;;OASG;IACG,gBAAgB,IAAI,OAAO,CAAC,qBAAqB,CAAC;IAQxD;;;;;;;;;;;OAWG;IACG,kBAAkB,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAQ5D;;;;;;;;;OASG;IACG,cAAc,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAQpD;;;;;;;;;;;OAWG;IACG,iBAAiB,CACrB,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,yBAAyB,CAAC;IAcrC;;;;;;;;OAQG;IACG,UAAU,CACd,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAgBhC;;;;;;;;OAQG;IACG,iBAAiB,CACrB,QAAQ,EAAE,SAAS,GAAG,QA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