@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.
Files changed (41) hide show
  1. package/api/resources/profiles/client/Client.js +4 -4
  2. package/api/resources/sessions/client/Client.js +10 -10
  3. package/api/resources/windows/client/Client.js +8 -8
  4. package/api/types/AiResponseEnvelope.d.ts +0 -3
  5. package/api/types/ExternalSessionConfig.d.ts +1 -1
  6. package/api/types/ExternalSessionWithConnectionInfo.d.ts +2 -0
  7. package/api/types/ScrapeResponseEnvelope.d.ts +0 -2
  8. package/api/types/SessionConfigV1.d.ts +2 -2
  9. package/dist/api/resources/profiles/client/Client.js +4 -4
  10. package/dist/api/resources/sessions/client/Client.js +10 -10
  11. package/dist/api/resources/windows/client/Client.js +8 -8
  12. package/dist/api/types/AiResponseEnvelope.d.ts +0 -3
  13. package/dist/api/types/ExternalSessionConfig.d.ts +1 -1
  14. package/dist/api/types/ExternalSessionWithConnectionInfo.d.ts +2 -0
  15. package/dist/api/types/ScrapeResponseEnvelope.d.ts +0 -2
  16. package/dist/api/types/SessionConfigV1.d.ts +2 -2
  17. package/dist/index.d.ts +1 -3
  18. package/dist/index.js +3 -4
  19. package/dist/serialization/types/AiResponseEnvelope.d.ts +0 -3
  20. package/dist/serialization/types/AiResponseEnvelope.js +0 -3
  21. package/dist/serialization/types/ExternalSessionWithConnectionInfo.d.ts +1 -0
  22. package/dist/serialization/types/ExternalSessionWithConnectionInfo.js +1 -0
  23. package/dist/serialization/types/ScrapeResponseEnvelope.d.ts +0 -3
  24. package/dist/serialization/types/ScrapeResponseEnvelope.js +0 -3
  25. package/dist/serialization/types/SessionConfigV1.d.ts +1 -1
  26. package/dist/serialization/types/SessionConfigV1.js +1 -1
  27. package/dist/wrapper/AirtopSessions.js +3 -1
  28. package/dist/wrapper/AirtopWindows.d.ts +19 -6
  29. package/index.d.ts +1 -3
  30. package/index.js +3 -4
  31. package/package.json +8 -6
  32. package/serialization/types/AiResponseEnvelope.d.ts +0 -3
  33. package/serialization/types/AiResponseEnvelope.js +0 -3
  34. package/serialization/types/ExternalSessionWithConnectionInfo.d.ts +1 -0
  35. package/serialization/types/ExternalSessionWithConnectionInfo.js +1 -0
  36. package/serialization/types/ScrapeResponseEnvelope.d.ts +0 -3
  37. package/serialization/types/ScrapeResponseEnvelope.js +0 -3
  38. package/serialization/types/SessionConfigV1.d.ts +1 -1
  39. package/serialization/types/SessionConfigV1.js +1 -1
  40. package/wrapper/AirtopSessions.js +3 -1
  41. 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.10",
81
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
152
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
98
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
184
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
249
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
336
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
384
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
84
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
147
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
208
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
269
- "User-Agent": "@airtop/sdk/0.0.10",
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
  },
@@ -1,9 +1,6 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as Airtop from "../index";
5
4
  export interface AiResponseEnvelope {
6
- errors?: Airtop.Issue[];
7
5
  modelResponse: string;
8
- warnings?: Airtop.Issue[];
9
6
  }
@@ -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 use with this session */
5
+ /** Id of a profile to load into the session */
6
6
  baseProfileId?: string;
7
7
  /** Persist the profile */
8
8
  persistProfile?: boolean;
