@intuned/runtime-dev 1.3.18-interface.13 → 1.3.18-interface.2

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 (58) hide show
  1. package/.babelrc +21 -0
  2. package/.eslintignore +10 -0
  3. package/.eslintrc.js +39 -0
  4. package/WebTemplate.zip +0 -0
  5. package/api/sample.ts +4 -0
  6. package/package.json +18 -77
  7. package/template.tsconfig.json +11 -0
  8. package/tsconfig.eslint.json +5 -0
  9. package/tsconfig.json +25 -0
  10. package/typedoc.json +49 -0
  11. package/dist/commands/api/run.d.ts +0 -8
  12. package/dist/commands/api/run.js +0 -2094
  13. package/dist/commands/auth-sessions/load.d.ts +0 -1
  14. package/dist/commands/auth-sessions/load.js +0 -1559
  15. package/dist/commands/auth-sessions/run-check.d.ts +0 -1
  16. package/dist/commands/auth-sessions/run-check.js +0 -1964
  17. package/dist/commands/auth-sessions/run-create.d.ts +0 -1
  18. package/dist/commands/auth-sessions/run-create.js +0 -1968
  19. package/dist/commands/browser/save-state.d.ts +0 -1
  20. package/dist/commands/browser/save-state.js +0 -108
  21. package/dist/commands/browser/start-browser.d.ts +0 -1
  22. package/dist/commands/browser/start-browser.js +0 -67
  23. package/dist/commands/build.d.ts +0 -2
  24. package/dist/commands/build.js +0 -203
  25. package/dist/commands/common/tsNodeImport.d.ts +0 -5
  26. package/dist/commands/common/tsNodeImport.js +0 -82
  27. package/dist/commands/get-headless-user-agent.d.ts +0 -2
  28. package/dist/commands/get-headless-user-agent.js +0 -354
  29. package/dist/commands/interface/run.d.ts +0 -3
  30. package/dist/commands/interface/run.js +0 -2084
  31. package/dist/commands/intuned-cli/main.d.ts +0 -2
  32. package/dist/commands/intuned-cli/main.js +0 -5403
  33. package/dist/commands/ts-check.d.ts +0 -1
  34. package/dist/commands/ts-check.js +0 -158
  35. package/dist/common/assets/browser_scripts.js +0 -2580
  36. package/dist/common/asyncLocalStorage/index.d.ts +0 -17
  37. package/dist/common/asyncLocalStorage/index.js +0 -41
  38. package/dist/common/binStartupScript.d.ts +0 -2
  39. package/dist/common/binStartupScript.js +0 -152
  40. package/dist/common/cleanEnvironmentVariables.d.ts +0 -3
  41. package/dist/common/cleanEnvironmentVariables.js +0 -38
  42. package/dist/common/constants.d.ts +0 -13
  43. package/dist/common/constants.js +0 -59
  44. package/dist/common/contextStorageStateHelpers.d.ts +0 -24
  45. package/dist/common/contextStorageStateHelpers.js +0 -108
  46. package/dist/common/jwtTokenManager.d.ts +0 -19
  47. package/dist/common/jwtTokenManager.js +0 -180
  48. package/dist/common/runApi/index.d.ts +0 -11
  49. package/dist/common/runApi/index.js +0 -1873
  50. package/dist/common/settingsSchema.d.ts +0 -540
  51. package/dist/common/settingsSchema.js +0 -92
  52. package/dist/common/telemetry.d.ts +0 -6
  53. package/dist/common/telemetry.js +0 -63
  54. package/dist/export.d-BAUMB-lG.d.ts +0 -140
  55. package/dist/index.d.ts +0 -6
  56. package/dist/index.js +0 -808
  57. package/dist/runtime/index.d.ts +0 -168
  58. package/dist/runtime/index.js +0 -801
