browserscale-ts 1.0.1 → 1.2.0
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/dist/browser.d.ts +3 -3
- package/dist/browser.js +2 -2
- package/dist/browserscale.browser.js +322 -87
- package/dist/client.d.ts +70 -27
- package/dist/client.js +106 -45
- package/dist/errors.d.ts +153 -4
- package/dist/errors.js +120 -4
- package/dist/gen/wrc_pb.d.ts +716 -4
- package/dist/gen/wrc_pb.js +140 -55
- package/dist/index.d.ts +27 -3
- package/dist/index.js +31 -2
- package/dist/internal/convert.d.ts +16 -5
- package/dist/internal/convert.js +126 -10
- package/dist/options.d.ts +25 -0
- package/dist/types.d.ts +77 -0
- package/package.json +1 -1
package/dist/gen/wrc_pb.d.ts
CHANGED
|
@@ -349,12 +349,95 @@ export type WaitResult = Message<"browserscale.v1.WaitResult"> & {
|
|
|
349
349
|
* @generated from field: browserscale.v1.Rect bounds = 5;
|
|
350
350
|
*/
|
|
351
351
|
bounds?: Rect;
|
|
352
|
+
/**
|
|
353
|
+
* Present iff no condition matched before the deadline (index is -1): the
|
|
354
|
+
* per-condition breakdown of why nothing matched. A timeout is a normal
|
|
355
|
+
* result, not an RPC error.
|
|
356
|
+
*
|
|
357
|
+
* @generated from field: optional browserscale.v1.WaitError error = 6;
|
|
358
|
+
*/
|
|
359
|
+
error?: WaitError;
|
|
352
360
|
};
|
|
353
361
|
/**
|
|
354
362
|
* Describes the message browserscale.v1.WaitResult.
|
|
355
363
|
* Use `create(WaitResultSchema)` to create a new message.
|
|
356
364
|
*/
|
|
357
365
|
export declare const WaitResultSchema: GenMessage<WaitResult>;
|
|
366
|
+
/**
|
|
367
|
+
* Per-condition diagnostic status returned inside WaitError when WaitForAny
|
|
368
|
+
* times out; one entry per input condition, in the same order.
|
|
369
|
+
*
|
|
370
|
+
* @generated from message browserscale.v1.WaitConditionStatus
|
|
371
|
+
*/
|
|
372
|
+
export type WaitConditionStatus = Message<"browserscale.v1.WaitConditionStatus"> & {
|
|
373
|
+
/**
|
|
374
|
+
* @generated from field: int32 index = 1;
|
|
375
|
+
*/
|
|
376
|
+
index: number;
|
|
377
|
+
/**
|
|
378
|
+
* "not_found" | "found_hidden" | "found_occluded" | "pending_steady".
|
|
379
|
+
*
|
|
380
|
+
* @generated from field: string state = 2;
|
|
381
|
+
*/
|
|
382
|
+
state: string;
|
|
383
|
+
/**
|
|
384
|
+
* @generated from field: int32 backend_node_id = 3;
|
|
385
|
+
*/
|
|
386
|
+
backendNodeId: number;
|
|
387
|
+
/**
|
|
388
|
+
* @generated from field: string frame_id = 4;
|
|
389
|
+
*/
|
|
390
|
+
frameId: string;
|
|
391
|
+
/**
|
|
392
|
+
* @generated from field: bool is_visible = 5;
|
|
393
|
+
*/
|
|
394
|
+
isVisible: boolean;
|
|
395
|
+
/**
|
|
396
|
+
* @generated from field: optional browserscale.v1.Rect bounds = 6;
|
|
397
|
+
*/
|
|
398
|
+
bounds?: Rect;
|
|
399
|
+
/**
|
|
400
|
+
* The intercepting element, present iff state == "found_occluded".
|
|
401
|
+
*
|
|
402
|
+
* @generated from field: optional browserscale.v1.OccluderInfo occluder = 7;
|
|
403
|
+
*/
|
|
404
|
+
occluder?: OccluderInfo;
|
|
405
|
+
};
|
|
406
|
+
/**
|
|
407
|
+
* Describes the message browserscale.v1.WaitConditionStatus.
|
|
408
|
+
* Use `create(WaitConditionStatusSchema)` to create a new message.
|
|
409
|
+
*/
|
|
410
|
+
export declare const WaitConditionStatusSchema: GenMessage<WaitConditionStatus>;
|
|
411
|
+
/**
|
|
412
|
+
* Error detail for WaitForAny. Present in WaitResult iff no condition matched
|
|
413
|
+
* before the deadline. Same per-command WRCError<Command> convention as
|
|
414
|
+
* ClickError, plus a per-condition breakdown.
|
|
415
|
+
*
|
|
416
|
+
* @generated from message browserscale.v1.WaitError
|
|
417
|
+
*/
|
|
418
|
+
export type WaitError = Message<"browserscale.v1.WaitError"> & {
|
|
419
|
+
/**
|
|
420
|
+
* Machine-stable failure code. Currently always "timeout".
|
|
421
|
+
*
|
|
422
|
+
* @generated from field: string code = 1;
|
|
423
|
+
*/
|
|
424
|
+
code: string;
|
|
425
|
+
/**
|
|
426
|
+
* @generated from field: string message = 2;
|
|
427
|
+
*/
|
|
428
|
+
message: string;
|
|
429
|
+
/**
|
|
430
|
+
* Per-condition status, same order/length as the input conditions.
|
|
431
|
+
*
|
|
432
|
+
* @generated from field: repeated browserscale.v1.WaitConditionStatus conditions = 3;
|
|
433
|
+
*/
|
|
434
|
+
conditions: WaitConditionStatus[];
|
|
435
|
+
};
|
|
436
|
+
/**
|
|
437
|
+
* Describes the message browserscale.v1.WaitError.
|
|
438
|
+
* Use `create(WaitErrorSchema)` to create a new message.
|
|
439
|
+
*/
|
|
440
|
+
export declare const WaitErrorSchema: GenMessage<WaitError>;
|
|
358
441
|
/**
|
|
359
442
|
* @generated from message browserscale.v1.ElementResult
|
|
360
443
|
*/
|
|
@@ -393,6 +476,238 @@ export type ElementResult = Message<"browserscale.v1.ElementResult"> & {
|
|
|
393
476
|
* Use `create(ElementResultSchema)` to create a new message.
|
|
394
477
|
*/
|
|
395
478
|
export declare const ElementResultSchema: GenMessage<ElementResult>;
|
|
479
|
+
/**
|
|
480
|
+
* Describes the element that intercepted a click — the element sitting on top
|
|
481
|
+
* of the target at the intended click point. Coordinates are root-viewport CSS
|
|
482
|
+
* pixels, consistent with ClickResult.bounds.
|
|
483
|
+
*
|
|
484
|
+
* @generated from message browserscale.v1.OccluderInfo
|
|
485
|
+
*/
|
|
486
|
+
export type OccluderInfo = Message<"browserscale.v1.OccluderInfo"> & {
|
|
487
|
+
/**
|
|
488
|
+
* @generated from field: int32 backend_node_id = 1;
|
|
489
|
+
*/
|
|
490
|
+
backendNodeId: number;
|
|
491
|
+
/**
|
|
492
|
+
* @generated from field: string frame_id = 2;
|
|
493
|
+
*/
|
|
494
|
+
frameId: string;
|
|
495
|
+
/**
|
|
496
|
+
* @generated from field: string tag_name = 3;
|
|
497
|
+
*/
|
|
498
|
+
tagName: string;
|
|
499
|
+
/**
|
|
500
|
+
* @generated from field: optional string id = 4;
|
|
501
|
+
*/
|
|
502
|
+
id?: string;
|
|
503
|
+
/**
|
|
504
|
+
* @generated from field: optional string class_name = 5;
|
|
505
|
+
*/
|
|
506
|
+
className?: string;
|
|
507
|
+
/**
|
|
508
|
+
* @generated from field: optional string text = 6;
|
|
509
|
+
*/
|
|
510
|
+
text?: string;
|
|
511
|
+
/**
|
|
512
|
+
* @generated from field: browserscale.v1.Rect bounds = 7;
|
|
513
|
+
*/
|
|
514
|
+
bounds?: Rect;
|
|
515
|
+
/**
|
|
516
|
+
* Computed pointer-events keyword (e.g. "auto", "none", "all"). Lets the
|
|
517
|
+
* caller tell an invisible pass-through layer from one that genuinely
|
|
518
|
+
* swallows clicks.
|
|
519
|
+
*
|
|
520
|
+
* @generated from field: optional string pointer_events = 8;
|
|
521
|
+
*/
|
|
522
|
+
pointerEvents?: string;
|
|
523
|
+
/**
|
|
524
|
+
* Computed visibility keyword ("visible", "hidden", "collapse").
|
|
525
|
+
*
|
|
526
|
+
* @generated from field: optional string visibility = 9;
|
|
527
|
+
*/
|
|
528
|
+
visibility?: string;
|
|
529
|
+
/**
|
|
530
|
+
* Computed opacity (0..1). 0 means visually invisible but may still
|
|
531
|
+
* intercept clicks depending on pointer_events.
|
|
532
|
+
*
|
|
533
|
+
* @generated from field: optional double opacity = 10;
|
|
534
|
+
*/
|
|
535
|
+
opacity?: number;
|
|
536
|
+
/**
|
|
537
|
+
* Computed effective z-index as a string ("0" when auto/not stacked).
|
|
538
|
+
*
|
|
539
|
+
* @generated from field: optional string z_index = 11;
|
|
540
|
+
*/
|
|
541
|
+
zIndex?: string;
|
|
542
|
+
/**
|
|
543
|
+
* True when this element can intercept clicks even while invisible (computed
|
|
544
|
+
* pointer-events in {all, painted, fill, stroke}); i.e. a real click here is
|
|
545
|
+
* swallowed even at visibility:hidden / opacity:0. When false and invisible,
|
|
546
|
+
* a real click would fall through.
|
|
547
|
+
*
|
|
548
|
+
* @generated from field: optional bool hittable_while_invisible = 12;
|
|
549
|
+
*/
|
|
550
|
+
hittableWhileInvisible?: boolean;
|
|
551
|
+
};
|
|
552
|
+
/**
|
|
553
|
+
* Describes the message browserscale.v1.OccluderInfo.
|
|
554
|
+
* Use `create(OccluderInfoSchema)` to create a new message.
|
|
555
|
+
*/
|
|
556
|
+
export declare const OccluderInfoSchema: GenMessage<OccluderInfo>;
|
|
557
|
+
/**
|
|
558
|
+
* Error detail for a Click that did not land. Present in ClickResult iff
|
|
559
|
+
* success is false. First instance of the per-command WRCError<Command>
|
|
560
|
+
* convention; other commands migrate to the same shape later.
|
|
561
|
+
*
|
|
562
|
+
* @generated from message browserscale.v1.ClickError
|
|
563
|
+
*/
|
|
564
|
+
export type ClickError = Message<"browserscale.v1.ClickError"> & {
|
|
565
|
+
/**
|
|
566
|
+
* Machine-stable failure code, e.g. "occluded_no_reachable_point" or
|
|
567
|
+
* "occluded_after_evade".
|
|
568
|
+
*
|
|
569
|
+
* @generated from field: string code = 1;
|
|
570
|
+
*/
|
|
571
|
+
code: string;
|
|
572
|
+
/**
|
|
573
|
+
* @generated from field: string message = 2;
|
|
574
|
+
*/
|
|
575
|
+
message: string;
|
|
576
|
+
/**
|
|
577
|
+
* The intercepting element (present for occlusion codes).
|
|
578
|
+
*
|
|
579
|
+
* @generated from field: optional browserscale.v1.OccluderInfo occluder = 3;
|
|
580
|
+
*/
|
|
581
|
+
occluder?: OccluderInfo;
|
|
582
|
+
/**
|
|
583
|
+
* Whether a pointer reposition/evade was attempted before giving up.
|
|
584
|
+
*
|
|
585
|
+
* @generated from field: optional bool evade_attempted = 4;
|
|
586
|
+
*/
|
|
587
|
+
evadeAttempted?: boolean;
|
|
588
|
+
};
|
|
589
|
+
/**
|
|
590
|
+
* Describes the message browserscale.v1.ClickError.
|
|
591
|
+
* Use `create(ClickErrorSchema)` to create a new message.
|
|
592
|
+
*/
|
|
593
|
+
export declare const ClickErrorSchema: GenMessage<ClickError>;
|
|
594
|
+
/**
|
|
595
|
+
* ClickResult mirrors ElementResult (field numbers 1-7 kept identical, so it is
|
|
596
|
+
* wire-compatible) plus an optional error describing why the click did not land
|
|
597
|
+
* when success is false. A failed click is a normal response, not an RPC error.
|
|
598
|
+
*
|
|
599
|
+
* @generated from message browserscale.v1.ClickResult
|
|
600
|
+
*/
|
|
601
|
+
export type ClickResult = Message<"browserscale.v1.ClickResult"> & {
|
|
602
|
+
/**
|
|
603
|
+
* @generated from field: bool success = 1;
|
|
604
|
+
*/
|
|
605
|
+
success: boolean;
|
|
606
|
+
/**
|
|
607
|
+
* @generated from field: string frame_id = 2;
|
|
608
|
+
*/
|
|
609
|
+
frameId: string;
|
|
610
|
+
/**
|
|
611
|
+
* @generated from field: int32 backend_node_id = 3;
|
|
612
|
+
*/
|
|
613
|
+
backendNodeId: number;
|
|
614
|
+
/**
|
|
615
|
+
* @generated from field: bool is_visible = 4;
|
|
616
|
+
*/
|
|
617
|
+
isVisible: boolean;
|
|
618
|
+
/**
|
|
619
|
+
* @generated from field: browserscale.v1.Rect bounds = 5;
|
|
620
|
+
*/
|
|
621
|
+
bounds?: Rect;
|
|
622
|
+
/**
|
|
623
|
+
* @generated from field: double root_x = 6;
|
|
624
|
+
*/
|
|
625
|
+
rootX: number;
|
|
626
|
+
/**
|
|
627
|
+
* @generated from field: double root_y = 7;
|
|
628
|
+
*/
|
|
629
|
+
rootY: number;
|
|
630
|
+
/**
|
|
631
|
+
* @generated from field: optional browserscale.v1.ClickError error = 8;
|
|
632
|
+
*/
|
|
633
|
+
error?: ClickError;
|
|
634
|
+
};
|
|
635
|
+
/**
|
|
636
|
+
* Describes the message browserscale.v1.ClickResult.
|
|
637
|
+
* Use `create(ClickResultSchema)` to create a new message.
|
|
638
|
+
*/
|
|
639
|
+
export declare const ClickResultSchema: GenMessage<ClickResult>;
|
|
640
|
+
/**
|
|
641
|
+
* Error detail for a Fill that did not complete. Present in FillResult iff
|
|
642
|
+
* success is false. Fill focuses the field with the exact same smart click as
|
|
643
|
+
* Click, so any pre-typing failure is a click failure: code/message mirror it
|
|
644
|
+
* and the full click diagnostics are nested under click_error.
|
|
645
|
+
*
|
|
646
|
+
* @generated from message browserscale.v1.FillError
|
|
647
|
+
*/
|
|
648
|
+
export type FillError = Message<"browserscale.v1.FillError"> & {
|
|
649
|
+
/**
|
|
650
|
+
* Mirrored from the underlying click failure: "not_found",
|
|
651
|
+
* "occluded_no_reachable_point" or "occluded_after_evade".
|
|
652
|
+
*
|
|
653
|
+
* @generated from field: string code = 1;
|
|
654
|
+
*/
|
|
655
|
+
code: string;
|
|
656
|
+
/**
|
|
657
|
+
* @generated from field: string message = 2;
|
|
658
|
+
*/
|
|
659
|
+
message: string;
|
|
660
|
+
/**
|
|
661
|
+
* The underlying click-core failure that prevented focusing/typing.
|
|
662
|
+
*
|
|
663
|
+
* @generated from field: optional browserscale.v1.ClickError click_error = 3;
|
|
664
|
+
*/
|
|
665
|
+
clickError?: ClickError;
|
|
666
|
+
};
|
|
667
|
+
/**
|
|
668
|
+
* Describes the message browserscale.v1.FillError.
|
|
669
|
+
* Use `create(FillErrorSchema)` to create a new message.
|
|
670
|
+
*/
|
|
671
|
+
export declare const FillErrorSchema: GenMessage<FillError>;
|
|
672
|
+
/**
|
|
673
|
+
* FillResult mirrors the fill return: the success payload plus an optional error
|
|
674
|
+
* when the field could not be focused/typed. Field numbers 1-3/6-7 match
|
|
675
|
+
* ElementResult so it stays wire-compatible; is_visible/bounds are not part of
|
|
676
|
+
* fill's contract.
|
|
677
|
+
*
|
|
678
|
+
* @generated from message browserscale.v1.FillResult
|
|
679
|
+
*/
|
|
680
|
+
export type FillResult = Message<"browserscale.v1.FillResult"> & {
|
|
681
|
+
/**
|
|
682
|
+
* @generated from field: bool success = 1;
|
|
683
|
+
*/
|
|
684
|
+
success: boolean;
|
|
685
|
+
/**
|
|
686
|
+
* @generated from field: string frame_id = 2;
|
|
687
|
+
*/
|
|
688
|
+
frameId: string;
|
|
689
|
+
/**
|
|
690
|
+
* @generated from field: int32 backend_node_id = 3;
|
|
691
|
+
*/
|
|
692
|
+
backendNodeId: number;
|
|
693
|
+
/**
|
|
694
|
+
* @generated from field: double root_x = 6;
|
|
695
|
+
*/
|
|
696
|
+
rootX: number;
|
|
697
|
+
/**
|
|
698
|
+
* @generated from field: double root_y = 7;
|
|
699
|
+
*/
|
|
700
|
+
rootY: number;
|
|
701
|
+
/**
|
|
702
|
+
* @generated from field: optional browserscale.v1.FillError error = 8;
|
|
703
|
+
*/
|
|
704
|
+
error?: FillError;
|
|
705
|
+
};
|
|
706
|
+
/**
|
|
707
|
+
* Describes the message browserscale.v1.FillResult.
|
|
708
|
+
* Use `create(FillResultSchema)` to create a new message.
|
|
709
|
+
*/
|
|
710
|
+
export declare const FillResultSchema: GenMessage<FillResult>;
|
|
396
711
|
/**
|
|
397
712
|
* @generated from message browserscale.v1.DragResult
|
|
398
713
|
*/
|
|
@@ -425,12 +740,43 @@ export type DragResult = Message<"browserscale.v1.DragResult"> & {
|
|
|
425
740
|
* @generated from field: double end_y = 7;
|
|
426
741
|
*/
|
|
427
742
|
endY: number;
|
|
743
|
+
/**
|
|
744
|
+
* @generated from field: optional browserscale.v1.DragError error = 8;
|
|
745
|
+
*/
|
|
746
|
+
error?: DragError;
|
|
428
747
|
};
|
|
429
748
|
/**
|
|
430
749
|
* Describes the message browserscale.v1.DragResult.
|
|
431
750
|
* Use `create(DragResultSchema)` to create a new message.
|
|
432
751
|
*/
|
|
433
752
|
export declare const DragResultSchema: GenMessage<DragResult>;
|
|
753
|
+
/**
|
|
754
|
+
* Error detail for a Drag whose source pickup failed. Present in DragResult iff
|
|
755
|
+
* success is false. Drag acquires+presses the source with the same smart click
|
|
756
|
+
* as Click, so a pre-drag failure is a click failure: code/message mirror it
|
|
757
|
+
* and the full click diagnostics are nested under click_error.
|
|
758
|
+
*
|
|
759
|
+
* @generated from message browserscale.v1.DragError
|
|
760
|
+
*/
|
|
761
|
+
export type DragError = Message<"browserscale.v1.DragError"> & {
|
|
762
|
+
/**
|
|
763
|
+
* @generated from field: string code = 1;
|
|
764
|
+
*/
|
|
765
|
+
code: string;
|
|
766
|
+
/**
|
|
767
|
+
* @generated from field: string message = 2;
|
|
768
|
+
*/
|
|
769
|
+
message: string;
|
|
770
|
+
/**
|
|
771
|
+
* @generated from field: optional browserscale.v1.ClickError click_error = 3;
|
|
772
|
+
*/
|
|
773
|
+
clickError?: ClickError;
|
|
774
|
+
};
|
|
775
|
+
/**
|
|
776
|
+
* Describes the message browserscale.v1.DragError.
|
|
777
|
+
* Use `create(DragErrorSchema)` to create a new message.
|
|
778
|
+
*/
|
|
779
|
+
export declare const DragErrorSchema: GenMessage<DragError>;
|
|
434
780
|
/**
|
|
435
781
|
* @generated from message browserscale.v1.SelectOptionResult
|
|
436
782
|
*/
|
|
@@ -447,12 +793,176 @@ export type SelectOptionResult = Message<"browserscale.v1.SelectOptionResult"> &
|
|
|
447
793
|
* @generated from field: string selected_text = 3;
|
|
448
794
|
*/
|
|
449
795
|
selectedText: string;
|
|
796
|
+
/**
|
|
797
|
+
* @generated from field: bool success = 4;
|
|
798
|
+
*/
|
|
799
|
+
success: boolean;
|
|
800
|
+
/**
|
|
801
|
+
* @generated from field: optional browserscale.v1.SelectOptionError error = 5;
|
|
802
|
+
*/
|
|
803
|
+
error?: SelectOptionError;
|
|
450
804
|
};
|
|
451
805
|
/**
|
|
452
806
|
* Describes the message browserscale.v1.SelectOptionResult.
|
|
453
807
|
* Use `create(SelectOptionResultSchema)` to create a new message.
|
|
454
808
|
*/
|
|
455
809
|
export declare const SelectOptionResultSchema: GenMessage<SelectOptionResult>;
|
|
810
|
+
/**
|
|
811
|
+
* Error detail for a SelectOption that failed. Present iff success is false.
|
|
812
|
+
* selectOption is programmatic (no pointer gate), so it only reports semantic
|
|
813
|
+
* failures.
|
|
814
|
+
*
|
|
815
|
+
* @generated from message browserscale.v1.SelectOptionError
|
|
816
|
+
*/
|
|
817
|
+
export type SelectOptionError = Message<"browserscale.v1.SelectOptionError"> & {
|
|
818
|
+
/**
|
|
819
|
+
* "not_found" (the <select> was not located) or "option_not_found" (no option
|
|
820
|
+
* matched the requested index/value/text).
|
|
821
|
+
*
|
|
822
|
+
* @generated from field: string code = 1;
|
|
823
|
+
*/
|
|
824
|
+
code: string;
|
|
825
|
+
/**
|
|
826
|
+
* @generated from field: string message = 2;
|
|
827
|
+
*/
|
|
828
|
+
message: string;
|
|
829
|
+
};
|
|
830
|
+
/**
|
|
831
|
+
* Describes the message browserscale.v1.SelectOptionError.
|
|
832
|
+
* Use `create(SelectOptionErrorSchema)` to create a new message.
|
|
833
|
+
*/
|
|
834
|
+
export declare const SelectOptionErrorSchema: GenMessage<SelectOptionError>;
|
|
835
|
+
/**
|
|
836
|
+
* ScrollResult mirrors the scrollTo return: the success payload plus an optional
|
|
837
|
+
* error when the target could not be located/scrolled. Field numbers 1-5 match
|
|
838
|
+
* ElementResult so it stays wire-compatible; scrollTo returns no root_x/root_y.
|
|
839
|
+
*
|
|
840
|
+
* @generated from message browserscale.v1.ScrollResult
|
|
841
|
+
*/
|
|
842
|
+
export type ScrollResult = Message<"browserscale.v1.ScrollResult"> & {
|
|
843
|
+
/**
|
|
844
|
+
* @generated from field: bool success = 1;
|
|
845
|
+
*/
|
|
846
|
+
success: boolean;
|
|
847
|
+
/**
|
|
848
|
+
* @generated from field: string frame_id = 2;
|
|
849
|
+
*/
|
|
850
|
+
frameId: string;
|
|
851
|
+
/**
|
|
852
|
+
* @generated from field: int32 backend_node_id = 3;
|
|
853
|
+
*/
|
|
854
|
+
backendNodeId: number;
|
|
855
|
+
/**
|
|
856
|
+
* @generated from field: bool is_visible = 4;
|
|
857
|
+
*/
|
|
858
|
+
isVisible: boolean;
|
|
859
|
+
/**
|
|
860
|
+
* @generated from field: browserscale.v1.Rect bounds = 5;
|
|
861
|
+
*/
|
|
862
|
+
bounds?: Rect;
|
|
863
|
+
/**
|
|
864
|
+
* @generated from field: optional browserscale.v1.ScrollError error = 8;
|
|
865
|
+
*/
|
|
866
|
+
error?: ScrollError;
|
|
867
|
+
};
|
|
868
|
+
/**
|
|
869
|
+
* Describes the message browserscale.v1.ScrollResult.
|
|
870
|
+
* Use `create(ScrollResultSchema)` to create a new message.
|
|
871
|
+
*/
|
|
872
|
+
export declare const ScrollResultSchema: GenMessage<ScrollResult>;
|
|
873
|
+
/**
|
|
874
|
+
* Error detail for a ScrollTo that failed. Present iff success is false; the
|
|
875
|
+
* only semantic failure is the target not being locatable/scrollable.
|
|
876
|
+
*
|
|
877
|
+
* @generated from message browserscale.v1.ScrollError
|
|
878
|
+
*/
|
|
879
|
+
export type ScrollError = Message<"browserscale.v1.ScrollError"> & {
|
|
880
|
+
/**
|
|
881
|
+
* Currently always "not_found".
|
|
882
|
+
*
|
|
883
|
+
* @generated from field: string code = 1;
|
|
884
|
+
*/
|
|
885
|
+
code: string;
|
|
886
|
+
/**
|
|
887
|
+
* @generated from field: string message = 2;
|
|
888
|
+
*/
|
|
889
|
+
message: string;
|
|
890
|
+
};
|
|
891
|
+
/**
|
|
892
|
+
* Describes the message browserscale.v1.ScrollError.
|
|
893
|
+
* Use `create(ScrollErrorSchema)` to create a new message.
|
|
894
|
+
*/
|
|
895
|
+
export declare const ScrollErrorSchema: GenMessage<ScrollError>;
|
|
896
|
+
/**
|
|
897
|
+
* MoveResult mirrors the moveTo return: the success payload plus an optional
|
|
898
|
+
* error when the target could not be located. Field numbers 1-7 match
|
|
899
|
+
* ElementResult so it stays wire-compatible.
|
|
900
|
+
*
|
|
901
|
+
* @generated from message browserscale.v1.MoveResult
|
|
902
|
+
*/
|
|
903
|
+
export type MoveResult = Message<"browserscale.v1.MoveResult"> & {
|
|
904
|
+
/**
|
|
905
|
+
* @generated from field: bool success = 1;
|
|
906
|
+
*/
|
|
907
|
+
success: boolean;
|
|
908
|
+
/**
|
|
909
|
+
* @generated from field: string frame_id = 2;
|
|
910
|
+
*/
|
|
911
|
+
frameId: string;
|
|
912
|
+
/**
|
|
913
|
+
* @generated from field: int32 backend_node_id = 3;
|
|
914
|
+
*/
|
|
915
|
+
backendNodeId: number;
|
|
916
|
+
/**
|
|
917
|
+
* @generated from field: bool is_visible = 4;
|
|
918
|
+
*/
|
|
919
|
+
isVisible: boolean;
|
|
920
|
+
/**
|
|
921
|
+
* @generated from field: browserscale.v1.Rect bounds = 5;
|
|
922
|
+
*/
|
|
923
|
+
bounds?: Rect;
|
|
924
|
+
/**
|
|
925
|
+
* @generated from field: double root_x = 6;
|
|
926
|
+
*/
|
|
927
|
+
rootX: number;
|
|
928
|
+
/**
|
|
929
|
+
* @generated from field: double root_y = 7;
|
|
930
|
+
*/
|
|
931
|
+
rootY: number;
|
|
932
|
+
/**
|
|
933
|
+
* @generated from field: optional browserscale.v1.MoveError error = 8;
|
|
934
|
+
*/
|
|
935
|
+
error?: MoveError;
|
|
936
|
+
};
|
|
937
|
+
/**
|
|
938
|
+
* Describes the message browserscale.v1.MoveResult.
|
|
939
|
+
* Use `create(MoveResultSchema)` to create a new message.
|
|
940
|
+
*/
|
|
941
|
+
export declare const MoveResultSchema: GenMessage<MoveResult>;
|
|
942
|
+
/**
|
|
943
|
+
* Error detail for a MoveTo that failed. Present iff success is false; a move
|
|
944
|
+
* has no occlusion notion, so the only failure is the target not being
|
|
945
|
+
* locatable.
|
|
946
|
+
*
|
|
947
|
+
* @generated from message browserscale.v1.MoveError
|
|
948
|
+
*/
|
|
949
|
+
export type MoveError = Message<"browserscale.v1.MoveError"> & {
|
|
950
|
+
/**
|
|
951
|
+
* Currently always "not_found".
|
|
952
|
+
*
|
|
953
|
+
* @generated from field: string code = 1;
|
|
954
|
+
*/
|
|
955
|
+
code: string;
|
|
956
|
+
/**
|
|
957
|
+
* @generated from field: string message = 2;
|
|
958
|
+
*/
|
|
959
|
+
message: string;
|
|
960
|
+
};
|
|
961
|
+
/**
|
|
962
|
+
* Describes the message browserscale.v1.MoveError.
|
|
963
|
+
* Use `create(MoveErrorSchema)` to create a new message.
|
|
964
|
+
*/
|
|
965
|
+
export declare const MoveErrorSchema: GenMessage<MoveError>;
|
|
456
966
|
/**
|
|
457
967
|
* @generated from message browserscale.v1.SetProxyRequest
|
|
458
968
|
*/
|
|
@@ -674,6 +1184,62 @@ export type EvaluateResponse = Message<"browserscale.v1.EvaluateResponse"> & {
|
|
|
674
1184
|
* Use `create(EvaluateResponseSchema)` to create a new message.
|
|
675
1185
|
*/
|
|
676
1186
|
export declare const EvaluateResponseSchema: GenMessage<EvaluateResponse>;
|
|
1187
|
+
/**
|
|
1188
|
+
* Run executes a JavaScript automation script inside the God-VM — a bare V8
|
|
1189
|
+
* isolate that lives outside every renderer.
|
|
1190
|
+
*
|
|
1191
|
+
* @generated from message browserscale.v1.RunRequest
|
|
1192
|
+
*/
|
|
1193
|
+
export type RunRequest = Message<"browserscale.v1.RunRequest"> & {
|
|
1194
|
+
/**
|
|
1195
|
+
* @generated from field: string session_id = 1;
|
|
1196
|
+
*/
|
|
1197
|
+
sessionId: string;
|
|
1198
|
+
/**
|
|
1199
|
+
* @generated from field: string api_key = 2;
|
|
1200
|
+
*/
|
|
1201
|
+
apiKey: string;
|
|
1202
|
+
/**
|
|
1203
|
+
* JavaScript source to execute in the God-VM.
|
|
1204
|
+
*
|
|
1205
|
+
* @generated from field: string source = 3;
|
|
1206
|
+
*/
|
|
1207
|
+
source: string;
|
|
1208
|
+
/**
|
|
1209
|
+
* Page the script should be able to drive (reserved; frame bridge wired in a
|
|
1210
|
+
* follow-up). Optional for now — ignored server-side.
|
|
1211
|
+
*
|
|
1212
|
+
* @generated from field: optional string page_id = 4;
|
|
1213
|
+
*/
|
|
1214
|
+
pageId?: string;
|
|
1215
|
+
};
|
|
1216
|
+
/**
|
|
1217
|
+
* Describes the message browserscale.v1.RunRequest.
|
|
1218
|
+
* Use `create(RunRequestSchema)` to create a new message.
|
|
1219
|
+
*/
|
|
1220
|
+
export declare const RunRequestSchema: GenMessage<RunRequest>;
|
|
1221
|
+
/**
|
|
1222
|
+
* @generated from message browserscale.v1.RunResponse
|
|
1223
|
+
*/
|
|
1224
|
+
export type RunResponse = Message<"browserscale.v1.RunResponse"> & {
|
|
1225
|
+
/**
|
|
1226
|
+
* False if compilation or execution threw; then `result` holds the message.
|
|
1227
|
+
*
|
|
1228
|
+
* @generated from field: bool success = 1;
|
|
1229
|
+
*/
|
|
1230
|
+
success: boolean;
|
|
1231
|
+
/**
|
|
1232
|
+
* JSON-serialized result value (or "undefined"), or the error message.
|
|
1233
|
+
*
|
|
1234
|
+
* @generated from field: string result = 2;
|
|
1235
|
+
*/
|
|
1236
|
+
result: string;
|
|
1237
|
+
};
|
|
1238
|
+
/**
|
|
1239
|
+
* Describes the message browserscale.v1.RunResponse.
|
|
1240
|
+
* Use `create(RunResponseSchema)` to create a new message.
|
|
1241
|
+
*/
|
|
1242
|
+
export declare const RunResponseSchema: GenMessage<RunResponse>;
|
|
677
1243
|
/**
|
|
678
1244
|
* Note: named "WaitForAnyParams" instead of "WaitForAnyRequest" to avoid
|
|
679
1245
|
* colliding with the rpc method name "WaitForAnyRequest" (network intercept).
|
|
@@ -1915,6 +2481,136 @@ export type ScreenshotResponse = Message<"browserscale.v1.ScreenshotResponse"> &
|
|
|
1915
2481
|
* Use `create(ScreenshotResponseSchema)` to create a new message.
|
|
1916
2482
|
*/
|
|
1917
2483
|
export declare const ScreenshotResponseSchema: GenMessage<ScreenshotResponse>;
|
|
2484
|
+
/**
|
|
2485
|
+
* ReadCanvas reads the pixels of a single <canvas> element directly in the
|
|
2486
|
+
* renderer, bypassing the origin-clean (tainted) security check and without
|
|
2487
|
+
* executing page JavaScript — so cross-origin/tainted canvases (common in
|
|
2488
|
+
* captchas) can be read. The element is addressed like any other action
|
|
2489
|
+
* target: by selector, js_expression, or backend_node_id.
|
|
2490
|
+
*
|
|
2491
|
+
* @generated from message browserscale.v1.ReadCanvasRequest
|
|
2492
|
+
*/
|
|
2493
|
+
export type ReadCanvasRequest = Message<"browserscale.v1.ReadCanvasRequest"> & {
|
|
2494
|
+
/**
|
|
2495
|
+
* @generated from field: string session_id = 1;
|
|
2496
|
+
*/
|
|
2497
|
+
sessionId: string;
|
|
2498
|
+
/**
|
|
2499
|
+
* @generated from field: string api_key = 2;
|
|
2500
|
+
*/
|
|
2501
|
+
apiKey: string;
|
|
2502
|
+
/**
|
|
2503
|
+
* @generated from field: string page_id = 3;
|
|
2504
|
+
*/
|
|
2505
|
+
pageId: string;
|
|
2506
|
+
/**
|
|
2507
|
+
* @generated from field: optional int32 backend_node_id = 4;
|
|
2508
|
+
*/
|
|
2509
|
+
backendNodeId?: number;
|
|
2510
|
+
/**
|
|
2511
|
+
* @generated from field: optional string selector = 5;
|
|
2512
|
+
*/
|
|
2513
|
+
selector?: string;
|
|
2514
|
+
/**
|
|
2515
|
+
* @generated from field: optional string js_expression = 6;
|
|
2516
|
+
*/
|
|
2517
|
+
jsExpression?: string;
|
|
2518
|
+
/**
|
|
2519
|
+
* Specific frameId, empty/omitted for main frame, or "ALL_FRAMES".
|
|
2520
|
+
*
|
|
2521
|
+
* @generated from field: optional string frame_id = 7;
|
|
2522
|
+
*/
|
|
2523
|
+
frameId?: string;
|
|
2524
|
+
/**
|
|
2525
|
+
* Output encoding: "png" (default), "jpeg", "webp", or "rgba" for the raw
|
|
2526
|
+
* unpremultiplied RGBA pixel buffer.
|
|
2527
|
+
*
|
|
2528
|
+
* @generated from field: optional string format = 8;
|
|
2529
|
+
*/
|
|
2530
|
+
format?: string;
|
|
2531
|
+
/**
|
|
2532
|
+
* Encode quality 0-100 for "jpeg"/"webp" (ignored otherwise). Default 90.
|
|
2533
|
+
*
|
|
2534
|
+
* @generated from field: optional int32 quality = 9;
|
|
2535
|
+
*/
|
|
2536
|
+
quality?: number;
|
|
2537
|
+
/**
|
|
2538
|
+
* Optional sub-rectangle in canvas pixels (mirrors getImageData). The full
|
|
2539
|
+
* canvas is read when sw/sh are omitted or <= 0.
|
|
2540
|
+
*
|
|
2541
|
+
* @generated from field: optional int32 sx = 10;
|
|
2542
|
+
*/
|
|
2543
|
+
sx?: number;
|
|
2544
|
+
/**
|
|
2545
|
+
* @generated from field: optional int32 sy = 11;
|
|
2546
|
+
*/
|
|
2547
|
+
sy?: number;
|
|
2548
|
+
/**
|
|
2549
|
+
* @generated from field: optional int32 sw = 12;
|
|
2550
|
+
*/
|
|
2551
|
+
sw?: number;
|
|
2552
|
+
/**
|
|
2553
|
+
* @generated from field: optional int32 sh = 13;
|
|
2554
|
+
*/
|
|
2555
|
+
sh?: number;
|
|
2556
|
+
};
|
|
2557
|
+
/**
|
|
2558
|
+
* Describes the message browserscale.v1.ReadCanvasRequest.
|
|
2559
|
+
* Use `create(ReadCanvasRequestSchema)` to create a new message.
|
|
2560
|
+
*/
|
|
2561
|
+
export declare const ReadCanvasRequestSchema: GenMessage<ReadCanvasRequest>;
|
|
2562
|
+
/**
|
|
2563
|
+
* @generated from message browserscale.v1.ReadCanvasResponse
|
|
2564
|
+
*/
|
|
2565
|
+
export type ReadCanvasResponse = Message<"browserscale.v1.ReadCanvasResponse"> & {
|
|
2566
|
+
/**
|
|
2567
|
+
* @generated from field: bool success = 1;
|
|
2568
|
+
*/
|
|
2569
|
+
success: boolean;
|
|
2570
|
+
/**
|
|
2571
|
+
* Frame the canvas was resolved in.
|
|
2572
|
+
*
|
|
2573
|
+
* @generated from field: string frame_id = 2;
|
|
2574
|
+
*/
|
|
2575
|
+
frameId: string;
|
|
2576
|
+
/**
|
|
2577
|
+
* Resolved DevTools backendNodeId of the canvas.
|
|
2578
|
+
*
|
|
2579
|
+
* @generated from field: int32 backend_node_id = 3;
|
|
2580
|
+
*/
|
|
2581
|
+
backendNodeId: number;
|
|
2582
|
+
/**
|
|
2583
|
+
* Encoded image bytes as base64 (PNG by default), or the raw RGBA buffer
|
|
2584
|
+
* when format == "rgba".
|
|
2585
|
+
*
|
|
2586
|
+
* @generated from field: string data_base64 = 4;
|
|
2587
|
+
*/
|
|
2588
|
+
dataBase64: string;
|
|
2589
|
+
/**
|
|
2590
|
+
* Canvas width in pixels.
|
|
2591
|
+
*
|
|
2592
|
+
* @generated from field: int32 width = 5;
|
|
2593
|
+
*/
|
|
2594
|
+
width: number;
|
|
2595
|
+
/**
|
|
2596
|
+
* Canvas height in pixels.
|
|
2597
|
+
*
|
|
2598
|
+
* @generated from field: int32 height = 6;
|
|
2599
|
+
*/
|
|
2600
|
+
height: number;
|
|
2601
|
+
/**
|
|
2602
|
+
* Whether the canvas was origin-clean (untainted). Informational only —
|
|
2603
|
+
* the read succeeds regardless.
|
|
2604
|
+
*
|
|
2605
|
+
* @generated from field: bool origin_clean = 7;
|
|
2606
|
+
*/
|
|
2607
|
+
originClean: boolean;
|
|
2608
|
+
};
|
|
2609
|
+
/**
|
|
2610
|
+
* Describes the message browserscale.v1.ReadCanvasResponse.
|
|
2611
|
+
* Use `create(ReadCanvasResponseSchema)` to create a new message.
|
|
2612
|
+
*/
|
|
2613
|
+
export declare const ReadCanvasResponseSchema: GenMessage<ReadCanvasResponse>;
|
|
1918
2614
|
/**
|
|
1919
2615
|
* @generated from message browserscale.v1.SolveCaptchaRequest
|
|
1920
2616
|
*/
|
|
@@ -2013,6 +2709,14 @@ export declare const Browser: GenService<{
|
|
|
2013
2709
|
input: typeof EvaluateRequestSchema;
|
|
2014
2710
|
output: typeof EvaluateResponseSchema;
|
|
2015
2711
|
};
|
|
2712
|
+
/**
|
|
2713
|
+
* @generated from rpc browserscale.v1.Browser.Run
|
|
2714
|
+
*/
|
|
2715
|
+
run: {
|
|
2716
|
+
methodKind: "unary";
|
|
2717
|
+
input: typeof RunRequestSchema;
|
|
2718
|
+
output: typeof RunResponseSchema;
|
|
2719
|
+
};
|
|
2016
2720
|
/**
|
|
2017
2721
|
* Waiting
|
|
2018
2722
|
*
|
|
@@ -2039,7 +2743,7 @@ export declare const Browser: GenService<{
|
|
|
2039
2743
|
scrollTo: {
|
|
2040
2744
|
methodKind: "unary";
|
|
2041
2745
|
input: typeof ScrollToRequestSchema;
|
|
2042
|
-
output: typeof
|
|
2746
|
+
output: typeof ScrollResultSchema;
|
|
2043
2747
|
};
|
|
2044
2748
|
/**
|
|
2045
2749
|
* @generated from rpc browserscale.v1.Browser.MoveTo
|
|
@@ -2047,7 +2751,7 @@ export declare const Browser: GenService<{
|
|
|
2047
2751
|
moveTo: {
|
|
2048
2752
|
methodKind: "unary";
|
|
2049
2753
|
input: typeof MoveToRequestSchema;
|
|
2050
|
-
output: typeof
|
|
2754
|
+
output: typeof MoveResultSchema;
|
|
2051
2755
|
};
|
|
2052
2756
|
/**
|
|
2053
2757
|
* @generated from rpc browserscale.v1.Browser.Click
|
|
@@ -2055,7 +2759,7 @@ export declare const Browser: GenService<{
|
|
|
2055
2759
|
click: {
|
|
2056
2760
|
methodKind: "unary";
|
|
2057
2761
|
input: typeof ClickRequestSchema;
|
|
2058
|
-
output: typeof
|
|
2762
|
+
output: typeof ClickResultSchema;
|
|
2059
2763
|
};
|
|
2060
2764
|
/**
|
|
2061
2765
|
* @generated from rpc browserscale.v1.Browser.Drag
|
|
@@ -2071,7 +2775,7 @@ export declare const Browser: GenService<{
|
|
|
2071
2775
|
fill: {
|
|
2072
2776
|
methodKind: "unary";
|
|
2073
2777
|
input: typeof FillRequestSchema;
|
|
2074
|
-
output: typeof
|
|
2778
|
+
output: typeof FillResultSchema;
|
|
2075
2779
|
};
|
|
2076
2780
|
/**
|
|
2077
2781
|
* Network interception
|
|
@@ -2219,6 +2923,14 @@ export declare const Browser: GenService<{
|
|
|
2219
2923
|
input: typeof ScreenshotRequestSchema;
|
|
2220
2924
|
output: typeof ScreenshotResponseSchema;
|
|
2221
2925
|
};
|
|
2926
|
+
/**
|
|
2927
|
+
* @generated from rpc browserscale.v1.Browser.ReadCanvas
|
|
2928
|
+
*/
|
|
2929
|
+
readCanvas: {
|
|
2930
|
+
methodKind: "unary";
|
|
2931
|
+
input: typeof ReadCanvasRequestSchema;
|
|
2932
|
+
output: typeof ReadCanvasResponseSchema;
|
|
2933
|
+
};
|
|
2222
2934
|
/**
|
|
2223
2935
|
* Keyboard / IME (used by the live browser UI on top of the WebRTC stream)
|
|
2224
2936
|
*
|