@@ -19,6 +19,8 @@ export interface ExternalSessionWithConnectionInfo {
19
19
  id: string;
20
20
  /** Date of the last activity */
21
21
  lastActivity?: Date;
22
+ /** Id of a newly persisted profile */
23
+ profileId?: string;
22
24
  /** Session status */
23
25
  status: string;
24
26
  }
@@ -3,7 +3,5 @@
3
3
  */
4
4
  import * as Airtop from "../index";
5
5
  export interface ScrapeResponseEnvelope {
6
- errors?: Airtop.Issue[];
7
6
  modelResponse: Airtop.ScrapeResponseOutput;
8
- warnings?: Airtop.Issue[];
9
7
  }
@@ -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.10",
81
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
152
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
98
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
184
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
249
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
336
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
384
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
84
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
147
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
208
- "User-Agent": "@airtop/sdk/0.0.10",
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.10",
269
- "User-Agent": "@airtop/sdk/0.0.10",
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
  },
@@ -1,9 +1,6 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as Airtop from "../index";
5
4
  export interface AiResponseEnvelope {
6
- errors?: Airtop.Issue[];
7
5
  modelResponse: string;
8
- warnings?: Airtop.Issue[];
9
6
  }
@@ -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 use with this session */
5
+ /** Id of a profile to load into the session */
6
6
  baseProfileId?: string;
7
7
  /** Persist the profile */
8
8
  persistProfile?: boolean;
@@ -19,6 +19,8 @@ export interface ExternalSessionWithConnectionInfo {
19
19
  id: string;
20
20
  /** Date of the last activity */
21
21
  lastActivity?: Date;
22
+ /** Id of a newly persisted profile */
23
+ profileId?: string;
22
24
  /** Session status */
23
25
  status: string;
24
26
  }
@@ -3,7 +3,5 @@
3
3
  */
4
4
  import * as Airtop from "../index";
5
5
  export interface ScrapeResponseEnvelope {
6
- errors?: Airtop.Issue[];
7
6
  modelResponse: Airtop.ScrapeResponseOutput;
8
- warnings?: Airtop.Issue[];
9
7
  }
@@ -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
- import { AirtopClient } from './wrapper/AirtopClient';
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
- const AirtopClient_1 = require("./wrapper/AirtopClient");
35
- const client = new AirtopClient_1.AirtopClient();
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
  });
@@ -16,6 +16,7 @@ export declare namespace ExternalSessionWithConnectionInfo {
16
16
  dateCreated?: string | null;
17
17
  id: string;
18
18
  lastActivity?: string | null;
19
+ profileId?: string | null;
19
20
  status: string;
20
21
  }
21
22
  }
@@ -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
- return this.getInfo(createSessionResponse.data.id, requestOptions);
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
- import { Page as PuppeteerPage } from 'puppeteer';
2
- import { Page as PlaywrightPage } from 'playwright';
3
- import { WebDriver } from 'selenium-webdriver';
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: PuppeteerPage, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
16
- getWindowInfoForPlaywrightPage(sessionId: string, page: PlaywrightPage, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
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
- import { AirtopClient } from './wrapper/AirtopClient';
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
- const AirtopClient_1 = require("./wrapper/AirtopClient");
35
- const client = new AirtopClient_1.AirtopClient();
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.10",
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
  });
@@ -16,6 +16,7 @@ export declare namespace ExternalSessionWithConnectionInfo {
16
16
  dateCreated?: string | null;
17
17
  id: string;
18
18
  lastActivity?: string | null;
19
+ profileId?: string | null;
19
20
  status: string;
20
21
  }
21
22
  }
@@ -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
- return this.getInfo(createSessionResponse.data.id, requestOptions);
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
- import { Page as PuppeteerPage } from 'puppeteer';
2
- import { Page as PlaywrightPage } from 'playwright';
3
- import { WebDriver } from 'selenium-webdriver';
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: PuppeteerPage, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
16
- getWindowInfoForPlaywrightPage(sessionId: string, page: PlaywrightPage, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
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 {};