browserscale-ts 1.2.1 → 1.4.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/README.md +6 -5
- package/dist/browser.d.ts +1 -1
- package/dist/browserscale.browser.js +342 -52
- package/dist/client.d.ts +170 -15
- package/dist/client.js +281 -14
- package/dist/errors.d.ts +33 -6
- package/dist/errors.js +11 -3
- package/dist/gen/wrc_pb.d.ts +630 -14
- package/dist/gen/wrc_pb.js +146 -66
- package/dist/index.d.ts +2 -2
- package/dist/internal/convert.js +21 -0
- package/dist/options.d.ts +81 -2
- package/dist/types.d.ts +66 -9
- package/package.json +1 -1
package/dist/gen/wrc_pb.d.ts
CHANGED
|
@@ -548,6 +548,15 @@ export type OccluderInfo = Message<"browserscale.v1.OccluderInfo"> & {
|
|
|
548
548
|
* @generated from field: optional bool hittable_while_invisible = 12;
|
|
549
549
|
*/
|
|
550
550
|
hittableWhileInvisible?: boolean;
|
|
551
|
+
/**
|
|
552
|
+
* Computed position keyword. Reports "fixed"/"sticky" when the element is
|
|
553
|
+
* pinned by itself or by an ancestor — pinned blockers stay put no matter
|
|
554
|
+
* where the pointer goes and can only be cleared by scrolling the target out
|
|
555
|
+
* from under them; ordinary overlays often collapse once the pointer leaves.
|
|
556
|
+
*
|
|
557
|
+
* @generated from field: optional string position = 13;
|
|
558
|
+
*/
|
|
559
|
+
position?: string;
|
|
551
560
|
};
|
|
552
561
|
/**
|
|
553
562
|
* Describes the message browserscale.v1.OccluderInfo.
|
|
@@ -637,18 +646,298 @@ export type ClickResult = Message<"browserscale.v1.ClickResult"> & {
|
|
|
637
646
|
* Use `create(ClickResultSchema)` to create a new message.
|
|
638
647
|
*/
|
|
639
648
|
export declare const ClickResultSchema: GenMessage<ClickResult>;
|
|
649
|
+
/**
|
|
650
|
+
* ReactionInfo (WRC.pdl ReactionInfo) describes a still-pending reaction as
|
|
651
|
+
* returned by ListReactions. One-shot reactions that already fired are gone.
|
|
652
|
+
*
|
|
653
|
+
* @generated from message browserscale.v1.ReactionInfo
|
|
654
|
+
*/
|
|
655
|
+
export type ReactionInfo = Message<"browserscale.v1.ReactionInfo"> & {
|
|
656
|
+
/**
|
|
657
|
+
* Stable id assigned by AddReaction; pass to RemoveReaction.
|
|
658
|
+
*
|
|
659
|
+
* @generated from field: string reaction_id = 1;
|
|
660
|
+
*/
|
|
661
|
+
reactionId: string;
|
|
662
|
+
/**
|
|
663
|
+
* The match's CSS selector, if it matches by selector.
|
|
664
|
+
*
|
|
665
|
+
* @generated from field: optional string match_selector = 2;
|
|
666
|
+
*/
|
|
667
|
+
matchSelector?: string;
|
|
668
|
+
/**
|
|
669
|
+
* The match's JS expression, if it matches by expression.
|
|
670
|
+
*
|
|
671
|
+
* @generated from field: optional string match_js_expression = 3;
|
|
672
|
+
*/
|
|
673
|
+
matchJsExpression?: string;
|
|
674
|
+
/**
|
|
675
|
+
* Click-target selector, if the action targets a different element.
|
|
676
|
+
*
|
|
677
|
+
* @generated from field: optional string action_selector = 4;
|
|
678
|
+
*/
|
|
679
|
+
actionSelector?: string;
|
|
680
|
+
/**
|
|
681
|
+
* Click-target JS expression, if the action targets a different element.
|
|
682
|
+
*
|
|
683
|
+
* @generated from field: optional string action_js_expression = 5;
|
|
684
|
+
*/
|
|
685
|
+
actionJsExpression?: string;
|
|
686
|
+
/**
|
|
687
|
+
* Frame scope: a specific frameId, empty for the main frame, or "ALL_FRAMES".
|
|
688
|
+
*
|
|
689
|
+
* @generated from field: string frame_id = 6;
|
|
690
|
+
*/
|
|
691
|
+
frameId: string;
|
|
692
|
+
/**
|
|
693
|
+
* Whether the match additionally requires the element to be visible.
|
|
694
|
+
*
|
|
695
|
+
* @generated from field: bool visible = 7;
|
|
696
|
+
*/
|
|
697
|
+
visible: boolean;
|
|
698
|
+
};
|
|
699
|
+
/**
|
|
700
|
+
* Describes the message browserscale.v1.ReactionInfo.
|
|
701
|
+
* Use `create(ReactionInfoSchema)` to create a new message.
|
|
702
|
+
*/
|
|
703
|
+
export declare const ReactionInfoSchema: GenMessage<ReactionInfo>;
|
|
704
|
+
/**
|
|
705
|
+
* @generated from message browserscale.v1.AddReactionRequest
|
|
706
|
+
*/
|
|
707
|
+
export type AddReactionRequest = Message<"browserscale.v1.AddReactionRequest"> & {
|
|
708
|
+
/**
|
|
709
|
+
* @generated from field: string session_id = 1;
|
|
710
|
+
*/
|
|
711
|
+
sessionId: string;
|
|
712
|
+
/**
|
|
713
|
+
* @generated from field: string api_key = 2;
|
|
714
|
+
*/
|
|
715
|
+
apiKey: string;
|
|
716
|
+
/**
|
|
717
|
+
* @generated from field: string page_id = 3;
|
|
718
|
+
*/
|
|
719
|
+
pageId: string;
|
|
720
|
+
/**
|
|
721
|
+
* Exactly one of match_selector / match_js_expression must be set.
|
|
722
|
+
*
|
|
723
|
+
* @generated from field: optional string match_selector = 4;
|
|
724
|
+
*/
|
|
725
|
+
matchSelector?: string;
|
|
726
|
+
/**
|
|
727
|
+
* @generated from field: optional string match_js_expression = 5;
|
|
728
|
+
*/
|
|
729
|
+
matchJsExpression?: string;
|
|
730
|
+
/**
|
|
731
|
+
* Where to watch: a specific frameId, empty/omitted for the main frame, or
|
|
732
|
+
* "ALL_FRAMES" to watch every frame.
|
|
733
|
+
*
|
|
734
|
+
* @generated from field: optional string frame_id = 6;
|
|
735
|
+
*/
|
|
736
|
+
frameId?: string;
|
|
737
|
+
/**
|
|
738
|
+
* Require the matched element to be visible before firing.
|
|
739
|
+
*
|
|
740
|
+
* @generated from field: optional bool visible = 7;
|
|
741
|
+
*/
|
|
742
|
+
visible?: boolean;
|
|
743
|
+
/**
|
|
744
|
+
* Optional click-target CSS selector, resolved in the matched element's
|
|
745
|
+
* frame. Omitted → click the matched element itself.
|
|
746
|
+
*
|
|
747
|
+
* @generated from field: optional string action_selector = 8;
|
|
748
|
+
*/
|
|
749
|
+
actionSelector?: string;
|
|
750
|
+
/**
|
|
751
|
+
* Optional click-target JS expression (mutually exclusive with
|
|
752
|
+
* action_selector).
|
|
753
|
+
*
|
|
754
|
+
* @generated from field: optional string action_js_expression = 9;
|
|
755
|
+
*/
|
|
756
|
+
actionJsExpression?: string;
|
|
757
|
+
/**
|
|
758
|
+
* "left" (default), "right", or "middle".
|
|
759
|
+
*
|
|
760
|
+
* @generated from field: optional string button = 10;
|
|
761
|
+
*/
|
|
762
|
+
button?: string;
|
|
763
|
+
/**
|
|
764
|
+
* 1 = single click (default), 2 = double click.
|
|
765
|
+
*
|
|
766
|
+
* @generated from field: optional int32 click_count = 11;
|
|
767
|
+
*/
|
|
768
|
+
clickCount?: number;
|
|
769
|
+
/**
|
|
770
|
+
* Poll cadence in ms for the shared page loop. Default 300.
|
|
771
|
+
*
|
|
772
|
+
* @generated from field: optional double interval = 12;
|
|
773
|
+
*/
|
|
774
|
+
interval?: number;
|
|
775
|
+
};
|
|
776
|
+
/**
|
|
777
|
+
* Describes the message browserscale.v1.AddReactionRequest.
|
|
778
|
+
* Use `create(AddReactionRequestSchema)` to create a new message.
|
|
779
|
+
*/
|
|
780
|
+
export declare const AddReactionRequestSchema: GenMessage<AddReactionRequest>;
|
|
781
|
+
/**
|
|
782
|
+
* @generated from message browserscale.v1.AddReactionResponse
|
|
783
|
+
*/
|
|
784
|
+
export type AddReactionResponse = Message<"browserscale.v1.AddReactionResponse"> & {
|
|
785
|
+
/**
|
|
786
|
+
* Id of the registered reaction (pass to RemoveReaction).
|
|
787
|
+
*
|
|
788
|
+
* @generated from field: string reaction_id = 1;
|
|
789
|
+
*/
|
|
790
|
+
reactionId: string;
|
|
791
|
+
};
|
|
792
|
+
/**
|
|
793
|
+
* Describes the message browserscale.v1.AddReactionResponse.
|
|
794
|
+
* Use `create(AddReactionResponseSchema)` to create a new message.
|
|
795
|
+
*/
|
|
796
|
+
export declare const AddReactionResponseSchema: GenMessage<AddReactionResponse>;
|
|
797
|
+
/**
|
|
798
|
+
* @generated from message browserscale.v1.RemoveReactionRequest
|
|
799
|
+
*/
|
|
800
|
+
export type RemoveReactionRequest = Message<"browserscale.v1.RemoveReactionRequest"> & {
|
|
801
|
+
/**
|
|
802
|
+
* @generated from field: string session_id = 1;
|
|
803
|
+
*/
|
|
804
|
+
sessionId: string;
|
|
805
|
+
/**
|
|
806
|
+
* @generated from field: string api_key = 2;
|
|
807
|
+
*/
|
|
808
|
+
apiKey: string;
|
|
809
|
+
/**
|
|
810
|
+
* Id returned by AddReaction.
|
|
811
|
+
*
|
|
812
|
+
* @generated from field: string reaction_id = 3;
|
|
813
|
+
*/
|
|
814
|
+
reactionId: string;
|
|
815
|
+
};
|
|
816
|
+
/**
|
|
817
|
+
* Describes the message browserscale.v1.RemoveReactionRequest.
|
|
818
|
+
* Use `create(RemoveReactionRequestSchema)` to create a new message.
|
|
819
|
+
*/
|
|
820
|
+
export declare const RemoveReactionRequestSchema: GenMessage<RemoveReactionRequest>;
|
|
821
|
+
/**
|
|
822
|
+
* @generated from message browserscale.v1.RemoveReactionResponse
|
|
823
|
+
*/
|
|
824
|
+
export type RemoveReactionResponse = Message<"browserscale.v1.RemoveReactionResponse"> & {
|
|
825
|
+
/**
|
|
826
|
+
* True if a pending reaction with this id existed and was removed.
|
|
827
|
+
*
|
|
828
|
+
* @generated from field: bool removed = 1;
|
|
829
|
+
*/
|
|
830
|
+
removed: boolean;
|
|
831
|
+
};
|
|
832
|
+
/**
|
|
833
|
+
* Describes the message browserscale.v1.RemoveReactionResponse.
|
|
834
|
+
* Use `create(RemoveReactionResponseSchema)` to create a new message.
|
|
835
|
+
*/
|
|
836
|
+
export declare const RemoveReactionResponseSchema: GenMessage<RemoveReactionResponse>;
|
|
837
|
+
/**
|
|
838
|
+
* @generated from message browserscale.v1.ListReactionsRequest
|
|
839
|
+
*/
|
|
840
|
+
export type ListReactionsRequest = Message<"browserscale.v1.ListReactionsRequest"> & {
|
|
841
|
+
/**
|
|
842
|
+
* @generated from field: string session_id = 1;
|
|
843
|
+
*/
|
|
844
|
+
sessionId: string;
|
|
845
|
+
/**
|
|
846
|
+
* @generated from field: string api_key = 2;
|
|
847
|
+
*/
|
|
848
|
+
apiKey: string;
|
|
849
|
+
/**
|
|
850
|
+
* @generated from field: string page_id = 3;
|
|
851
|
+
*/
|
|
852
|
+
pageId: string;
|
|
853
|
+
};
|
|
854
|
+
/**
|
|
855
|
+
* Describes the message browserscale.v1.ListReactionsRequest.
|
|
856
|
+
* Use `create(ListReactionsRequestSchema)` to create a new message.
|
|
857
|
+
*/
|
|
858
|
+
export declare const ListReactionsRequestSchema: GenMessage<ListReactionsRequest>;
|
|
859
|
+
/**
|
|
860
|
+
* @generated from message browserscale.v1.ListReactionsResponse
|
|
861
|
+
*/
|
|
862
|
+
export type ListReactionsResponse = Message<"browserscale.v1.ListReactionsResponse"> & {
|
|
863
|
+
/**
|
|
864
|
+
* @generated from field: repeated browserscale.v1.ReactionInfo reactions = 1;
|
|
865
|
+
*/
|
|
866
|
+
reactions: ReactionInfo[];
|
|
867
|
+
};
|
|
868
|
+
/**
|
|
869
|
+
* Describes the message browserscale.v1.ListReactionsResponse.
|
|
870
|
+
* Use `create(ListReactionsResponseSchema)` to create a new message.
|
|
871
|
+
*/
|
|
872
|
+
export declare const ListReactionsResponseSchema: GenMessage<ListReactionsResponse>;
|
|
640
873
|
/**
|
|
641
874
|
* Error detail for a Fill that did not complete. Present in FillResult iff
|
|
642
875
|
* success is false. Fill focuses the field with the exact same smart click as
|
|
643
876
|
* Click, so any pre-typing failure is a click failure: code/message mirror it
|
|
644
877
|
* and the full click diagnostics are nested under click_error.
|
|
878
|
+
* ElementRef is a lightweight descriptor of an element — enough for an agent to
|
|
879
|
+
* identify it (and decide what to do) without another DOM round-trip. Used to
|
|
880
|
+
* name the element that stole focus in a fill focus-loss failure.
|
|
645
881
|
*
|
|
882
|
+
* @generated from message browserscale.v1.ElementRef
|
|
883
|
+
*/
|
|
884
|
+
export type ElementRef = Message<"browserscale.v1.ElementRef"> & {
|
|
885
|
+
/**
|
|
886
|
+
* @generated from field: int32 backend_node_id = 1;
|
|
887
|
+
*/
|
|
888
|
+
backendNodeId: number;
|
|
889
|
+
/**
|
|
890
|
+
* Upper-case tag name, e.g. "INPUT", "BUTTON", "DIV".
|
|
891
|
+
*
|
|
892
|
+
* @generated from field: string tag_name = 2;
|
|
893
|
+
*/
|
|
894
|
+
tagName: string;
|
|
895
|
+
/**
|
|
896
|
+
* @generated from field: optional string id = 3;
|
|
897
|
+
*/
|
|
898
|
+
id?: string;
|
|
899
|
+
/**
|
|
900
|
+
* @generated from field: optional string name = 4;
|
|
901
|
+
*/
|
|
902
|
+
name?: string;
|
|
903
|
+
/**
|
|
904
|
+
* @generated from field: optional string class_name = 5;
|
|
905
|
+
*/
|
|
906
|
+
className?: string;
|
|
907
|
+
/**
|
|
908
|
+
* <input> type, if the element is an <input>.
|
|
909
|
+
*
|
|
910
|
+
* @generated from field: optional string input_type = 6;
|
|
911
|
+
*/
|
|
912
|
+
inputType?: string;
|
|
913
|
+
/**
|
|
914
|
+
* Whitespace-collapsed textContent/value snippet (max 120 chars).
|
|
915
|
+
*
|
|
916
|
+
* @generated from field: optional string text = 7;
|
|
917
|
+
*/
|
|
918
|
+
text?: string;
|
|
919
|
+
/**
|
|
920
|
+
* Whether this element is itself an editable text sink (input/textarea/
|
|
921
|
+
* contenteditable).
|
|
922
|
+
*
|
|
923
|
+
* @generated from field: bool editable = 8;
|
|
924
|
+
*/
|
|
925
|
+
editable: boolean;
|
|
926
|
+
};
|
|
927
|
+
/**
|
|
928
|
+
* Describes the message browserscale.v1.ElementRef.
|
|
929
|
+
* Use `create(ElementRefSchema)` to create a new message.
|
|
930
|
+
*/
|
|
931
|
+
export declare const ElementRefSchema: GenMessage<ElementRef>;
|
|
932
|
+
/**
|
|
646
933
|
* @generated from message browserscale.v1.FillError
|
|
647
934
|
*/
|
|
648
935
|
export type FillError = Message<"browserscale.v1.FillError"> & {
|
|
649
936
|
/**
|
|
650
|
-
*
|
|
651
|
-
*
|
|
937
|
+
* "not_found", "occluded_no_reachable_point", "occluded_after_evade"
|
|
938
|
+
* (mirrored from the underlying focus click; diagnostics under click_error),
|
|
939
|
+
* "focus_stolen" (another element took focus; focused_element names it) or
|
|
940
|
+
* "focus_lost" (focus left the target and nothing is focused).
|
|
652
941
|
*
|
|
653
942
|
* @generated from field: string code = 1;
|
|
654
943
|
*/
|
|
@@ -658,11 +947,38 @@ export type FillError = Message<"browserscale.v1.FillError"> & {
|
|
|
658
947
|
*/
|
|
659
948
|
message: string;
|
|
660
949
|
/**
|
|
661
|
-
* The underlying click-core failure that prevented focusing/typing.
|
|
950
|
+
* The underlying click-core failure that prevented focusing/typing. Present
|
|
951
|
+
* for the click-phase codes; absent for "focus_stolen"/"focus_lost".
|
|
662
952
|
*
|
|
663
953
|
* @generated from field: optional browserscale.v1.ClickError click_error = 3;
|
|
664
954
|
*/
|
|
665
955
|
clickError?: ClickError;
|
|
956
|
+
/**
|
|
957
|
+
* For "focus_stolen"/"focus_lost": backendNodeId that held focus when fill
|
|
958
|
+
* gave up (0 if nothing was focused). Diagnostic only.
|
|
959
|
+
*
|
|
960
|
+
* @generated from field: optional int32 focused_backend_node_id = 4;
|
|
961
|
+
*/
|
|
962
|
+
focusedBackendNodeId?: number;
|
|
963
|
+
/**
|
|
964
|
+
* For "focus_stolen": full descriptor of the element that holds focus
|
|
965
|
+
* instead of the target, so the agent can act on it.
|
|
966
|
+
*
|
|
967
|
+
* @generated from field: optional browserscale.v1.ElementRef focused_element = 5;
|
|
968
|
+
*/
|
|
969
|
+
focusedElement?: ElementRef;
|
|
970
|
+
/**
|
|
971
|
+
* The fill target's own state at the point of failure: whether it is still an
|
|
972
|
+
* editable text sink, and its current text length. Present for the focus_*
|
|
973
|
+
* codes; lets the agent tell "field vanished/readonly" from "focus stolen".
|
|
974
|
+
*
|
|
975
|
+
* @generated from field: optional bool target_editable = 6;
|
|
976
|
+
*/
|
|
977
|
+
targetEditable?: boolean;
|
|
978
|
+
/**
|
|
979
|
+
* @generated from field: optional int32 target_value_length = 7;
|
|
980
|
+
*/
|
|
981
|
+
targetValueLength?: number;
|
|
666
982
|
};
|
|
667
983
|
/**
|
|
668
984
|
* Describes the message browserscale.v1.FillError.
|
|
@@ -1590,6 +1906,21 @@ export type FillRequest = Message<"browserscale.v1.FillRequest"> & {
|
|
|
1590
1906
|
* @generated from field: optional bool clear_first = 9;
|
|
1591
1907
|
*/
|
|
1592
1908
|
clearFirst?: boolean;
|
|
1909
|
+
/**
|
|
1910
|
+
* Budget in ms to make the field focusable+clickable before giving up
|
|
1911
|
+
* (locate, scroll, settle, un-occlude); mirrors Click's timeout. Omit for
|
|
1912
|
+
* the server default (5000). 0 = one-shot (no retry).
|
|
1913
|
+
*
|
|
1914
|
+
* @generated from field: optional double timeout = 10;
|
|
1915
|
+
*/
|
|
1916
|
+
timeout?: number;
|
|
1917
|
+
/**
|
|
1918
|
+
* Settle window in ms before the focus click; mirrors Click's steady_time.
|
|
1919
|
+
* Omit for the server default (750). 0 skips settling.
|
|
1920
|
+
*
|
|
1921
|
+
* @generated from field: optional double steady_time = 11;
|
|
1922
|
+
*/
|
|
1923
|
+
steadyTime?: number;
|
|
1593
1924
|
};
|
|
1594
1925
|
/**
|
|
1595
1926
|
* Describes the message browserscale.v1.FillRequest.
|
|
@@ -2075,17 +2406,74 @@ export type GetObservationRequest = Message<"browserscale.v1.GetObservationReque
|
|
|
2075
2406
|
*/
|
|
2076
2407
|
pageId: string;
|
|
2077
2408
|
/**
|
|
2078
|
-
*
|
|
2409
|
+
* Safety net against runaway documents; max_total_tokens is the limit that
|
|
2410
|
+
* normally binds. Default 800.
|
|
2079
2411
|
*
|
|
2080
2412
|
* @generated from field: optional int32 max_elements_per_frame = 4;
|
|
2081
2413
|
*/
|
|
2082
2414
|
maxElementsPerFrame?: number;
|
|
2083
2415
|
/**
|
|
2084
|
-
* Default
|
|
2416
|
+
* Max length of human-readable strings (labels, text, values). Default 300.
|
|
2417
|
+
* Identifier-like attributes have their own shorter cap.
|
|
2085
2418
|
*
|
|
2086
2419
|
* @generated from field: optional int32 max_text_length = 5;
|
|
2087
2420
|
*/
|
|
2088
2421
|
maxTextLength?: number;
|
|
2422
|
+
/**
|
|
2423
|
+
* "text" (default) for the compact line format, "json" for the structured
|
|
2424
|
+
* form. Only the requested representation is built.
|
|
2425
|
+
*
|
|
2426
|
+
* @generated from field: optional string format = 6;
|
|
2427
|
+
*/
|
|
2428
|
+
format?: string;
|
|
2429
|
+
/**
|
|
2430
|
+
* Budget across ALL frames, in estimated tokens rather than characters.
|
|
2431
|
+
* Default 8000.
|
|
2432
|
+
*
|
|
2433
|
+
* @generated from field: optional int32 max_total_tokens = 7;
|
|
2434
|
+
*/
|
|
2435
|
+
maxTotalTokens?: number;
|
|
2436
|
+
/**
|
|
2437
|
+
* Include element bounds as bounds="x,y,w,h".
|
|
2438
|
+
*
|
|
2439
|
+
* @generated from field: optional bool include_bounds = 8;
|
|
2440
|
+
*/
|
|
2441
|
+
includeBounds?: boolean;
|
|
2442
|
+
/**
|
|
2443
|
+
* Only emit elements intersecting the frame's current viewport.
|
|
2444
|
+
*
|
|
2445
|
+
* @generated from field: optional bool viewport_only = 9;
|
|
2446
|
+
*/
|
|
2447
|
+
viewportOnly?: boolean;
|
|
2448
|
+
/**
|
|
2449
|
+
* Scope root by backend node ID from a previous wait/getObservation.
|
|
2450
|
+
* Requires frame_id. At most one of backend_node_id, selector, js_expression.
|
|
2451
|
+
* Omit all three for the whole page.
|
|
2452
|
+
*
|
|
2453
|
+
* @generated from field: optional int32 backend_node_id = 10;
|
|
2454
|
+
*/
|
|
2455
|
+
backendNodeId?: number;
|
|
2456
|
+
/**
|
|
2457
|
+
* Scope root by CSS selector.
|
|
2458
|
+
*
|
|
2459
|
+
* @generated from field: optional string selector = 11;
|
|
2460
|
+
*/
|
|
2461
|
+
selector?: string;
|
|
2462
|
+
/**
|
|
2463
|
+
* Scope root by JS expression that evaluates to a DOM Element
|
|
2464
|
+
* (including __wrc.shadow(...) for closed shadow roots).
|
|
2465
|
+
*
|
|
2466
|
+
* @generated from field: optional string js_expression = 12;
|
|
2467
|
+
*/
|
|
2468
|
+
jsExpression?: string;
|
|
2469
|
+
/**
|
|
2470
|
+
* Where to look up the scope root: a specific frameId, empty/omitted for
|
|
2471
|
+
* the main frame, or "ALL_FRAMES" to search every frame until found.
|
|
2472
|
+
* Ignored when observing the whole page.
|
|
2473
|
+
*
|
|
2474
|
+
* @generated from field: optional string frame_id = 13;
|
|
2475
|
+
*/
|
|
2476
|
+
frameId?: string;
|
|
2089
2477
|
};
|
|
2090
2478
|
/**
|
|
2091
2479
|
* Describes the message browserscale.v1.GetObservationRequest.
|
|
@@ -2097,17 +2485,11 @@ export declare const GetObservationRequestSchema: GenMessage<GetObservationReque
|
|
|
2097
2485
|
*/
|
|
2098
2486
|
export type GetObservationResponse = Message<"browserscale.v1.GetObservationResponse"> & {
|
|
2099
2487
|
/**
|
|
2100
|
-
*
|
|
2101
|
-
*
|
|
2102
|
-
* @generated from field: string observation_text = 1;
|
|
2103
|
-
*/
|
|
2104
|
-
observationText: string;
|
|
2105
|
-
/**
|
|
2106
|
-
* Structured JSON with frames, elements, counts, and limits.
|
|
2488
|
+
* The observation in the requested format.
|
|
2107
2489
|
*
|
|
2108
|
-
* @generated from field: string
|
|
2490
|
+
* @generated from field: string observation = 1;
|
|
2109
2491
|
*/
|
|
2110
|
-
|
|
2492
|
+
observation: string;
|
|
2111
2493
|
};
|
|
2112
2494
|
/**
|
|
2113
2495
|
* Describes the message browserscale.v1.GetObservationResponse.
|
|
@@ -2288,6 +2670,44 @@ export type InsertTextRequest = Message<"browserscale.v1.InsertTextRequest"> & {
|
|
|
2288
2670
|
* Use `create(InsertTextRequestSchema)` to create a new message.
|
|
2289
2671
|
*/
|
|
2290
2672
|
export declare const InsertTextRequestSchema: GenMessage<InsertTextRequest>;
|
|
2673
|
+
/**
|
|
2674
|
+
* Type dispatches `text` as a per-key stream of real keyboard events to the
|
|
2675
|
+
* currently focused element (untargeted, no focus pinning) — unlike InsertText,
|
|
2676
|
+
* which is a single IME-style commit. Focus may move between fields mid-stream
|
|
2677
|
+
* (e.g. OTP inputs that auto-advance on each digit). For a strict, target-bound
|
|
2678
|
+
* value that must stay focused, use Fill instead.
|
|
2679
|
+
*
|
|
2680
|
+
* @generated from message browserscale.v1.TypeRequest
|
|
2681
|
+
*/
|
|
2682
|
+
export type TypeRequest = Message<"browserscale.v1.TypeRequest"> & {
|
|
2683
|
+
/**
|
|
2684
|
+
* @generated from field: string session_id = 1;
|
|
2685
|
+
*/
|
|
2686
|
+
sessionId: string;
|
|
2687
|
+
/**
|
|
2688
|
+
* @generated from field: string api_key = 2;
|
|
2689
|
+
*/
|
|
2690
|
+
apiKey: string;
|
|
2691
|
+
/**
|
|
2692
|
+
* @generated from field: string page_id = 3;
|
|
2693
|
+
*/
|
|
2694
|
+
pageId: string;
|
|
2695
|
+
/**
|
|
2696
|
+
* @generated from field: string text = 4;
|
|
2697
|
+
*/
|
|
2698
|
+
text: string;
|
|
2699
|
+
/**
|
|
2700
|
+
* Clear the currently focused field first (Ctrl+A, Delete). Default false.
|
|
2701
|
+
*
|
|
2702
|
+
* @generated from field: optional bool clear_first = 5;
|
|
2703
|
+
*/
|
|
2704
|
+
clearFirst?: boolean;
|
|
2705
|
+
};
|
|
2706
|
+
/**
|
|
2707
|
+
* Describes the message browserscale.v1.TypeRequest.
|
|
2708
|
+
* Use `create(TypeRequestSchema)` to create a new message.
|
|
2709
|
+
*/
|
|
2710
|
+
export declare const TypeRequestSchema: GenMessage<TypeRequest>;
|
|
2291
2711
|
/**
|
|
2292
2712
|
* Fires a single key-down (PressKey) or key-up (ReleaseKey) event. For
|
|
2293
2713
|
* full press cycles (down + char + up) call PressKey followed by ReleaseKey,
|
|
@@ -2659,6 +3079,136 @@ export type SolveCaptchaResponse = Message<"browserscale.v1.SolveCaptchaResponse
|
|
|
2659
3079
|
* Use `create(SolveCaptchaResponseSchema)` to create a new message.
|
|
2660
3080
|
*/
|
|
2661
3081
|
export declare const SolveCaptchaResponseSchema: GenMessage<SolveCaptchaResponse>;
|
|
3082
|
+
/**
|
|
3083
|
+
* IceServer is one entry for an RTCPeerConnection's iceServers config: a TURN
|
|
3084
|
+
* (or STUN) URL plus the short-lived REST credentials to authenticate with it.
|
|
3085
|
+
*
|
|
3086
|
+
* @generated from message browserscale.v1.IceServer
|
|
3087
|
+
*/
|
|
3088
|
+
export type IceServer = Message<"browserscale.v1.IceServer"> & {
|
|
3089
|
+
/**
|
|
3090
|
+
* @generated from field: repeated string urls = 1;
|
|
3091
|
+
*/
|
|
3092
|
+
urls: string[];
|
|
3093
|
+
/**
|
|
3094
|
+
* @generated from field: optional string username = 2;
|
|
3095
|
+
*/
|
|
3096
|
+
username?: string;
|
|
3097
|
+
/**
|
|
3098
|
+
* @generated from field: optional string credential = 3;
|
|
3099
|
+
*/
|
|
3100
|
+
credential?: string;
|
|
3101
|
+
};
|
|
3102
|
+
/**
|
|
3103
|
+
* Describes the message browserscale.v1.IceServer.
|
|
3104
|
+
* Use `create(IceServerSchema)` to create a new message.
|
|
3105
|
+
*/
|
|
3106
|
+
export declare const IceServerSchema: GenMessage<IceServer>;
|
|
3107
|
+
/**
|
|
3108
|
+
* @generated from message browserscale.v1.GetStreamConfigRequest
|
|
3109
|
+
*/
|
|
3110
|
+
export type GetStreamConfigRequest = Message<"browserscale.v1.GetStreamConfigRequest"> & {
|
|
3111
|
+
/**
|
|
3112
|
+
* @generated from field: string session_id = 1;
|
|
3113
|
+
*/
|
|
3114
|
+
sessionId: string;
|
|
3115
|
+
/**
|
|
3116
|
+
* @generated from field: string api_key = 2;
|
|
3117
|
+
*/
|
|
3118
|
+
apiKey: string;
|
|
3119
|
+
};
|
|
3120
|
+
/**
|
|
3121
|
+
* Describes the message browserscale.v1.GetStreamConfigRequest.
|
|
3122
|
+
* Use `create(GetStreamConfigRequestSchema)` to create a new message.
|
|
3123
|
+
*/
|
|
3124
|
+
export declare const GetStreamConfigRequestSchema: GenMessage<GetStreamConfigRequest>;
|
|
3125
|
+
/**
|
|
3126
|
+
* @generated from message browserscale.v1.GetStreamConfigResponse
|
|
3127
|
+
*/
|
|
3128
|
+
export type GetStreamConfigResponse = Message<"browserscale.v1.GetStreamConfigResponse"> & {
|
|
3129
|
+
/**
|
|
3130
|
+
* TURN/STUN servers with short-lived credentials. Put these in the client's
|
|
3131
|
+
* RTCPeerConnection config BEFORE creating the offer, so it can gather relay
|
|
3132
|
+
* candidates.
|
|
3133
|
+
*
|
|
3134
|
+
* @generated from field: repeated browserscale.v1.IceServer ice_servers = 1;
|
|
3135
|
+
*/
|
|
3136
|
+
iceServers: IceServer[];
|
|
3137
|
+
};
|
|
3138
|
+
/**
|
|
3139
|
+
* Describes the message browserscale.v1.GetStreamConfigResponse.
|
|
3140
|
+
* Use `create(GetStreamConfigResponseSchema)` to create a new message.
|
|
3141
|
+
*/
|
|
3142
|
+
export declare const GetStreamConfigResponseSchema: GenMessage<GetStreamConfigResponse>;
|
|
3143
|
+
/**
|
|
3144
|
+
* @generated from message browserscale.v1.StartStreamRequest
|
|
3145
|
+
*/
|
|
3146
|
+
export type StartStreamRequest = Message<"browserscale.v1.StartStreamRequest"> & {
|
|
3147
|
+
/**
|
|
3148
|
+
* @generated from field: string session_id = 1;
|
|
3149
|
+
*/
|
|
3150
|
+
sessionId: string;
|
|
3151
|
+
/**
|
|
3152
|
+
* @generated from field: string api_key = 2;
|
|
3153
|
+
*/
|
|
3154
|
+
apiKey: string;
|
|
3155
|
+
/**
|
|
3156
|
+
* The client's SDP offer. The browser sets it as the remote description and
|
|
3157
|
+
* returns its answer. Relay policy, frame rate and bitrate are decided by the
|
|
3158
|
+
* server — the client only offers.
|
|
3159
|
+
*
|
|
3160
|
+
* @generated from field: string offer_sdp = 3;
|
|
3161
|
+
*/
|
|
3162
|
+
offerSdp: string;
|
|
3163
|
+
};
|
|
3164
|
+
/**
|
|
3165
|
+
* Describes the message browserscale.v1.StartStreamRequest.
|
|
3166
|
+
* Use `create(StartStreamRequestSchema)` to create a new message.
|
|
3167
|
+
*/
|
|
3168
|
+
export declare const StartStreamRequestSchema: GenMessage<StartStreamRequest>;
|
|
3169
|
+
/**
|
|
3170
|
+
* @generated from message browserscale.v1.StartStreamResponse
|
|
3171
|
+
*/
|
|
3172
|
+
export type StartStreamResponse = Message<"browserscale.v1.StartStreamResponse"> & {
|
|
3173
|
+
/**
|
|
3174
|
+
* The browser's SDP answer to set as the client's remote description.
|
|
3175
|
+
*
|
|
3176
|
+
* @generated from field: string answer_sdp = 1;
|
|
3177
|
+
*/
|
|
3178
|
+
answerSdp: string;
|
|
3179
|
+
};
|
|
3180
|
+
/**
|
|
3181
|
+
* Describes the message browserscale.v1.StartStreamResponse.
|
|
3182
|
+
* Use `create(StartStreamResponseSchema)` to create a new message.
|
|
3183
|
+
*/
|
|
3184
|
+
export declare const StartStreamResponseSchema: GenMessage<StartStreamResponse>;
|
|
3185
|
+
/**
|
|
3186
|
+
* @generated from message browserscale.v1.StopStreamRequest
|
|
3187
|
+
*/
|
|
3188
|
+
export type StopStreamRequest = Message<"browserscale.v1.StopStreamRequest"> & {
|
|
3189
|
+
/**
|
|
3190
|
+
* @generated from field: string session_id = 1;
|
|
3191
|
+
*/
|
|
3192
|
+
sessionId: string;
|
|
3193
|
+
/**
|
|
3194
|
+
* @generated from field: string api_key = 2;
|
|
3195
|
+
*/
|
|
3196
|
+
apiKey: string;
|
|
3197
|
+
};
|
|
3198
|
+
/**
|
|
3199
|
+
* Describes the message browserscale.v1.StopStreamRequest.
|
|
3200
|
+
* Use `create(StopStreamRequestSchema)` to create a new message.
|
|
3201
|
+
*/
|
|
3202
|
+
export declare const StopStreamRequestSchema: GenMessage<StopStreamRequest>;
|
|
3203
|
+
/**
|
|
3204
|
+
* @generated from message browserscale.v1.StopStreamResponse
|
|
3205
|
+
*/
|
|
3206
|
+
export type StopStreamResponse = Message<"browserscale.v1.StopStreamResponse"> & {};
|
|
3207
|
+
/**
|
|
3208
|
+
* Describes the message browserscale.v1.StopStreamResponse.
|
|
3209
|
+
* Use `create(StopStreamResponseSchema)` to create a new message.
|
|
3210
|
+
*/
|
|
3211
|
+
export declare const StopStreamResponseSchema: GenMessage<StopStreamResponse>;
|
|
2662
3212
|
/**
|
|
2663
3213
|
* @generated from service browserscale.v1.Browser
|
|
2664
3214
|
*/
|
|
@@ -2777,6 +3327,34 @@ export declare const Browser: GenService<{
|
|
|
2777
3327
|
input: typeof FillRequestSchema;
|
|
2778
3328
|
output: typeof FillResultSchema;
|
|
2779
3329
|
};
|
|
3330
|
+
/**
|
|
3331
|
+
* Reactions — one-shot background auto-click when a condition matches. A
|
|
3332
|
+
* shared per-page poller fires only while the pointer is idle, so a reaction
|
|
3333
|
+
* slots into the gaps of a retrying foreground action.
|
|
3334
|
+
*
|
|
3335
|
+
* @generated from rpc browserscale.v1.Browser.AddReaction
|
|
3336
|
+
*/
|
|
3337
|
+
addReaction: {
|
|
3338
|
+
methodKind: "unary";
|
|
3339
|
+
input: typeof AddReactionRequestSchema;
|
|
3340
|
+
output: typeof AddReactionResponseSchema;
|
|
3341
|
+
};
|
|
3342
|
+
/**
|
|
3343
|
+
* @generated from rpc browserscale.v1.Browser.RemoveReaction
|
|
3344
|
+
*/
|
|
3345
|
+
removeReaction: {
|
|
3346
|
+
methodKind: "unary";
|
|
3347
|
+
input: typeof RemoveReactionRequestSchema;
|
|
3348
|
+
output: typeof RemoveReactionResponseSchema;
|
|
3349
|
+
};
|
|
3350
|
+
/**
|
|
3351
|
+
* @generated from rpc browserscale.v1.Browser.ListReactions
|
|
3352
|
+
*/
|
|
3353
|
+
listReactions: {
|
|
3354
|
+
methodKind: "unary";
|
|
3355
|
+
input: typeof ListReactionsRequestSchema;
|
|
3356
|
+
output: typeof ListReactionsResponseSchema;
|
|
3357
|
+
};
|
|
2780
3358
|
/**
|
|
2781
3359
|
* Network interception
|
|
2782
3360
|
*
|
|
@@ -2941,6 +3519,14 @@ export declare const Browser: GenService<{
|
|
|
2941
3519
|
input: typeof InsertTextRequestSchema;
|
|
2942
3520
|
output: typeof EmptySchema;
|
|
2943
3521
|
};
|
|
3522
|
+
/**
|
|
3523
|
+
* @generated from rpc browserscale.v1.Browser.Type
|
|
3524
|
+
*/
|
|
3525
|
+
type: {
|
|
3526
|
+
methodKind: "unary";
|
|
3527
|
+
input: typeof TypeRequestSchema;
|
|
3528
|
+
output: typeof EmptySchema;
|
|
3529
|
+
};
|
|
2944
3530
|
/**
|
|
2945
3531
|
* @generated from rpc browserscale.v1.Browser.PressKey
|
|
2946
3532
|
*/
|
|
@@ -2975,4 +3561,34 @@ export declare const Browser: GenService<{
|
|
|
2975
3561
|
input: typeof SolveCaptchaRequestSchema;
|
|
2976
3562
|
output: typeof SolveCaptchaResponseSchema;
|
|
2977
3563
|
};
|
|
3564
|
+
/**
|
|
3565
|
+
* Live streaming (WebRTC). The page is streamed as a video track over a
|
|
3566
|
+
* WebRTC PeerConnection whose media is relayed through the TURN server. The
|
|
3567
|
+
* caller creates the offer (client-offerer); the browser answers it.
|
|
3568
|
+
* GetStreamConfig first hands out the ICE servers the client needs to build
|
|
3569
|
+
* that offer.
|
|
3570
|
+
*
|
|
3571
|
+
* @generated from rpc browserscale.v1.Browser.GetStreamConfig
|
|
3572
|
+
*/
|
|
3573
|
+
getStreamConfig: {
|
|
3574
|
+
methodKind: "unary";
|
|
3575
|
+
input: typeof GetStreamConfigRequestSchema;
|
|
3576
|
+
output: typeof GetStreamConfigResponseSchema;
|
|
3577
|
+
};
|
|
3578
|
+
/**
|
|
3579
|
+
* @generated from rpc browserscale.v1.Browser.StartStream
|
|
3580
|
+
*/
|
|
3581
|
+
startStream: {
|
|
3582
|
+
methodKind: "unary";
|
|
3583
|
+
input: typeof StartStreamRequestSchema;
|
|
3584
|
+
output: typeof StartStreamResponseSchema;
|
|
3585
|
+
};
|
|
3586
|
+
/**
|
|
3587
|
+
* @generated from rpc browserscale.v1.Browser.StopStream
|
|
3588
|
+
*/
|
|
3589
|
+
stopStream: {
|
|
3590
|
+
methodKind: "unary";
|
|
3591
|
+
input: typeof StopStreamRequestSchema;
|
|
3592
|
+
output: typeof StopStreamResponseSchema;
|
|
3593
|
+
};
|
|
2978
3594
|
}>;
|