@intuned/runtime-dev 1.3.18-interface.1 → 1.3.18-interface.10

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 (40) hide show
  1. package/dist/commands/common/tsNodeImport.d.ts +5 -0
  2. package/dist/commands/common/tsNodeImport.js +82 -0
  3. package/dist/commands/interface/run.d.ts +3 -0
  4. package/dist/commands/interface/run.js +2096 -0
  5. package/dist/common/assets/browser_scripts.js +2580 -0
  6. package/dist/common/asyncLocalStorage/index.d.ts +17 -0
  7. package/dist/common/asyncLocalStorage/index.js +41 -0
  8. package/dist/common/binStartupScript.d.ts +2 -0
  9. package/dist/common/binStartupScript.js +152 -0
  10. package/dist/common/cleanEnvironmentVariables.d.ts +3 -0
  11. package/dist/common/cleanEnvironmentVariables.js +38 -0
  12. package/dist/common/constants.d.ts +13 -0
  13. package/dist/common/constants.js +59 -0
  14. package/dist/common/contextStorageStateHelpers.d.ts +24 -0
  15. package/dist/common/contextStorageStateHelpers.js +108 -0
  16. package/dist/common/jwtTokenManager.d.ts +19 -0
  17. package/dist/common/jwtTokenManager.js +180 -0
  18. package/dist/common/runApi/index.d.ts +11 -0
  19. package/dist/common/runApi/index.js +1885 -0
  20. package/dist/common/settingsSchema.d.ts +540 -0
  21. package/dist/common/settingsSchema.js +92 -0
  22. package/dist/common/telemetry.d.ts +6 -0
  23. package/dist/common/telemetry.js +63 -0
  24. package/dist/export.d-BAUMB-lG.d.ts +140 -0
  25. package/dist/index.d.ts +6 -0
  26. package/dist/index.js +808 -0
  27. package/dist/runtime/index.d.ts +168 -0
  28. package/dist/runtime/index.js +801 -0
  29. package/package.json +63 -18
  30. package/.babelrc +0 -21
  31. package/.eslintignore +0 -10
  32. package/.eslintrc.js +0 -39
  33. package/InterfaceTemplate/__utils.ts +0 -61
  34. package/InterfaceTemplate/index.playwright.ts +0 -6
  35. package/WebTemplate.zip +0 -0
  36. package/api/sample.ts +0 -4
  37. package/template.tsconfig.json +0 -11
  38. package/tsconfig.eslint.json +0 -5
  39. package/tsconfig.json +0 -25
  40. package/typedoc.json +0 -49
@@ -0,0 +1,168 @@
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 };