@@ -61,11 +61,14 @@ type BrowserNewResponse struct {
6161 CdpWsURL string `json:"cdp_ws_url,required"`
6262 // Unique identifier for the browser session
6363 SessionID string `json:"session_id,required"`
64+ // Optional persistence configuration for the browser session.
65+ Persistence BrowserNewResponsePersistence `json:"persistence"`
6466 // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
6567 JSON struct {
6668 BrowserLiveViewURL respjson.Field
6769 CdpWsURL respjson.Field
6870 SessionID respjson.Field
71+ Persistence respjson.Field
6972 ExtraFields map [string ]respjson.Field
7073 raw string
7174 } `json:"-"`
@@ -77,18 +80,39 @@ func (r *BrowserNewResponse) UnmarshalJSON(data []byte) error {
7780 return apijson .UnmarshalRoot (data , r )
7881}
7982
83+ // Optional persistence configuration for the browser session.
84+ type BrowserNewResponsePersistence struct {
85+ // Unique identifier for the persistent browser session.
86+ ID string `json:"id,required"`
87+ // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
88+ JSON struct {
89+ ID respjson.Field
90+ ExtraFields map [string ]respjson.Field
91+ raw string
92+ } `json:"-"`
93+ }
94+
95+ // Returns the unmodified JSON received from the API
96+ func (r BrowserNewResponsePersistence ) RawJSON () string { return r .JSON .raw }
97+ func (r * BrowserNewResponsePersistence ) UnmarshalJSON (data []byte ) error {
98+ return apijson .UnmarshalRoot (data , r )
99+ }
100+
80101type BrowserGetResponse struct {
81102 // Remote URL for live viewing the browser session
82103 BrowserLiveViewURL string `json:"browser_live_view_url,required"`
83104 // Websocket URL for Chrome DevTools Protocol connections to the browser session
84105 CdpWsURL string `json:"cdp_ws_url,required"`
85106 // Unique identifier for the browser session
86107 SessionID string `json:"session_id,required"`
108+ // Optional persistence configuration for the browser session.
109+ Persistence BrowserGetResponsePersistence `json:"persistence"`
87110 // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
88111 JSON struct {
89112 BrowserLiveViewURL respjson.Field
90113 CdpWsURL respjson.Field
91114 SessionID respjson.Field
115+ Persistence respjson.Field
92116 ExtraFields map [string ]respjson.Field
93117 raw string
94118 } `json:"-"`
@@ -100,9 +124,29 @@ func (r *BrowserGetResponse) UnmarshalJSON(data []byte) error {
100124 return apijson .UnmarshalRoot (data , r )
101125}
102126
127+ // Optional persistence configuration for the browser session.
128+ type BrowserGetResponsePersistence struct {
129+ // Unique identifier for the persistent browser session.
130+ ID string `json:"id,required"`
131+ // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
132+ JSON struct {
133+ ID respjson.Field
134+ ExtraFields map [string ]respjson.Field
135+ raw string
136+ } `json:"-"`
137+ }
138+
139+ // Returns the unmodified JSON received from the API
140+ func (r BrowserGetResponsePersistence ) RawJSON () string { return r .JSON .raw }
141+ func (r * BrowserGetResponsePersistence ) UnmarshalJSON (data []byte ) error {
142+ return apijson .UnmarshalRoot (data , r )
143+ }
144+
103145type BrowserNewParams struct {
104146 // action invocation ID
105147 InvocationID string `json:"invocation_id,required"`
148+ // Optional persistence configuration for the browser session.
149+ Persistence BrowserNewParamsPersistence `json:"persistence,omitzero"`
106150 paramObj
107151}
108152
@@ -113,3 +157,20 @@ func (r BrowserNewParams) MarshalJSON() (data []byte, err error) {
113157func (r * BrowserNewParams ) UnmarshalJSON (data []byte ) error {
114158 return apijson .UnmarshalRoot (data , r )
115159}
160+
161+ // Optional persistence configuration for the browser session.
162+ //
163+ // The property ID is required.
164+ type BrowserNewParamsPersistence struct {
165+ // Unique identifier for the persistent browser session.
166+ ID string `json:"id,required"`
167+ paramObj
168+ }
169+
170+ func (r BrowserNewParamsPersistence ) MarshalJSON () (data []byte , err error ) {
171+ type shadow BrowserNewParamsPersistence
172+ return param .MarshalObject (r , (* shadow )(& r ))
173+ }
174+ func (r * BrowserNewParamsPersistence ) UnmarshalJSON (data []byte ) error {
175+ return apijson .UnmarshalRoot (data , r )
176+ }
0 commit comments