@iflow-mcp/roxybrowserlabs-roxybrowser-mcp-server 1.0.9

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.
package/lib/types.d.ts ADDED
@@ -0,0 +1,1195 @@
1
+ /**
2
+ * RoxyBrowser MCP Server Types
3
+ *
4
+ * TypeScript type definitions for RoxyBrowser API and MCP server functionality
5
+ */
6
+ /** Base API response structure */
7
+ export interface RoxyApiResponse<T = unknown> {
8
+ code: number;
9
+ msg: string;
10
+ data?: T;
11
+ }
12
+ /** Workspace project details */
13
+ export interface ProjectDetails {
14
+ projectId: number;
15
+ projectName: string;
16
+ }
17
+ /** Workspace information */
18
+ export interface Workspace {
19
+ id: number;
20
+ workspaceName: string;
21
+ project_details: ProjectDetails[];
22
+ }
23
+ /** Paginated workspace response */
24
+ export interface WorkspaceListResponse {
25
+ total: number;
26
+ rows: Workspace[];
27
+ }
28
+ /** Browser open result (single browser) */
29
+ export interface BrowserOpenResult {
30
+ /**
31
+ * WebSocket CDP endpoint
32
+ */
33
+ ws: string;
34
+ http: string; /**
35
+ * HTTP endpoint
36
+ */
37
+ coreVersion: string; /**
38
+ * Browser core version
39
+ */
40
+ driver: string; /**
41
+ * WebDriver path
42
+ */
43
+ sortNum: number; /**
44
+ * Window sort number
45
+ */
46
+ windowName: string; /**
47
+ * Window name
48
+ */
49
+ windowRemark: string; /**
50
+ * Window remark
51
+ */
52
+ pid: number; /**
53
+ * Process ID
54
+ */
55
+ /**
56
+ * Browser directory ID
57
+ */
58
+ dirId?: string;
59
+ }
60
+ /** Browser list item */
61
+ export interface BrowserListItem {
62
+ dirId: string; /**
63
+ * Browser directory ID
64
+ */
65
+ workspaceId: number; /**
66
+ * Workspace ID
67
+ */
68
+ projectId: number; /**
69
+ * Project ID
70
+ */
71
+ windowName: string; /**
72
+ * Window name
73
+ */
74
+ windowRemark: string; /**
75
+ * Window remark
76
+ */
77
+ sortNum: number; /**
78
+ * Window sort number
79
+ */
80
+ os: string; /**
81
+ * Operating system
82
+ */
83
+ /**
84
+ * Browser status
85
+ */
86
+ status: string;
87
+ }
88
+ /** Paginated browser list response */
89
+ export interface BrowserListResponse {
90
+ total: number;
91
+ rows: BrowserListItem[];
92
+ }
93
+ /** Browser list query parameters */
94
+ export interface BrowserListParams {
95
+ workspaceId: number;
96
+ dirIds?: string; /**
97
+ * Comma-separated browser IDs
98
+ */
99
+ windowName?: string; /**
100
+ * Browser window name
101
+ */
102
+ sortNums?: string; /**
103
+ * Comma-separated sort numbers
104
+ */
105
+ os?: string; /**
106
+ * Operating system
107
+ */
108
+ projectIds?: string; /**
109
+ * Comma-separated project IDs
110
+ */
111
+ windowRemark?: string; /**
112
+ * Window remark
113
+ */
114
+ page_index?: number; /**
115
+ * Page index (default: 1)
116
+ */
117
+ /**
118
+ * Page size (default: 15)
119
+ */
120
+ page_size?: number;
121
+ }
122
+ /** Browser open parameters */
123
+ export interface BrowserOpenParams {
124
+ workspaceId: number;
125
+ dirId: string; /**
126
+ * Browser directory ID
127
+ */
128
+ /**
129
+ * Browser startup arguments
130
+ */
131
+ args?: string[];
132
+ }
133
+ /** Browser close parameters */
134
+ export interface BrowserCloseParams {
135
+ /**
136
+ * Browser directory ID
137
+ */
138
+ dirId: string;
139
+ }
140
+ /** Workspace list tool response */
141
+ export interface WorkspaceListToolResponse {
142
+ workspaces: Workspace[];
143
+ total: number;
144
+ }
145
+ /** Browser list tool parameters */
146
+ export interface BrowserListToolParams {
147
+ workspaceId: number;
148
+ projectIds?: string; /**
149
+ * Comma-separated project IDs
150
+ */
151
+ windowName?: string;
152
+ pageIndex?: number;
153
+ pageSize?: number;
154
+ }
155
+ /** Browser list tool response */
156
+ export interface BrowserListToolResponse {
157
+ browsers: BrowserListItem[];
158
+ total: number;
159
+ workspaceId: number;
160
+ }
161
+ /** Browser open tool parameters */
162
+ export interface BrowserOpenToolParams {
163
+ workspaceId: number;
164
+ dirIds: string[]; /**
165
+ * Array of browser directory IDs
166
+ */
167
+ /**
168
+ * Optional browser startup arguments
169
+ */
170
+ args?: string[];
171
+ }
172
+ /** Browser open tool response */
173
+ export interface BrowserOpenToolResponse {
174
+ results: {
175
+ dirId: string;
176
+ ws: string; /**
177
+ * CDP WebSocket endpoint
178
+ */
179
+ http: string; /**
180
+ * HTTP endpoint
181
+ */
182
+ pid: number;
183
+ success: boolean;
184
+ error?: string;
185
+ }[];
186
+ total: number;
187
+ successCount: number;
188
+ failureCount: number;
189
+ }
190
+ /** Browser close tool parameters */
191
+ export interface BrowserCloseToolParams {
192
+ /**
193
+ * Array of browser directory IDs
194
+ */
195
+ dirIds: string[];
196
+ }
197
+ /** Browser close tool response */
198
+ export interface BrowserCloseToolResponse {
199
+ results: {
200
+ dirId: string;
201
+ success: boolean;
202
+ error?: string;
203
+ }[];
204
+ total: number;
205
+ successCount: number;
206
+ failureCount: number;
207
+ }
208
+ /** Browser delete tool parameters */
209
+ export interface BrowserDeleteToolParams {
210
+ workspaceId: number; /**
211
+ * Workspace ID
212
+ */
213
+ /**
214
+ * Array of browser directory IDs to delete
215
+ */
216
+ dirIds: string[];
217
+ }
218
+ /** Browser delete tool response */
219
+ export interface BrowserDeleteToolResponse {
220
+ results: {
221
+ dirId: string;
222
+ success: boolean;
223
+ error?: string;
224
+ }[];
225
+ successCount: number;
226
+ failureCount: number;
227
+ message: string;
228
+ }
229
+ /** RoxyBrowser client configuration */
230
+ export interface RoxyClientConfig {
231
+ apiHost: string; /**
232
+ * RoxyBrowser API host (default: http://127.0.0.1:50000)
233
+ */
234
+ apiKey: string; /**
235
+ * RoxyBrowser API key
236
+ */
237
+ /**
238
+ * Request timeout in milliseconds (default: 30000)
239
+ */
240
+ timeout?: number;
241
+ }
242
+ /** Browser operating system types */
243
+ export type BrowserOS = 'Windows' | 'macOS' | 'Linux' | 'IOS' | 'Android';
244
+ /** Browser core versions */
245
+ export type CoreVersion = '140' | '138' | '137' | '136' | '135' | '133' | '130' | '125' | '117' | '109';
246
+ /** Latest/recommended browser core version */
247
+ export declare const LATEST_CORE_VERSION: CoreVersion;
248
+ /** Search engine options */
249
+ export type SearchEngine = 'Google' | 'Microsoft Bing' | 'Yahoo' | 'Yandex' | 'DuckDuckGo';
250
+ /** Window platform information */
251
+ export interface WindowPlatformInfo {
252
+ platformUrl?: string; /**
253
+ * Business platform URL
254
+ */
255
+ platformUserName?: string; /**
256
+ * Platform account
257
+ */
258
+ platformPassword?: string; /**
259
+ * Platform password
260
+ */
261
+ platformEfa?: string; /**
262
+ * EFA value
263
+ */
264
+ /**
265
+ * Platform remarks
266
+ */
267
+ platformRemarks?: string;
268
+ }
269
+ /** Proxy configuration details */
270
+ export interface ProxyInfo {
271
+ proxyMethod?: 'custom' | 'choose' | 'api'; /**
272
+ * Proxy method
273
+ */
274
+ proxyCategory?: 'noproxy' | 'HTTP' | 'HTTPS' | 'SOCKS5' | 'SSH'; /**
275
+ * Proxy type
276
+ */
277
+ ipType?: 'IPV4' | 'IPV6'; /**
278
+ * Network protocol
279
+ */
280
+ protocol?: 'HTTP' | 'HTTPS' | 'SOCKS5'; /**
281
+ * Proxy protocol
282
+ */
283
+ host?: string; /**
284
+ * Proxy host
285
+ */
286
+ port?: string; /**
287
+ * Proxy port
288
+ */
289
+ proxyUserName?: string; /**
290
+ * Proxy username
291
+ */
292
+ proxyPassword?: string; /**
293
+ * Proxy password
294
+ */
295
+ refreshUrl?: string; /**
296
+ * Refresh URL
297
+ */
298
+ /**
299
+ * IP query channel
300
+ */
301
+ checkChannel?: 'IPRust.io' | 'IP-API' | 'IP123.in';
302
+ }
303
+ /** Fingerprint configuration */
304
+ export interface FingerInfo {
305
+ /**
306
+ * Language settings
307
+ */
308
+ isLanguageBaseIp?: boolean; /**
309
+ * Follow IP matching for browser language
310
+ */
311
+ language?: string; /**
312
+ * Custom browser language
313
+ */
314
+ isDisplayLanguageBaseIp?: boolean; /**
315
+ * Follow IP matching for display language
316
+ */
317
+ /**
318
+ * Custom display language
319
+ */
320
+ displayLanguage?: string;
321
+ /**
322
+ * Location and timezone
323
+ */
324
+ isTimeZone?: boolean; /**
325
+ * Follow IP matching for timezone
326
+ */
327
+ timeZone?: string; /**
328
+ * Custom timezone
329
+ */
330
+ position?: 0 | 1 | 2; /**
331
+ * Geolocation prompt: 0=ask, 1=allow, 2=deny
332
+ */
333
+ isPositionBaseIp?: boolean; /**
334
+ * Follow IP matching for geolocation
335
+ */
336
+ longitude?: string; /**
337
+ * Custom longitude
338
+ */
339
+ latitude?: string; /**
340
+ * Custom latitude
341
+ */
342
+ /**
343
+ * Precision in meters
344
+ */
345
+ precisionPos?: string;
346
+ /**
347
+ * Media settings
348
+ */
349
+ forbidAudio?: boolean; /**
350
+ * Enable/disable sound
351
+ */
352
+ forbidImage?: boolean; /**
353
+ * Enable/disable image loading
354
+ */
355
+ /**
356
+ * Enable/disable video playback
357
+ */
358
+ forbidMedia?: boolean;
359
+ /**
360
+ * Window settings
361
+ */
362
+ openWidth?: string; /**
363
+ * Window width
364
+ */
365
+ openHeight?: string; /**
366
+ * Window height
367
+ */
368
+ openBookmarks?: boolean; /**
369
+ * Enable bookmarks
370
+ */
371
+ positionSwitch?: boolean; /**
372
+ * Window position switch
373
+ */
374
+ windowRatioPosition?: string; /**
375
+ * Window position ratio
376
+ */
377
+ /**
378
+ * Show window name in title bar
379
+ */
380
+ isDisplayName?: boolean;
381
+ /**
382
+ * Sync settings
383
+ */
384
+ syncBookmark?: boolean; /**
385
+ * Sync bookmarks
386
+ */
387
+ syncHistory?: boolean; /**
388
+ * Sync history
389
+ */
390
+ syncTab?: boolean; /**
391
+ * Sync tabs
392
+ */
393
+ syncCookie?: boolean; /**
394
+ * Sync cookies
395
+ */
396
+ syncExtensions?: boolean; /**
397
+ * Sync extensions
398
+ */
399
+ syncPassword?: boolean; /**
400
+ * Sync saved passwords
401
+ */
402
+ syncIndexedDb?: boolean; /**
403
+ * Sync IndexedDB
404
+ */
405
+ /**
406
+ * Sync LocalStorage
407
+ */
408
+ syncLocalStorage?: boolean;
409
+ /**
410
+ * Cleanup settings
411
+ */
412
+ clearCacheFile?: boolean; /**
413
+ * Clear cache files on startup
414
+ */
415
+ clearCookie?: boolean; /**
416
+ * Clear cookies on startup
417
+ */
418
+ /**
419
+ * Clear LocalStorage on startup
420
+ */
421
+ clearLocalStorage?: boolean;
422
+ /**
423
+ * Advanced settings
424
+ */
425
+ randomFingerprint?: boolean; /**
426
+ * Generate random fingerprint
427
+ */
428
+ forbidSavePassword?: boolean; /**
429
+ * Disable password save prompts
430
+ */
431
+ stopOpenNet?: boolean; /**
432
+ * Stop opening if network fails
433
+ */
434
+ stopOpenIP?: boolean; /**
435
+ * Stop opening if IP changes
436
+ */
437
+ stopOpenPosition?: boolean; /**
438
+ * Stop opening if IP location changes
439
+ */
440
+ /**
441
+ * Open workbench: 0=close, 1=open, 2=follow app
442
+ */
443
+ openWorkbench?: 0 | 1 | 2;
444
+ /**
445
+ * Display settings
446
+ */
447
+ resolutionType?: boolean; /**
448
+ * Custom resolution vs follow system
449
+ */
450
+ resolutionX?: string; /**
451
+ * Custom resolution width
452
+ */
453
+ resolutionY?: string; /**
454
+ * Custom resolution height
455
+ */
456
+ /**
457
+ * Random fonts vs system fonts
458
+ */
459
+ fontType?: boolean;
460
+ /**
461
+ * Browser fingerprint settings
462
+ */
463
+ webRTC?: 0 | 1 | 2; /**
464
+ * WebRTC: 0=replace, 1=real, 2=disable
465
+ */
466
+ webGL?: boolean; /**
467
+ * WebGL: random vs real
468
+ */
469
+ webGLInfo?: boolean; /**
470
+ * WebGL info: custom vs real
471
+ */
472
+ webGLManufacturer?: string; /**
473
+ * Custom WebGL manufacturer
474
+ */
475
+ webGLRender?: string; /**
476
+ * Custom WebGL renderer
477
+ */
478
+ webGpu?: 'webgl' | 'real' | 'block'; /**
479
+ * WebGPU setting
480
+ */
481
+ canvas?: boolean; /**
482
+ * Canvas: random vs real
483
+ */
484
+ audioContext?: boolean; /**
485
+ * AudioContext: random vs real
486
+ */
487
+ speechVoices?: boolean; /**
488
+ * Speech Voices: random vs real
489
+ */
490
+ doNotTrack?: boolean; /**
491
+ * Enable Do Not Track
492
+ */
493
+ clientRects?: boolean; /**
494
+ * ClientRects: random vs real
495
+ */
496
+ deviceInfo?: boolean; /**
497
+ * Media devices: random vs real
498
+ */
499
+ deviceNameSwitch?: boolean; /**
500
+ * Device names: random vs real
501
+ */
502
+ macInfo?: boolean; /**
503
+ * MAC address: custom vs real
504
+ */
505
+ hardwareConcurrent?: string; /**
506
+ * Hardware concurrency
507
+ */
508
+ deviceMemory?: string; /**
509
+ * Device memory
510
+ */
511
+ disableSsl?: boolean; /**
512
+ * SSL fingerprint settings
513
+ */
514
+ disableSslList?: string[]; /**
515
+ * SSL feature list
516
+ */
517
+ portScanProtect?: boolean; /**
518
+ * Port scan protection
519
+ */
520
+ portScanList?: string; /**
521
+ * Port scan whitelist
522
+ */
523
+ useGpu?: boolean; /**
524
+ * Use GPU acceleration
525
+ */
526
+ sandboxPermission?: boolean; /**
527
+ * Disable sandbox
528
+ */
529
+ /**
530
+ * Browser startup parameters
531
+ */
532
+ startupParam?: string;
533
+ }
534
+ /** Complete browser creation configuration */
535
+ export interface BrowserCreateConfig {
536
+ workspaceId: number; /**
537
+ * Required: Workspace ID
538
+ */
539
+ windowName?: string; /**
540
+ * Window name
541
+ */
542
+ coreVersion?: CoreVersion; /**
543
+ * Browser core version
544
+ */
545
+ os?: BrowserOS; /**
546
+ * Operating system
547
+ */
548
+ osVersion?: string; /**
549
+ * OS version
550
+ */
551
+ userAgent?: string; /**
552
+ * Custom user agent
553
+ */
554
+ cookie?: unknown[]; /**
555
+ * Cookie list
556
+ */
557
+ searchEngine?: SearchEngine; /**
558
+ * Default search engine
559
+ */
560
+ labelIds?: number[]; /**
561
+ * Label IDs
562
+ */
563
+ windowPlatformList?: WindowPlatformInfo[]; /**
564
+ * Platform account info
565
+ */
566
+ defaultOpenUrl?: string[]; /**
567
+ * Default URLs to open
568
+ */
569
+ windowRemark?: string; /**
570
+ * Window remarks
571
+ */
572
+ projectId?: number; /**
573
+ * Project ID
574
+ */
575
+ proxyInfo?: ProxyInfo; /**
576
+ * Proxy configuration
577
+ */
578
+ /**
579
+ * Fingerprint configuration
580
+ */
581
+ fingerInfo?: FingerInfo;
582
+ }
583
+ /** Simple browser creation parameters - for most common use cases */
584
+ export interface BrowserCreateSimpleParams {
585
+ workspaceId: number; /**
586
+ * Required: Workspace ID
587
+ */
588
+ windowName?: string; /**
589
+ * Window name
590
+ */
591
+ projectId?: number; /**
592
+ * Project ID
593
+ */
594
+ windowRemark?: string; /**
595
+ * Window remarks
596
+ */
597
+ proxyHost?: string; /**
598
+ * Simple proxy host
599
+ */
600
+ proxyPort?: string; /**
601
+ * Simple proxy port
602
+ */
603
+ proxyUserName?: string; /**
604
+ * Simple proxy username
605
+ */
606
+ proxyPassword?: string; /**
607
+ * Simple proxy password
608
+ */
609
+ /**
610
+ * Simple proxy type
611
+ */
612
+ proxyType?: 'HTTP' | 'HTTPS' | 'SOCKS5';
613
+ }
614
+ /** Standard browser creation parameters - covers 80% of use cases */
615
+ export interface BrowserCreateStandardParams {
616
+ workspaceId: number; /**
617
+ * Required: Workspace ID
618
+ */
619
+ windowName?: string; /**
620
+ * Window name
621
+ */
622
+ projectId?: number; /**
623
+ * Project ID
624
+ */
625
+ windowRemark?: string; /**
626
+ * Window remarks
627
+ */
628
+ os?: BrowserOS; /**
629
+ * Operating system
630
+ */
631
+ osVersion?: string; /**
632
+ * OS version
633
+ */
634
+ coreVersion?: CoreVersion; /**
635
+ * Browser core version
636
+ */
637
+ proxyInfo?: ProxyInfo; /**
638
+ * Complete proxy configuration
639
+ */
640
+ openWidth?: string; /**
641
+ * Window width
642
+ */
643
+ openHeight?: string; /**
644
+ * Window height
645
+ */
646
+ language?: string; /**
647
+ * Browser language
648
+ */
649
+ timeZone?: string; /**
650
+ * Timezone
651
+ */
652
+ /**
653
+ * Default URLs
654
+ */
655
+ defaultOpenUrl?: string[];
656
+ }
657
+ /** Advanced browser creation parameters - full control */
658
+ export interface BrowserCreateAdvancedParams extends BrowserCreateConfig {
659
+ }
660
+ /** Browser creation result */
661
+ export interface BrowserCreateResult {
662
+ dirId: string; /**
663
+ * Browser directory ID
664
+ */
665
+ windowName: string; /**
666
+ * Window name
667
+ */
668
+ success: boolean; /**
669
+ * Creation success
670
+ */
671
+ /**
672
+ * Error message if failed
673
+ */
674
+ error?: string;
675
+ }
676
+ /** Batch browser creation result */
677
+ export interface BrowserCreateBatchResult {
678
+ results: BrowserCreateResult[]; /**
679
+ * Individual results
680
+ */
681
+ successCount: number; /**
682
+ * Number of successful creations
683
+ */
684
+ failureCount: number; /**
685
+ * Number of failed creations
686
+ */
687
+ /**
688
+ * Total attempts
689
+ */
690
+ total: number;
691
+ }
692
+ /** Simple browser creation tool response */
693
+ export interface BrowserCreateSimpleResponse {
694
+ browser: {
695
+ dirId: string;
696
+ windowName: string;
697
+ workspaceId: number;
698
+ projectId?: number;
699
+ proxyConfigured: boolean;
700
+ };
701
+ message: string;
702
+ }
703
+ /** Standard browser creation tool response */
704
+ export interface BrowserCreateStandardResponse {
705
+ browser: {
706
+ dirId: string;
707
+ windowName: string;
708
+ workspaceId: number;
709
+ projectId?: number;
710
+ os: string;
711
+ coreVersion: string;
712
+ proxyInfo?: ProxyInfo;
713
+ windowSize: string;
714
+ };
715
+ message: string;
716
+ }
717
+ /** Advanced browser creation tool response */
718
+ export interface BrowserCreateAdvancedResponse {
719
+ browser: {
720
+ dirId: string;
721
+ config: BrowserCreateConfig;
722
+ };
723
+ message: string;
724
+ }
725
+ /** RoxyBrowser API error codes mapping */
726
+ export declare enum RoxyApiErrorCode {
727
+ SUCCESS = 0,// 成功
728
+ INSUFFICIENT_QUOTA = 101,// 窗口额度不足
729
+ INVALID_PARAMS = 400,// 参数错误
730
+ UNAUTHORIZED = 401,// 认证失败
731
+ FORBIDDEN = 403,// 权限不足
732
+ NOT_FOUND = 404,// 资源不存在
733
+ TIMEOUT = 408,// 请求超时
734
+ CONFLICT = 409,// 资源冲突
735
+ SERVER_ERROR = 500,// 服务器内部错误
736
+ BAD_GATEWAY = 502,// 网关错误
737
+ SERVICE_UNAVAILABLE = 503,// 服务不可用
738
+ GATEWAY_TIMEOUT = 504
739
+ }
740
+ /** Error information with troubleshooting guidance */
741
+ export interface ErrorInfo {
742
+ code: number;
743
+ name: string;
744
+ description: string;
745
+ chineseMsg: string;
746
+ englishMsg: string;
747
+ category: 'network' | 'authentication' | 'configuration' | 'resource' | 'server' | 'browser' | 'proxy';
748
+ severity: 'low' | 'medium' | 'high' | 'critical';
749
+ troubleshooting: string[];
750
+ autoRecoverable: boolean;
751
+ retryable: boolean;
752
+ }
753
+ /** Error mapping for RoxyBrowser API */
754
+ export declare const ROXY_ERROR_MAP: Record<number, ErrorInfo>;
755
+ /** Network error patterns and their solutions */
756
+ export declare const NETWORK_ERROR_PATTERNS: Array<{
757
+ pattern: RegExp;
758
+ category: string;
759
+ description: string;
760
+ troubleshooting: string[];
761
+ }>;
762
+ /** Enhanced RoxyBrowser API error */
763
+ export declare class RoxyApiError extends Error {
764
+ code: number;
765
+ response?: unknown | undefined;
766
+ originalError?: Error | undefined;
767
+ readonly errorInfo?: ErrorInfo;
768
+ readonly troubleshooting: string[];
769
+ readonly category: string;
770
+ readonly severity: string;
771
+ readonly retryable: boolean;
772
+ constructor(message: string, code: number, response?: unknown | undefined, originalError?: Error | undefined);
773
+ /** Get user-friendly error explanation */
774
+ getExplanation(): string;
775
+ /** Get troubleshooting steps */
776
+ getTroubleshootingSteps(): string[];
777
+ /** Check if error is retryable */
778
+ isRetryable(): boolean;
779
+ /** Get retry strategy */
780
+ getRetryStrategy(): {
781
+ shouldRetry: boolean;
782
+ delayMs: number;
783
+ maxRetries: number;
784
+ };
785
+ }
786
+ /** Configuration error */
787
+ export declare class ConfigError extends Error {
788
+ constructor(message: string);
789
+ }
790
+ /** Browser creation error */
791
+ export declare class BrowserCreationError extends Error {
792
+ failedConfigs?: Partial<BrowserCreateConfig>[] | undefined;
793
+ partialResults?: BrowserCreateResult[] | undefined;
794
+ constructor(message: string, failedConfigs?: Partial<BrowserCreateConfig>[] | undefined, partialResults?: BrowserCreateResult[] | undefined);
795
+ }
796
+ /** Account item */
797
+ export interface AccountItem {
798
+ id: number; /**
799
+ * Account ID
800
+ */
801
+ platformUrl: string; /**
802
+ * Business platform URL
803
+ */
804
+ platformUserName: string; /**
805
+ * Account username
806
+ */
807
+ platformPassword: string; /**
808
+ * Account password
809
+ */
810
+ platformEfa: string; /**
811
+ * Account EFA
812
+ */
813
+ platformCookies: Array<{
814
+ name: string;
815
+ value: string;
816
+ domain: string;
817
+ }>;
818
+ platformName: string; /**
819
+ * Platform name
820
+ */
821
+ platformRemarks: string; /**
822
+ * Platform remarks
823
+ */
824
+ createTime: string; /**
825
+ * Create time
826
+ */
827
+ /**
828
+ * Update time
829
+ */
830
+ updateTime: string;
831
+ }
832
+ /** Paginated account list response */
833
+ export interface AccountListResponse {
834
+ total: number;
835
+ rows: AccountItem[];
836
+ }
837
+ /** Account list query parameters */
838
+ export interface AccountListParams {
839
+ workspaceId: number;
840
+ accountId?: number;
841
+ page_index?: number;
842
+ page_size?: number;
843
+ }
844
+ /** Account create parameters */
845
+ export interface AccountCreateParams {
846
+ workspaceId: number;
847
+ /**
848
+ * Business platform URL (required)
849
+ */
850
+ platformUrl: string;
851
+ /**
852
+ * Account username (required)
853
+ */
854
+ platformUserName: string;
855
+ /**
856
+ * Account password (required)
857
+ */
858
+ platformPassword: string;
859
+ /**
860
+ * Account EFA (optional)
861
+ */
862
+ platformEfa?: string;
863
+ /**
864
+ * Account cookies (optional)
865
+ */
866
+ platformCookies?: Array<{
867
+ name: string;
868
+ value: string;
869
+ domain: string;
870
+ }>;
871
+ /**
872
+ * Platform name (optional)
873
+ */
874
+ platformName?: string;
875
+ /**
876
+ * Platform remarks/notes (optional)
877
+ */
878
+ platformRemarks?: string;
879
+ }
880
+ /** Account modify parameters (same as create but with id) */
881
+ export interface AccountModifyParams extends AccountCreateParams {
882
+ /**
883
+ * Account ID (required for modify)
884
+ */
885
+ id: number;
886
+ }
887
+ /** Account delete parameters */
888
+ export interface AccountDeleteParams {
889
+ workspaceId: number;
890
+ /**
891
+ * Array of account IDs to delete
892
+ */
893
+ ids: number[];
894
+ }
895
+ /** Batch create account parameters */
896
+ export interface AccountBatchCreateParams {
897
+ workspaceId: number;
898
+ /**
899
+ * Array of account configurations
900
+ */
901
+ accountList: AccountCreateParams[];
902
+ }
903
+ /** Label item */
904
+ export interface LabelItem {
905
+ id: number; /**
906
+ * Label ID
907
+ */
908
+ color: string; /**
909
+ * Label color
910
+ */
911
+ /**
912
+ * Label name
913
+ */
914
+ name: string;
915
+ }
916
+ /** Label list response */
917
+ export interface LabelListResponse {
918
+ labels: LabelItem[];
919
+ }
920
+ /** Connection info item for opened browser */
921
+ export interface ConnectionInfoItem {
922
+ ws: string; /**
923
+ * WebSocket endpoint for automation tools
924
+ */
925
+ http: string; /**
926
+ * HTTP endpoint for automation tools
927
+ */
928
+ coreVersion: string; /**
929
+ * Core version
930
+ */
931
+ driver: string; /**
932
+ * WebDriver path for automation tools
933
+ */
934
+ sortNum: number; /**
935
+ * Window sort number
936
+ */
937
+ windowName: string; /**
938
+ * Window name
939
+ */
940
+ windowRemark: string; /**
941
+ * Window remark
942
+ */
943
+ pid: number; /**
944
+ * Process ID
945
+ */
946
+ /**
947
+ * Browser directory ID
948
+ */
949
+ dirId: string;
950
+ }
951
+ /** Connection info response */
952
+ export interface ConnectionInfoResponse {
953
+ connections: ConnectionInfoItem[];
954
+ }
955
+ /** Browser update parameters (same as create but with dirId) */
956
+ export interface BrowserUpdateParams extends BrowserCreateConfig {
957
+ /**
958
+ * Browser directory ID (required for update)
959
+ */
960
+ dirId: string;
961
+ }
962
+ /** Local cache clear parameters */
963
+ export interface ClearLocalCacheParams {
964
+ /**
965
+ * Array of browser directory IDs
966
+ */
967
+ dirIds: string[];
968
+ }
969
+ /** Server cache clear parameters */
970
+ export interface ClearServerCacheParams {
971
+ workspaceId: number;
972
+ /**
973
+ * Array of browser directory IDs
974
+ */
975
+ dirIds: string[];
976
+ }
977
+ /** Random fingerprint parameters */
978
+ export interface RandomFingerprintParams {
979
+ workspaceId: number;
980
+ /**
981
+ * Browser directory ID
982
+ */
983
+ dirId: string;
984
+ }
985
+ /** Proxy list item */
986
+ export interface ProxyListItem {
987
+ id?: number;
988
+ /**
989
+ * Proxy check status: 0=未检测, 1=检测成功, 2=检测失败
990
+ */
991
+ checkStatus?: number;
992
+ /**
993
+ * IP detection channel
994
+ */
995
+ checkChannel?: string;
996
+ /**
997
+ * IP detection channel value
998
+ */
999
+ checkChannelValue?: string;
1000
+ /**
1001
+ * Last detected IP address
1002
+ */
1003
+ lastIp?: string;
1004
+ /**
1005
+ * Last detected country
1006
+ */
1007
+ lastCountry?: string;
1008
+ /**
1009
+ * Last detected state/region
1010
+ */
1011
+ lastState?: string;
1012
+ /**
1013
+ * Last detected city
1014
+ */
1015
+ lastCity?: string;
1016
+ /**
1017
+ * IP type: IPV4 or IPV6
1018
+ */
1019
+ ipType?: string;
1020
+ /**
1021
+ * Proxy protocol: HTTP, HTTPS, SOCKS5, SSH
1022
+ */
1023
+ protocol?: string;
1024
+ /**
1025
+ * Proxy host/IP address
1026
+ */
1027
+ host?: string;
1028
+ /**
1029
+ * Proxy port
1030
+ */
1031
+ port?: string;
1032
+ /**
1033
+ * Proxy username
1034
+ */
1035
+ proxyUserName?: string;
1036
+ /**
1037
+ * Proxy password
1038
+ */
1039
+ proxyPassword?: string;
1040
+ /**
1041
+ * Refresh URL for dynamic proxies
1042
+ */
1043
+ refreshUrl?: string;
1044
+ /**
1045
+ * Proxy remark/notes
1046
+ */
1047
+ remark?: string;
1048
+ /**
1049
+ * Last check time
1050
+ */
1051
+ checkTime?: string;
1052
+ /**
1053
+ * Create time
1054
+ */
1055
+ createTime?: string;
1056
+ /**
1057
+ * Update time
1058
+ */
1059
+ updateTime?: string;
1060
+ /**
1061
+ * Timezone
1062
+ */
1063
+ timezone?: string;
1064
+ /**
1065
+ * Error information if check failed
1066
+ */
1067
+ error?: any;
1068
+ }
1069
+ /** Paginated proxy list response */
1070
+ export interface ProxyListResponse {
1071
+ total: number;
1072
+ rows: ProxyListItem[];
1073
+ }
1074
+ /** Proxy list query parameters */
1075
+ export interface ProxyListParams {
1076
+ workspaceId: number;
1077
+ id?: number;
1078
+ page_index?: number;
1079
+ page_size?: number;
1080
+ [key: string]: any;
1081
+ }
1082
+ /** Proxy create parameters */
1083
+ export interface ProxyCreateParams {
1084
+ workspaceId: number;
1085
+ /**
1086
+ * Proxy protocol: HTTP, HTTPS, SOCKS5, SSH
1087
+ */
1088
+ protocol?: string;
1089
+ /**
1090
+ * Proxy host/IP address
1091
+ */
1092
+ host?: string;
1093
+ /**
1094
+ * Proxy port
1095
+ */
1096
+ port?: string;
1097
+ /**
1098
+ * Proxy username
1099
+ */
1100
+ proxyUserName?: string;
1101
+ /**
1102
+ * Proxy password
1103
+ */
1104
+ proxyPassword?: string;
1105
+ /**
1106
+ * IP type: IPV4 or IPV6
1107
+ */
1108
+ ipType?: string;
1109
+ /**
1110
+ * IP detection channel: IPRust.io, IP-API, IP123.in
1111
+ */
1112
+ checkChannel?: string;
1113
+ /**
1114
+ * Refresh URL for dynamic proxies
1115
+ */
1116
+ refreshUrl?: string;
1117
+ /**
1118
+ * Proxy remark/notes
1119
+ */
1120
+ remark?: string;
1121
+ /**
1122
+ * Proxy category (same as protocol)
1123
+ */
1124
+ proxyCategory?: string;
1125
+ [key: string]: any;
1126
+ }
1127
+ /** Proxy modify parameters (same as create but with id) */
1128
+ export interface ProxyModifyParams extends ProxyCreateParams {
1129
+ /**
1130
+ * Proxy ID (required for modify)
1131
+ */
1132
+ id: number;
1133
+ }
1134
+ /** Proxy detect parameters */
1135
+ export interface ProxyDetectParams {
1136
+ workspaceId: number;
1137
+ /**
1138
+ * Proxy ID to detect
1139
+ */
1140
+ id: number;
1141
+ }
1142
+ /** Proxy delete parameters */
1143
+ export interface ProxyDeleteParams {
1144
+ workspaceId: number;
1145
+ /**
1146
+ * Array of proxy IDs to delete
1147
+ */
1148
+ ids: number[];
1149
+ }
1150
+ /** Batch create proxy parameters */
1151
+ export interface ProxyBatchCreateParams {
1152
+ workspaceId: number;
1153
+ /**
1154
+ * Default check channel for all proxies
1155
+ */
1156
+ checkChannel?: string;
1157
+ /**
1158
+ * Array of proxy configurations
1159
+ */
1160
+ proxyList: ProxyCreateParams[];
1161
+ }
1162
+ /** Detect channel item */
1163
+ export interface DetectChannelItem {
1164
+ label: string;
1165
+ value: string;
1166
+ }
1167
+ /** Detect channel response */
1168
+ export interface DetectChannelResponse {
1169
+ checkChannel: DetectChannelItem[];
1170
+ }
1171
+ export interface BoughtProxyListItem {
1172
+ id: number;
1173
+ orderNo: string;
1174
+ checkStatus: number;
1175
+ proxyCheckChannel: string;
1176
+ checkChannelValue: string;
1177
+ lastIp: string;
1178
+ lastCountry: string;
1179
+ lastState: string;
1180
+ lastCity: string;
1181
+ proxyProviderName: string;
1182
+ providerType: string;
1183
+ ipType: string;
1184
+ protocol: string;
1185
+ host: string;
1186
+ port: string;
1187
+ proxyUserName: string;
1188
+ proxyPassword: string;
1189
+ remark: string;
1190
+ checkTime: string;
1191
+ createTime: string;
1192
+ updateTime: string;
1193
+ expireDate: string;
1194
+ }
1195
+ //# sourceMappingURL=types.d.ts.map