airbrowser-client 1.1.8
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/.openapi-generator/FILES +74 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +165 -0
- package/api.ts +4299 -0
- package/base.ts +62 -0
- package/common.ts +113 -0
- package/configuration.ts +121 -0
- package/dist/api.d.ts +2543 -0
- package/dist/api.js +3260 -0
- package/dist/base.d.ts +42 -0
- package/dist/base.js +46 -0
- package/dist/common.d.ts +28 -0
- package/dist/common.js +124 -0
- package/dist/configuration.d.ts +98 -0
- package/dist/configuration.js +44 -0
- package/dist/esm/api.d.ts +2543 -0
- package/dist/esm/api.js +3241 -0
- package/dist/esm/base.d.ts +42 -0
- package/dist/esm/base.js +41 -0
- package/dist/esm/common.d.ts +28 -0
- package/dist/esm/common.js +112 -0
- package/dist/esm/configuration.d.ts +98 -0
- package/dist/esm/configuration.js +40 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.js +15 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +31 -0
- package/docs/ActionResult.md +26 -0
- package/docs/AttributeResponse.md +26 -0
- package/docs/BaseResponse.md +24 -0
- package/docs/BrowserApi.md +1922 -0
- package/docs/BrowserConfig.md +36 -0
- package/docs/BrowserCreated.md +26 -0
- package/docs/BrowserCreationData.md +22 -0
- package/docs/BrowserInfoResponse.md +26 -0
- package/docs/BrowserList.md +26 -0
- package/docs/BrowserListData.md +22 -0
- package/docs/CheckElementRequest.md +24 -0
- package/docs/ClickRequest.md +26 -0
- package/docs/CombinedDialogRequest.md +22 -0
- package/docs/CombinedEmulateRequest.md +32 -0
- package/docs/CombinedGuiClickRequest.md +30 -0
- package/docs/CombinedScrollRequest.md +32 -0
- package/docs/ConsoleLogsRequest.md +22 -0
- package/docs/ContentData.md +24 -0
- package/docs/ContentResponse.md +26 -0
- package/docs/CreateProfileRequest.md +20 -0
- package/docs/DetectCoordinatesRequest.md +20 -0
- package/docs/DetectCoordinatesResult.md +44 -0
- package/docs/ElementDataRequest.md +26 -0
- package/docs/ErrorResponse.md +24 -0
- package/docs/ExecuteData.md +20 -0
- package/docs/ExecuteRequest.md +22 -0
- package/docs/ExecuteResponse.md +26 -0
- package/docs/FillFormRequest.md +22 -0
- package/docs/FormField.md +22 -0
- package/docs/HealthApi.md +95 -0
- package/docs/HealthStatus.md +24 -0
- package/docs/HistoryRequest.md +20 -0
- package/docs/LogsResponse.md +26 -0
- package/docs/MouseRequest.md +28 -0
- package/docs/NavigateRequest.md +22 -0
- package/docs/NetworkLogsRequest.md +22 -0
- package/docs/PerformanceRequest.md +22 -0
- package/docs/PoolApi.md +104 -0
- package/docs/PoolScaled.md +26 -0
- package/docs/PoolStatusResponse.md +26 -0
- package/docs/PressKeysRequest.md +24 -0
- package/docs/ProfileInfo.md +28 -0
- package/docs/ProfileListData.md +20 -0
- package/docs/ProfileListResponse.md +26 -0
- package/docs/ProfileResponse.md +26 -0
- package/docs/ProfilesApi.md +209 -0
- package/docs/ResizeRequest.md +22 -0
- package/docs/ScaleData.md +20 -0
- package/docs/ScalePool.md +20 -0
- package/docs/ScreenshotData.md +22 -0
- package/docs/ScreenshotResponse.md +26 -0
- package/docs/SelectRequest.md +30 -0
- package/docs/SnapshotRequest.md +20 -0
- package/docs/SuccessResponse.md +26 -0
- package/docs/TabsRequest.md +26 -0
- package/docs/TypeRequest.md +26 -0
- package/docs/UploadFileRequest.md +24 -0
- package/docs/UrlData.md +20 -0
- package/docs/UrlResponse.md +26 -0
- package/docs/WaitElementRequest.md +26 -0
- package/docs/WhatIsVisibleResult.md +34 -0
- package/git_push.sh +57 -0
- package/index.ts +18 -0
- package/package.json +33 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +18 -0
package/base.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Airbrowser API
|
|
5
|
+
* Undetectable Chrome-in-Docker for developers and agents (REST + MCP)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import type { Configuration } from './configuration';
|
|
17
|
+
// Some imports not used depending on template conditions
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
20
|
+
import globalAxios from 'axios';
|
|
21
|
+
|
|
22
|
+
export const BASE_PATH = "/api/v1".replace(/\/+$/, "");
|
|
23
|
+
|
|
24
|
+
export const COLLECTION_FORMATS = {
|
|
25
|
+
csv: ",",
|
|
26
|
+
ssv: " ",
|
|
27
|
+
tsv: "\t",
|
|
28
|
+
pipes: "|",
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export interface RequestArgs {
|
|
32
|
+
url: string;
|
|
33
|
+
options: RawAxiosRequestConfig;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class BaseAPI {
|
|
37
|
+
protected configuration: Configuration | undefined;
|
|
38
|
+
|
|
39
|
+
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
|
40
|
+
if (configuration) {
|
|
41
|
+
this.configuration = configuration;
|
|
42
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export class RequiredError extends Error {
|
|
48
|
+
constructor(public field: string, msg?: string) {
|
|
49
|
+
super(msg);
|
|
50
|
+
this.name = "RequiredError"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface ServerMap {
|
|
55
|
+
[key: string]: {
|
|
56
|
+
url: string,
|
|
57
|
+
description: string,
|
|
58
|
+
}[];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const operationServerMap: ServerMap = {
|
|
62
|
+
}
|
package/common.ts
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Airbrowser API
|
|
5
|
+
* Undetectable Chrome-in-Docker for developers and agents (REST + MCP)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { Configuration } from "./configuration";
|
|
16
|
+
import type { RequestArgs } from "./base";
|
|
17
|
+
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
18
|
+
import { RequiredError } from "./base";
|
|
19
|
+
|
|
20
|
+
export const DUMMY_BASE_URL = 'https://example.com'
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @throws {RequiredError}
|
|
25
|
+
*/
|
|
26
|
+
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
|
|
27
|
+
if (paramValue === null || paramValue === undefined) {
|
|
28
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
|
|
33
|
+
if (configuration && configuration.apiKey) {
|
|
34
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
35
|
+
? await configuration.apiKey(keyParamName)
|
|
36
|
+
: await configuration.apiKey;
|
|
37
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
|
|
42
|
+
if (configuration && (configuration.username || configuration.password)) {
|
|
43
|
+
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
|
|
48
|
+
if (configuration && configuration.accessToken) {
|
|
49
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
50
|
+
? await configuration.accessToken()
|
|
51
|
+
: await configuration.accessToken;
|
|
52
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
|
|
57
|
+
if (configuration && configuration.accessToken) {
|
|
58
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
59
|
+
? await configuration.accessToken(name, scopes)
|
|
60
|
+
: await configuration.accessToken;
|
|
61
|
+
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
|
67
|
+
if (parameter == null) return;
|
|
68
|
+
if (typeof parameter === "object") {
|
|
69
|
+
if (Array.isArray(parameter)) {
|
|
70
|
+
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
Object.keys(parameter).forEach(currentKey =>
|
|
74
|
+
setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
if (urlSearchParams.has(key)) {
|
|
80
|
+
urlSearchParams.append(key, parameter);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
urlSearchParams.set(key, parameter);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export const setSearchParams = function (url: URL, ...objects: any[]) {
|
|
89
|
+
const searchParams = new URLSearchParams(url.search);
|
|
90
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
91
|
+
url.search = searchParams.toString();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
|
|
95
|
+
const nonString = typeof value !== 'string';
|
|
96
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
97
|
+
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
98
|
+
: nonString;
|
|
99
|
+
return needsSerialization
|
|
100
|
+
? JSON.stringify(value !== undefined ? value : {})
|
|
101
|
+
: (value || "");
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export const toPathString = function (url: URL) {
|
|
105
|
+
return url.pathname + url.search + url.hash
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
|
|
109
|
+
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
110
|
+
const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
|
|
111
|
+
return axios.request<T, R>(axiosRequestArgs);
|
|
112
|
+
};
|
|
113
|
+
}
|
package/configuration.ts
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/**
|
|
3
|
+
* Airbrowser API
|
|
4
|
+
* Undetectable Chrome-in-Docker for developers and agents (REST + MCP)
|
|
5
|
+
*
|
|
6
|
+
* The version of the OpenAPI document: 1.0
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
interface AWSv4Configuration {
|
|
15
|
+
options?: {
|
|
16
|
+
region?: string
|
|
17
|
+
service?: string
|
|
18
|
+
}
|
|
19
|
+
credentials?: {
|
|
20
|
+
accessKeyId?: string
|
|
21
|
+
secretAccessKey?: string,
|
|
22
|
+
sessionToken?: string
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ConfigurationParameters {
|
|
27
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
28
|
+
username?: string;
|
|
29
|
+
password?: string;
|
|
30
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
31
|
+
awsv4?: AWSv4Configuration;
|
|
32
|
+
basePath?: string;
|
|
33
|
+
serverIndex?: number;
|
|
34
|
+
baseOptions?: any;
|
|
35
|
+
formDataCtor?: new () => any;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export class Configuration {
|
|
39
|
+
/**
|
|
40
|
+
* parameter for apiKey security
|
|
41
|
+
* @param name security name
|
|
42
|
+
*/
|
|
43
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
44
|
+
/**
|
|
45
|
+
* parameter for basic security
|
|
46
|
+
*/
|
|
47
|
+
username?: string;
|
|
48
|
+
/**
|
|
49
|
+
* parameter for basic security
|
|
50
|
+
*/
|
|
51
|
+
password?: string;
|
|
52
|
+
/**
|
|
53
|
+
* parameter for oauth2 security
|
|
54
|
+
* @param name security name
|
|
55
|
+
* @param scopes oauth2 scope
|
|
56
|
+
*/
|
|
57
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
58
|
+
/**
|
|
59
|
+
* parameter for aws4 signature security
|
|
60
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
61
|
+
* @param {string} options.region - aws region
|
|
62
|
+
* @param {string} options.service - name of the service.
|
|
63
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
64
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
65
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
66
|
+
* @memberof Configuration
|
|
67
|
+
*/
|
|
68
|
+
awsv4?: AWSv4Configuration;
|
|
69
|
+
/**
|
|
70
|
+
* override base path
|
|
71
|
+
*/
|
|
72
|
+
basePath?: string;
|
|
73
|
+
/**
|
|
74
|
+
* override server index
|
|
75
|
+
*/
|
|
76
|
+
serverIndex?: number;
|
|
77
|
+
/**
|
|
78
|
+
* base options for axios calls
|
|
79
|
+
*/
|
|
80
|
+
baseOptions?: any;
|
|
81
|
+
/**
|
|
82
|
+
* The FormData constructor that will be used to create multipart form data
|
|
83
|
+
* requests. You can inject this here so that execution environments that
|
|
84
|
+
* do not support the FormData class can still run the generated client.
|
|
85
|
+
*
|
|
86
|
+
* @type {new () => FormData}
|
|
87
|
+
*/
|
|
88
|
+
formDataCtor?: new () => any;
|
|
89
|
+
|
|
90
|
+
constructor(param: ConfigurationParameters = {}) {
|
|
91
|
+
this.apiKey = param.apiKey;
|
|
92
|
+
this.username = param.username;
|
|
93
|
+
this.password = param.password;
|
|
94
|
+
this.accessToken = param.accessToken;
|
|
95
|
+
this.awsv4 = param.awsv4;
|
|
96
|
+
this.basePath = param.basePath;
|
|
97
|
+
this.serverIndex = param.serverIndex;
|
|
98
|
+
this.baseOptions = {
|
|
99
|
+
...param.baseOptions,
|
|
100
|
+
headers: {
|
|
101
|
+
...param.baseOptions?.headers,
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
this.formDataCtor = param.formDataCtor;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Check if the given MIME is a JSON MIME.
|
|
109
|
+
* JSON MIME examples:
|
|
110
|
+
* application/json
|
|
111
|
+
* application/json; charset=UTF8
|
|
112
|
+
* APPLICATION/JSON
|
|
113
|
+
* application/vnd.company+json
|
|
114
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
115
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
116
|
+
*/
|
|
117
|
+
public isJsonMime(mime: string): boolean {
|
|
118
|
+
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
119
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
120
|
+
}
|
|
121
|
+
}
|