@airtop/sdk 0.0.10 → 0.0.12
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/api/resources/profiles/client/Client.js +4 -4
- package/api/resources/sessions/client/Client.js +10 -10
- package/api/resources/windows/client/Client.js +8 -8
- package/api/types/AiResponseEnvelope.d.ts +0 -3
- package/api/types/ExternalSessionConfig.d.ts +1 -1
- package/api/types/ExternalSessionWithConnectionInfo.d.ts +2 -0
- package/api/types/ScrapeResponseEnvelope.d.ts +0 -2
- package/api/types/SessionConfigV1.d.ts +2 -2
- 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.js +8 -8
- package/dist/api/types/AiResponseEnvelope.d.ts +0 -3
- package/dist/api/types/ExternalSessionConfig.d.ts +1 -1
- package/dist/api/types/ExternalSessionWithConnectionInfo.d.ts +2 -0
- package/dist/api/types/ScrapeResponseEnvelope.d.ts +0 -2
- package/dist/api/types/SessionConfigV1.d.ts +2 -2
- package/dist/index.d.ts +1 -3
- package/dist/index.js +3 -4
- package/dist/serialization/types/AiResponseEnvelope.d.ts +0 -3
- package/dist/serialization/types/AiResponseEnvelope.js +0 -3
- package/dist/serialization/types/ExternalSessionWithConnectionInfo.d.ts +1 -0
- package/dist/serialization/types/ExternalSessionWithConnectionInfo.js +1 -0
- package/dist/serialization/types/ScrapeResponseEnvelope.d.ts +0 -3
- package/dist/serialization/types/ScrapeResponseEnvelope.js +0 -3
- package/dist/serialization/types/SessionConfigV1.d.ts +1 -1
- package/dist/serialization/types/SessionConfigV1.js +1 -1
- package/dist/wrapper/AirtopSessions.js +3 -1
- package/dist/wrapper/AirtopWindows.d.ts +19 -6
- package/index.d.ts +1 -3
- package/index.js +3 -4
- package/package.json +8 -6
- package/serialization/types/AiResponseEnvelope.d.ts +0 -3
- package/serialization/types/AiResponseEnvelope.js +0 -3
- package/serialization/types/ExternalSessionWithConnectionInfo.d.ts +1 -0
- package/serialization/types/ExternalSessionWithConnectionInfo.js +1 -0
- package/serialization/types/ScrapeResponseEnvelope.d.ts +0 -3
- package/serialization/types/ScrapeResponseEnvelope.js +0 -3
- package/serialization/types/SessionConfigV1.d.ts +1 -1
- package/serialization/types/SessionConfigV1.js +1 -1
- package/wrapper/AirtopSessions.js +3 -1
- package/wrapper/AirtopWindows.d.ts +19 -6
@@ -77,8 +77,8 @@ class Profiles {
|
|
77
77
|
Authorization: yield this._getAuthorizationHeader(),
|
78
78
|
"X-Fern-Language": "JavaScript",
|
79
79
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
80
|
-
"X-Fern-SDK-Version": "0.0.
|
81
|
-
"User-Agent": "@airtop/sdk/0.0.
|
80
|
+
"X-Fern-SDK-Version": "0.0.12",
|
81
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
82
82
|
"X-Fern-Runtime": core.RUNTIME.type,
|
83
83
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
84
84
|
},
|
@@ -148,8 +148,8 @@ class Profiles {
|
|
148
148
|
Authorization: yield this._getAuthorizationHeader(),
|
149
149
|
"X-Fern-Language": "JavaScript",
|
150
150
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
151
|
-
"X-Fern-SDK-Version": "0.0.
|
152
|
-
"User-Agent": "@airtop/sdk/0.0.
|
151
|
+
"X-Fern-SDK-Version": "0.0.12",
|
152
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
153
153
|
"X-Fern-Runtime": core.RUNTIME.type,
|
154
154
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
155
155
|
},
|
@@ -94,8 +94,8 @@ class Sessions {
|
|
94
94
|
Authorization: yield this._getAuthorizationHeader(),
|
95
95
|
"X-Fern-Language": "JavaScript",
|
96
96
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
97
|
-
"X-Fern-SDK-Version": "0.0.
|
98
|
-
"User-Agent": "@airtop/sdk/0.0.
|
97
|
+
"X-Fern-SDK-Version": "0.0.12",
|
98
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
99
99
|
"X-Fern-Runtime": core.RUNTIME.type,
|
100
100
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
101
101
|
},
|
@@ -180,8 +180,8 @@ class Sessions {
|
|
180
180
|
Authorization: yield this._getAuthorizationHeader(),
|
181
181
|
"X-Fern-Language": "JavaScript",
|
182
182
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
183
|
-
"X-Fern-SDK-Version": "0.0.
|
184
|
-
"User-Agent": "@airtop/sdk/0.0.
|
183
|
+
"X-Fern-SDK-Version": "0.0.12",
|
184
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
185
185
|
"X-Fern-Runtime": core.RUNTIME.type,
|
186
186
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
187
187
|
},
|
@@ -245,8 +245,8 @@ class Sessions {
|
|
245
245
|
Authorization: yield this._getAuthorizationHeader(),
|
246
246
|
"X-Fern-Language": "JavaScript",
|
247
247
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
248
|
-
"X-Fern-SDK-Version": "0.0.
|
249
|
-
"User-Agent": "@airtop/sdk/0.0.
|
248
|
+
"X-Fern-SDK-Version": "0.0.12",
|
249
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
250
250
|
"X-Fern-Runtime": core.RUNTIME.type,
|
251
251
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
252
252
|
},
|
@@ -332,8 +332,8 @@ class Sessions {
|
|
332
332
|
Authorization: yield this._getAuthorizationHeader(),
|
333
333
|
"X-Fern-Language": "JavaScript",
|
334
334
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
335
|
-
"X-Fern-SDK-Version": "0.0.
|
336
|
-
"User-Agent": "@airtop/sdk/0.0.
|
335
|
+
"X-Fern-SDK-Version": "0.0.12",
|
336
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
337
337
|
"X-Fern-Runtime": core.RUNTIME.type,
|
338
338
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
339
339
|
},
|
@@ -380,8 +380,8 @@ class Sessions {
|
|
380
380
|
Authorization: yield this._getAuthorizationHeader(),
|
381
381
|
"X-Fern-Language": "JavaScript",
|
382
382
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
383
|
-
"X-Fern-SDK-Version": "0.0.
|
384
|
-
"User-Agent": "@airtop/sdk/0.0.
|
383
|
+
"X-Fern-SDK-Version": "0.0.12",
|
384
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
385
385
|
"X-Fern-Runtime": core.RUNTIME.type,
|
386
386
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
387
387
|
},
|
@@ -80,8 +80,8 @@ class Windows {
|
|
80
80
|
Authorization: yield this._getAuthorizationHeader(),
|
81
81
|
"X-Fern-Language": "JavaScript",
|
82
82
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
83
|
-
"X-Fern-SDK-Version": "0.0.
|
84
|
-
"User-Agent": "@airtop/sdk/0.0.
|
83
|
+
"X-Fern-SDK-Version": "0.0.12",
|
84
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
85
85
|
"X-Fern-Runtime": core.RUNTIME.type,
|
86
86
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
87
87
|
},
|
@@ -143,8 +143,8 @@ class Windows {
|
|
143
143
|
Authorization: yield this._getAuthorizationHeader(),
|
144
144
|
"X-Fern-Language": "JavaScript",
|
145
145
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
146
|
-
"X-Fern-SDK-Version": "0.0.
|
147
|
-
"User-Agent": "@airtop/sdk/0.0.
|
146
|
+
"X-Fern-SDK-Version": "0.0.12",
|
147
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
148
148
|
"X-Fern-Runtime": core.RUNTIME.type,
|
149
149
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
150
150
|
},
|
@@ -204,8 +204,8 @@ class Windows {
|
|
204
204
|
Authorization: yield this._getAuthorizationHeader(),
|
205
205
|
"X-Fern-Language": "JavaScript",
|
206
206
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
207
|
-
"X-Fern-SDK-Version": "0.0.
|
208
|
-
"User-Agent": "@airtop/sdk/0.0.
|
207
|
+
"X-Fern-SDK-Version": "0.0.12",
|
208
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
209
209
|
"X-Fern-Runtime": core.RUNTIME.type,
|
210
210
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
211
211
|
},
|
@@ -265,8 +265,8 @@ class Windows {
|
|
265
265
|
Authorization: yield this._getAuthorizationHeader(),
|
266
266
|
"X-Fern-Language": "JavaScript",
|
267
267
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
268
|
-
"X-Fern-SDK-Version": "0.0.
|
269
|
-
"User-Agent": "@airtop/sdk/0.0.
|
268
|
+
"X-Fern-SDK-Version": "0.0.12",
|
269
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
270
270
|
"X-Fern-Runtime": core.RUNTIME.type,
|
271
271
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
272
272
|
},
|
@@ -2,7 +2,7 @@
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
3
3
|
*/
|
4
4
|
export interface ExternalSessionConfig {
|
5
|
-
/** Id of a profile to
|
5
|
+
/** Id of a profile to load into the session */
|
6
6
|
baseProfileId?: string;
|
7
7
|
/** Persist the profile */
|
8
8
|
persistProfile?: boolean;
|
@@ -2,10 +2,10 @@
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
3
3
|
*/
|
4
4
|
export interface SessionConfigV1 {
|
5
|
+
/** Id of a profile to load into the session */
|
6
|
+
baseProfileId?: string;
|
5
7
|
/** Persist the profile */
|
6
8
|
persistProfile?: boolean;
|
7
|
-
/** Id of a profile to use with this session */
|
8
|
-
profileId?: string;
|
9
9
|
/** Max length of session in minutes, after which it will terminate if not already deleted */
|
10
10
|
timeoutMinutes?: number;
|
11
11
|
}
|
@@ -77,8 +77,8 @@ class Profiles {
|
|
77
77
|
Authorization: yield this._getAuthorizationHeader(),
|
78
78
|
"X-Fern-Language": "JavaScript",
|
79
79
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
80
|
-
"X-Fern-SDK-Version": "0.0.
|
81
|
-
"User-Agent": "@airtop/sdk/0.0.
|
80
|
+
"X-Fern-SDK-Version": "0.0.12",
|
81
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
82
82
|
"X-Fern-Runtime": core.RUNTIME.type,
|
83
83
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
84
84
|
},
|
@@ -148,8 +148,8 @@ class Profiles {
|
|
148
148
|
Authorization: yield this._getAuthorizationHeader(),
|
149
149
|
"X-Fern-Language": "JavaScript",
|
150
150
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
151
|
-
"X-Fern-SDK-Version": "0.0.
|
152
|
-
"User-Agent": "@airtop/sdk/0.0.
|
151
|
+
"X-Fern-SDK-Version": "0.0.12",
|
152
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
153
153
|
"X-Fern-Runtime": core.RUNTIME.type,
|
154
154
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
155
155
|
},
|
@@ -94,8 +94,8 @@ class Sessions {
|
|
94
94
|
Authorization: yield this._getAuthorizationHeader(),
|
95
95
|
"X-Fern-Language": "JavaScript",
|
96
96
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
97
|
-
"X-Fern-SDK-Version": "0.0.
|
98
|
-
"User-Agent": "@airtop/sdk/0.0.
|
97
|
+
"X-Fern-SDK-Version": "0.0.12",
|
98
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
99
99
|
"X-Fern-Runtime": core.RUNTIME.type,
|
100
100
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
101
101
|
},
|
@@ -180,8 +180,8 @@ class Sessions {
|
|
180
180
|
Authorization: yield this._getAuthorizationHeader(),
|
181
181
|
"X-Fern-Language": "JavaScript",
|
182
182
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
183
|
-
"X-Fern-SDK-Version": "0.0.
|
184
|
-
"User-Agent": "@airtop/sdk/0.0.
|
183
|
+
"X-Fern-SDK-Version": "0.0.12",
|
184
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
185
185
|
"X-Fern-Runtime": core.RUNTIME.type,
|
186
186
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
187
187
|
},
|
@@ -245,8 +245,8 @@ class Sessions {
|
|
245
245
|
Authorization: yield this._getAuthorizationHeader(),
|
246
246
|
"X-Fern-Language": "JavaScript",
|
247
247
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
248
|
-
"X-Fern-SDK-Version": "0.0.
|
249
|
-
"User-Agent": "@airtop/sdk/0.0.
|
248
|
+
"X-Fern-SDK-Version": "0.0.12",
|
249
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
250
250
|
"X-Fern-Runtime": core.RUNTIME.type,
|
251
251
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
252
252
|
},
|
@@ -332,8 +332,8 @@ class Sessions {
|
|
332
332
|
Authorization: yield this._getAuthorizationHeader(),
|
333
333
|
"X-Fern-Language": "JavaScript",
|
334
334
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
335
|
-
"X-Fern-SDK-Version": "0.0.
|
336
|
-
"User-Agent": "@airtop/sdk/0.0.
|
335
|
+
"X-Fern-SDK-Version": "0.0.12",
|
336
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
337
337
|
"X-Fern-Runtime": core.RUNTIME.type,
|
338
338
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
339
339
|
},
|
@@ -380,8 +380,8 @@ class Sessions {
|
|
380
380
|
Authorization: yield this._getAuthorizationHeader(),
|
381
381
|
"X-Fern-Language": "JavaScript",
|
382
382
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
383
|
-
"X-Fern-SDK-Version": "0.0.
|
384
|
-
"User-Agent": "@airtop/sdk/0.0.
|
383
|
+
"X-Fern-SDK-Version": "0.0.12",
|
384
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
385
385
|
"X-Fern-Runtime": core.RUNTIME.type,
|
386
386
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
387
387
|
},
|
@@ -80,8 +80,8 @@ class Windows {
|
|
80
80
|
Authorization: yield this._getAuthorizationHeader(),
|
81
81
|
"X-Fern-Language": "JavaScript",
|
82
82
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
83
|
-
"X-Fern-SDK-Version": "0.0.
|
84
|
-
"User-Agent": "@airtop/sdk/0.0.
|
83
|
+
"X-Fern-SDK-Version": "0.0.12",
|
84
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
85
85
|
"X-Fern-Runtime": core.RUNTIME.type,
|
86
86
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
87
87
|
},
|
@@ -143,8 +143,8 @@ class Windows {
|
|
143
143
|
Authorization: yield this._getAuthorizationHeader(),
|
144
144
|
"X-Fern-Language": "JavaScript",
|
145
145
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
146
|
-
"X-Fern-SDK-Version": "0.0.
|
147
|
-
"User-Agent": "@airtop/sdk/0.0.
|
146
|
+
"X-Fern-SDK-Version": "0.0.12",
|
147
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
148
148
|
"X-Fern-Runtime": core.RUNTIME.type,
|
149
149
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
150
150
|
},
|
@@ -204,8 +204,8 @@ class Windows {
|
|
204
204
|
Authorization: yield this._getAuthorizationHeader(),
|
205
205
|
"X-Fern-Language": "JavaScript",
|
206
206
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
207
|
-
"X-Fern-SDK-Version": "0.0.
|
208
|
-
"User-Agent": "@airtop/sdk/0.0.
|
207
|
+
"X-Fern-SDK-Version": "0.0.12",
|
208
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
209
209
|
"X-Fern-Runtime": core.RUNTIME.type,
|
210
210
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
211
211
|
},
|
@@ -265,8 +265,8 @@ class Windows {
|
|
265
265
|
Authorization: yield this._getAuthorizationHeader(),
|
266
266
|
"X-Fern-Language": "JavaScript",
|
267
267
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
268
|
-
"X-Fern-SDK-Version": "0.0.
|
269
|
-
"User-Agent": "@airtop/sdk/0.0.
|
268
|
+
"X-Fern-SDK-Version": "0.0.12",
|
269
|
+
"User-Agent": "@airtop/sdk/0.0.12",
|
270
270
|
"X-Fern-Runtime": core.RUNTIME.type,
|
271
271
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
272
272
|
},
|
@@ -2,7 +2,7 @@
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
3
3
|
*/
|
4
4
|
export interface ExternalSessionConfig {
|
5
|
-
/** Id of a profile to
|
5
|
+
/** Id of a profile to load into the session */
|
6
6
|
baseProfileId?: string;
|
7
7
|
/** Persist the profile */
|
8
8
|
persistProfile?: boolean;
|
@@ -2,10 +2,10 @@
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
3
3
|
*/
|
4
4
|
export interface SessionConfigV1 {
|
5
|
+
/** Id of a profile to load into the session */
|
6
|
+
baseProfileId?: string;
|
5
7
|
/** Persist the profile */
|
6
8
|
persistProfile?: boolean;
|
7
|
-
/** Id of a profile to use with this session */
|
8
|
-
profileId?: string;
|
9
9
|
/** Max length of session in minutes, after which it will terminate if not already deleted */
|
10
10
|
timeoutMinutes?: number;
|
11
11
|
}
|
package/dist/index.d.ts
CHANGED
@@ -2,6 +2,4 @@ export * as Airtop from "./api";
|
|
2
2
|
export * as Resources from './api/resources';
|
3
3
|
export { AirtopEnvironment } from "./environments";
|
4
4
|
export { AirtopError, AirtopTimeoutError } from "./errors";
|
5
|
-
|
6
|
-
declare const client: AirtopClient;
|
7
|
-
export default client;
|
5
|
+
export { AirtopClient } from './wrapper/AirtopClient';
|
package/dist/index.js
CHANGED
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
23
|
return result;
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.AirtopTimeoutError = exports.AirtopError = exports.AirtopEnvironment = exports.Resources = exports.Airtop = void 0;
|
26
|
+
exports.AirtopClient = exports.AirtopTimeoutError = exports.AirtopError = exports.AirtopEnvironment = exports.Resources = exports.Airtop = void 0;
|
27
27
|
exports.Airtop = __importStar(require("./api"));
|
28
28
|
exports.Resources = __importStar(require("./api/resources"));
|
29
29
|
var environments_1 = require("./environments");
|
@@ -31,6 +31,5 @@ Object.defineProperty(exports, "AirtopEnvironment", { enumerable: true, get: fun
|
|
31
31
|
var errors_1 = require("./errors");
|
32
32
|
Object.defineProperty(exports, "AirtopError", { enumerable: true, get: function () { return errors_1.AirtopError; } });
|
33
33
|
Object.defineProperty(exports, "AirtopTimeoutError", { enumerable: true, get: function () { return errors_1.AirtopTimeoutError; } });
|
34
|
-
|
35
|
-
|
36
|
-
exports.default = client;
|
34
|
+
var AirtopClient_1 = require("./wrapper/AirtopClient");
|
35
|
+
Object.defineProperty(exports, "AirtopClient", { enumerable: true, get: function () { return AirtopClient_1.AirtopClient; } });
|
@@ -4,12 +4,9 @@
|
|
4
4
|
import * as serializers from "../index";
|
5
5
|
import * as Airtop from "../../api/index";
|
6
6
|
import * as core from "../../core";
|
7
|
-
import { Issue } from "./Issue";
|
8
7
|
export declare const AiResponseEnvelope: core.serialization.ObjectSchema<serializers.AiResponseEnvelope.Raw, Airtop.AiResponseEnvelope>;
|
9
8
|
export declare namespace AiResponseEnvelope {
|
10
9
|
interface Raw {
|
11
|
-
errors?: Issue.Raw[] | null;
|
12
10
|
modelResponse: string;
|
13
|
-
warnings?: Issue.Raw[] | null;
|
14
11
|
}
|
15
12
|
}
|
@@ -28,9 +28,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
29
|
exports.AiResponseEnvelope = void 0;
|
30
30
|
const core = __importStar(require("../../core"));
|
31
|
-
const Issue_1 = require("./Issue");
|
32
31
|
exports.AiResponseEnvelope = core.serialization.object({
|
33
|
-
errors: core.serialization.list(Issue_1.Issue).optional(),
|
34
32
|
modelResponse: core.serialization.string(),
|
35
|
-
warnings: core.serialization.list(Issue_1.Issue).optional(),
|
36
33
|
});
|
@@ -38,5 +38,6 @@ exports.ExternalSessionWithConnectionInfo = core.serialization.object({
|
|
38
38
|
dateCreated: core.serialization.date().optional(),
|
39
39
|
id: core.serialization.string(),
|
40
40
|
lastActivity: core.serialization.date().optional(),
|
41
|
+
profileId: core.serialization.string().optional(),
|
41
42
|
status: core.serialization.string(),
|
42
43
|
});
|
@@ -4,13 +4,10 @@
|
|
4
4
|
import * as serializers from "../index";
|
5
5
|
import * as Airtop from "../../api/index";
|
6
6
|
import * as core from "../../core";
|
7
|
-
import { Issue } from "./Issue";
|
8
7
|
import { ScrapeResponseOutput } from "./ScrapeResponseOutput";
|
9
8
|
export declare const ScrapeResponseEnvelope: core.serialization.ObjectSchema<serializers.ScrapeResponseEnvelope.Raw, Airtop.ScrapeResponseEnvelope>;
|
10
9
|
export declare namespace ScrapeResponseEnvelope {
|
11
10
|
interface Raw {
|
12
|
-
errors?: Issue.Raw[] | null;
|
13
11
|
modelResponse: ScrapeResponseOutput.Raw;
|
14
|
-
warnings?: Issue.Raw[] | null;
|
15
12
|
}
|
16
13
|
}
|
@@ -28,10 +28,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
29
|
exports.ScrapeResponseEnvelope = void 0;
|
30
30
|
const core = __importStar(require("../../core"));
|
31
|
-
const Issue_1 = require("./Issue");
|
32
31
|
const ScrapeResponseOutput_1 = require("./ScrapeResponseOutput");
|
33
32
|
exports.ScrapeResponseEnvelope = core.serialization.object({
|
34
|
-
errors: core.serialization.list(Issue_1.Issue).optional(),
|
35
33
|
modelResponse: ScrapeResponseOutput_1.ScrapeResponseOutput,
|
36
|
-
warnings: core.serialization.list(Issue_1.Issue).optional(),
|
37
34
|
});
|
@@ -7,8 +7,8 @@ import * as core from "../../core";
|
|
7
7
|
export declare const SessionConfigV1: core.serialization.ObjectSchema<serializers.SessionConfigV1.Raw, Airtop.SessionConfigV1>;
|
8
8
|
export declare namespace SessionConfigV1 {
|
9
9
|
interface Raw {
|
10
|
+
baseProfileId?: string | null;
|
10
11
|
persistProfile?: boolean | null;
|
11
|
-
profileId?: string | null;
|
12
12
|
timeoutMinutes?: number | null;
|
13
13
|
}
|
14
14
|
}
|
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.SessionConfigV1 = void 0;
|
30
30
|
const core = __importStar(require("../../core"));
|
31
31
|
exports.SessionConfigV1 = core.serialization.object({
|
32
|
+
baseProfileId: core.serialization.string().optional(),
|
32
33
|
persistProfile: core.serialization.boolean().optional(),
|
33
|
-
profileId: core.serialization.string().optional(),
|
34
34
|
timeoutMinutes: core.serialization.number().optional(),
|
35
35
|
});
|
@@ -48,7 +48,9 @@ class AirtopSessions {
|
|
48
48
|
this.log('No browser created, timed out?');
|
49
49
|
throw new Error(`Waiting for session ready timed out`);
|
50
50
|
}
|
51
|
-
|
51
|
+
const getInfoResponse = yield this.getInfo(createSessionResponse.data.id, requestOptions);
|
52
|
+
// Merge the createSessionResponse with any new data from getInfoResponse
|
53
|
+
return Object.assign(Object.assign({}, createSessionResponse), { data: Object.assign(Object.assign({}, createSessionResponse.data), getInfoResponse.data) });
|
52
54
|
}
|
53
55
|
catch (e) {
|
54
56
|
this.log(e);
|
@@ -1,6 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
declare namespace puppeteer {
|
2
|
+
interface Page {
|
3
|
+
mainFrame(): any;
|
4
|
+
}
|
5
|
+
}
|
6
|
+
declare namespace playwright {
|
7
|
+
interface Page {
|
8
|
+
context(): any;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
declare namespace seleniumWebdriver {
|
12
|
+
interface WebDriver {
|
13
|
+
createCDPConnection(domain: string): Promise<any>;
|
14
|
+
}
|
15
|
+
}
|
4
16
|
import { AirtopClient as FernClient } from '../Client';
|
5
17
|
import * as Airtop from '../api';
|
6
18
|
import { Windows as WindowsNamespace } from '../api/resources/windows/client/Client';
|
@@ -12,7 +24,8 @@ export declare class AirtopWindows {
|
|
12
24
|
promptContent(sessionId: string, windowId: string, request: Airtop.PromptContentRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper>;
|
13
25
|
scrapeContent(sessionId: string, windowId: string, requestOptions?: Airtop.ScrapeContentRequest): Promise<Airtop.ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper>;
|
14
26
|
summarizeContent(sessionId: string, windowId: string, request?: Airtop.SummarizeContentRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper>;
|
15
|
-
getWindowInfoForPuppeteerPage(sessionId: string, page:
|
16
|
-
getWindowInfoForPlaywrightPage(sessionId: string, page:
|
17
|
-
getWindowInfoForSeleniumDriver(sessionId: string, driver: WebDriver, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
|
27
|
+
getWindowInfoForPuppeteerPage(sessionId: string, page: puppeteer.Page, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
|
28
|
+
getWindowInfoForPlaywrightPage(sessionId: string, page: playwright.Page, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
|
29
|
+
getWindowInfoForSeleniumDriver(sessionId: string, driver: seleniumWebdriver.WebDriver, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
|
18
30
|
}
|
31
|
+
export {};
|
package/index.d.ts
CHANGED
@@ -2,6 +2,4 @@ export * as Airtop from "./api";
|
|
2
2
|
export * as Resources from './api/resources';
|
3
3
|
export { AirtopEnvironment } from "./environments";
|
4
4
|
export { AirtopError, AirtopTimeoutError } from "./errors";
|
5
|
-
|
6
|
-
declare const client: AirtopClient;
|
7
|
-
export default client;
|
5
|
+
export { AirtopClient } from './wrapper/AirtopClient';
|
package/index.js
CHANGED
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
23
|
return result;
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.AirtopTimeoutError = exports.AirtopError = exports.AirtopEnvironment = exports.Resources = exports.Airtop = void 0;
|
26
|
+
exports.AirtopClient = exports.AirtopTimeoutError = exports.AirtopError = exports.AirtopEnvironment = exports.Resources = exports.Airtop = void 0;
|
27
27
|
exports.Airtop = __importStar(require("./api"));
|
28
28
|
exports.Resources = __importStar(require("./api/resources"));
|
29
29
|
var environments_1 = require("./environments");
|
@@ -31,6 +31,5 @@ Object.defineProperty(exports, "AirtopEnvironment", { enumerable: true, get: fun
|
|
31
31
|
var errors_1 = require("./errors");
|
32
32
|
Object.defineProperty(exports, "AirtopError", { enumerable: true, get: function () { return errors_1.AirtopError; } });
|
33
33
|
Object.defineProperty(exports, "AirtopTimeoutError", { enumerable: true, get: function () { return errors_1.AirtopTimeoutError; } });
|
34
|
-
|
35
|
-
|
36
|
-
exports.default = client;
|
34
|
+
var AirtopClient_1 = require("./wrapper/AirtopClient");
|
35
|
+
Object.defineProperty(exports, "AirtopClient", { enumerable: true, get: function () { return AirtopClient_1.AirtopClient; } });
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@airtop/sdk",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.12",
|
4
4
|
"private": false,
|
5
5
|
"repository": "https://github.com/airtop-ai/airtop-node-sdk",
|
6
6
|
"main": "./index.js",
|
@@ -17,10 +17,7 @@
|
|
17
17
|
"formdata-node": "^6.0.3",
|
18
18
|
"node-fetch": "2.7.0",
|
19
19
|
"qs": "6.11.2",
|
20
|
-
"js-base64": "3.7.2"
|
21
|
-
"playwright": "1.47.2",
|
22
|
-
"puppeteer": "22.14.0",
|
23
|
-
"selenium-webdriver": "4.25.0"
|
20
|
+
"js-base64": "3.7.2"
|
24
21
|
},
|
25
22
|
"devDependencies": {
|
26
23
|
"@types/url-join": "4.0.1",
|
@@ -56,5 +53,10 @@
|
|
56
53
|
"node",
|
57
54
|
"typescript"
|
58
55
|
],
|
59
|
-
"license": "MIT"
|
56
|
+
"license": "MIT",
|
57
|
+
"peerDependencies": {
|
58
|
+
"playwright": "1.47.2",
|
59
|
+
"puppeteer": "22.14.0",
|
60
|
+
"selenium-webdriver": "4.25.0"
|
61
|
+
}
|
60
62
|
}
|
@@ -4,12 +4,9 @@
|
|
4
4
|
import * as serializers from "../index";
|
5
5
|
import * as Airtop from "../../api/index";
|
6
6
|
import * as core from "../../core";
|
7
|
-
import { Issue } from "./Issue";
|
8
7
|
export declare const AiResponseEnvelope: core.serialization.ObjectSchema<serializers.AiResponseEnvelope.Raw, Airtop.AiResponseEnvelope>;
|
9
8
|
export declare namespace AiResponseEnvelope {
|
10
9
|
interface Raw {
|
11
|
-
errors?: Issue.Raw[] | null;
|
12
10
|
modelResponse: string;
|
13
|
-
warnings?: Issue.Raw[] | null;
|
14
11
|
}
|
15
12
|
}
|
@@ -28,9 +28,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
29
|
exports.AiResponseEnvelope = void 0;
|
30
30
|
const core = __importStar(require("../../core"));
|
31
|
-
const Issue_1 = require("./Issue");
|
32
31
|
exports.AiResponseEnvelope = core.serialization.object({
|
33
|
-
errors: core.serialization.list(Issue_1.Issue).optional(),
|
34
32
|
modelResponse: core.serialization.string(),
|
35
|
-
warnings: core.serialization.list(Issue_1.Issue).optional(),
|
36
33
|
});
|
@@ -38,5 +38,6 @@ exports.ExternalSessionWithConnectionInfo = core.serialization.object({
|
|
38
38
|
dateCreated: core.serialization.date().optional(),
|
39
39
|
id: core.serialization.string(),
|
40
40
|
lastActivity: core.serialization.date().optional(),
|
41
|
+
profileId: core.serialization.string().optional(),
|
41
42
|
status: core.serialization.string(),
|
42
43
|
});
|
@@ -4,13 +4,10 @@
|
|
4
4
|
import * as serializers from "../index";
|
5
5
|
import * as Airtop from "../../api/index";
|
6
6
|
import * as core from "../../core";
|
7
|
-
import { Issue } from "./Issue";
|
8
7
|
import { ScrapeResponseOutput } from "./ScrapeResponseOutput";
|
9
8
|
export declare const ScrapeResponseEnvelope: core.serialization.ObjectSchema<serializers.ScrapeResponseEnvelope.Raw, Airtop.ScrapeResponseEnvelope>;
|
10
9
|
export declare namespace ScrapeResponseEnvelope {
|
11
10
|
interface Raw {
|
12
|
-
errors?: Issue.Raw[] | null;
|
13
11
|
modelResponse: ScrapeResponseOutput.Raw;
|
14
|
-
warnings?: Issue.Raw[] | null;
|
15
12
|
}
|
16
13
|
}
|
@@ -28,10 +28,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
29
|
exports.ScrapeResponseEnvelope = void 0;
|
30
30
|
const core = __importStar(require("../../core"));
|
31
|
-
const Issue_1 = require("./Issue");
|
32
31
|
const ScrapeResponseOutput_1 = require("./ScrapeResponseOutput");
|
33
32
|
exports.ScrapeResponseEnvelope = core.serialization.object({
|
34
|
-
errors: core.serialization.list(Issue_1.Issue).optional(),
|
35
33
|
modelResponse: ScrapeResponseOutput_1.ScrapeResponseOutput,
|
36
|
-
warnings: core.serialization.list(Issue_1.Issue).optional(),
|
37
34
|
});
|
@@ -7,8 +7,8 @@ import * as core from "../../core";
|
|
7
7
|
export declare const SessionConfigV1: core.serialization.ObjectSchema<serializers.SessionConfigV1.Raw, Airtop.SessionConfigV1>;
|
8
8
|
export declare namespace SessionConfigV1 {
|
9
9
|
interface Raw {
|
10
|
+
baseProfileId?: string | null;
|
10
11
|
persistProfile?: boolean | null;
|
11
|
-
profileId?: string | null;
|
12
12
|
timeoutMinutes?: number | null;
|
13
13
|
}
|
14
14
|
}
|
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.SessionConfigV1 = void 0;
|
30
30
|
const core = __importStar(require("../../core"));
|
31
31
|
exports.SessionConfigV1 = core.serialization.object({
|
32
|
+
baseProfileId: core.serialization.string().optional(),
|
32
33
|
persistProfile: core.serialization.boolean().optional(),
|
33
|
-
profileId: core.serialization.string().optional(),
|
34
34
|
timeoutMinutes: core.serialization.number().optional(),
|
35
35
|
});
|
@@ -48,7 +48,9 @@ class AirtopSessions {
|
|
48
48
|
this.log('No browser created, timed out?');
|
49
49
|
throw new Error(`Waiting for session ready timed out`);
|
50
50
|
}
|
51
|
-
|
51
|
+
const getInfoResponse = yield this.getInfo(createSessionResponse.data.id, requestOptions);
|
52
|
+
// Merge the createSessionResponse with any new data from getInfoResponse
|
53
|
+
return Object.assign(Object.assign({}, createSessionResponse), { data: Object.assign(Object.assign({}, createSessionResponse.data), getInfoResponse.data) });
|
52
54
|
}
|
53
55
|
catch (e) {
|
54
56
|
this.log(e);
|
@@ -1,6 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
declare namespace puppeteer {
|
2
|
+
interface Page {
|
3
|
+
mainFrame(): any;
|
4
|
+
}
|
5
|
+
}
|
6
|
+
declare namespace playwright {
|
7
|
+
interface Page {
|
8
|
+
context(): any;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
declare namespace seleniumWebdriver {
|
12
|
+
interface WebDriver {
|
13
|
+
createCDPConnection(domain: string): Promise<any>;
|
14
|
+
}
|
15
|
+
}
|
4
16
|
import { AirtopClient as FernClient } from '../Client';
|
5
17
|
import * as Airtop from '../api';
|
6
18
|
import { Windows as WindowsNamespace } from '../api/resources/windows/client/Client';
|
@@ -12,7 +24,8 @@ export declare class AirtopWindows {
|
|
12
24
|
promptContent(sessionId: string, windowId: string, request: Airtop.PromptContentRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper>;
|
13
25
|
scrapeContent(sessionId: string, windowId: string, requestOptions?: Airtop.ScrapeContentRequest): Promise<Airtop.ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper>;
|
14
26
|
summarizeContent(sessionId: string, windowId: string, request?: Airtop.SummarizeContentRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper>;
|
15
|
-
getWindowInfoForPuppeteerPage(sessionId: string, page:
|
16
|
-
getWindowInfoForPlaywrightPage(sessionId: string, page:
|
17
|
-
getWindowInfoForSeleniumDriver(sessionId: string, driver: WebDriver, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
|
27
|
+
getWindowInfoForPuppeteerPage(sessionId: string, page: puppeteer.Page, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
|
28
|
+
getWindowInfoForPlaywrightPage(sessionId: string, page: playwright.Page, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
|
29
|
+
getWindowInfoForSeleniumDriver(sessionId: string, driver: seleniumWebdriver.WebDriver, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
|
18
30
|
}
|
31
|
+
export {};
|