@airtop/sdk 0.1.6 → 0.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/Client.d.ts +3 -3
- package/Client.js +9 -9
- package/README.md +6 -6
- package/api/resources/index.d.ts +3 -3
- package/api/resources/index.js +4 -4
- package/api/resources/profiles/client/Client.js +4 -4
- package/api/resources/sessions/client/Client.js +10 -10
- package/api/resources/windows/client/Client.d.ts +3 -3
- package/api/resources/windows/client/Client.js +25 -25
- package/api/resources/windows/client/requests/CreateWindowInputV1Body.d.ts +1 -1
- package/api/resources/windows/client/requests/WindowLoadUrlV1Body.d.ts +1 -1
- package/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +3 -2
- package/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +1 -0
- package/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +3 -2
- package/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +1 -0
- package/api/types/ClickConfig.d.ts +5 -1
- package/api/types/Issue.d.ts +2 -0
- package/{dist/api/types/EmptyResponseJson.d.ts → api/types/OperationOutcome.d.ts} +1 -1
- package/api/types/{EmptyResponse.d.ts → OperationOutcomeResponse.d.ts} +3 -3
- package/api/types/PageQueryConfig.d.ts +3 -0
- package/api/types/SummaryConfig.d.ts +2 -0
- package/api/types/VisualAnalysisConfig.d.ts +12 -0
- package/api/types/VisualAnalysisConfigPartitionDirection.d.ts +12 -0
- package/api/types/VisualAnalysisConfigPartitionDirection.js +11 -0
- package/api/types/VisualAnalysisConfigScope.d.ts +11 -0
- package/api/types/VisualAnalysisConfigScope.js +10 -0
- package/api/types/index.d.ts +5 -4
- package/api/types/index.js +5 -4
- package/dist/Client.d.ts +3 -3
- package/dist/Client.js +9 -9
- package/dist/api/resources/index.d.ts +3 -3
- package/dist/api/resources/index.js +4 -4
- package/dist/api/resources/profiles/client/Client.js +4 -4
- package/dist/api/resources/sessions/client/Client.js +10 -10
- package/dist/api/resources/windows/client/Client.d.ts +3 -3
- package/dist/api/resources/windows/client/Client.js +25 -25
- package/dist/api/resources/windows/client/requests/CreateWindowInputV1Body.d.ts +1 -1
- package/dist/api/resources/windows/client/requests/WindowLoadUrlV1Body.d.ts +1 -1
- package/dist/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +3 -2
- package/dist/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +1 -0
- package/dist/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +3 -2
- package/dist/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +1 -0
- package/dist/api/types/ClickConfig.d.ts +5 -1
- package/dist/api/types/Issue.d.ts +2 -0
- package/{api/types/EmptyResponseJson.d.ts → dist/api/types/OperationOutcome.d.ts} +1 -1
- package/dist/api/types/{EmptyResponse.d.ts → OperationOutcomeResponse.d.ts} +3 -3
- package/dist/api/types/PageQueryConfig.d.ts +3 -0
- package/dist/api/types/SummaryConfig.d.ts +2 -0
- package/dist/api/types/VisualAnalysisConfig.d.ts +12 -0
- package/dist/api/types/VisualAnalysisConfigPartitionDirection.d.ts +12 -0
- package/dist/api/types/VisualAnalysisConfigPartitionDirection.js +11 -0
- package/dist/api/types/VisualAnalysisConfigScope.d.ts +11 -0
- package/dist/api/types/VisualAnalysisConfigScope.js +10 -0
- package/dist/api/types/index.d.ts +5 -4
- package/dist/api/types/index.js +5 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/serialization/resources/index.d.ts +3 -3
- package/dist/serialization/resources/index.js +4 -4
- package/dist/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +1 -1
- package/dist/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +1 -1
- package/dist/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +1 -1
- package/dist/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +1 -1
- package/dist/serialization/types/ClickConfig.d.ts +5 -2
- package/dist/serialization/types/ClickConfig.js +4 -1
- package/dist/serialization/types/Issue.d.ts +1 -0
- package/dist/serialization/types/Issue.js +1 -0
- package/{serialization/types/EmptyResponseJson.d.ts → dist/serialization/types/OperationOutcome.d.ts} +2 -2
- package/{serialization/types/EmptyResponseJson.js → dist/serialization/types/OperationOutcome.js} +2 -2
- package/dist/serialization/types/OperationOutcomeResponse.d.ts +18 -0
- package/dist/serialization/types/{EmptyResponse.js → OperationOutcomeResponse.js} +6 -6
- package/dist/serialization/types/PageQueryConfig.d.ts +2 -0
- package/dist/serialization/types/PageQueryConfig.js +2 -0
- package/dist/serialization/types/SummaryConfig.d.ts +2 -0
- package/dist/serialization/types/SummaryConfig.js +2 -0
- package/dist/serialization/types/VisualAnalysisConfig.d.ts +16 -0
- package/dist/serialization/types/{EnvelopeStatusDefaultMeta.js → VisualAnalysisConfig.js} +7 -5
- package/dist/serialization/types/VisualAnalysisConfigPartitionDirection.d.ts +10 -0
- package/dist/serialization/types/VisualAnalysisConfigPartitionDirection.js +31 -0
- package/dist/serialization/types/VisualAnalysisConfigScope.d.ts +10 -0
- package/dist/serialization/types/{EnvelopeStatusDefaultMetaStatus.js → VisualAnalysisConfigScope.js} +2 -2
- package/dist/serialization/types/index.d.ts +5 -4
- package/dist/serialization/types/index.js +5 -4
- package/dist/utils/batch-operate/SessionQueue.d.ts +46 -0
- package/dist/utils/batch-operate/SessionQueue.js +223 -0
- package/dist/utils/batch-operate/WindowQueue.d.ts +25 -0
- package/dist/utils/batch-operate/WindowQueue.js +201 -0
- package/dist/utils/batch-operate/batch-util.d.ts +3 -0
- package/dist/utils/batch-operate/batch-util.js +51 -0
- package/dist/utils/batch-operate/helpers.d.ts +2 -0
- package/dist/utils/batch-operate/helpers.js +19 -0
- package/dist/utils/batch-operate/types.d.ts +29 -0
- package/dist/utils/batch-operate/types.js +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +18 -0
- package/dist/wrapper/AirtopClient.d.ts +3 -0
- package/dist/wrapper/AirtopClient.js +16 -0
- package/dist/wrapper/AirtopWindows.d.ts +34 -0
- package/dist/wrapper/AirtopWindows.js +55 -0
- package/index.d.ts +1 -0
- package/index.js +4 -0
- package/package.json +3 -2
- package/reference.md +243 -243
- package/serialization/resources/index.d.ts +3 -3
- package/serialization/resources/index.js +4 -4
- package/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +1 -1
- package/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +1 -1
- package/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +1 -1
- package/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +1 -1
- package/serialization/types/ClickConfig.d.ts +5 -2
- package/serialization/types/ClickConfig.js +4 -1
- package/serialization/types/Issue.d.ts +1 -0
- package/serialization/types/Issue.js +1 -0
- package/{dist/serialization/types/EmptyResponseJson.d.ts → serialization/types/OperationOutcome.d.ts} +2 -2
- package/{dist/serialization/types/EmptyResponseJson.js → serialization/types/OperationOutcome.js} +2 -2
- package/serialization/types/OperationOutcomeResponse.d.ts +18 -0
- package/serialization/types/{EmptyResponse.js → OperationOutcomeResponse.js} +6 -6
- package/serialization/types/PageQueryConfig.d.ts +2 -0
- package/serialization/types/PageQueryConfig.js +2 -0
- package/serialization/types/SummaryConfig.d.ts +2 -0
- package/serialization/types/SummaryConfig.js +2 -0
- package/serialization/types/VisualAnalysisConfig.d.ts +16 -0
- package/serialization/types/VisualAnalysisConfig.js +37 -0
- package/serialization/types/VisualAnalysisConfigPartitionDirection.d.ts +10 -0
- package/serialization/types/VisualAnalysisConfigPartitionDirection.js +31 -0
- package/serialization/types/VisualAnalysisConfigScope.d.ts +10 -0
- package/serialization/types/{EnvelopeStatusDefaultMetaStatus.js → VisualAnalysisConfigScope.js} +2 -2
- package/serialization/types/index.d.ts +5 -4
- package/serialization/types/index.js +5 -4
- package/utils/batch-operate/SessionQueue.d.ts +46 -0
- package/utils/batch-operate/SessionQueue.js +223 -0
- package/utils/batch-operate/WindowQueue.d.ts +25 -0
- package/utils/batch-operate/WindowQueue.js +201 -0
- package/utils/batch-operate/batch-util.d.ts +3 -0
- package/utils/batch-operate/batch-util.js +51 -0
- package/utils/batch-operate/helpers.d.ts +2 -0
- package/utils/batch-operate/helpers.js +19 -0
- package/utils/batch-operate/types.d.ts +29 -0
- package/utils/batch-operate/types.js +2 -0
- package/utils/index.d.ts +2 -0
- package/utils/index.js +18 -0
- package/wrapper/AirtopClient.d.ts +3 -0
- package/wrapper/AirtopClient.js +16 -0
- package/wrapper/AirtopWindows.d.ts +34 -0
- package/wrapper/AirtopWindows.js +55 -0
- package/api/types/EnvelopeStatusDefaultMeta.d.ts +0 -8
- package/api/types/EnvelopeStatusDefaultMetaStatus.d.ts +0 -9
- package/api/types/EnvelopeStatusDefaultMetaStatus.js +0 -11
- package/dist/api/types/EnvelopeStatusDefaultMeta.d.ts +0 -8
- package/dist/api/types/EnvelopeStatusDefaultMetaStatus.d.ts +0 -9
- package/dist/api/types/EnvelopeStatusDefaultMetaStatus.js +0 -11
- package/dist/serialization/types/EmptyResponse.d.ts +0 -18
- package/dist/serialization/types/EnvelopeStatusDefaultMeta.d.ts +0 -14
- package/dist/serialization/types/EnvelopeStatusDefaultMetaStatus.d.ts +0 -10
- package/serialization/types/EmptyResponse.d.ts +0 -18
- package/serialization/types/EnvelopeStatusDefaultMeta.d.ts +0 -14
- package/serialization/types/EnvelopeStatusDefaultMeta.js +0 -35
- package/serialization/types/EnvelopeStatusDefaultMetaStatus.d.ts +0 -10
- /package/api/types/{EmptyResponse.js → OperationOutcome.js} +0 -0
- /package/api/types/{EmptyResponseJson.js → OperationOutcomeResponse.js} +0 -0
- /package/api/types/{EnvelopeStatusDefaultMeta.js → VisualAnalysisConfig.js} +0 -0
- /package/dist/api/types/{EmptyResponse.js → OperationOutcome.js} +0 -0
- /package/dist/api/types/{EmptyResponseJson.js → OperationOutcomeResponse.js} +0 -0
- /package/dist/api/types/{EnvelopeStatusDefaultMeta.js → VisualAnalysisConfig.js} +0 -0
@@ -80,6 +80,40 @@ export declare class AirtopWindows extends WindowsClass {
|
|
80
80
|
}, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.AiPromptResponse>;
|
81
81
|
getWindowInfoForPuppeteerPage(session: Airtop.ExternalSessionWithConnectionInfo, page: puppeteer.Page, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowResponse>;
|
82
82
|
getWindowInfoForPlaywrightPage(session: Airtop.ExternalSessionWithConnectionInfo, page: playwright.Page, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowResponse>;
|
83
|
+
/**
|
84
|
+
* @param {string} sessionId - The session id for the window.
|
85
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
86
|
+
* @param {Airtop.SessionClickHandlerRequestBody} request
|
87
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
88
|
+
*
|
89
|
+
* @example
|
90
|
+
* await client.windows.click("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
91
|
+
* elementDescription: "The login button"
|
92
|
+
* })
|
93
|
+
*/
|
94
|
+
click(sessionId: string, windowId: string, request: Airtop.SessionClickHandlerRequestBody, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.AiPromptResponse>;
|
95
|
+
/**
|
96
|
+
* @param {string} sessionId - The session id for the window.
|
97
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
98
|
+
* @param {Airtop.SessionHoverHandlerRequestBody} request
|
99
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
100
|
+
*
|
101
|
+
* @example
|
102
|
+
* await client.windows.hover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
103
|
+
*/
|
104
|
+
hover(sessionId: string, windowId: string, request?: Airtop.SessionHoverHandlerRequestBody, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.AiPromptResponse>;
|
105
|
+
/**
|
106
|
+
* @param {string} sessionId - The session id for the window.
|
107
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
108
|
+
* @param {Airtop.SessionTypeHandlerRequestBody} request
|
109
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
110
|
+
*
|
111
|
+
* @example
|
112
|
+
* await client.windows.type("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
113
|
+
* text: "Example text"
|
114
|
+
* })
|
115
|
+
*/
|
116
|
+
type(sessionId: string, windowId: string, request: Airtop.SessionTypeHandlerRequestBody, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.AiPromptResponse>;
|
83
117
|
private executeSeleniumCDPCommand;
|
84
118
|
getWindowInfoForSeleniumDriver(session: Airtop.ExternalSessionWithConnectionInfo, driver: seleniumWebdriver.WebDriver, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowResponse>;
|
85
119
|
}
|
@@ -135,6 +135,61 @@ class AirtopWindows extends Client_1.Windows {
|
|
135
135
|
return yield this.getWindowInfo(session.id, targetId, request, requestOptions);
|
136
136
|
});
|
137
137
|
}
|
138
|
+
/**
|
139
|
+
* @param {string} sessionId - The session id for the window.
|
140
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
141
|
+
* @param {Airtop.SessionClickHandlerRequestBody} request
|
142
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
143
|
+
*
|
144
|
+
* @example
|
145
|
+
* await client.windows.click("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
146
|
+
* elementDescription: "The login button"
|
147
|
+
* })
|
148
|
+
*/
|
149
|
+
click(sessionId, windowId, request, requestOptions) {
|
150
|
+
const _super = Object.create(null, {
|
151
|
+
click: { get: () => super.click }
|
152
|
+
});
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
154
|
+
return _super.click.call(this, sessionId, windowId, request, Object.assign(Object.assign({ timeoutInSeconds: 600 }, requestOptions), { maxRetries: 0 }));
|
155
|
+
});
|
156
|
+
}
|
157
|
+
/**
|
158
|
+
* @param {string} sessionId - The session id for the window.
|
159
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
160
|
+
* @param {Airtop.SessionHoverHandlerRequestBody} request
|
161
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
162
|
+
*
|
163
|
+
* @example
|
164
|
+
* await client.windows.hover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
165
|
+
*/
|
166
|
+
hover(sessionId, windowId, request = {}, requestOptions) {
|
167
|
+
const _super = Object.create(null, {
|
168
|
+
hover: { get: () => super.hover }
|
169
|
+
});
|
170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
171
|
+
return _super.hover.call(this, sessionId, windowId, request, Object.assign(Object.assign({ timeoutInSeconds: 600 }, requestOptions), { maxRetries: 0 }));
|
172
|
+
});
|
173
|
+
}
|
174
|
+
/**
|
175
|
+
* @param {string} sessionId - The session id for the window.
|
176
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
177
|
+
* @param {Airtop.SessionTypeHandlerRequestBody} request
|
178
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
179
|
+
*
|
180
|
+
* @example
|
181
|
+
* await client.windows.type("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
182
|
+
* text: "Example text"
|
183
|
+
* })
|
184
|
+
*/
|
185
|
+
type(sessionId, windowId, request, requestOptions) {
|
186
|
+
const _super = Object.create(null, {
|
187
|
+
type: { get: () => super.type }
|
188
|
+
});
|
189
|
+
return __awaiter(this, void 0, void 0, function* () {
|
190
|
+
return _super.type.call(this, sessionId, windowId, request, Object.assign(Object.assign({ timeoutInSeconds: 600 }, requestOptions), { maxRetries: 0 }));
|
191
|
+
});
|
192
|
+
}
|
138
193
|
executeSeleniumCDPCommand(driver, session, apiKey) {
|
139
194
|
return __awaiter(this, void 0, void 0, function* () {
|
140
195
|
// Get the current WebDriver session ID
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
@@ -22,6 +22,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
22
|
__setModuleDefault(result, mod);
|
23
23
|
return result;
|
24
24
|
};
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
27
|
+
};
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
29
|
exports.LiveViewEventName = exports.AirtopClient = exports.AirtopTimeoutError = exports.AirtopError = exports.AirtopEnvironment = exports.Resources = exports.Airtop = void 0;
|
27
30
|
exports.Airtop = __importStar(require("./api"));
|
@@ -35,3 +38,4 @@ var AirtopClient_1 = require("./wrapper/AirtopClient");
|
|
35
38
|
Object.defineProperty(exports, "AirtopClient", { enumerable: true, get: function () { return AirtopClient_1.AirtopClient; } });
|
36
39
|
var types_1 = require("./live-view/types");
|
37
40
|
Object.defineProperty(exports, "LiveViewEventName", { enumerable: true, get: function () { return types_1.LiveViewEventName; } });
|
41
|
+
__exportStar(require("./utils"), exports);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@airtop/sdk",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.8",
|
4
4
|
"private": false,
|
5
5
|
"repository": "https://github.com/airtop-ai/airtop-node-sdk",
|
6
6
|
"main": "./index.js",
|
@@ -18,7 +18,8 @@
|
|
18
18
|
"formdata-node": "^6.0.3",
|
19
19
|
"node-fetch": "2.7.0",
|
20
20
|
"qs": "6.11.2",
|
21
|
-
"js-base64": "3.7.2"
|
21
|
+
"js-base64": "3.7.2",
|
22
|
+
"async-mutex": "0.5.0"
|
22
23
|
},
|
23
24
|
"devDependencies": {
|
24
25
|
"@types/url-join": "4.0.1",
|