@airtop/sdk 0.1.40-beta0 → 0.1.41
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/README.md +10 -9
- package/api/resources/automations/client/Client.js +4 -4
- package/api/resources/files/client/Client.d.ts +11 -0
- package/api/resources/files/client/Client.js +52 -4
- package/api/resources/files/client/requests/PushFileBodyV1.d.ts +11 -0
- package/api/resources/files/client/requests/index.d.ts +1 -0
- package/api/resources/profiles/client/Client.js +1 -1
- package/api/resources/requests/client/Client.js +1 -1
- package/api/resources/sessions/client/Client.js +6 -6
- package/api/resources/windows/client/Client.d.ts +14 -200
- package/api/resources/windows/client/Client.js +215 -1001
- package/api/resources/windows/client/requests/{AsyncClickRequest.d.ts → SessionFileInputHandlerRequestBody.d.ts} +8 -6
- package/api/resources/windows/client/requests/index.d.ts +1 -15
- package/api/types/FileEventMessage.d.ts +1 -0
- package/api/types/index.d.ts +0 -1
- package/api/types/index.js +0 -1
- package/dist/api/resources/automations/client/Client.js +4 -4
- package/dist/api/resources/files/client/Client.d.ts +11 -0
- package/dist/api/resources/files/client/Client.js +52 -4
- package/dist/api/resources/files/client/requests/PushFileBodyV1.d.ts +11 -0
- package/dist/api/resources/files/client/requests/index.d.ts +1 -0
- package/dist/api/resources/profiles/client/Client.js +1 -1
- package/dist/api/resources/requests/client/Client.js +1 -1
- package/dist/api/resources/sessions/client/Client.js +6 -6
- package/dist/api/resources/windows/client/Client.d.ts +14 -200
- package/dist/api/resources/windows/client/Client.js +215 -1001
- package/dist/api/resources/windows/client/requests/{AsyncClickRequest.d.ts → SessionFileInputHandlerRequestBody.d.ts} +8 -6
- package/dist/api/resources/windows/client/requests/index.d.ts +1 -15
- package/dist/api/types/FileEventMessage.d.ts +1 -0
- package/dist/api/types/index.d.ts +0 -1
- package/dist/api/types/index.js +0 -1
- package/dist/serialization/resources/files/client/requests/PushFileBodyV1.d.ts +12 -0
- package/{serialization/types/AsyncOperatorPromptResponseEnvelope.js → dist/serialization/resources/files/client/requests/PushFileBodyV1.js} +4 -7
- package/dist/serialization/resources/files/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/files/client/requests/index.js +3 -1
- package/dist/serialization/resources/windows/client/requests/{AsyncHoverRequest.d.ts → SessionFileInputHandlerRequestBody.d.ts} +5 -4
- package/{serialization/resources/windows/client/requests/AsyncHoverRequest.js → dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js} +5 -4
- package/dist/serialization/resources/windows/client/requests/index.d.ts +1 -15
- package/dist/serialization/resources/windows/client/requests/index.js +3 -31
- package/dist/serialization/types/FileEventMessage.d.ts +1 -0
- package/dist/serialization/types/FileEventMessage.js +1 -0
- package/dist/serialization/types/index.d.ts +0 -1
- package/dist/serialization/types/index.js +0 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/upload.d.ts +13 -0
- package/dist/utils/upload.js +55 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/AirtopClient.js +1 -1
- package/dist/wrapper/AirtopFiles.js +3 -3
- package/dist/wrapper/AirtopSessions.d.ts +24 -0
- package/dist/wrapper/AirtopSessions.js +103 -0
- package/dist/wrapper/AirtopWindows.d.ts +25 -1
- package/dist/wrapper/AirtopWindows.js +23 -1
- package/package.json +1 -1
- package/reference.md +187 -1186
- package/serialization/resources/files/client/requests/PushFileBodyV1.d.ts +12 -0
- package/{dist/serialization/types/AsyncOperatorPromptResponseEnvelope.js → serialization/resources/files/client/requests/PushFileBodyV1.js} +4 -7
- package/serialization/resources/files/client/requests/index.d.ts +1 -0
- package/serialization/resources/files/client/requests/index.js +3 -1
- package/serialization/resources/windows/client/requests/{AsyncHoverRequest.d.ts → SessionFileInputHandlerRequestBody.d.ts} +5 -4
- package/{dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js → serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js} +5 -4
- package/serialization/resources/windows/client/requests/index.d.ts +1 -15
- package/serialization/resources/windows/client/requests/index.js +3 -31
- package/serialization/types/FileEventMessage.d.ts +1 -0
- package/serialization/types/FileEventMessage.js +1 -0
- package/serialization/types/index.d.ts +0 -1
- package/serialization/types/index.js +0 -1
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/upload.d.ts +13 -0
- package/utils/upload.js +55 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/AirtopClient.js +1 -1
- package/wrapper/AirtopFiles.js +3 -3
- package/wrapper/AirtopSessions.d.ts +24 -0
- package/wrapper/AirtopSessions.js +103 -0
- package/wrapper/AirtopWindows.d.ts +25 -1
- package/wrapper/AirtopWindows.js +23 -1
- package/api/resources/windows/client/requests/ActRequest.d.ts +0 -30
- package/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
- package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
- package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
- package/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
- package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
- package/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
- package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
- package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
- package/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
- package/api/resources/windows/client/requests/ExtractRequest.d.ts +0 -30
- package/api/resources/windows/client/requests/ExtractRequest.js +0 -5
- package/api/resources/windows/client/requests/FindManyRequest.d.ts +0 -30
- package/api/resources/windows/client/requests/FindManyRequest.js +0 -5
- package/api/resources/windows/client/requests/FindOneRequest.d.ts +0 -30
- package/api/resources/windows/client/requests/FindOneRequest.js +0 -5
- package/api/resources/windows/client/requests/LlmRequest.d.ts +0 -25
- package/api/resources/windows/client/requests/LlmRequest.js +0 -5
- package/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -25
- package/api/resources/windows/client/requests/OperatorPromptV1Body.js +0 -5
- package/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -9
- package/api/types/AsyncOperatorPromptResponseEnvelope.js +0 -5
- package/dist/api/resources/windows/client/requests/ActRequest.d.ts +0 -30
- package/dist/api/resources/windows/client/requests/ActRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
- package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
- package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
- package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/ExtractRequest.d.ts +0 -30
- package/dist/api/resources/windows/client/requests/ExtractRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/FindManyRequest.d.ts +0 -30
- package/dist/api/resources/windows/client/requests/FindManyRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/FindOneRequest.d.ts +0 -30
- package/dist/api/resources/windows/client/requests/FindOneRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/LlmRequest.d.ts +0 -25
- package/dist/api/resources/windows/client/requests/LlmRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -25
- package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.js +0 -5
- package/dist/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -9
- package/dist/api/types/AsyncOperatorPromptResponseEnvelope.js +0 -5
- package/dist/serialization/resources/windows/client/requests/ActRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/ActRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
- package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -51
- package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
- package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -51
- package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -51
- package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
- package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -49
- package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -55
- package/dist/serialization/resources/windows/client/requests/ExtractRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/ExtractRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/FindManyRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/FindManyRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/FindOneRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/FindOneRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/LlmRequest.d.ts +0 -17
- package/dist/serialization/resources/windows/client/requests/LlmRequest.js +0 -48
- package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -17
- package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +0 -48
- package/dist/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -15
- package/serialization/resources/windows/client/requests/ActRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/ActRequest.js +0 -50
- package/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
- package/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -51
- package/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -50
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -51
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -50
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -51
- package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
- package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -49
- package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -50
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -55
- package/serialization/resources/windows/client/requests/ExtractRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/ExtractRequest.js +0 -50
- package/serialization/resources/windows/client/requests/FindManyRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/FindManyRequest.js +0 -50
- package/serialization/resources/windows/client/requests/FindOneRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/FindOneRequest.js +0 -50
- package/serialization/resources/windows/client/requests/LlmRequest.d.ts +0 -17
- package/serialization/resources/windows/client/requests/LlmRequest.js +0 -48
- package/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -17
- package/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +0 -48
- package/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -15
- /package/api/resources/{windows/client/requests/ActRequest.js → files/client/requests/PushFileBodyV1.js} +0 -0
- /package/api/resources/windows/client/requests/{AsyncClickRequest.js → SessionFileInputHandlerRequestBody.js} +0 -0
- /package/{api/resources/windows/client/requests/AsyncHoverRequest.js → dist/api/resources/files/client/requests/PushFileBodyV1.js} +0 -0
- /package/{api/resources/windows/client/requests/AsyncMonitorRequest.js → dist/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js} +0 -0
@@ -5,19 +5,21 @@ import * as Airtop from "../../../../index";
|
|
5
5
|
/**
|
6
6
|
* @example
|
7
7
|
* {
|
8
|
-
* elementDescription: "The
|
8
|
+
* elementDescription: "The file input in the bottom left corner"
|
9
9
|
* }
|
10
10
|
*/
|
11
|
-
export interface
|
12
|
-
/** Async configuration options. */
|
13
|
-
async?: Airtop.AsyncConfig;
|
11
|
+
export interface SessionFileInputHandlerRequestBody {
|
14
12
|
clientRequestId?: string;
|
15
13
|
/** Request configuration */
|
16
|
-
configuration?: Airtop.
|
14
|
+
configuration?: Airtop.MicroInteractionConfigWithExperimental;
|
17
15
|
/** A credit threshold that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended). */
|
18
16
|
costThresholdCredits?: number;
|
19
|
-
/** A natural language description of the
|
17
|
+
/** A natural language description of the file input to interact with (e.g. 'the file input', 'file upload selection box'). The interaction will be aborted if the target element cannot be found. */
|
20
18
|
elementDescription: string;
|
19
|
+
/** The id of the file to upload. 'fileId' or 'fileName' is required. */
|
20
|
+
fileId?: string;
|
21
|
+
/** The name of the file to upload, not including the path. 'fileId' or 'fileName' is required. */
|
22
|
+
fileName?: string;
|
21
23
|
/**
|
22
24
|
* A time threshold in seconds that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended).
|
23
25
|
*
|
@@ -1,33 +1,19 @@
|
|
1
|
-
export { type AsyncClickRequest } from "./AsyncClickRequest";
|
2
1
|
export { type AsyncCreateAutomationRequest } from "./AsyncCreateAutomationRequest";
|
3
2
|
export { type AsyncCreateFormFillerRequest } from "./AsyncCreateFormFillerRequest";
|
4
3
|
export { type AsyncExecuteAutomationRequest } from "./AsyncExecuteAutomationRequest";
|
5
4
|
export { type AsyncFillFormRequest } from "./AsyncFillFormRequest";
|
6
|
-
export { type AsyncHoverRequest } from "./AsyncHoverRequest";
|
7
|
-
export { type AsyncMonitorRequest } from "./AsyncMonitorRequest";
|
8
|
-
export { type AsyncPageQueryRequest } from "./AsyncPageQueryRequest";
|
9
|
-
export { type AsyncPaginatedExtractionRequest } from "./AsyncPaginatedExtractionRequest";
|
10
|
-
export { type AsyncPromptContentRequest } from "./AsyncPromptContentRequest";
|
11
|
-
export { type AsyncScreenshotRequest } from "./AsyncScreenshotRequest";
|
12
|
-
export { type AsyncSummarizeContentRequest } from "./AsyncSummarizeContentRequest";
|
13
|
-
export { type AsyncTypeRequest } from "./AsyncTypeRequest";
|
14
5
|
export { type CreateWindowInputV1Body } from "./CreateWindowInputV1Body";
|
15
6
|
export { type GetWindowInfoRequest } from "./GetWindowInfoRequest";
|
16
7
|
export { type WindowLoadUrlV1Body } from "./WindowLoadUrlV1Body";
|
17
8
|
export { type SessionClickHandlerRequestBody } from "./SessionClickHandlerRequestBody";
|
18
9
|
export { type CreateFormFillerRequest } from "./CreateFormFillerRequest";
|
10
|
+
export { type SessionFileInputHandlerRequestBody } from "./SessionFileInputHandlerRequestBody";
|
19
11
|
export { type FillFormRequest } from "./FillFormRequest";
|
20
12
|
export { type SessionHoverHandlerRequestBody } from "./SessionHoverHandlerRequestBody";
|
21
13
|
export { type SessionMonitorHandlerRequestBody } from "./SessionMonitorHandlerRequestBody";
|
22
|
-
export { type OperatorPromptV1Body } from "./OperatorPromptV1Body";
|
23
14
|
export { type SessionPaginatedExtractionHandlerRequestBody } from "./SessionPaginatedExtractionHandlerRequestBody";
|
24
15
|
export { type ScrapeContentRequest } from "./ScrapeContentRequest";
|
25
16
|
export { type SessionScreenshotHandlerRequestBody } from "./SessionScreenshotHandlerRequestBody";
|
26
17
|
export { type SessionScrollHandlerRequestBody } from "./SessionScrollHandlerRequestBody";
|
27
18
|
export { type SessionSummaryHandlerRequestBody } from "./SessionSummaryHandlerRequestBody";
|
28
19
|
export { type SessionTypeHandlerRequestBody } from "./SessionTypeHandlerRequestBody";
|
29
|
-
export { type ActRequest } from "./ActRequest";
|
30
|
-
export { type ExtractRequest } from "./ExtractRequest";
|
31
|
-
export { type FindManyRequest } from "./FindManyRequest";
|
32
|
-
export { type FindOneRequest } from "./FindOneRequest";
|
33
|
-
export { type LlmRequest } from "./LlmRequest";
|
package/api/types/index.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
export * from "./AiPromptResponse";
|
2
2
|
export * from "./AiResponseEnvelope";
|
3
3
|
export * from "./AsyncConfig";
|
4
|
-
export * from "./AsyncOperatorPromptResponseEnvelope";
|
5
4
|
export * from "./AsyncSessionAiResponseEnvelope";
|
6
5
|
export * from "./AutomationOutput";
|
7
6
|
export * from "./BrowserWaitNavigationConfigWaitUntil";
|
package/api/types/index.js
CHANGED
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./AiPromptResponse"), exports);
|
18
18
|
__exportStar(require("./AiResponseEnvelope"), exports);
|
19
19
|
__exportStar(require("./AsyncConfig"), exports);
|
20
|
-
__exportStar(require("./AsyncOperatorPromptResponseEnvelope"), exports);
|
21
20
|
__exportStar(require("./AsyncSessionAiResponseEnvelope"), exports);
|
22
21
|
__exportStar(require("./AutomationOutput"), exports);
|
23
22
|
__exportStar(require("./BrowserWaitNavigationConfigWaitUntil"), exports);
|
@@ -73,7 +73,7 @@ class Automations {
|
|
73
73
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
74
74
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, "v1/automations"),
|
75
75
|
method: "GET",
|
76
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
76
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
77
77
|
contentType: "application/json",
|
78
78
|
requestType: "json",
|
79
79
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -135,7 +135,7 @@ class Automations {
|
|
135
135
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
136
136
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, "v1/automations/description"),
|
137
137
|
method: "PUT",
|
138
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
138
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
139
139
|
contentType: "application/json",
|
140
140
|
requestType: "json",
|
141
141
|
body: serializers.UpdateAutomationDescriptionInputBody.jsonOrThrow(request, {
|
@@ -239,7 +239,7 @@ class Automations {
|
|
239
239
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
240
240
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/automations/${encodeURIComponent(automationId)}`),
|
241
241
|
method: "GET",
|
242
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
242
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
243
243
|
contentType: "application/json",
|
244
244
|
requestType: "json",
|
245
245
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -340,7 +340,7 @@ class Automations {
|
|
340
340
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
341
341
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/automations/${encodeURIComponent(automationId)}`),
|
342
342
|
method: "DELETE",
|
343
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
343
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
344
344
|
contentType: "application/json",
|
345
345
|
requestType: "json",
|
346
346
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -65,5 +65,16 @@ export declare class Files {
|
|
65
65
|
* await client.files.delete("id")
|
66
66
|
*/
|
67
67
|
delete(id: string, requestOptions?: Files.RequestOptions): Promise<void>;
|
68
|
+
/**
|
69
|
+
* Push a file to one or more sessions, making it available for the sessions to use
|
70
|
+
*
|
71
|
+
* @param {string} id - ID of the file
|
72
|
+
* @param {Airtop.PushFileBodyV1} request
|
73
|
+
* @param {Files.RequestOptions} requestOptions - Request-specific configuration.
|
74
|
+
*
|
75
|
+
* @example
|
76
|
+
* await client.files.push("id")
|
77
|
+
*/
|
78
|
+
push(id: string, request?: Airtop.PushFileBodyV1, requestOptions?: Files.RequestOptions): Promise<void>;
|
68
79
|
protected _getAuthorizationHeader(): Promise<string>;
|
69
80
|
}
|
@@ -92,7 +92,7 @@ class Files {
|
|
92
92
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
93
93
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, "v1/files"),
|
94
94
|
method: "GET",
|
95
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
95
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
96
96
|
contentType: "application/json",
|
97
97
|
queryParameters: _queryParams,
|
98
98
|
requestType: "json",
|
@@ -145,7 +145,7 @@ class Files {
|
|
145
145
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
146
146
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, "v1/files"),
|
147
147
|
method: "POST",
|
148
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
148
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
149
149
|
contentType: "application/json",
|
150
150
|
requestType: "json",
|
151
151
|
body: serializers.CreateFileRestInputV1.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -196,7 +196,7 @@ class Files {
|
|
196
196
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
197
197
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/files/${encodeURIComponent(id)}`),
|
198
198
|
method: "GET",
|
199
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
199
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
200
200
|
contentType: "application/json",
|
201
201
|
requestType: "json",
|
202
202
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -246,7 +246,7 @@ class Files {
|
|
246
246
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
247
247
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/files/${encodeURIComponent(id)}`),
|
248
248
|
method: "DELETE",
|
249
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
249
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
250
250
|
contentType: "application/json",
|
251
251
|
requestType: "json",
|
252
252
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -277,6 +277,54 @@ class Files {
|
|
277
277
|
}
|
278
278
|
});
|
279
279
|
}
|
280
|
+
/**
|
281
|
+
* Push a file to one or more sessions, making it available for the sessions to use
|
282
|
+
*
|
283
|
+
* @param {string} id - ID of the file
|
284
|
+
* @param {Airtop.PushFileBodyV1} request
|
285
|
+
* @param {Files.RequestOptions} requestOptions - Request-specific configuration.
|
286
|
+
*
|
287
|
+
* @example
|
288
|
+
* await client.files.push("id")
|
289
|
+
*/
|
290
|
+
push(id_1) {
|
291
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
292
|
+
var _a, _b, _c;
|
293
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
294
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/files/${encodeURIComponent(id)}/push`),
|
295
|
+
method: "POST",
|
296
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
297
|
+
contentType: "application/json",
|
298
|
+
requestType: "json",
|
299
|
+
body: serializers.PushFileBodyV1.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
300
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
301
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
302
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
303
|
+
});
|
304
|
+
if (_response.ok) {
|
305
|
+
return;
|
306
|
+
}
|
307
|
+
if (_response.error.reason === "status-code") {
|
308
|
+
throw new errors.AirtopError({
|
309
|
+
statusCode: _response.error.statusCode,
|
310
|
+
body: _response.error.body,
|
311
|
+
});
|
312
|
+
}
|
313
|
+
switch (_response.error.reason) {
|
314
|
+
case "non-json":
|
315
|
+
throw new errors.AirtopError({
|
316
|
+
statusCode: _response.error.statusCode,
|
317
|
+
body: _response.error.rawBody,
|
318
|
+
});
|
319
|
+
case "timeout":
|
320
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/files/{id}/push.");
|
321
|
+
case "unknown":
|
322
|
+
throw new errors.AirtopError({
|
323
|
+
message: _response.error.errorMessage,
|
324
|
+
});
|
325
|
+
}
|
326
|
+
});
|
327
|
+
}
|
280
328
|
_getAuthorizationHeader() {
|
281
329
|
return __awaiter(this, void 0, void 0, function* () {
|
282
330
|
return `Bearer ${yield core.Supplier.get(this._options.apiKey)}`;
|
@@ -90,7 +90,7 @@ class Profiles {
|
|
90
90
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
91
91
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, "v1/profiles"),
|
92
92
|
method: "DELETE",
|
93
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
93
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
94
94
|
contentType: "application/json",
|
95
95
|
queryParameters: _queryParams,
|
96
96
|
requestType: "json",
|
@@ -71,7 +71,7 @@ class Requests {
|
|
71
71
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
72
72
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/requests/${encodeURIComponent(requestId)}/status`),
|
73
73
|
method: "GET",
|
74
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
74
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
75
75
|
contentType: "application/json",
|
76
76
|
requestType: "json",
|
77
77
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -102,7 +102,7 @@ class Sessions {
|
|
102
102
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
103
103
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, "v1/sessions"),
|
104
104
|
method: "GET",
|
105
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
105
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
106
106
|
contentType: "application/json",
|
107
107
|
queryParameters: _queryParams,
|
108
108
|
requestType: "json",
|
@@ -180,7 +180,7 @@ class Sessions {
|
|
180
180
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
181
181
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, "v1/sessions"),
|
182
182
|
method: "POST",
|
183
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
183
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
184
184
|
contentType: "application/json",
|
185
185
|
requestType: "json",
|
186
186
|
body: serializers.SessionRestInputV1.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -237,7 +237,7 @@ class Sessions {
|
|
237
237
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
238
238
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(id)}`),
|
239
239
|
method: "GET",
|
240
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
240
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
241
241
|
contentType: "application/json",
|
242
242
|
requestType: "json",
|
243
243
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -316,7 +316,7 @@ class Sessions {
|
|
316
316
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
317
317
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(id)}`),
|
318
318
|
method: "DELETE",
|
319
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
319
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
320
320
|
contentType: "application/json",
|
321
321
|
requestType: "json",
|
322
322
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -364,7 +364,7 @@ class Sessions {
|
|
364
364
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
365
365
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(id)}/events`),
|
366
366
|
method: "GET",
|
367
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
367
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
368
368
|
contentType: "application/json",
|
369
369
|
queryParameters: _queryParams,
|
370
370
|
requestType: "json",
|
@@ -454,7 +454,7 @@ class Sessions {
|
|
454
454
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
455
455
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/save-profile-on-termination/${encodeURIComponent(profileName)}`),
|
456
456
|
method: "PUT",
|
457
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
457
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
458
458
|
contentType: "application/json",
|
459
459
|
requestType: "json",
|
460
460
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -26,20 +26,6 @@ export declare namespace Windows {
|
|
26
26
|
export declare class Windows {
|
27
27
|
protected readonly _options: Windows.Options;
|
28
28
|
constructor(_options: Windows.Options);
|
29
|
-
/**
|
30
|
-
* Execute a click interaction in a specific browser window asynchronously
|
31
|
-
*
|
32
|
-
* @param {string} sessionId - The session id for the window.
|
33
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
34
|
-
* @param {Airtop.AsyncClickRequest} request
|
35
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
36
|
-
*
|
37
|
-
* @example
|
38
|
-
* await client.windows.asyncClick("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
39
|
-
* elementDescription: "The login button"
|
40
|
-
* })
|
41
|
-
*/
|
42
|
-
asyncClick(sessionId: string, windowId: string, request: Airtop.AsyncClickRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncSessionAiResponseEnvelope>;
|
43
29
|
/**
|
44
30
|
* Create an automation of a browser window asynchronously
|
45
31
|
*
|
@@ -92,104 +78,6 @@ export declare class Windows {
|
|
92
78
|
* })
|
93
79
|
*/
|
94
80
|
asyncFillForm(sessionId: string, windowId: string, request: Airtop.AsyncFillFormRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncSessionAiResponseEnvelope>;
|
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.AsyncHoverRequest} request
|
99
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
100
|
-
*
|
101
|
-
* @example
|
102
|
-
* await client.windows.asyncHover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
103
|
-
* elementDescription: "The search box input in the top right corner"
|
104
|
-
* })
|
105
|
-
*/
|
106
|
-
asyncHover(sessionId: string, windowId: string, request: Airtop.AsyncHoverRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncSessionAiResponseEnvelope>;
|
107
|
-
/**
|
108
|
-
* @param {string} sessionId - The session id for the window.
|
109
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
110
|
-
* @param {Airtop.AsyncMonitorRequest} request
|
111
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
112
|
-
*
|
113
|
-
* @example
|
114
|
-
* await client.windows.asyncMonitor("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
115
|
-
* condition: "Determine if the user appears to be signed in to the website"
|
116
|
-
* })
|
117
|
-
*/
|
118
|
-
asyncMonitor(sessionId: string, windowId: string, request: Airtop.AsyncMonitorRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncSessionAiResponseEnvelope>;
|
119
|
-
/**
|
120
|
-
* @param {string} sessionId - The session id for the window.
|
121
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
122
|
-
* @param {Airtop.AsyncPageQueryRequest} request
|
123
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
124
|
-
*
|
125
|
-
* @example
|
126
|
-
* await client.windows.asyncPageQuery("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
127
|
-
* prompt: "What is the main idea of this page?"
|
128
|
-
* })
|
129
|
-
*/
|
130
|
-
asyncPageQuery(sessionId: string, windowId: string, request: Airtop.AsyncPageQueryRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncSessionAiResponseEnvelope>;
|
131
|
-
/**
|
132
|
-
* @param {string} sessionId - The session id for the window.
|
133
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
134
|
-
* @param {Airtop.AsyncPaginatedExtractionRequest} request
|
135
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
136
|
-
*
|
137
|
-
* @example
|
138
|
-
* await client.windows.asyncPaginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
139
|
-
* prompt: "This site contains a list of results about <provide details about the list>. Navigate through 3 pages of results and return the title and <provide details about the data you want to extract> about each result in this list."
|
140
|
-
* })
|
141
|
-
*/
|
142
|
-
asyncPaginatedExtraction(sessionId: string, windowId: string, request: Airtop.AsyncPaginatedExtractionRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncSessionAiResponseEnvelope>;
|
143
|
-
/**
|
144
|
-
* This endpoint is deprecated. Please use the `pageQuery` endpoint instead.
|
145
|
-
*
|
146
|
-
* @param {string} sessionId - The session id for the window.
|
147
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
148
|
-
* @param {Airtop.AsyncPromptContentRequest} request
|
149
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
150
|
-
*
|
151
|
-
* @example
|
152
|
-
* await client.windows.asyncPromptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
153
|
-
* prompt: "What is the main idea of this page?"
|
154
|
-
* })
|
155
|
-
*/
|
156
|
-
asyncPromptContent(sessionId: string, windowId: string, request: Airtop.AsyncPromptContentRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncSessionAiResponseEnvelope>;
|
157
|
-
/**
|
158
|
-
* Take a screenshot of the current viewport of a browser window asynchronously
|
159
|
-
*
|
160
|
-
* @param {string} sessionId - The session id for the window.
|
161
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
162
|
-
* @param {Airtop.AsyncScreenshotRequest} request
|
163
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
164
|
-
*
|
165
|
-
* @example
|
166
|
-
* await client.windows.asyncScreenshot("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
167
|
-
*/
|
168
|
-
asyncScreenshot(sessionId: string, windowId: string, request?: Airtop.AsyncScreenshotRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncSessionAiResponseEnvelope>;
|
169
|
-
/**
|
170
|
-
* This endpoint is deprecated. Please use the `pageQuery` endpoint and ask for a summary in the prompt instead.
|
171
|
-
*
|
172
|
-
* @param {string} sessionId - The session id for the window.
|
173
|
-
* @param {string} windowId - The Airtop window id of the browser window to summarize.
|
174
|
-
* @param {Airtop.AsyncSummarizeContentRequest} request
|
175
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
176
|
-
*
|
177
|
-
* @example
|
178
|
-
* await client.windows.asyncSummarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
179
|
-
*/
|
180
|
-
asyncSummarizeContent(sessionId: string, windowId: string, request?: Airtop.AsyncSummarizeContentRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncSessionAiResponseEnvelope>;
|
181
|
-
/**
|
182
|
-
* @param {string} sessionId - The session id for the window.
|
183
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
184
|
-
* @param {Airtop.AsyncTypeRequest} request
|
185
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
186
|
-
*
|
187
|
-
* @example
|
188
|
-
* await client.windows.asyncType("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
189
|
-
* text: "Example text"
|
190
|
-
* })
|
191
|
-
*/
|
192
|
-
asyncType(sessionId: string, windowId: string, request: Airtop.AsyncTypeRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncSessionAiResponseEnvelope>;
|
193
81
|
/**
|
194
82
|
* Creates a new browser window in a session. Optionally, you can specify a url to load on the window upon creation.
|
195
83
|
*
|
@@ -266,6 +154,20 @@ export declare class Windows {
|
|
266
154
|
* await client.windows.createFormFiller("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
267
155
|
*/
|
268
156
|
createFormFiller(sessionId: string, windowId: string, request?: Airtop.CreateFormFillerRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiPromptResponse>;
|
157
|
+
/**
|
158
|
+
* Execute a file input interaction in a specific browser window
|
159
|
+
*
|
160
|
+
* @param {string} sessionId - The session id for the window.
|
161
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
162
|
+
* @param {Airtop.SessionFileInputHandlerRequestBody} request
|
163
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
164
|
+
*
|
165
|
+
* @example
|
166
|
+
* await client.windows.fileInput("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
167
|
+
* elementDescription: "The file input in the bottom left corner"
|
168
|
+
* })
|
169
|
+
*/
|
170
|
+
fileInput(sessionId: string, windowId: string, request: Airtop.SessionFileInputHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiPromptResponse>;
|
269
171
|
/**
|
270
172
|
* Fill a form of a browser window synchronously using a form-filler automation
|
271
173
|
*
|
@@ -306,20 +208,6 @@ export declare class Windows {
|
|
306
208
|
* })
|
307
209
|
*/
|
308
210
|
monitor(sessionId: string, windowId: string, request: Airtop.SessionMonitorHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiPromptResponse>;
|
309
|
-
/**
|
310
|
-
* Prompt OpenAI Operator
|
311
|
-
*
|
312
|
-
* @param {string} sessionId - ID of the session that owns the window.
|
313
|
-
* @param {string} windowId - Airtop window ID of the browser window.
|
314
|
-
* @param {Airtop.OperatorPromptV1Body} request
|
315
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
316
|
-
*
|
317
|
-
* @example
|
318
|
-
* await client.windows.operatorPrompt("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430", {
|
319
|
-
* prompt: "What is the latest news about OpenAI?"
|
320
|
-
* })
|
321
|
-
*/
|
322
|
-
operatorPrompt(sessionId: string, windowId: string, request: Airtop.OperatorPromptV1Body, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncOperatorPromptResponseEnvelope>;
|
323
211
|
/**
|
324
212
|
* Submit a prompt that queries the content of a specific browser window. You may extract content from the page, or ask a question about the page and allow the AI to answer it (ex. Is the user logged in?).
|
325
213
|
*
|
@@ -424,79 +312,5 @@ export declare class Windows {
|
|
424
312
|
* })
|
425
313
|
*/
|
426
314
|
type(sessionId: string, windowId: string, request: Airtop.SessionTypeHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiPromptResponse>;
|
427
|
-
/**
|
428
|
-
* Perform actions in a specific browser window based on a prompt
|
429
|
-
*
|
430
|
-
* @param {string} sessionId - The session id for the window.
|
431
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
432
|
-
* @param {Airtop.ActRequest} request
|
433
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
434
|
-
*
|
435
|
-
* @example
|
436
|
-
* await client.windows.act("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
437
|
-
* jobId: "123",
|
438
|
-
* prompt: "Click the login button"
|
439
|
-
* })
|
440
|
-
*/
|
441
|
-
act(sessionId: string, windowId: string, request: Airtop.ActRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncSessionAiResponseEnvelope>;
|
442
|
-
/**
|
443
|
-
* Extract data from a specific browser window based on a prompt
|
444
|
-
*
|
445
|
-
* @param {string} sessionId - The session id for the window.
|
446
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
447
|
-
* @param {Airtop.ExtractRequest} request
|
448
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
449
|
-
*
|
450
|
-
* @example
|
451
|
-
* await client.windows.extract("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
452
|
-
* jobId: "123",
|
453
|
-
* prompt: "Extract all product prices from this page"
|
454
|
-
* })
|
455
|
-
*/
|
456
|
-
extract(sessionId: string, windowId: string, request: Airtop.ExtractRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncSessionAiResponseEnvelope>;
|
457
|
-
/**
|
458
|
-
* Find multiple elements in a browser window based on a prompt
|
459
|
-
*
|
460
|
-
* @param {string} sessionId - The session id for the window.
|
461
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
462
|
-
* @param {Airtop.FindManyRequest} request
|
463
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
464
|
-
*
|
465
|
-
* @example
|
466
|
-
* await client.windows.findMany("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
467
|
-
* jobId: "123",
|
468
|
-
* prompt: "Find all the news articles"
|
469
|
-
* })
|
470
|
-
*/
|
471
|
-
findMany(sessionId: string, windowId: string, request: Airtop.FindManyRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncSessionAiResponseEnvelope>;
|
472
|
-
/**
|
473
|
-
* Find a specific element in a browser window based on a prompt
|
474
|
-
*
|
475
|
-
* @param {string} sessionId - The session id for the window.
|
476
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
477
|
-
* @param {Airtop.FindOneRequest} request
|
478
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
479
|
-
*
|
480
|
-
* @example
|
481
|
-
* await client.windows.findOne("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
482
|
-
* jobId: "123",
|
483
|
-
* prompt: "Find the login button"
|
484
|
-
* })
|
485
|
-
*/
|
486
|
-
findOne(sessionId: string, windowId: string, request: Airtop.FindOneRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncSessionAiResponseEnvelope>;
|
487
|
-
/**
|
488
|
-
* Send a prompt to an LLM with context from the browser window
|
489
|
-
*
|
490
|
-
* @param {string} sessionId - The session id for the window.
|
491
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
492
|
-
* @param {Airtop.LlmRequest} request
|
493
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
494
|
-
*
|
495
|
-
* @example
|
496
|
-
* await client.windows.llm("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
497
|
-
* prompt: "Tell me about this webpage"
|
498
|
-
* })
|
499
|
-
*/
|
500
|
-
llm(sessionId: string, windowId: string, request: Airtop.LlmRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AsyncSessionAiResponseEnvelope>;
|
501
315
|
protected _getAuthorizationHeader(): Promise<string>;
|
502
316
|
}
|