@decodo/sdk-ts 2.0.0 → 2.0.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.
Files changed (42) hide show
  1. package/README.md +415 -17
  2. package/package.json +1 -1
  3. package/build/cjs/api/web-scraping-api.d.ts +0 -13
  4. package/build/cjs/api/web-scraping-api.js +0 -41
  5. package/build/cjs/client.d.ts +0 -11
  6. package/build/cjs/client.js +0 -34
  7. package/build/cjs/errors.d.ts +0 -18
  8. package/build/cjs/errors.js +0 -44
  9. package/build/cjs/generated/parameters.d.ts +0 -11
  10. package/build/cjs/generated/parameters.js +0 -85
  11. package/build/cjs/generated/request-schemas.d.ts +0 -2123
  12. package/build/cjs/generated/request-schemas.js +0 -2431
  13. package/build/cjs/generated/targets.d.ts +0 -735
  14. package/build/cjs/generated/targets.js +0 -343
  15. package/build/cjs/http.d.ts +0 -22
  16. package/build/cjs/http.js +0 -94
  17. package/build/cjs/index.d.ts +0 -9
  18. package/build/cjs/index.js +0 -19
  19. package/build/cjs/types/requests.d.ts +0 -1
  20. package/build/cjs/types/requests.js +0 -2
  21. package/build/cjs/types/responses.d.ts +0 -62
  22. package/build/cjs/types/responses.js +0 -2
  23. package/build/esm/api/web-scraping-api.d.ts +0 -13
  24. package/build/esm/api/web-scraping-api.js +0 -37
  25. package/build/esm/client.d.ts +0 -11
  26. package/build/esm/client.js +0 -30
  27. package/build/esm/errors.d.ts +0 -18
  28. package/build/esm/errors.js +0 -36
  29. package/build/esm/generated/parameters.d.ts +0 -11
  30. package/build/esm/generated/parameters.js +0 -82
  31. package/build/esm/generated/request-schemas.d.ts +0 -2123
  32. package/build/esm/generated/request-schemas.js +0 -2395
  33. package/build/esm/generated/targets.d.ts +0 -735
  34. package/build/esm/generated/targets.js +0 -340
  35. package/build/esm/http.d.ts +0 -22
  36. package/build/esm/http.js +0 -90
  37. package/build/esm/index.d.ts +0 -9
  38. package/build/esm/index.js +0 -5
  39. package/build/esm/types/requests.d.ts +0 -1
  40. package/build/esm/types/requests.js +0 -1
  41. package/build/esm/types/responses.d.ts +0 -62
  42. package/build/esm/types/responses.js +0 -1
