11// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22
33import { APIResource } from '../resource' ;
4+ import { isRequestOptions } from '../core' ;
45import * as Core from '../core' ;
56
67export class Profiles extends APIResource {
78 /**
89 * Create a new profile
910 */
10- create ( body : ProfileCreateParams , options ?: Core . RequestOptions ) : Core . APIPromise < ProfileCreateResponse > {
11+ create ( body ?: ProfileCreateParams , options ?: Core . RequestOptions ) : Core . APIPromise < ProfileCreateResponse > ;
12+ create ( options ?: Core . RequestOptions ) : Core . APIPromise < ProfileCreateResponse > ;
13+ create (
14+ body : ProfileCreateParams | Core . RequestOptions = { } ,
15+ options ?: Core . RequestOptions ,
16+ ) : Core . APIPromise < ProfileCreateResponse > {
17+ if ( isRequestOptions ( body ) ) {
18+ return this . create ( { } , body ) ;
19+ }
1120 return this . _client . post ( '/v1/profiles' , Core . multipartFormRequestOptions ( { body, ...options } ) ) ;
1221 }
1322
@@ -753,24 +762,19 @@ export namespace ProfileListResponse {
753762
754763export interface ProfileCreateParams {
755764 /**
756- * The fingerprint associated with the profile
765+ * The dimensions associated with the profile
757766 */
758- fingerprint : ProfileCreateParams . Fingerprint | null ;
767+ dimensions ? : ProfileCreateParams . Dimensions ;
759768
760769 /**
761770 * The proxy associated with the profile
762771 */
763- proxyUrl : string | null ;
772+ proxyUrl ? : string ;
764773
765774 /**
766775 * The user agent associated with the profile
767776 */
768- userAgent : string | null ;
769-
770- /**
771- * The dimensions associated with the profile
772- */
773- dimensions ?: ProfileCreateParams . Dimensions ;
777+ userAgent ?: string ;
774778
775779 /**
776780 * The user data directory associated with the profile
@@ -779,297 +783,6 @@ export interface ProfileCreateParams {
779783}
780784
781785export namespace ProfileCreateParams {
782- /**
783- * The fingerprint associated with the profile
784- */
785- export interface Fingerprint {
786- fingerprint : Fingerprint . Fingerprint ;
787-
788- headers : Fingerprint . Headers ;
789- }
790-
791- export namespace Fingerprint {
792- export interface Fingerprint {
793- audioCodecs : { [ key : string ] : string | null } ;
794-
795- battery : Fingerprint . Battery ;
796-
797- fonts : Array < string | null > ;
798-
799- mockWebRTC : boolean | null ;
800-
801- multimediaDevices : Fingerprint . MultimediaDevices ;
802-
803- navigator : Fingerprint . Navigator ;
804-
805- pluginsData : Fingerprint . PluginsData ;
806-
807- screen : Fingerprint . Screen ;
808-
809- slim : boolean | null ;
810-
811- videoCard : Fingerprint . VideoCard ;
812-
813- videoCodecs : { [ key : string ] : string | null } ;
814-
815- [ k : string ] : unknown ;
816- }
817-
818- export namespace Fingerprint {
819- export interface Battery {
820- charging : boolean | null ;
821-
822- chargingTime : number | null ;
823-
824- dischargingTime : number | null ;
825-
826- level : number | null ;
827-
828- [ k : string ] : unknown ;
829- }
830-
831- export interface MultimediaDevices {
832- micros : Array < MultimediaDevices . Micro > ;
833-
834- speakers : Array < MultimediaDevices . Speaker > ;
835-
836- webcams : Array < MultimediaDevices . Webcam > ;
837-
838- [ k : string ] : unknown ;
839- }
840-
841- export namespace MultimediaDevices {
842- export interface Micro {
843- deviceId : string | null ;
844-
845- groupId : string | null ;
846-
847- kind : string | null ;
848-
849- label : string | null ;
850-
851- [ k : string ] : unknown ;
852- }
853-
854- export interface Speaker {
855- deviceId : string | null ;
856-
857- groupId : string | null ;
858-
859- kind : string | null ;
860-
861- label : string | null ;
862-
863- [ k : string ] : unknown ;
864- }
865-
866- export interface Webcam {
867- deviceId : string | null ;
868-
869- groupId : string | null ;
870-
871- kind : string | null ;
872-
873- label : string | null ;
874-
875- [ k : string ] : unknown ;
876- }
877- }
878-
879- export interface Navigator {
880- appCodeName : string | null ;
881-
882- appName : string | null ;
883-
884- appVersion : string | null ;
885-
886- deviceMemory : number | null ;
887-
888- extraProperties : Navigator . ExtraProperties ;
889-
890- hardwareConcurrency : number | null ;
891-
892- language : string | null ;
893-
894- languages : Array < string | null > ;
895-
896- maxTouchPoints : number | null ;
897-
898- oscpu : string | null ;
899-
900- platform : string | null ;
901-
902- product : string | null ;
903-
904- productSub : string | null ;
905-
906- userAgent : string | null ;
907-
908- userAgentData : Navigator . UserAgentData ;
909-
910- vendor : string | null ;
911-
912- vendorSub : string | null ;
913-
914- webdriver : boolean | null ;
915-
916- doNotTrack ?: string | null ;
917-
918- [ k : string ] : unknown ;
919- }
920-
921- export namespace Navigator {
922- export interface ExtraProperties {
923- globalPrivacyControl : boolean | null ;
924-
925- installedApps : Array < string | null > ;
926-
927- pdfViewerEnabled : boolean | null ;
928-
929- vendorFlavors : Array < string | null > ;
930-
931- [ k : string ] : unknown ;
932- }
933-
934- export interface UserAgentData {
935- brands : Array < UserAgentData . Brand > ;
936-
937- mobile : boolean | null ;
938-
939- platform : string | null ;
940-
941- [ k : string ] : unknown ;
942- }
943-
944- export namespace UserAgentData {
945- export interface Brand {
946- brand : string | null ;
947-
948- version : string | null ;
949-
950- [ k : string ] : unknown ;
951- }
952- }
953- }
954-
955- export interface PluginsData {
956- mimeTypes : Array < string | null > ;
957-
958- plugins : Array < PluginsData . Plugin > ;
959-
960- [ k : string ] : unknown ;
961- }
962-
963- export namespace PluginsData {
964- export interface Plugin {
965- description : string | null ;
966-
967- filename : string | null ;
968-
969- mimeTypes : Array < Plugin . MimeType > ;
970-
971- name : string | null ;
972-
973- [ k : string ] : unknown ;
974- }
975-
976- export namespace Plugin {
977- export interface MimeType {
978- description : string | null ;
979-
980- enabledPlugin : string | null ;
981-
982- suffixes : string | null ;
983-
984- type : string | null ;
985-
986- [ k : string ] : unknown ;
987- }
988- }
989- }
990-
991- export interface Screen {
992- availHeight : number | null ;
993-
994- availLeft : number | null ;
995-
996- availTop : number | null ;
997-
998- availWidth : number | null ;
999-
1000- clientHeight : number | null ;
1001-
1002- clientWidth : number | null ;
1003-
1004- colorDepth : number | null ;
1005-
1006- devicePixelRatio : number | null ;
1007-
1008- hasHDR : boolean | null ;
1009-
1010- height : number | null ;
1011-
1012- innerHeight : number | null ;
1013-
1014- innerWidth : number | null ;
1015-
1016- outerHeight : number | null ;
1017-
1018- outerWidth : number | null ;
1019-
1020- pageXOffset : number | null ;
1021-
1022- pageYOffset : number | null ;
1023-
1024- pixelDepth : number | null ;
1025-
1026- screenX : number | null ;
1027-
1028- width : number | null ;
1029-
1030- [ k : string ] : unknown ;
1031- }
1032-
1033- export interface VideoCard {
1034- renderer : string | null ;
1035-
1036- vendor : string | null ;
1037-
1038- [ k : string ] : unknown ;
1039- }
1040- }
1041-
1042- export interface Headers {
1043- 'user-agent' : string | null ;
1044-
1045- accept ?: string | null ;
1046-
1047- 'accept-encoding' ?: string | null ;
1048-
1049- 'accept-language' ?: string | null ;
1050-
1051- dnt ?: string | null ;
1052-
1053- 'sec-ch-ua' ?: string | null ;
1054-
1055- 'sec-ch-ua-mobile' ?: string | null ;
1056-
1057- 'sec-ch-ua-platform' ?: string | null ;
1058-
1059- 'sec-fetch-dest' ?: string | null ;
1060-
1061- 'sec-fetch-mode' ?: string | null ;
1062-
1063- 'sec-fetch-site' ?: string | null ;
1064-
1065- 'sec-fetch-user' ?: string | null ;
1066-
1067- 'upgrade-insecure-requests' ?: string | null ;
1068-
1069- [ k : string ] : unknown ;
1070- }
1071- }
1072-
1073786 /**
1074787 * The dimensions associated with the profile
1075788 */
0 commit comments