@@ -1,168 +0,0 @@
1
- import { P as Payload, A as AttemptStore, a as PersistentStore, R as RunInfo, b as RunErrorOptions } from '../export.d-BAUMB-lG.js';
2
- import { Page, BrowserContext } from 'playwright';
3
- import { z } from 'zod';
4
-
5
- declare function extendPayload(payload: Payload | Payload[]): void;
6
-
7
- declare function extendTimeout(): void;
8
-
9
- declare const attemptStore: AttemptStore;
10
-
11
- declare const persistentStore: PersistentStore;
12
-
13
- declare function getAuthSessionParameters(): Promise<any>;
14
-
15
- declare function runInfo(): RunInfo;
16
-
17
- declare class RunError extends Error {
18
- options: RunErrorOptions;
19
- constructor(message: string, options?: RunErrorOptions);
20
- }
21
-
22
- declare const captchaStatusSchema: z.ZodEnum<["attached", "solving", "solved", "error", "detached"]>;
23
- type CaptchaStatus = z.infer<typeof captchaStatusSchema>;
24
- declare const captchaSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
25
- id: z.ZodString;
26
- tabId: z.ZodNumber;
27
- type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
28
- retryCount: z.ZodOptional<z.ZodNumber>;
29
- } & {
30
- status: z.ZodLiteral<"attached">;
31
- }, "strip", z.ZodTypeAny, {
32
- type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
33
- status: "attached";
34
- id: string;
35
- tabId: number;
36
- retryCount?: number | undefined;
37
- }, {
38
- type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
39
- status: "attached";
40
- id: string;
41
- tabId: number;
42
- retryCount?: number | undefined;
43
- }>, z.ZodObject<{
44
- id: z.ZodString;
45
- tabId: z.ZodNumber;
46
- type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
47
- retryCount: z.ZodOptional<z.ZodNumber>;
48
- } & {
49
- status: z.ZodLiteral<"solving">;
50
- }, "strip", z.ZodTypeAny, {
51
- type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
52
- status: "solving";
53
- id: string;
54
- tabId: number;
55
- retryCount?: number | undefined;
56
- }, {
57
- type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
58
- status: "solving";
59
- id: string;
60
- tabId: number;
61
- retryCount?: number | undefined;
62
- }>, z.ZodObject<{
63
- id: z.ZodString;
64
- tabId: z.ZodNumber;
65
- type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
66
- retryCount: z.ZodOptional<z.ZodNumber>;
67
- } & {
68
- status: z.ZodLiteral<"solved">;
69
- }, "strip", z.ZodTypeAny, {
70
- type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
71
- status: "solved";
72
- id: string;
73
- tabId: number;
74
- retryCount?: number | undefined;
75
- }, {
76
- type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
77
- status: "solved";
78
- id: string;
79
- tabId: number;
80
- retryCount?: number | undefined;
81
- }>, z.ZodObject<{
82
- id: z.ZodString;
83
- tabId: z.ZodNumber;
84
- type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
85
- retryCount: z.ZodOptional<z.ZodNumber>;
86
- } & {
87
- status: z.ZodLiteral<"detached">;
88
- }, "strip", z.ZodTypeAny, {
89
- type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
90
- status: "detached";
91
- id: string;
92
- tabId: number;
93
- retryCount?: number | undefined;
94
- }, {
95
- type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
96
- status: "detached";
97
- id: string;
98
- tabId: number;
99
- retryCount?: number | undefined;
100
- }>, z.ZodObject<{
101
- id: z.ZodString;
102
- tabId: z.ZodNumber;
103
- type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
104
- retryCount: z.ZodOptional<z.ZodNumber>;
105
- } & {
106
- status: z.ZodLiteral<"error">;
107
- error: z.ZodObject<{
108
- code: z.ZodEnum<["HIT_LIMIT", "MAX_RETRIES", "UNEXPECTED_SERVER_RESPONSE", "UNEXPECTED_ERROR"]>;
109
- error: z.ZodOptional<z.ZodUnknown>;
110
- }, "strip", z.ZodTypeAny, {
111
- code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
112
- error?: unknown;
113
- }, {
114
- code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
115
- error?: unknown;
116
- }>;
117
- }, "strip", z.ZodTypeAny, {
118
- error: {
119
- code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
120
- error?: unknown;
121
- };
122
- type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
123
- status: "error";
124
- id: string;
125
- tabId: number;
126
- retryCount?: number | undefined;
127
- }, {
128
- error: {
129
- code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
130
- error?: unknown;
131
- };
132
- type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
133
- status: "error";
134
- id: string;
135
- tabId: number;
136
- retryCount?: number | undefined;
137
- }>]>;
138
- type Captcha = z.infer<typeof captchaSchema>;
139
- type CaptchaCallback = (captcha: Captcha) => Promise<void> | void;
140
-
141
- type WithWaitForCaptchaSolveOptions = {
142
- page: Page;
143
- timeoutInMs?: number;
144
- settleDurationMs?: number;
145
- waitForNetworkSettled?: boolean;
146
- };
147
- declare function withWaitForCaptchaSolve<T>(callback: (page: Page) => Promise<T>, options: WithWaitForCaptchaSolveOptions): Promise<T>;
148
- declare function waitForCaptchaSolve(page: Page, { timeoutInMs, settleDurationMs, }?: Pick<WithWaitForCaptchaSolveOptions, "timeoutInMs" | "settleDurationMs">): Promise<void>;
149
- declare function removeCaptchaEventListener(page: Page, status: CaptchaStatus, f: CaptchaCallback): Promise<void>;
150
- declare function onCaptchaEvent(page: Page, status: CaptchaStatus, f: CaptchaCallback): Promise<void>;
151
- declare function onceCaptchaEvent(page: Page, status: CaptchaStatus, f: CaptchaCallback): Promise<void>;
152
- declare function pauseCaptchaSolver(context: BrowserContext): Promise<void>;
153
- declare function resumeCaptchaSolver(context: BrowserContext): Promise<void>;
154
-
155
- /**
156
- * Retrieves the base URL and API key for the Intuned AI Gateway.
157
-
158
- * Returns:
159
- * { baseUrl: string, apiKey: string }: An object containing the base URL and API key
160
- */
161
- declare function getAiGatewayConfig(): {
162
- baseUrl: string;
163
- apiKey: string;
164
- };
165
-
166
- declare function getDownloadDirectoryPath(): string;
167
-
168
- export { RunError, attemptStore, extendPayload, extendTimeout, getAiGatewayConfig, getAuthSessionParameters, getDownloadDirectoryPath, onCaptchaEvent, onceCaptchaEvent, pauseCaptchaSolver, persistentStore, removeCaptchaEventListener, resumeCaptchaSolver, runInfo, waitForCaptchaSolve, withWaitForCaptchaSolve };