@roxybrowser/openapi 1.0.7 → 1.0.8

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.
@@ -1,5 +1,430 @@
1
1
  import { request } from '../utils/index.js';
2
2
  import { proxyList, proxyStore } from './proxy.js';
3
+ const osversion_windows = [
4
+ {
5
+ label: '11',
6
+ type: 'osVersion-Windows',
7
+ value: '11',
8
+ },
9
+ {
10
+ label: '10',
11
+ type: 'osVersion-Windows',
12
+ value: '10',
13
+ },
14
+ {
15
+ label: '8',
16
+ type: 'osVersion-Windows',
17
+ value: '8',
18
+ },
19
+ {
20
+ label: '7',
21
+ type: 'osVersion-Windows',
22
+ value: '7',
23
+ },
24
+ ];
25
+ const osversion_macos = [
26
+ {
27
+ label: '15.3.2',
28
+ type: 'osVersion-macOS',
29
+ value: '15.3.2',
30
+ },
31
+ {
32
+ label: '15.3.1',
33
+ type: 'osVersion-macOS',
34
+ value: '15.3.1',
35
+ },
36
+ {
37
+ label: '15.3',
38
+ type: 'osVersion-macOS',
39
+ value: '15.3',
40
+ },
41
+ {
42
+ label: '15.2',
43
+ type: 'osVersion-macOS',
44
+ value: '15.2',
45
+ },
46
+ {
47
+ label: '15.1',
48
+ type: 'osVersion-macOS',
49
+ value: '15.1',
50
+ },
51
+ {
52
+ label: '15.0.1',
53
+ type: 'osVersion-macOS',
54
+ value: '15.0.1',
55
+ },
56
+ {
57
+ label: '15.0',
58
+ type: 'osVersion-macOS',
59
+ value: '15.0',
60
+ },
61
+ {
62
+ label: '14.7.4',
63
+ type: 'osVersion-macOS',
64
+ value: '14.7.4',
65
+ },
66
+ {
67
+ label: '14.7.3',
68
+ type: 'osVersion-macOS',
69
+ value: '14.7.3',
70
+ },
71
+ {
72
+ label: '14.7.2',
73
+ type: 'osVersion-macOS',
74
+ value: '14.7.2',
75
+ },
76
+ {
77
+ label: '14.7.1',
78
+ type: 'osVersion-macOS',
79
+ value: '14.7.1',
80
+ },
81
+ {
82
+ label: '14.7',
83
+ type: 'osVersion-macOS',
84
+ value: '14.7',
85
+ },
86
+ {
87
+ label: '14.6.1',
88
+ type: 'osVersion-macOS',
89
+ value: '14.6.1',
90
+ },
91
+ {
92
+ label: '14.6',
93
+ type: 'osVersion-macOS',
94
+ value: '14.6',
95
+ },
96
+ {
97
+ label: '14.5',
98
+ type: 'osVersion-macOS',
99
+ value: '14.5',
100
+ },
101
+ {
102
+ label: '14.4.1',
103
+ type: 'osVersion-macOS',
104
+ value: '14.4.1',
105
+ },
106
+ {
107
+ label: '14.4',
108
+ type: 'osVersion-macOS',
109
+ value: '14.4',
110
+ },
111
+ {
112
+ label: '14.3.1',
113
+ type: 'osVersion-macOS',
114
+ value: '14.3.1',
115
+ },
116
+ {
117
+ label: '14.3',
118
+ type: 'osVersion-macOS',
119
+ value: '14.3',
120
+ },
121
+ {
122
+ label: '14.2.1',
123
+ type: 'osVersion-macOS',
124
+ value: '14.2.1',
125
+ },
126
+ {
127
+ label: '14.2',
128
+ type: 'osVersion-macOS',
129
+ value: '14.2',
130
+ },
131
+ {
132
+ label: '14.1',
133
+ type: 'osVersion-macOS',
134
+ value: '14.1',
135
+ },
136
+ {
137
+ label: '13.7.4',
138
+ type: 'osVersion-macOS',
139
+ value: '13.7.4',
140
+ },
141
+ {
142
+ label: '13.7.3',
143
+ type: 'osVersion-macOS',
144
+ value: '13.7.3',
145
+ },
146
+ {
147
+ label: '13.7.2',
148
+ type: 'osVersion-macOS',
149
+ value: '13.7.2',
150
+ },
151
+ {
152
+ label: '13.7.1',
153
+ type: 'osVersion-macOS',
154
+ value: '13.7.1',
155
+ },
156
+ {
157
+ label: '13.7',
158
+ type: 'osVersion-macOS',
159
+ value: '13.7',
160
+ },
161
+ {
162
+ label: 'ALL',
163
+ type: 'osVersion-macOS',
164
+ value: 'ALL',
165
+ },
166
+ ];
167
+ const osversion_linux = [
168
+ {
169
+ label: 'ALL',
170
+ type: 'osVersion-Linux',
171
+ value: 'ALL',
172
+ },
173
+ ];
174
+ const osversion_android = [
175
+ {
176
+ label: '15',
177
+ type: 'osVersion-Android',
178
+ value: '15',
179
+ },
180
+ {
181
+ label: '14',
182
+ type: 'osVersion-Android',
183
+ value: '14',
184
+ },
185
+ {
186
+ label: '13',
187
+ type: 'osVersion-Android',
188
+ value: '13',
189
+ },
190
+ {
191
+ label: '12',
192
+ type: 'osVersion-Android',
193
+ value: '12',
194
+ },
195
+ {
196
+ label: '11',
197
+ type: 'osVersion-Android',
198
+ value: '11',
199
+ },
200
+ {
201
+ label: '10',
202
+ type: 'osVersion-Android',
203
+ value: '10',
204
+ },
205
+ {
206
+ label: '9',
207
+ type: 'osVersion-Android',
208
+ value: '9',
209
+ },
210
+ ];
211
+ const osversion_ios = [
212
+ {
213
+ label: '18.2',
214
+ type: 'osVersion-IOS',
215
+ value: '18.2',
216
+ },
217
+ {
218
+ label: '18.1',
219
+ type: 'osVersion-IOS',
220
+ value: '18.1',
221
+ },
222
+ {
223
+ label: '18.0',
224
+ type: 'osVersion-IOS',
225
+ value: '18.0',
226
+ },
227
+ {
228
+ label: '17.0',
229
+ type: 'osVersion-IOS',
230
+ value: '17.0',
231
+ },
232
+ {
233
+ label: '16.6',
234
+ type: 'osVersion-IOS',
235
+ value: '16.6',
236
+ },
237
+ {
238
+ label: '16.5',
239
+ type: 'osVersion-IOS',
240
+ value: '16.5',
241
+ },
242
+ {
243
+ label: '16.4',
244
+ type: 'osVersion-IOS',
245
+ value: '16.4',
246
+ },
247
+ {
248
+ label: '16.3',
249
+ type: 'osVersion-IOS',
250
+ value: '16.3',
251
+ },
252
+ {
253
+ label: '16.2',
254
+ type: 'osVersion-IOS',
255
+ value: '16.2',
256
+ },
257
+ {
258
+ label: '16.1',
259
+ type: 'osVersion-IOS',
260
+ value: '16.1',
261
+ },
262
+ {
263
+ label: '16.0',
264
+ type: 'osVersion-IOS',
265
+ value: '16.0',
266
+ },
267
+ {
268
+ label: '15.7',
269
+ type: 'osVersion-IOS',
270
+ value: '15.7',
271
+ },
272
+ {
273
+ label: '15.6',
274
+ type: 'osVersion-IOS',
275
+ value: '15.6',
276
+ },
277
+ {
278
+ label: '15.5',
279
+ type: 'osVersion-IOS',
280
+ value: '15.5',
281
+ },
282
+ {
283
+ label: '15.4',
284
+ type: 'osVersion-IOS',
285
+ value: '15.4',
286
+ },
287
+ {
288
+ label: '15.3',
289
+ type: 'osVersion-IOS',
290
+ value: '15.3',
291
+ },
292
+ {
293
+ label: '15.2',
294
+ type: 'osVersion-IOS',
295
+ value: '15.2',
296
+ },
297
+ {
298
+ label: '15.1',
299
+ type: 'osVersion-IOS',
300
+ value: '15.1',
301
+ },
302
+ {
303
+ label: '15.0',
304
+ type: 'osVersion-IOS',
305
+ value: '15.0',
306
+ },
307
+ {
308
+ label: '14.7',
309
+ type: 'osVersion-IOS',
310
+ value: '14.7',
311
+ },
312
+ {
313
+ label: '14.6',
314
+ type: 'osVersion-IOS',
315
+ value: '14.6',
316
+ },
317
+ {
318
+ label: '14.5',
319
+ type: 'osVersion-IOS',
320
+ value: '14.5',
321
+ },
322
+ {
323
+ label: '14.4',
324
+ type: 'osVersion-IOS',
325
+ value: '14.4',
326
+ },
327
+ {
328
+ label: '14.3',
329
+ type: 'osVersion-IOS',
330
+ value: '14.3',
331
+ },
332
+ {
333
+ label: '14.2',
334
+ type: 'osVersion-IOS',
335
+ value: '14.2',
336
+ },
337
+ {
338
+ label: '14.1',
339
+ type: 'osVersion-IOS',
340
+ value: '14.1',
341
+ },
342
+ {
343
+ label: '14.0',
344
+ type: 'osVersion-IOS',
345
+ value: '14.0',
346
+ },
347
+ ];
348
+ const coreVersion = [
349
+ {
350
+ label: 'RoxyChrome 144',
351
+ type: 'coreVersion',
352
+ value: '144',
353
+ },
354
+ {
355
+ label: 'RoxyChrome 143',
356
+ type: 'coreVersion',
357
+ value: '143',
358
+ },
359
+ {
360
+ label: 'RoxyChrome 142',
361
+ type: 'coreVersion',
362
+ value: '142',
363
+ },
364
+ {
365
+ label: 'RoxyChrome 141',
366
+ type: 'coreVersion',
367
+ value: '141',
368
+ },
369
+ {
370
+ label: 'RoxyChrome 140',
371
+ type: 'coreVersion',
372
+ value: '140',
373
+ },
374
+ {
375
+ label: 'RoxyChrome 139',
376
+ type: 'coreVersion',
377
+ value: '139',
378
+ },
379
+ {
380
+ label: 'RoxyChrome 138',
381
+ type: 'coreVersion',
382
+ value: '138',
383
+ },
384
+ {
385
+ label: 'RoxyChrome 137',
386
+ type: 'coreVersion',
387
+ value: '137',
388
+ },
389
+ {
390
+ label: 'RoxyChrome 136',
391
+ type: 'coreVersion',
392
+ value: '136',
393
+ },
394
+ {
395
+ label: 'RoxyChrome 135',
396
+ type: 'coreVersion',
397
+ value: '135',
398
+ },
399
+ {
400
+ label: 'RoxyChrome 133',
401
+ type: 'coreVersion',
402
+ value: '133',
403
+ },
404
+ {
405
+ label: 'RoxyChrome 130',
406
+ type: 'coreVersion',
407
+ value: '130',
408
+ },
409
+ {
410
+ label: 'RoxyChrome 125',
411
+ type: 'coreVersion',
412
+ value: '125',
413
+ },
414
+ {
415
+ label: 'RoxyChrome 117',
416
+ type: 'coreVersion',
417
+ value: '117',
418
+ },
419
+ {
420
+ label: 'RoxyChrome 109',
421
+ type: 'coreVersion',
422
+ value: '109',
423
+ },
424
+ ];
425
+ function osVersionString() {
426
+ return `Windows: ${osversion_windows.map(item => item.value).join(',')}; macOS: ${osversion_macos.map(item => item.value).join(',')}; Linux: ${osversion_linux.map(item => item.value).join(',')}; Android: ${osversion_android.map(item => item.value).join(',')}; IOS: ${osversion_ios.map(item => item.value).join(',')}`;
427
+ }
3
428
  class CreateBrowser {
4
429
  name = 'roxy_create_browser';
5
430
  description = 'Create a browser with complete configuration control - for expert users needing full parameter access';
@@ -8,56 +433,56 @@ class CreateBrowser {
8
433
  properties: {
9
434
  workspaceId: {
10
435
  type: 'number',
11
- description: 'Workspace ID (required)',
436
+ description: 'Workspace ID',
12
437
  },
13
438
  windowName: {
14
439
  type: 'string',
15
- description: 'Browser window name (optional)',
440
+ description: 'Browser window name',
16
441
  },
17
442
  coreVersion: {
18
443
  type: 'string',
19
- enum: ['144', '143', '142', '141', '140', '138', '137', '136', '135', '133', '130', '125', '117', '109'],
20
- description: 'Browser core version (optional). If not provided, the latest available core version will be used.',
444
+ enum: coreVersion.map(item => item.value),
445
+ description: 'Browser core version. If not provided, the latest available core version will be used.',
21
446
  },
22
447
  os: {
23
448
  type: 'string',
24
449
  enum: ['Windows', 'macOS', 'Linux', 'IOS', 'Android'],
25
- description: 'Operating system (optional, default: Windows)',
450
+ description: 'Operating system (default: Windows)',
26
451
  },
27
452
  osVersion: {
28
453
  type: 'string',
29
- description: `Windows: 11,10,8,7; macOS: 15.3.2,15.3.1,15.3,15.2,15.1,15.0.1,15.0,14.7.4,14.7.3,14.7.2,14.7.1,14.7,14.6.1,14.6,14.5,14.4.1,14.4,14.3.1,14.3,14.2.1,14.2,14.1,13.7.4,13.7.3,13.7.2,13.7.1,13.7; Linux: ALL; Android: 14,13,12,11,10,9; IOS: 18.2,18.1,18.0,17.0,16.6,16.5,16.4,16.3,16.2,16.1,16.0,15.7,15.6,15.5,15.4,15.3,15.2,15.1,15.0,14.7,14.6,14.5,14.4,14.3,14.2,14.1,14.0 (optional)`,
454
+ description: osVersionString(),
30
455
  },
31
456
  userAgent: {
32
457
  type: 'string',
33
- description: 'Custom user agent (optional)',
458
+ description: 'Custom user agent',
34
459
  },
35
460
  cookie: {
36
461
  type: 'array',
37
- description: 'Cookie list (optional)',
462
+ description: 'Cookie list',
38
463
  },
39
464
  searchEngine: {
40
465
  type: 'string',
41
466
  enum: ['Google', 'Microsoft Bing', 'Yahoo', 'Yandex', 'DuckDuckGo'],
42
- description: 'Default search engine (optional)',
467
+ description: 'Default search engine',
43
468
  },
44
469
  labelIds: {
45
470
  type: 'array',
46
471
  items: { type: 'number' },
47
- description: 'Label IDs to assign (optional)',
472
+ description: 'Label IDs to assign',
48
473
  },
49
474
  defaultOpenUrl: {
50
475
  type: 'array',
51
476
  items: { type: 'string' },
52
- description: 'URLs to open by default (optional)',
477
+ description: 'URLs to open by default',
53
478
  },
54
479
  windowRemark: {
55
480
  type: 'string',
56
- description: 'Window remarks/notes (optional)',
481
+ description: 'Window remarks/notes',
57
482
  },
58
483
  projectId: {
59
484
  type: 'number',
60
- description: 'Project ID (optional)',
485
+ description: 'Project ID',
61
486
  },
62
487
  windowPlatformList: {
63
488
  type: 'array',
@@ -73,11 +498,11 @@ class CreateBrowser {
73
498
  platformRemarks: { type: 'string', description: 'Platform remarks' },
74
499
  },
75
500
  },
76
- description: 'Platform account information (optional)',
501
+ description: 'Platform account information',
77
502
  },
78
503
  proxyInfo: {
79
504
  type: 'object',
80
- description: 'Complete proxy configuration object (optional)',
505
+ description: 'Complete proxy configuration object',
81
506
  properties: {
82
507
  // 如果有 moduleId ,则其他参数不可传递 (moduleId 可通过 roxy_list_proxies 或 roxy_store_proxies 获取) 优先使用该参数来绑定代理IP
83
508
  moduleId: { type: 'number', description: `If moduleId is provided, no other parameters may be passed. (moduleId can be obtained via ${proxyList.name} or ${proxyStore.name}. field: id) Priority to use this parameter to bind proxy IP` },
@@ -95,7 +520,7 @@ class CreateBrowser {
95
520
  },
96
521
  fingerInfo: {
97
522
  type: 'object',
98
- description: 'Complete fingerprint configuration (optional)',
523
+ description: 'Complete fingerprint configuration',
99
524
  properties: {
100
525
  // Language and timezone
101
526
  isLanguageBaseIp: { type: 'boolean', description: 'Follow IP for browser language' },
@@ -350,12 +775,12 @@ class OpenBrowser {
350
775
  properties: {
351
776
  workspaceId: {
352
777
  type: 'number',
353
- description: 'Workspace ID (required)',
778
+ description: 'Workspace ID',
354
779
  },
355
780
  dirIds: {
356
781
  type: 'array',
357
782
  items: { type: 'string' },
358
- description: 'Array of browser directory IDs to open (required)',
783
+ description: 'Array of browser directory IDs to open',
359
784
  },
360
785
  forceOpen: {
361
786
  type: 'boolean',
@@ -476,15 +901,15 @@ class ListBrowsers {
476
901
  properties: {
477
902
  workspaceId: {
478
903
  type: 'number',
479
- description: 'Workspace ID (required)',
904
+ description: 'Workspace ID',
480
905
  },
481
906
  projectIds: {
482
907
  type: 'string',
483
- description: 'Comma-separated project IDs (optional)',
908
+ description: 'Comma-separated project IDs',
484
909
  },
485
910
  windowName: {
486
911
  type: 'string',
487
- description: 'Filter by browser window name (optional)',
912
+ description: 'Filter by browser window name',
488
913
  },
489
914
  pageIndex: {
490
915
  type: 'number',
@@ -551,7 +976,7 @@ class CloseBrowsers {
551
976
  dirIds: {
552
977
  type: 'array',
553
978
  items: { type: 'string' },
554
- description: 'Array of browser directory IDs to close (required)',
979
+ description: 'Array of browser directory IDs to close',
555
980
  },
556
981
  },
557
982
  required: ['dirIds'],
@@ -619,12 +1044,12 @@ class DeleteBrowsers {
619
1044
  properties: {
620
1045
  workspaceId: {
621
1046
  type: 'number',
622
- description: 'Workspace ID (required)',
1047
+ description: 'Workspace ID',
623
1048
  },
624
1049
  dirIds: {
625
1050
  type: 'array',
626
1051
  items: { type: 'string' },
627
- description: 'Array of browser directory IDs to delete (required)',
1052
+ description: 'Array of browser directory IDs to delete',
628
1053
  },
629
1054
  },
630
1055
  required: ['workspaceId', 'dirIds'],
@@ -687,11 +1112,11 @@ class GetBrowserDetail {
687
1112
  properties: {
688
1113
  workspaceId: {
689
1114
  type: 'number',
690
- description: 'Workspace ID (required)',
1115
+ description: 'Workspace ID',
691
1116
  },
692
1117
  dirId: {
693
1118
  type: 'string',
694
- description: 'Browser directory ID (required)',
1119
+ description: 'Browser directory ID',
695
1120
  },
696
1121
  },
697
1122
  required: ['workspaceId', 'dirId'],
@@ -768,7 +1193,7 @@ class ClearLocalCache {
768
1193
  dirIds: {
769
1194
  type: 'array',
770
1195
  items: { type: 'string' },
771
- description: 'Array of browser directory IDs (required)',
1196
+ description: 'Array of browser directory IDs',
772
1197
  },
773
1198
  },
774
1199
  required: ['dirIds'],
@@ -825,12 +1250,12 @@ class ClearServerCache {
825
1250
  properties: {
826
1251
  workspaceId: {
827
1252
  type: 'number',
828
- description: 'Workspace ID (required)',
1253
+ description: 'Workspace ID',
829
1254
  },
830
1255
  dirIds: {
831
1256
  type: 'array',
832
1257
  items: { type: 'string' },
833
- description: 'Array of browser directory IDs (required)',
1258
+ description: 'Array of browser directory IDs',
834
1259
  },
835
1260
  },
836
1261
  required: ['workspaceId', 'dirIds'],
@@ -891,11 +1316,11 @@ class RandomFingerprint {
891
1316
  properties: {
892
1317
  workspaceId: {
893
1318
  type: 'number',
894
- description: 'Workspace ID (required)',
1319
+ description: 'Workspace ID',
895
1320
  },
896
1321
  dirId: {
897
1322
  type: 'string',
898
- description: 'Browser directory ID (required)',
1323
+ description: 'Browser directory ID',
899
1324
  },
900
1325
  },
901
1326
  required: ['workspaceId', 'dirId'],
@@ -955,7 +1380,7 @@ class ListLabels {
955
1380
  properties: {
956
1381
  workspaceId: {
957
1382
  type: 'number',
958
- description: 'Workspace ID (required)',
1383
+ description: 'Workspace ID',
959
1384
  },
960
1385
  },
961
1386
  required: ['workspaceId'],