@intuned/runtime-dev 1.3.18-interface.0 → 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,540 @@
1
+ import * as z from 'zod';
2
+
3
+ declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
4
+ enabled: z.ZodDefault<z.ZodBoolean>;
5
+ port: z.ZodOptional<z.ZodNumber>;
6
+ cloudflare: z.ZodOptional<z.ZodObject<{
7
+ enabled: z.ZodBoolean;
8
+ }, "strip", z.ZodTypeAny, {
9
+ enabled: boolean;
10
+ }, {
11
+ enabled: boolean;
12
+ }>>;
13
+ googleRecaptchaV2: z.ZodOptional<z.ZodObject<{
14
+ enabled: z.ZodBoolean;
15
+ }, "strip", z.ZodTypeAny, {
16
+ enabled: boolean;
17
+ }, {
18
+ enabled: boolean;
19
+ }>>;
20
+ googleRecaptchaV3: z.ZodOptional<z.ZodObject<{
21
+ enabled: z.ZodBoolean;
22
+ }, "strip", z.ZodTypeAny, {
23
+ enabled: boolean;
24
+ }, {
25
+ enabled: boolean;
26
+ }>>;
27
+ awscaptcha: z.ZodOptional<z.ZodObject<{
28
+ enabled: z.ZodBoolean;
29
+ }, "strip", z.ZodTypeAny, {
30
+ enabled: boolean;
31
+ }, {
32
+ enabled: boolean;
33
+ }>>;
34
+ hcaptcha: z.ZodOptional<z.ZodObject<{
35
+ enabled: z.ZodBoolean;
36
+ }, "strip", z.ZodTypeAny, {
37
+ enabled: boolean;
38
+ }, {
39
+ enabled: boolean;
40
+ }>>;
41
+ funcaptcha: z.ZodOptional<z.ZodObject<{
42
+ enabled: z.ZodBoolean;
43
+ }, "strip", z.ZodTypeAny, {
44
+ enabled: boolean;
45
+ }, {
46
+ enabled: boolean;
47
+ }>>;
48
+ geetest: z.ZodOptional<z.ZodObject<{
49
+ enabled: z.ZodBoolean;
50
+ }, "strip", z.ZodTypeAny, {
51
+ enabled: boolean;
52
+ }, {
53
+ enabled: boolean;
54
+ }>>;
55
+ lemin: z.ZodOptional<z.ZodObject<{
56
+ enabled: z.ZodBoolean;
57
+ }, "strip", z.ZodTypeAny, {
58
+ enabled: boolean;
59
+ }, {
60
+ enabled: boolean;
61
+ }>>;
62
+ customCaptcha: z.ZodOptional<z.ZodObject<{
63
+ enabled: z.ZodBoolean;
64
+ } & {
65
+ imageLocators: z.ZodArray<z.ZodString, "many">;
66
+ submitLocators: z.ZodArray<z.ZodString, "many">;
67
+ inputLocators: z.ZodArray<z.ZodString, "many">;
68
+ }, "strip", z.ZodTypeAny, {
69
+ enabled: boolean;
70
+ imageLocators: string[];
71
+ submitLocators: string[];
72
+ inputLocators: string[];
73
+ }, {
74
+ enabled: boolean;
75
+ imageLocators: string[];
76
+ submitLocators: string[];
77
+ inputLocators: string[];
78
+ }>>;
79
+ text: z.ZodOptional<z.ZodObject<{
80
+ enabled: z.ZodBoolean;
81
+ } & {
82
+ labelLocators: z.ZodArray<z.ZodString, "many">;
83
+ submitLocators: z.ZodArray<z.ZodString, "many">;
84
+ inputLocators: z.ZodArray<z.ZodString, "many">;
85
+ }, "strip", z.ZodTypeAny, {
86
+ enabled: boolean;
87
+ submitLocators: string[];
88
+ inputLocators: string[];
89
+ labelLocators: string[];
90
+ }, {
91
+ enabled: boolean;
92
+ submitLocators: string[];
93
+ inputLocators: string[];
94
+ labelLocators: string[];
95
+ }>>;
96
+ settings: z.ZodDefault<z.ZodObject<{
97
+ autoSolve: z.ZodDefault<z.ZodBoolean>;
98
+ solveDelay: z.ZodDefault<z.ZodNumber>;
99
+ maxRetries: z.ZodDefault<z.ZodNumber>;
100
+ timeout: z.ZodDefault<z.ZodNumber>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ autoSolve: boolean;
103
+ solveDelay: number;
104
+ maxRetries: number;
105
+ timeout: number;
106
+ }, {
107
+ autoSolve?: boolean | undefined;
108
+ solveDelay?: number | undefined;
109
+ maxRetries?: number | undefined;
110
+ timeout?: number | undefined;
111
+ }>>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ enabled: boolean;
114
+ settings: {
115
+ autoSolve: boolean;
116
+ solveDelay: number;
117
+ maxRetries: number;
118
+ timeout: number;
119
+ };
120
+ cloudflare?: {
121
+ enabled: boolean;
122
+ } | undefined;
123
+ funcaptcha?: {
124
+ enabled: boolean;
125
+ } | undefined;
126
+ geetest?: {
127
+ enabled: boolean;
128
+ } | undefined;
129
+ hcaptcha?: {
130
+ enabled: boolean;
131
+ } | undefined;
132
+ port?: number | undefined;
133
+ googleRecaptchaV2?: {
134
+ enabled: boolean;
135
+ } | undefined;
136
+ googleRecaptchaV3?: {
137
+ enabled: boolean;
138
+ } | undefined;
139
+ awscaptcha?: {
140
+ enabled: boolean;
141
+ } | undefined;
142
+ lemin?: {
143
+ enabled: boolean;
144
+ } | undefined;
145
+ customCaptcha?: {
146
+ enabled: boolean;
147
+ imageLocators: string[];
148
+ submitLocators: string[];
149
+ inputLocators: string[];
150
+ } | undefined;
151
+ text?: {
152
+ enabled: boolean;
153
+ submitLocators: string[];
154
+ inputLocators: string[];
155
+ labelLocators: string[];
156
+ } | undefined;
157
+ }, {
158
+ cloudflare?: {
159
+ enabled: boolean;
160
+ } | undefined;
161
+ funcaptcha?: {
162
+ enabled: boolean;
163
+ } | undefined;
164
+ geetest?: {
165
+ enabled: boolean;
166
+ } | undefined;
167
+ hcaptcha?: {
168
+ enabled: boolean;
169
+ } | undefined;
170
+ enabled?: boolean | undefined;
171
+ port?: number | undefined;
172
+ googleRecaptchaV2?: {
173
+ enabled: boolean;
174
+ } | undefined;
175
+ googleRecaptchaV3?: {
176
+ enabled: boolean;
177
+ } | undefined;
178
+ awscaptcha?: {
179
+ enabled: boolean;
180
+ } | undefined;
181
+ lemin?: {
182
+ enabled: boolean;
183
+ } | undefined;
184
+ customCaptcha?: {
185
+ enabled: boolean;
186
+ imageLocators: string[];
187
+ submitLocators: string[];
188
+ inputLocators: string[];
189
+ } | undefined;
190
+ text?: {
191
+ enabled: boolean;
192
+ submitLocators: string[];
193
+ inputLocators: string[];
194
+ labelLocators: string[];
195
+ } | undefined;
196
+ settings?: {
197
+ autoSolve?: boolean | undefined;
198
+ solveDelay?: number | undefined;
199
+ maxRetries?: number | undefined;
200
+ timeout?: number | undefined;
201
+ } | undefined;
202
+ }>>;
203
+ type CaptchaSolverSettings = z.infer<typeof captchaSolverSettingsSchema>;
204
+ type CaptchaSolverSettingsWithRunContext = CaptchaSolverSettings & {
205
+ workspaceId: string;
206
+ projectId: string;
207
+ baseUrl: string;
208
+ authentication: {
209
+ type: "apiKey";
210
+ apiKey: string;
211
+ } | {
212
+ type: "basic" | "bearer";
213
+ token?: string;
214
+ };
215
+ };
216
+ declare const settingsSchema: z.ZodObject<{
217
+ authSessions: z.ZodDefault<z.ZodOptional<z.ZodObject<{
218
+ enabled: z.ZodBoolean;
219
+ }, "strip", z.ZodTypeAny, {
220
+ enabled: boolean;
221
+ }, {
222
+ enabled: boolean;
223
+ }>>>;
224
+ stealthMode: z.ZodDefault<z.ZodOptional<z.ZodObject<{
225
+ enabled: z.ZodBoolean;
226
+ }, "strip", z.ZodTypeAny, {
227
+ enabled: boolean;
228
+ }, {
229
+ enabled: boolean;
230
+ }>>>;
231
+ captchaSolver: z.ZodOptional<z.ZodDefault<z.ZodObject<{
232
+ enabled: z.ZodDefault<z.ZodBoolean>;
233
+ port: z.ZodOptional<z.ZodNumber>;
234
+ cloudflare: z.ZodOptional<z.ZodObject<{
235
+ enabled: z.ZodBoolean;
236
+ }, "strip", z.ZodTypeAny, {
237
+ enabled: boolean;
238
+ }, {
239
+ enabled: boolean;
240
+ }>>;
241
+ googleRecaptchaV2: z.ZodOptional<z.ZodObject<{
242
+ enabled: z.ZodBoolean;
243
+ }, "strip", z.ZodTypeAny, {
244
+ enabled: boolean;
245
+ }, {
246
+ enabled: boolean;
247
+ }>>;
248
+ googleRecaptchaV3: z.ZodOptional<z.ZodObject<{
249
+ enabled: z.ZodBoolean;
250
+ }, "strip", z.ZodTypeAny, {
251
+ enabled: boolean;
252
+ }, {
253
+ enabled: boolean;
254
+ }>>;
255
+ awscaptcha: z.ZodOptional<z.ZodObject<{
256
+ enabled: z.ZodBoolean;
257
+ }, "strip", z.ZodTypeAny, {
258
+ enabled: boolean;
259
+ }, {
260
+ enabled: boolean;
261
+ }>>;
262
+ hcaptcha: z.ZodOptional<z.ZodObject<{
263
+ enabled: z.ZodBoolean;
264
+ }, "strip", z.ZodTypeAny, {
265
+ enabled: boolean;
266
+ }, {
267
+ enabled: boolean;
268
+ }>>;
269
+ funcaptcha: z.ZodOptional<z.ZodObject<{
270
+ enabled: z.ZodBoolean;
271
+ }, "strip", z.ZodTypeAny, {
272
+ enabled: boolean;
273
+ }, {
274
+ enabled: boolean;
275
+ }>>;
276
+ geetest: z.ZodOptional<z.ZodObject<{
277
+ enabled: z.ZodBoolean;
278
+ }, "strip", z.ZodTypeAny, {
279
+ enabled: boolean;
280
+ }, {
281
+ enabled: boolean;
282
+ }>>;
283
+ lemin: z.ZodOptional<z.ZodObject<{
284
+ enabled: z.ZodBoolean;
285
+ }, "strip", z.ZodTypeAny, {
286
+ enabled: boolean;
287
+ }, {
288
+ enabled: boolean;
289
+ }>>;
290
+ customCaptcha: z.ZodOptional<z.ZodObject<{
291
+ enabled: z.ZodBoolean;
292
+ } & {
293
+ imageLocators: z.ZodArray<z.ZodString, "many">;
294
+ submitLocators: z.ZodArray<z.ZodString, "many">;
295
+ inputLocators: z.ZodArray<z.ZodString, "many">;
296
+ }, "strip", z.ZodTypeAny, {
297
+ enabled: boolean;
298
+ imageLocators: string[];
299
+ submitLocators: string[];
300
+ inputLocators: string[];
301
+ }, {
302
+ enabled: boolean;
303
+ imageLocators: string[];
304
+ submitLocators: string[];
305
+ inputLocators: string[];
306
+ }>>;
307
+ text: z.ZodOptional<z.ZodObject<{
308
+ enabled: z.ZodBoolean;
309
+ } & {
310
+ labelLocators: z.ZodArray<z.ZodString, "many">;
311
+ submitLocators: z.ZodArray<z.ZodString, "many">;
312
+ inputLocators: z.ZodArray<z.ZodString, "many">;
313
+ }, "strip", z.ZodTypeAny, {
314
+ enabled: boolean;
315
+ submitLocators: string[];
316
+ inputLocators: string[];
317
+ labelLocators: string[];
318
+ }, {
319
+ enabled: boolean;
320
+ submitLocators: string[];
321
+ inputLocators: string[];
322
+ labelLocators: string[];
323
+ }>>;
324
+ settings: z.ZodDefault<z.ZodObject<{
325
+ autoSolve: z.ZodDefault<z.ZodBoolean>;
326
+ solveDelay: z.ZodDefault<z.ZodNumber>;
327
+ maxRetries: z.ZodDefault<z.ZodNumber>;
328
+ timeout: z.ZodDefault<z.ZodNumber>;
329
+ }, "strip", z.ZodTypeAny, {
330
+ autoSolve: boolean;
331
+ solveDelay: number;
332
+ maxRetries: number;
333
+ timeout: number;
334
+ }, {
335
+ autoSolve?: boolean | undefined;
336
+ solveDelay?: number | undefined;
337
+ maxRetries?: number | undefined;
338
+ timeout?: number | undefined;
339
+ }>>;
340
+ }, "strip", z.ZodTypeAny, {
341
+ enabled: boolean;
342
+ settings: {
343
+ autoSolve: boolean;
344
+ solveDelay: number;
345
+ maxRetries: number;
346
+ timeout: number;
347
+ };
348
+ cloudflare?: {
349
+ enabled: boolean;
350
+ } | undefined;
351
+ funcaptcha?: {
352
+ enabled: boolean;
353
+ } | undefined;
354
+ geetest?: {
355
+ enabled: boolean;
356
+ } | undefined;
357
+ hcaptcha?: {
358
+ enabled: boolean;
359
+ } | undefined;
360
+ port?: number | undefined;
361
+ googleRecaptchaV2?: {
362
+ enabled: boolean;
363
+ } | undefined;
364
+ googleRecaptchaV3?: {
365
+ enabled: boolean;
366
+ } | undefined;
367
+ awscaptcha?: {
368
+ enabled: boolean;
369
+ } | undefined;
370
+ lemin?: {
371
+ enabled: boolean;
372
+ } | undefined;
373
+ customCaptcha?: {
374
+ enabled: boolean;
375
+ imageLocators: string[];
376
+ submitLocators: string[];
377
+ inputLocators: string[];
378
+ } | undefined;
379
+ text?: {
380
+ enabled: boolean;
381
+ submitLocators: string[];
382
+ inputLocators: string[];
383
+ labelLocators: string[];
384
+ } | undefined;
385
+ }, {
386
+ cloudflare?: {
387
+ enabled: boolean;
388
+ } | undefined;
389
+ funcaptcha?: {
390
+ enabled: boolean;
391
+ } | undefined;
392
+ geetest?: {
393
+ enabled: boolean;
394
+ } | undefined;
395
+ hcaptcha?: {
396
+ enabled: boolean;
397
+ } | undefined;
398
+ enabled?: boolean | undefined;
399
+ port?: number | undefined;
400
+ googleRecaptchaV2?: {
401
+ enabled: boolean;
402
+ } | undefined;
403
+ googleRecaptchaV3?: {
404
+ enabled: boolean;
405
+ } | undefined;
406
+ awscaptcha?: {
407
+ enabled: boolean;
408
+ } | undefined;
409
+ lemin?: {
410
+ enabled: boolean;
411
+ } | undefined;
412
+ customCaptcha?: {
413
+ enabled: boolean;
414
+ imageLocators: string[];
415
+ submitLocators: string[];
416
+ inputLocators: string[];
417
+ } | undefined;
418
+ text?: {
419
+ enabled: boolean;
420
+ submitLocators: string[];
421
+ inputLocators: string[];
422
+ labelLocators: string[];
423
+ } | undefined;
424
+ settings?: {
425
+ autoSolve?: boolean | undefined;
426
+ solveDelay?: number | undefined;
427
+ maxRetries?: number | undefined;
428
+ timeout?: number | undefined;
429
+ } | undefined;
430
+ }>>>;
431
+ }, "strip", z.ZodTypeAny, {
432
+ authSessions: {
433
+ enabled: boolean;
434
+ };
435
+ stealthMode: {
436
+ enabled: boolean;
437
+ };
438
+ captchaSolver?: {
439
+ enabled: boolean;
440
+ settings: {
441
+ autoSolve: boolean;
442
+ solveDelay: number;
443
+ maxRetries: number;
444
+ timeout: number;
445
+ };
446
+ cloudflare?: {
447
+ enabled: boolean;
448
+ } | undefined;
449
+ funcaptcha?: {
450
+ enabled: boolean;
451
+ } | undefined;
452
+ geetest?: {
453
+ enabled: boolean;
454
+ } | undefined;
455
+ hcaptcha?: {
456
+ enabled: boolean;
457
+ } | undefined;
458
+ port?: number | undefined;
459
+ googleRecaptchaV2?: {
460
+ enabled: boolean;
461
+ } | undefined;
462
+ googleRecaptchaV3?: {
463
+ enabled: boolean;
464
+ } | undefined;
465
+ awscaptcha?: {
466
+ enabled: boolean;
467
+ } | undefined;
468
+ lemin?: {
469
+ enabled: boolean;
470
+ } | undefined;
471
+ customCaptcha?: {
472
+ enabled: boolean;
473
+ imageLocators: string[];
474
+ submitLocators: string[];
475
+ inputLocators: string[];
476
+ } | undefined;
477
+ text?: {
478
+ enabled: boolean;
479
+ submitLocators: string[];
480
+ inputLocators: string[];
481
+ labelLocators: string[];
482
+ } | undefined;
483
+ } | undefined;
484
+ }, {
485
+ authSessions?: {
486
+ enabled: boolean;
487
+ } | undefined;
488
+ stealthMode?: {
489
+ enabled: boolean;
490
+ } | undefined;
491
+ captchaSolver?: {
492
+ cloudflare?: {
493
+ enabled: boolean;
494
+ } | undefined;
495
+ funcaptcha?: {
496
+ enabled: boolean;
497
+ } | undefined;
498
+ geetest?: {
499
+ enabled: boolean;
500
+ } | undefined;
501
+ hcaptcha?: {
502
+ enabled: boolean;
503
+ } | undefined;
504
+ enabled?: boolean | undefined;
505
+ port?: number | undefined;
506
+ googleRecaptchaV2?: {
507
+ enabled: boolean;
508
+ } | undefined;
509
+ googleRecaptchaV3?: {
510
+ enabled: boolean;
511
+ } | undefined;
512
+ awscaptcha?: {
513
+ enabled: boolean;
514
+ } | undefined;
515
+ lemin?: {
516
+ enabled: boolean;
517
+ } | undefined;
518
+ customCaptcha?: {
519
+ enabled: boolean;
520
+ imageLocators: string[];
521
+ submitLocators: string[];
522
+ inputLocators: string[];
523
+ } | undefined;
524
+ text?: {
525
+ enabled: boolean;
526
+ submitLocators: string[];
527
+ inputLocators: string[];
528
+ labelLocators: string[];
529
+ } | undefined;
530
+ settings?: {
531
+ autoSolve?: boolean | undefined;
532
+ solveDelay?: number | undefined;
533
+ maxRetries?: number | undefined;
534
+ timeout?: number | undefined;
535
+ } | undefined;
536
+ } | undefined;
537
+ }>;
538
+ type IntunedSettings = z.infer<typeof settingsSchema>;
539
+
540
+ export { type CaptchaSolverSettings, type CaptchaSolverSettingsWithRunContext, type IntunedSettings, captchaSolverSettingsSchema, settingsSchema };
@@ -0,0 +1,92 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/common/settingsSchema.ts
30
+ var settingsSchema_exports = {};
31
+ __export(settingsSchema_exports, {
32
+ captchaSolverSettingsSchema: () => captchaSolverSettingsSchema,
33
+ settingsSchema: () => settingsSchema
34
+ });
35
+ module.exports = __toCommonJS(settingsSchema_exports);
36
+ var z = __toESM(require("zod"));
37
+ var baseCaptchaSchema = z.object({
38
+ enabled: z.boolean()
39
+ });
40
+ var customCaptchaSchema = baseCaptchaSchema.extend({
41
+ imageLocators: z.array(z.string()).min(1, "At least one image locator is required"),
42
+ submitLocators: z.array(z.string()).min(1, "At least one submit locator is required"),
43
+ inputLocators: z.array(z.string()).min(1, "At least one input locator is required")
44
+ });
45
+ var textCaptchaSchema = baseCaptchaSchema.extend({
46
+ labelLocators: z.array(z.string()).min(1, "At least one image locator is required"),
47
+ submitLocators: z.array(z.string()).min(1, "At least one submit locator is required"),
48
+ inputLocators: z.array(z.string()).min(1, "At least one input locator is required")
49
+ });
50
+ var captchaSolverSolveSettingsSchema = z.object({
51
+ autoSolve: z.boolean().default(true),
52
+ solveDelay: z.number().min(0).default(2e3),
53
+ maxRetries: z.number().min(0).default(3),
54
+ timeout: z.number().min(0).default(3e4)
55
+ });
56
+ var captchaSolverSettingsSchema = z.object({
57
+ enabled: z.boolean().default(false),
58
+ port: z.number().int().min(1).max(65535).optional(),
59
+ cloudflare: baseCaptchaSchema.optional(),
60
+ googleRecaptchaV2: baseCaptchaSchema.optional(),
61
+ googleRecaptchaV3: baseCaptchaSchema.optional(),
62
+ awscaptcha: baseCaptchaSchema.optional(),
63
+ hcaptcha: baseCaptchaSchema.optional(),
64
+ funcaptcha: baseCaptchaSchema.optional(),
65
+ geetest: baseCaptchaSchema.optional(),
66
+ lemin: baseCaptchaSchema.optional(),
67
+ customCaptcha: customCaptchaSchema.optional(),
68
+ text: textCaptchaSchema.optional(),
69
+ settings: captchaSolverSolveSettingsSchema.default(
70
+ captchaSolverSolveSettingsSchema.parse({})
71
+ )
72
+ }).default({});
73
+ var authSessionsSchema = z.object({
74
+ enabled: z.boolean()
75
+ }).optional().default({
76
+ enabled: false
77
+ });
78
+ var stealthModeSchema = z.object({
79
+ enabled: z.boolean()
80
+ }).optional().default({
81
+ enabled: false
82
+ });
83
+ var settingsSchema = z.object({
84
+ authSessions: authSessionsSchema,
85
+ stealthMode: stealthModeSchema,
86
+ captchaSolver: captchaSolverSettingsSchema.optional()
87
+ });
88
+ // Annotate the CommonJS export names for ESM import in node:
89
+ 0 && (module.exports = {
90
+ captchaSolverSettingsSchema,
91
+ settingsSchema
92
+ });
@@ -0,0 +1,6 @@
1
+ import * as appInsights from 'applicationinsights';
2
+
3
+ declare function initializeAppInsights(): void;
4
+ declare function getTelemetryClient(): appInsights.TelemetryClient | undefined;
5
+
6
+ export { getTelemetryClient, initializeAppInsights };
@@ -0,0 +1,63 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/common/telemetry.ts
30
+ var telemetry_exports = {};
31
+ __export(telemetry_exports, {
32
+ getTelemetryClient: () => getTelemetryClient,
33
+ initializeAppInsights: () => initializeAppInsights
34
+ });
35
+ module.exports = __toCommonJS(telemetry_exports);
36
+ var appInsights = __toESM(require("applicationinsights"));
37
+ function gracefulShutdown() {
38
+ console.log("Shutting down, so flushing app insights.");
39
+ appInsights.defaultClient.flush();
40
+ process.exit();
41
+ }
42
+ function initializeAppInsights() {
43
+ const appInsightsConnectionString = process.env.APPINSIGHTS_CONNECTION_STRING;
44
+ if (appInsightsConnectionString) {
45
+ console.log("Initializing app insights.");
46
+ appInsights.setup(appInsightsConnectionString).setAutoCollectConsole(true, true).setAutoCollectDependencies(true).setAutoCollectExceptions(true).setAutoCollectHeartbeat(true).setAutoCollectPerformance(true, true).setAutoCollectRequests(true).setAutoDependencyCorrelation(true).setDistributedTracingMode(appInsights.DistributedTracingModes.AI_AND_W3C).setSendLiveMetrics(true).setUseDiskRetryCaching(true);
47
+ appInsights.defaultClient.context.tags[appInsights.defaultClient.context.keys.cloudRole] = "@intuned/sdk";
48
+ if (process.env.FLY_APP_NAME) {
49
+ appInsights.defaultClient.context.tags[appInsights.defaultClient.context.keys.cloudRoleInstance] = process.env.FLY_APP_NAME;
50
+ }
51
+ process.on("SIGTERM", gracefulShutdown);
52
+ process.on("SIGINT", gracefulShutdown);
53
+ appInsights.start();
54
+ }
55
+ }
56
+ function getTelemetryClient() {
57
+ return appInsights.defaultClient;
58
+ }
59
+ // Annotate the CommonJS export names for ESM import in node:
60
+ 0 && (module.exports = {
61
+ getTelemetryClient,
62
+ initializeAppInsights
63
+ });