@@ -1,18 +0,0 @@
1
- export declare class DecodoError extends Error {
2
- readonly statusCode: number;
3
- readonly apiStatus: string | undefined;
4
- constructor(message: string, statusCode: number, apiStatus?: string);
5
- }
6
- export declare class AuthenticationError extends DecodoError {
7
- constructor(message?: string);
8
- }
9
- export declare class RateLimitError extends DecodoError {
10
- constructor(message?: string);
11
- }
12
- export declare class ValidationError extends DecodoError {
13
- readonly errors: unknown[] | undefined;
14
- constructor(message: string, errors?: unknown[]);
15
- }
16
- export declare class TimeoutError extends Error {
17
- constructor(message?: string);
18
- }
@@ -1,36 +0,0 @@
1
- export class DecodoError extends Error {
2
- statusCode;
3
- apiStatus;
4
- constructor(message, statusCode, apiStatus) {
5
- super(message);
6
- this.name = 'DecodoError';
7
- this.statusCode = statusCode;
8
- this.apiStatus = apiStatus;
9
- }
10
- }
11
- export class AuthenticationError extends DecodoError {
12
- constructor(message = 'Authentication failed. Check your credentials.') {
13
- super(message, 401, 'failed');
14
- this.name = 'AuthenticationError';
15
- }
16
- }
17
- export class RateLimitError extends DecodoError {
18
- constructor(message = 'Rate limit exceeded. Slow down your request rate.') {
19
- super(message, 429, 'failed');
20
- this.name = 'RateLimitError';
21
- }
22
- }
23
- export class ValidationError extends DecodoError {
24
- errors;
25
- constructor(message, errors) {
26
- super(message, 422, 'failed');
27
- this.name = 'ValidationError';
28
- this.errors = errors;
29
- }
30
- }
31
- export class TimeoutError extends Error {
32
- constructor(message = 'The request timed out.') {
33
- super(message);
34
- this.name = 'TimeoutError';
35
- }
36
- }
@@ -1,11 +0,0 @@
1
- export type ParameterMeta = {
2
- type: string;
3
- maxLength?: number;
4
- minimum?: number;
5
- maximum?: number;
6
- enum?: (string | number)[];
7
- items?: {
8
- type: string;
9
- };
10
- };
11
- export declare const parameterMeta: Record<string, ParameterMeta>;
@@ -1,82 +0,0 @@
1
- // Auto-generated by src/codegen/web-scraping-api/generate-parameters.ts — do not edit
2
- export const parameterMeta = {
3
- "360": { type: "boolean" },
4
- callback_url: { type: "string" },
5
- query: { type: "string", maxLength: 2048 },
6
- headless: { type: "string", enum: ["html", "png"] },
7
- locale: { type: "string" },
8
- geo: { type: "string" },
9
- device_type: { type: "string" },
10
- page_from: { type: "number", minimum: 0, maximum: 100 },
11
- google_results_language: { type: "string" },
12
- google_tbm: { type: "string" },
13
- google_tbs: { type: "string" },
14
- parse: { type: "boolean" },
15
- google_nfpr: { type: "boolean" },
16
- google_safe_search: { type: "boolean" },
17
- session_id: { type: "string" },
18
- xhr: { type: "boolean" },
19
- markdown: { type: "boolean" },
20
- page_count: { type: "number", minimum: 1, maximum: 10 },
21
- date_range: { type: "string" },
22
- stars: { type: "number" },
23
- adults: { type: "number", minimum: 1, maximum: 3 },
24
- children: { type: "number", minimum: 1, maximum: 3 },
25
- search_type: { type: "string" },
26
- date_start: { type: "string" },
27
- date_end: { type: "string" },
28
- url: { type: "string", maxLength: 2056 },
29
- hotel_occupancy: { type: "string" },
30
- domain: { type: "string" },
31
- language_code: { type: "string" },
32
- transcript_origin: { type: "string" },
33
- autoselect_variant: { type: "boolean" },
34
- currency: { type: "string" },
35
- category: { type: "string" },
36
- merchant: { type: "string" },
37
- sort_by: { type: "string" },
38
- parser_type: { type: "string" },
39
- payload: { type: "string" },
40
- http_method: { type: "string" },
41
- successful_status_codes: { type: "array", items: { type: "number" } },
42
- product_id: { type: "string" },
43
- fulfillment_type: { type: "string" },
44
- walmart_store_id: { type: "string" },
45
- delivery_zip: { type: "string" },
46
- store_id: { type: "string" },
47
- delivery_type: { type: "string" },
48
- target_store_id: { type: "string" },
49
- lowes_store_id: { type: "string" },
50
- user_agent_type: { type: "string" },
51
- free_delivery: { type: "boolean" },
52
- pickup_today: { type: "boolean" },
53
- delivery_today_tomorrow: { type: "boolean" },
54
- proxy_pool: { type: "string", enum: ["standard", "premium"] },
55
- headers: { type: "object" },
56
- cookies: { type: "object" },
57
- force_headers: { type: "boolean" },
58
- force_cookies: { type: "boolean" },
59
- prompt: { type: "string", maxLength: 8192 },
60
- search: { type: "boolean" },
61
- country: { type: "string" },
62
- sort: { type: "string" },
63
- upload_date: { type: "string" },
64
- type: { type: "string" },
65
- duration: { type: "string" },
66
- video_sort_by: { type: "string" },
67
- "3d": { type: "boolean" },
68
- "4k": { type: "boolean" },
69
- creative_commons: { type: "boolean" },
70
- hd: { type: "boolean" },
71
- hdr: { type: "boolean" },
72
- vr180: { type: "boolean" },
73
- live: { type: "boolean" },
74
- location: { type: "boolean" },
75
- purchased: { type: "boolean" },
76
- subtitles: { type: "boolean" },
77
- subtitle_origin: { type: "string" },
78
- limit: { type: "number", minimum: 0, maximum: 100 },
79
- customStatusCode: { type: "string" },
80
- requestBody: { type: "string" },
81
- customCookies: { type: "string" },
82
- };