@@ -34,12 +34,19 @@ import {
34
34
ProxyCountryCode ,
35
35
} from './resources/browser-profiles' ;
36
36
import {
37
+ FileView ,
37
38
LlmModel ,
38
39
TaskCreateParams ,
40
+ TaskGetLogsResponse ,
41
+ TaskGetOutputFileParams ,
42
+ TaskGetOutputFileResponse ,
43
+ TaskGetUserUploadedFileParams ,
44
+ TaskGetUserUploadedFileResponse ,
45
+ TaskItemView ,
39
46
TaskListParams ,
40
47
TaskListResponse ,
41
- TaskRetrieveLogsResponse ,
42
48
TaskStatus ,
49
+ TaskStepView ,
43
50
TaskUpdateParams ,
44
51
TaskView ,
45
52
Tasks ,
@@ -53,6 +60,7 @@ import {
53
60
SessionView ,
54
61
Sessions ,
55
62
} from './resources/sessions/sessions' ;
63
+ import { Users } from './resources/users/users' ;
56
64
import { type Fetch } from './internal/builtin-types' ;
57
65
import { HeadersLike , NullableHeaders , buildHeaders } from './internal/headers' ;
58
66
import { FinalRequestOptions , RequestOptions } from './internal/request-options' ;
@@ -242,6 +250,10 @@ export class BrowserUse {
242
250
return ;
243
251
}
244
252
253
+ protected async authHeaders ( opts : FinalRequestOptions ) : Promise < NullableHeaders | undefined > {
254
+ return buildHeaders ( [ { 'X-Browser-Use-API-Key' : this . apiKey } ] ) ;
255
+ }
256
+
245
257
/**
246
258
* Basic re-implementation of `qs.stringify` for primitive types.
247
259
*/
@@ -679,6 +691,7 @@ export class BrowserUse {
679
691
...( options . timeout ? { 'X-Stainless-Timeout' : String ( Math . trunc ( options . timeout / 1000 ) ) } : { } ) ,
680
692
...getPlatformHeaders ( ) ,
681
693
} ,
694
+ await this . authHeaders ( options ) ,
682
695
this . _options . defaultHeaders ,
683
696
bodyHeaders ,
684
697
options . headers ,
@@ -745,28 +758,39 @@ export class BrowserUse {
745
758
746
759
static toFile = Uploads . toFile ;
747
760
761
+ users : API . Users = new API . Users ( this ) ;
748
762
tasks : API . Tasks = new API . Tasks ( this ) ;
749
763
sessions : API . Sessions = new API . Sessions ( this ) ;
750
764
browserProfiles : API . BrowserProfiles = new API . BrowserProfiles ( this ) ;
751
765
agentProfiles : API . AgentProfiles = new API . AgentProfiles ( this ) ;
752
766
}
767
+ BrowserUse . Users = Users ;
753
768
BrowserUse . Tasks = Tasks ;
754
769
BrowserUse . Sessions = Sessions ;
755
770
BrowserUse . BrowserProfiles = BrowserProfiles ;
756
771
BrowserUse . AgentProfiles = AgentProfiles ;
757
772
export declare namespace BrowserUse {
758
773
export type RequestOptions = Opts . RequestOptions ;
759
774
775
+ export { Users as Users } ;
776
+
760
777
export {
761
778
Tasks as Tasks ,
779
+ type FileView as FileView ,
762
780
type LlmModel as LlmModel ,
781
+ type TaskItemView as TaskItemView ,
763
782
type TaskStatus as TaskStatus ,
783
+ type TaskStepView as TaskStepView ,
764
784
type TaskView as TaskView ,
765
785
type TaskListResponse as TaskListResponse ,
766
- type TaskRetrieveLogsResponse as TaskRetrieveLogsResponse ,
786
+ type TaskGetLogsResponse as TaskGetLogsResponse ,
787
+ type TaskGetOutputFileResponse as TaskGetOutputFileResponse ,
788
+ type TaskGetUserUploadedFileResponse as TaskGetUserUploadedFileResponse ,
767
789
type TaskCreateParams as TaskCreateParams ,
768
790
type TaskUpdateParams as TaskUpdateParams ,
769
791
type TaskListParams as TaskListParams ,
792
+ type TaskGetOutputFileParams as TaskGetOutputFileParams ,
793
+ type TaskGetUserUploadedFileParams as TaskGetUserUploadedFileParams ,
770
794
} ;
771
795
772
796
export {
0 commit comments