@airtop/sdk 0.1.4 → 0.1.5

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 (80) hide show
  1. package/api/resources/profiles/client/Client.js +4 -4
  2. package/api/resources/sessions/client/Client.d.ts +2 -2
  3. package/api/resources/sessions/client/Client.js +12 -12
  4. package/api/resources/windows/client/Client.d.ts +18 -2
  5. package/api/resources/windows/client/Client.js +85 -16
  6. package/api/resources/windows/client/requests/SessionSummaryHandlerRequestBody.d.ts +3 -0
  7. package/api/resources/windows/client/requests/index.d.ts +0 -1
  8. package/api/types/PageQueryConfig.d.ts +7 -0
  9. package/api/types/{PromptContentExperimentalConfig.d.ts → PageQueryExperimentalConfig.d.ts} +1 -1
  10. package/api/{resources/windows/client/requests/SessionContentPromptHandlerRequestBody.d.ts → types/SessionPageQueryHandlerRequestBody.d.ts} +6 -9
  11. package/api/types/SummaryConfig.d.ts +2 -2
  12. package/api/types/index.d.ts +3 -2
  13. package/api/types/index.js +3 -2
  14. package/dist/api/resources/profiles/client/Client.js +4 -4
  15. package/dist/api/resources/sessions/client/Client.d.ts +2 -2
  16. package/dist/api/resources/sessions/client/Client.js +12 -12
  17. package/dist/api/resources/windows/client/Client.d.ts +18 -2
  18. package/dist/api/resources/windows/client/Client.js +85 -16
  19. package/dist/api/resources/windows/client/requests/SessionSummaryHandlerRequestBody.d.ts +3 -0
  20. package/dist/api/resources/windows/client/requests/index.d.ts +0 -1
  21. package/dist/api/types/PageQueryConfig.d.ts +7 -0
  22. package/dist/api/types/{PromptContentExperimentalConfig.d.ts → PageQueryExperimentalConfig.d.ts} +1 -1
  23. package/dist/api/{resources/windows/client/requests/SessionContentPromptHandlerRequestBody.d.ts → types/SessionPageQueryHandlerRequestBody.d.ts} +6 -9
  24. package/dist/api/types/SummaryConfig.d.ts +2 -2
  25. package/dist/api/types/index.d.ts +3 -2
  26. package/dist/api/types/index.js +3 -2
  27. package/dist/serialization/resources/windows/client/requests/SessionSummaryHandlerRequestBody.d.ts +2 -0
  28. package/dist/serialization/resources/windows/client/requests/SessionSummaryHandlerRequestBody.js +2 -0
  29. package/dist/serialization/resources/windows/client/requests/index.d.ts +0 -1
  30. package/dist/serialization/resources/windows/client/requests/index.js +1 -3
  31. package/dist/serialization/types/PageQueryConfig.d.ts +12 -0
  32. package/dist/serialization/types/{PromptContentConfig.js → PageQueryConfig.js} +3 -4
  33. package/dist/serialization/types/{PromptContentExperimentalConfig.d.ts → PageQueryExperimentalConfig.d.ts} +2 -2
  34. package/dist/serialization/types/{PromptContentExperimentalConfig.js → PageQueryExperimentalConfig.js} +2 -2
  35. package/dist/serialization/types/SessionPageQueryHandlerRequestBody.d.ts +18 -0
  36. package/{serialization/resources/windows/client/requests/SessionContentPromptHandlerRequestBody.js → dist/serialization/types/SessionPageQueryHandlerRequestBody.js} +5 -3
  37. package/dist/serialization/types/SummaryConfig.d.ts +1 -2
  38. package/dist/serialization/types/SummaryConfig.js +1 -2
  39. package/dist/serialization/types/index.d.ts +3 -2
  40. package/dist/serialization/types/index.js +3 -2
  41. package/dist/wrapper/AirtopClient.d.ts +6 -5
  42. package/dist/wrapper/AirtopClient.js +11 -10
  43. package/dist/wrapper/AirtopSessions.d.ts +11 -11
  44. package/dist/wrapper/AirtopSessions.js +16 -17
  45. package/dist/wrapper/AirtopWindows.d.ts +62 -14
  46. package/dist/wrapper/AirtopWindows.js +73 -31
  47. package/package.json +1 -1
  48. package/reference.md +99 -3
  49. package/serialization/resources/windows/client/requests/SessionSummaryHandlerRequestBody.d.ts +2 -0
  50. package/serialization/resources/windows/client/requests/SessionSummaryHandlerRequestBody.js +2 -0
  51. package/serialization/resources/windows/client/requests/index.d.ts +0 -1
  52. package/serialization/resources/windows/client/requests/index.js +1 -3
  53. package/serialization/types/PageQueryConfig.d.ts +12 -0
  54. package/serialization/types/{PromptContentConfig.js → PageQueryConfig.js} +3 -4
  55. package/serialization/types/{PromptContentExperimentalConfig.d.ts → PageQueryExperimentalConfig.d.ts} +2 -2
  56. package/serialization/types/{PromptContentExperimentalConfig.js → PageQueryExperimentalConfig.js} +2 -2
  57. package/serialization/types/SessionPageQueryHandlerRequestBody.d.ts +18 -0
  58. package/{dist/serialization/resources/windows/client/requests/SessionContentPromptHandlerRequestBody.js → serialization/types/SessionPageQueryHandlerRequestBody.js} +5 -3
  59. package/serialization/types/SummaryConfig.d.ts +1 -2
  60. package/serialization/types/SummaryConfig.js +1 -2
  61. package/serialization/types/index.d.ts +3 -2
  62. package/serialization/types/index.js +3 -2
  63. package/wrapper/AirtopClient.d.ts +6 -5
  64. package/wrapper/AirtopClient.js +11 -10
  65. package/wrapper/AirtopSessions.d.ts +11 -11
  66. package/wrapper/AirtopSessions.js +16 -17
  67. package/wrapper/AirtopWindows.d.ts +62 -14
  68. package/wrapper/AirtopWindows.js +73 -31
  69. package/api/types/PromptContentConfig.d.ts +0 -8
  70. package/dist/api/types/PromptContentConfig.d.ts +0 -8
  71. package/dist/serialization/resources/windows/client/requests/SessionContentPromptHandlerRequestBody.d.ts +0 -16
  72. package/dist/serialization/types/PromptContentConfig.d.ts +0 -13
  73. package/serialization/resources/windows/client/requests/SessionContentPromptHandlerRequestBody.d.ts +0 -16
  74. package/serialization/types/PromptContentConfig.d.ts +0 -13
  75. /package/api/{resources/windows/client/requests/SessionContentPromptHandlerRequestBody.js → types/PageQueryConfig.js} +0 -0
  76. /package/api/types/{PromptContentConfig.js → PageQueryExperimentalConfig.js} +0 -0
  77. /package/api/types/{PromptContentExperimentalConfig.js → SessionPageQueryHandlerRequestBody.js} +0 -0
  78. /package/dist/api/{resources/windows/client/requests/SessionContentPromptHandlerRequestBody.js → types/PageQueryConfig.js} +0 -0
  79. /package/dist/api/types/{PromptContentConfig.js → PageQueryExperimentalConfig.js} +0 -0
  80. /package/dist/api/types/{PromptContentExperimentalConfig.js → SessionPageQueryHandlerRequestBody.js} +0 -0
@@ -66,8 +66,8 @@ class Windows {
66
66
  Authorization: yield this._getAuthorizationHeader(),
67
67
  "X-Fern-Language": "JavaScript",
68
68
  "X-Fern-SDK-Name": "@airtop/sdk",
69
- "X-Fern-SDK-Version": "0.1.4",
70
- "User-Agent": "@airtop/sdk/0.1.4",
69
+ "X-Fern-SDK-Version": "0.1.5",
70
+ "User-Agent": "@airtop/sdk/0.1.5",
71
71
  "X-Fern-Runtime": core.RUNTIME.type,
72
72
  "X-Fern-Runtime-Version": core.RUNTIME.version,
73
73
  },
@@ -140,8 +140,8 @@ class Windows {
140
140
  Authorization: yield this._getAuthorizationHeader(),
141
141
  "X-Fern-Language": "JavaScript",
142
142
  "X-Fern-SDK-Name": "@airtop/sdk",
143
- "X-Fern-SDK-Version": "0.1.4",
144
- "User-Agent": "@airtop/sdk/0.1.4",
143
+ "X-Fern-SDK-Version": "0.1.5",
144
+ "User-Agent": "@airtop/sdk/0.1.5",
145
145
  "X-Fern-Runtime": core.RUNTIME.type,
146
146
  "X-Fern-Runtime-Version": core.RUNTIME.version,
147
147
  },
@@ -203,8 +203,8 @@ class Windows {
203
203
  Authorization: yield this._getAuthorizationHeader(),
204
204
  "X-Fern-Language": "JavaScript",
205
205
  "X-Fern-SDK-Name": "@airtop/sdk",
206
- "X-Fern-SDK-Version": "0.1.4",
207
- "User-Agent": "@airtop/sdk/0.1.4",
206
+ "X-Fern-SDK-Version": "0.1.5",
207
+ "User-Agent": "@airtop/sdk/0.1.5",
208
208
  "X-Fern-Runtime": core.RUNTIME.type,
209
209
  "X-Fern-Runtime-Version": core.RUNTIME.version,
210
210
  },
@@ -263,8 +263,8 @@ class Windows {
263
263
  Authorization: yield this._getAuthorizationHeader(),
264
264
  "X-Fern-Language": "JavaScript",
265
265
  "X-Fern-SDK-Name": "@airtop/sdk",
266
- "X-Fern-SDK-Version": "0.1.4",
267
- "User-Agent": "@airtop/sdk/0.1.4",
266
+ "X-Fern-SDK-Version": "0.1.5",
267
+ "User-Agent": "@airtop/sdk/0.1.5",
268
268
  "X-Fern-Runtime": core.RUNTIME.type,
269
269
  "X-Fern-Runtime-Version": core.RUNTIME.version,
270
270
  },
@@ -307,7 +307,74 @@ class Windows {
307
307
  /**
308
308
  * @param {string} sessionId - The session id for the window.
309
309
  * @param {string} windowId - The Airtop window id of the browser window to target with an Airtop AI prompt.
310
- * @param {Airtop.SessionContentPromptHandlerRequestBody} request
310
+ * @param {Airtop.SessionPageQueryHandlerRequestBody} request
311
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
312
+ *
313
+ * @example
314
+ * await client.windows.pageQuery("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
315
+ * prompt: "What is the main idea of this page?"
316
+ * })
317
+ */
318
+ pageQuery(sessionId, windowId, request, requestOptions) {
319
+ var _a, _b;
320
+ return __awaiter(this, void 0, void 0, function* () {
321
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
322
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/page-query`),
323
+ method: "POST",
324
+ headers: {
325
+ Authorization: yield this._getAuthorizationHeader(),
326
+ "X-Fern-Language": "JavaScript",
327
+ "X-Fern-SDK-Name": "@airtop/sdk",
328
+ "X-Fern-SDK-Version": "0.1.5",
329
+ "User-Agent": "@airtop/sdk/0.1.5",
330
+ "X-Fern-Runtime": core.RUNTIME.type,
331
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
332
+ },
333
+ contentType: "application/json",
334
+ requestType: "json",
335
+ body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
336
+ unrecognizedObjectKeys: "strip",
337
+ }),
338
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
339
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
340
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
341
+ });
342
+ if (_response.ok) {
343
+ return serializers.AiPromptResponse.parseOrThrow(_response.body, {
344
+ unrecognizedObjectKeys: "passthrough",
345
+ allowUnrecognizedUnionMembers: true,
346
+ allowUnrecognizedEnumValues: true,
347
+ skipValidation: true,
348
+ breadcrumbsPrefix: ["response"],
349
+ });
350
+ }
351
+ if (_response.error.reason === "status-code") {
352
+ throw new errors.AirtopError({
353
+ statusCode: _response.error.statusCode,
354
+ body: _response.error.body,
355
+ });
356
+ }
357
+ switch (_response.error.reason) {
358
+ case "non-json":
359
+ throw new errors.AirtopError({
360
+ statusCode: _response.error.statusCode,
361
+ body: _response.error.rawBody,
362
+ });
363
+ case "timeout":
364
+ throw new errors.AirtopTimeoutError();
365
+ case "unknown":
366
+ throw new errors.AirtopError({
367
+ message: _response.error.errorMessage,
368
+ });
369
+ }
370
+ });
371
+ }
372
+ /**
373
+ * This endpoint is deprecated. Please use the `pageQuery` endpoint instead.
374
+ *
375
+ * @param {string} sessionId - The session id for the window.
376
+ * @param {string} windowId - The Airtop window id of the browser window to target with an Airtop AI prompt.
377
+ * @param {Airtop.SessionPageQueryHandlerRequestBody} request
311
378
  * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
312
379
  *
313
380
  * @example
@@ -325,14 +392,14 @@ class Windows {
325
392
  Authorization: yield this._getAuthorizationHeader(),
326
393
  "X-Fern-Language": "JavaScript",
327
394
  "X-Fern-SDK-Name": "@airtop/sdk",
328
- "X-Fern-SDK-Version": "0.1.4",
329
- "User-Agent": "@airtop/sdk/0.1.4",
395
+ "X-Fern-SDK-Version": "0.1.5",
396
+ "User-Agent": "@airtop/sdk/0.1.5",
330
397
  "X-Fern-Runtime": core.RUNTIME.type,
331
398
  "X-Fern-Runtime-Version": core.RUNTIME.version,
332
399
  },
333
400
  contentType: "application/json",
334
401
  requestType: "json",
335
- body: serializers.SessionContentPromptHandlerRequestBody.jsonOrThrow(request, {
402
+ body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
336
403
  unrecognizedObjectKeys: "strip",
337
404
  }),
338
405
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -388,8 +455,8 @@ class Windows {
388
455
  Authorization: yield this._getAuthorizationHeader(),
389
456
  "X-Fern-Language": "JavaScript",
390
457
  "X-Fern-SDK-Name": "@airtop/sdk",
391
- "X-Fern-SDK-Version": "0.1.4",
392
- "User-Agent": "@airtop/sdk/0.1.4",
458
+ "X-Fern-SDK-Version": "0.1.5",
459
+ "User-Agent": "@airtop/sdk/0.1.5",
393
460
  "X-Fern-Runtime": core.RUNTIME.type,
394
461
  "X-Fern-Runtime-Version": core.RUNTIME.version,
395
462
  },
@@ -431,6 +498,8 @@ class Windows {
431
498
  });
432
499
  }
433
500
  /**
501
+ * This endpoint is deprecated. Please use the `pageQuery` endpoint and ask for a summary in the prompt instead.
502
+ *
434
503
  * @param {string} sessionId - The session id for the window.
435
504
  * @param {string} windowId - The Airtop window id of the browser window to summarize.
436
505
  * @param {Airtop.SessionSummaryHandlerRequestBody} request
@@ -449,8 +518,8 @@ class Windows {
449
518
  Authorization: yield this._getAuthorizationHeader(),
450
519
  "X-Fern-Language": "JavaScript",
451
520
  "X-Fern-SDK-Name": "@airtop/sdk",
452
- "X-Fern-SDK-Version": "0.1.4",
453
- "User-Agent": "@airtop/sdk/0.1.4",
521
+ "X-Fern-SDK-Version": "0.1.5",
522
+ "User-Agent": "@airtop/sdk/0.1.5",
454
523
  "X-Fern-Runtime": core.RUNTIME.type,
455
524
  "X-Fern-Runtime-Version": core.RUNTIME.version,
456
525
  },
@@ -1,12 +1,15 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Airtop from "../../../../index";
4
5
  /**
5
6
  * @example
6
7
  * {}
7
8
  */
8
9
  export interface SessionSummaryHandlerRequestBody {
9
10
  clientRequestId?: string;
11
+ /** Request configuration */
12
+ configuration?: Airtop.SummaryConfig;
10
13
  /** 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). */
11
14
  costThresholdCredits?: number;
12
15
  /** An optional prompt providing the Airtop AI model with additional direction or constraints about the summary (such as desired length). */
@@ -1,6 +1,5 @@
1
1
  export { type CreateWindowInputV1Body } from "./CreateWindowInputV1Body";
2
2
  export { type GetWindowInfoRequest } from "./GetWindowInfoRequest";
3
3
  export { type WindowLoadUrlV1Body } from "./WindowLoadUrlV1Body";
4
- export { type SessionContentPromptHandlerRequestBody } from "./SessionContentPromptHandlerRequestBody";
5
4
  export { type ScrapeContentRequest } from "./ScrapeContentRequest";
6
5
  export { type SessionSummaryHandlerRequestBody } from "./SessionSummaryHandlerRequestBody";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface PageQueryConfig {
5
+ /** JSON schema defining the structure of the output. If not provided, the format of the output might vary. */
6
+ outputSchema?: string;
7
+ }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export interface PromptContentExperimentalConfig {
4
+ export interface PageQueryExperimentalConfig {
5
5
  /** If set to 'enabled', Airtop AI will also analyze the web page visually when fulfilling the request. Note that this can add to both the execution time and cost of the operation. If the page is too large, the context window can be exceeded and the request will fail. If set to 'auto' or 'disabled', no visual analysis will be conducted. If 'followPaginationLinks' is set to true, visual analysis will be conducted unless 'includeVisualAnalysis' is explicitly set to 'disabled'. */
6
6
  includeVisualAnalysis?: string;
7
7
  }
@@ -1,22 +1,19 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- /**
5
- * @example
6
- * {
7
- * prompt: "What is the main idea of this page?"
8
- * }
9
- */
10
- export interface SessionContentPromptHandlerRequestBody {
4
+ import * as Airtop from "../index";
5
+ export interface SessionPageQueryHandlerRequestBody {
11
6
  clientRequestId?: string;
12
- /** 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). */
7
+ /** Request configuration */
8
+ configuration?: Airtop.PageQueryConfig;
9
+ /** 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). */
13
10
  costThresholdCredits?: number;
14
11
  /** Make a best effort attempt to load more content items than are originally displayed on the page, e.g. by following pagination links, clicking controls to load more content, utilizing infinite scrolling, etc. This can be quite a bit more costly, but may be necessary for sites that require additional interaction to show the needed results. You can provide constraints in your prompt (e.g. on the total number of pages or results to consider). */
15
12
  followPaginationLinks?: boolean;
16
13
  /** The prompt to submit about the content in the browser window. */
17
14
  prompt: string;
18
15
  /**
19
- * 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).
16
+ * 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).
20
17
  *
21
18
  * This setting does not extend the maximum session duration provided at the time of session creation.
22
19
  */
@@ -1,7 +1,7 @@
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 SummaryConfig {
6
- experimental?: Airtop.SummaryExperimentalConfig;
5
+ /** JSON schema defining the structure of the output. If not provided, the format of the output might vary. */
6
+ outputSchema?: string;
7
7
  }
@@ -16,10 +16,10 @@ export * from "./ExternalSessionAiResponseMetadataUsage";
16
16
  export * from "./ExternalSessionConfig";
17
17
  export * from "./ExternalSessionWithConnectionInfo";
18
18
  export * from "./Issue";
19
+ export * from "./PageQueryConfig";
20
+ export * from "./PageQueryExperimentalConfig";
19
21
  export * from "./Pagination";
20
22
  export * from "./ProfilesResponse";
21
- export * from "./PromptContentConfig";
22
- export * from "./PromptContentExperimentalConfig";
23
23
  export * from "./ScrapeResponse";
24
24
  export * from "./ScrapeResponseContent";
25
25
  export * from "./ScrapeResponseEnvelope";
@@ -29,6 +29,7 @@ export * from "./CustomProxy";
29
29
  export * from "./SessionConfigV1ProxyItem";
30
30
  export * from "./SessionConfigV1Proxy";
31
31
  export * from "./SessionConfigV1";
32
+ export * from "./SessionPageQueryHandlerRequestBody";
32
33
  export * from "./SessionResponse";
33
34
  export * from "./SessionsResponse";
34
35
  export * from "./SessionsWithPagination";
@@ -32,10 +32,10 @@ __exportStar(require("./ExternalSessionAiResponseMetadataUsage"), exports);
32
32
  __exportStar(require("./ExternalSessionConfig"), exports);
33
33
  __exportStar(require("./ExternalSessionWithConnectionInfo"), exports);
34
34
  __exportStar(require("./Issue"), exports);
35
+ __exportStar(require("./PageQueryConfig"), exports);
36
+ __exportStar(require("./PageQueryExperimentalConfig"), exports);
35
37
  __exportStar(require("./Pagination"), exports);
36
38
  __exportStar(require("./ProfilesResponse"), exports);
37
- __exportStar(require("./PromptContentConfig"), exports);
38
- __exportStar(require("./PromptContentExperimentalConfig"), exports);
39
39
  __exportStar(require("./ScrapeResponse"), exports);
40
40
  __exportStar(require("./ScrapeResponseContent"), exports);
41
41
  __exportStar(require("./ScrapeResponseEnvelope"), exports);
@@ -45,6 +45,7 @@ __exportStar(require("./CustomProxy"), exports);
45
45
  __exportStar(require("./SessionConfigV1ProxyItem"), exports);
46
46
  __exportStar(require("./SessionConfigV1Proxy"), exports);
47
47
  __exportStar(require("./SessionConfigV1"), exports);
48
+ __exportStar(require("./SessionPageQueryHandlerRequestBody"), exports);
48
49
  __exportStar(require("./SessionResponse"), exports);
49
50
  __exportStar(require("./SessionsResponse"), exports);
50
51
  __exportStar(require("./SessionsWithPagination"), exports);
@@ -4,10 +4,12 @@
4
4
  import * as serializers from "../../../../index";
5
5
  import * as Airtop from "../../../../../api/index";
6
6
  import * as core from "../../../../../core";
7
+ import { SummaryConfig } from "../../../../types/SummaryConfig";
7
8
  export declare const SessionSummaryHandlerRequestBody: core.serialization.Schema<serializers.SessionSummaryHandlerRequestBody.Raw, Airtop.SessionSummaryHandlerRequestBody>;
8
9
  export declare namespace SessionSummaryHandlerRequestBody {
9
10
  interface Raw {
10
11
  clientRequestId?: string | null;
12
+ configuration?: SummaryConfig.Raw | null;
11
13
  costThresholdCredits?: number | null;
12
14
  prompt?: string | null;
13
15
  timeThresholdSeconds?: number | null;
@@ -28,8 +28,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.SessionSummaryHandlerRequestBody = void 0;
30
30
  const core = __importStar(require("../../../../../core"));
31
+ const SummaryConfig_1 = require("../../../../types/SummaryConfig");
31
32
  exports.SessionSummaryHandlerRequestBody = core.serialization.object({
32
33
  clientRequestId: core.serialization.string().optional(),
34
+ configuration: SummaryConfig_1.SummaryConfig.optional(),
33
35
  costThresholdCredits: core.serialization.number().optional(),
34
36
  prompt: core.serialization.string().optional(),
35
37
  timeThresholdSeconds: core.serialization.number().optional(),
@@ -1,5 +1,4 @@
1
1
  export { CreateWindowInputV1Body } from "./CreateWindowInputV1Body";
2
2
  export { WindowLoadUrlV1Body } from "./WindowLoadUrlV1Body";
3
- export { SessionContentPromptHandlerRequestBody } from "./SessionContentPromptHandlerRequestBody";
4
3
  export { ScrapeContentRequest } from "./ScrapeContentRequest";
5
4
  export { SessionSummaryHandlerRequestBody } from "./SessionSummaryHandlerRequestBody";
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SessionSummaryHandlerRequestBody = exports.ScrapeContentRequest = exports.SessionContentPromptHandlerRequestBody = exports.WindowLoadUrlV1Body = exports.CreateWindowInputV1Body = void 0;
3
+ exports.SessionSummaryHandlerRequestBody = exports.ScrapeContentRequest = exports.WindowLoadUrlV1Body = exports.CreateWindowInputV1Body = void 0;
4
4
  var CreateWindowInputV1Body_1 = require("./CreateWindowInputV1Body");
5
5
  Object.defineProperty(exports, "CreateWindowInputV1Body", { enumerable: true, get: function () { return CreateWindowInputV1Body_1.CreateWindowInputV1Body; } });
6
6
  var WindowLoadUrlV1Body_1 = require("./WindowLoadUrlV1Body");
7
7
  Object.defineProperty(exports, "WindowLoadUrlV1Body", { enumerable: true, get: function () { return WindowLoadUrlV1Body_1.WindowLoadUrlV1Body; } });
8
- var SessionContentPromptHandlerRequestBody_1 = require("./SessionContentPromptHandlerRequestBody");
9
- Object.defineProperty(exports, "SessionContentPromptHandlerRequestBody", { enumerable: true, get: function () { return SessionContentPromptHandlerRequestBody_1.SessionContentPromptHandlerRequestBody; } });
10
8
  var ScrapeContentRequest_1 = require("./ScrapeContentRequest");
11
9
  Object.defineProperty(exports, "ScrapeContentRequest", { enumerable: true, get: function () { return ScrapeContentRequest_1.ScrapeContentRequest; } });
12
10
  var SessionSummaryHandlerRequestBody_1 = require("./SessionSummaryHandlerRequestBody");
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../index";
5
+ import * as Airtop from "../../api/index";
6
+ import * as core from "../../core";
7
+ export declare const PageQueryConfig: core.serialization.ObjectSchema<serializers.PageQueryConfig.Raw, Airtop.PageQueryConfig>;
8
+ export declare namespace PageQueryConfig {
9
+ interface Raw {
10
+ outputSchema?: string | null;
11
+ }
12
+ }
@@ -26,9 +26,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.PromptContentConfig = void 0;
29
+ exports.PageQueryConfig = void 0;
30
30
  const core = __importStar(require("../../core"));
31
- const PromptContentExperimentalConfig_1 = require("./PromptContentExperimentalConfig");
32
- exports.PromptContentConfig = core.serialization.object({
33
- experimental: PromptContentExperimentalConfig_1.PromptContentExperimentalConfig.optional(),
31
+ exports.PageQueryConfig = core.serialization.object({
32
+ outputSchema: core.serialization.string().optional(),
34
33
  });
@@ -4,8 +4,8 @@
4
4
  import * as serializers from "../index";
5
5
  import * as Airtop from "../../api/index";
6
6
  import * as core from "../../core";
7
- export declare const PromptContentExperimentalConfig: core.serialization.ObjectSchema<serializers.PromptContentExperimentalConfig.Raw, Airtop.PromptContentExperimentalConfig>;
8
- export declare namespace PromptContentExperimentalConfig {
7
+ export declare const PageQueryExperimentalConfig: core.serialization.ObjectSchema<serializers.PageQueryExperimentalConfig.Raw, Airtop.PageQueryExperimentalConfig>;
8
+ export declare namespace PageQueryExperimentalConfig {
9
9
  interface Raw {
10
10
  includeVisualAnalysis?: string | null;
11
11
  }
@@ -26,8 +26,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.PromptContentExperimentalConfig = void 0;
29
+ exports.PageQueryExperimentalConfig = void 0;
30
30
  const core = __importStar(require("../../core"));
31
- exports.PromptContentExperimentalConfig = core.serialization.object({
31
+ exports.PageQueryExperimentalConfig = core.serialization.object({
32
32
  includeVisualAnalysis: core.serialization.string().optional(),
33
33
  });
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../index";
5
+ import * as Airtop from "../../api/index";
6
+ import * as core from "../../core";
7
+ import { PageQueryConfig } from "./PageQueryConfig";
8
+ export declare const SessionPageQueryHandlerRequestBody: core.serialization.ObjectSchema<serializers.SessionPageQueryHandlerRequestBody.Raw, Airtop.SessionPageQueryHandlerRequestBody>;
9
+ export declare namespace SessionPageQueryHandlerRequestBody {
10
+ interface Raw {
11
+ clientRequestId?: string | null;
12
+ configuration?: PageQueryConfig.Raw | null;
13
+ costThresholdCredits?: number | null;
14
+ followPaginationLinks?: boolean | null;
15
+ prompt: string;
16
+ timeThresholdSeconds?: number | null;
17
+ }
18
+ }
@@ -26,10 +26,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.SessionContentPromptHandlerRequestBody = void 0;
30
- const core = __importStar(require("../../../../../core"));
31
- exports.SessionContentPromptHandlerRequestBody = core.serialization.object({
29
+ exports.SessionPageQueryHandlerRequestBody = void 0;
30
+ const core = __importStar(require("../../core"));
31
+ const PageQueryConfig_1 = require("./PageQueryConfig");
32
+ exports.SessionPageQueryHandlerRequestBody = core.serialization.object({
32
33
  clientRequestId: core.serialization.string().optional(),
34
+ configuration: PageQueryConfig_1.PageQueryConfig.optional(),
33
35
  costThresholdCredits: core.serialization.number().optional(),
34
36
  followPaginationLinks: core.serialization.boolean().optional(),
35
37
  prompt: core.serialization.string(),
@@ -4,10 +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 { SummaryExperimentalConfig } from "./SummaryExperimentalConfig";
8
7
  export declare const SummaryConfig: core.serialization.ObjectSchema<serializers.SummaryConfig.Raw, Airtop.SummaryConfig>;
9
8
  export declare namespace SummaryConfig {
10
9
  interface Raw {
11
- experimental?: SummaryExperimentalConfig.Raw | null;
10
+ outputSchema?: string | null;
12
11
  }
13
12
  }
@@ -28,7 +28,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.SummaryConfig = void 0;
30
30
  const core = __importStar(require("../../core"));
31
- const SummaryExperimentalConfig_1 = require("./SummaryExperimentalConfig");
32
31
  exports.SummaryConfig = core.serialization.object({
33
- experimental: SummaryExperimentalConfig_1.SummaryExperimentalConfig.optional(),
32
+ outputSchema: core.serialization.string().optional(),
34
33
  });
@@ -16,10 +16,10 @@ export * from "./ExternalSessionAiResponseMetadataUsage";
16
16
  export * from "./ExternalSessionConfig";
17
17
  export * from "./ExternalSessionWithConnectionInfo";
18
18
  export * from "./Issue";
19
+ export * from "./PageQueryConfig";
20
+ export * from "./PageQueryExperimentalConfig";
19
21
  export * from "./Pagination";
20
22
  export * from "./ProfilesResponse";
21
- export * from "./PromptContentConfig";
22
- export * from "./PromptContentExperimentalConfig";
23
23
  export * from "./ScrapeResponse";
24
24
  export * from "./ScrapeResponseContent";
25
25
  export * from "./ScrapeResponseEnvelope";
@@ -29,6 +29,7 @@ export * from "./CustomProxy";
29
29
  export * from "./SessionConfigV1ProxyItem";
30
30
  export * from "./SessionConfigV1Proxy";
31
31
  export * from "./SessionConfigV1";
32
+ export * from "./SessionPageQueryHandlerRequestBody";
32
33
  export * from "./SessionResponse";
33
34
  export * from "./SessionsResponse";
34
35
  export * from "./SessionsWithPagination";
@@ -32,10 +32,10 @@ __exportStar(require("./ExternalSessionAiResponseMetadataUsage"), exports);
32
32
  __exportStar(require("./ExternalSessionConfig"), exports);
33
33
  __exportStar(require("./ExternalSessionWithConnectionInfo"), exports);
34
34
  __exportStar(require("./Issue"), exports);
35
+ __exportStar(require("./PageQueryConfig"), exports);
36
+ __exportStar(require("./PageQueryExperimentalConfig"), exports);
35
37
  __exportStar(require("./Pagination"), exports);
36
38
  __exportStar(require("./ProfilesResponse"), exports);
37
- __exportStar(require("./PromptContentConfig"), exports);
38
- __exportStar(require("./PromptContentExperimentalConfig"), exports);
39
39
  __exportStar(require("./ScrapeResponse"), exports);
40
40
  __exportStar(require("./ScrapeResponseContent"), exports);
41
41
  __exportStar(require("./ScrapeResponseEnvelope"), exports);
@@ -45,6 +45,7 @@ __exportStar(require("./CustomProxy"), exports);
45
45
  __exportStar(require("./SessionConfigV1ProxyItem"), exports);
46
46
  __exportStar(require("./SessionConfigV1Proxy"), exports);
47
47
  __exportStar(require("./SessionConfigV1"), exports);
48
+ __exportStar(require("./SessionPageQueryHandlerRequestBody"), exports);
48
49
  __exportStar(require("./SessionResponse"), exports);
49
50
  __exportStar(require("./SessionsResponse"), exports);
50
51
  __exportStar(require("./SessionsWithPagination"), exports);
@@ -1,17 +1,18 @@
1
1
  import { AirtopClient as FernClient } from '../Client';
2
- import { AirtopWindows } from './AirtopWindows';
3
2
  import { AirtopSessions } from './AirtopSessions';
3
+ import { AirtopWindows } from './AirtopWindows';
4
4
  declare type AugmentedOptions = FernClient.Options & {
5
5
  debug?: boolean;
6
6
  };
7
7
  export declare class AirtopClient {
8
+ private _options;
8
9
  debug: boolean;
9
10
  private _client;
10
- private _windowsWrapper;
11
- private _sessionsWrapper;
12
- constructor(options: AugmentedOptions);
13
- get windows(): AirtopWindows;
11
+ private _windows;
12
+ private _sessions;
13
+ constructor(_options: AugmentedOptions);
14
14
  get sessions(): AirtopSessions;
15
+ get windows(): AirtopWindows;
15
16
  get profiles(): import("../api/resources/profiles/client/Client").Profiles;
16
17
  log(message: string): void;
17
18
  error(err: any): void;
@@ -2,20 +2,21 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AirtopClient = void 0;
4
4
  const Client_1 = require("../Client"); // alias the Fern generated client
5
- const AirtopWindows_1 = require("./AirtopWindows");
6
5
  const AirtopSessions_1 = require("./AirtopSessions");
6
+ const AirtopWindows_1 = require("./AirtopWindows");
7
7
  class AirtopClient {
8
- constructor(options) {
9
- this._client = new Client_1.AirtopClient(options);
10
- this.debug = (options === null || options === void 0 ? void 0 : options.debug) || false;
11
- this._windowsWrapper = new AirtopWindows_1.AirtopWindows(this._client, options === null || options === void 0 ? void 0 : options.apiKey);
12
- this._sessionsWrapper = new AirtopSessions_1.AirtopSessions(this._client, options === null || options === void 0 ? void 0 : options.debug);
13
- }
14
- get windows() {
15
- return this._windowsWrapper;
8
+ constructor(_options) {
9
+ this._options = _options;
10
+ this._client = new Client_1.AirtopClient(_options);
11
+ this.debug = (_options === null || _options === void 0 ? void 0 : _options.debug) || false;
16
12
  }
17
13
  get sessions() {
18
- return this._sessionsWrapper;
14
+ var _a;
15
+ return ((_a = this._sessions) !== null && _a !== void 0 ? _a : (this._sessions = new AirtopSessions_1.AirtopSessions(this._options, this.debug)));
16
+ }
17
+ get windows() {
18
+ var _a;
19
+ return ((_a = this._windows) !== null && _a !== void 0 ? _a : (this._windows = new AirtopWindows_1.AirtopWindows(this._options, this._options.apiKey)));
19
20
  }
20
21
  get profiles() {
21
22
  return this._client.profiles;
@@ -1,7 +1,5 @@
1
- import { AirtopClient as FernClient } from '../Client';
2
1
  import * as Airtop from '../api';
3
- import * as core from '../core';
4
- import { Sessions as SessionsNamespace } from '../api/resources/sessions/client/Client';
2
+ import { Sessions as SessionsClass, Sessions as SessionsNamespace } from '../api/resources/sessions/client/Client';
5
3
  export interface AirtopSessionConfigV1 extends Airtop.SessionConfigV1 {
6
4
  skipWaitSessionReady?: boolean;
7
5
  }
@@ -9,16 +7,18 @@ export interface AirtopSessionRestInputV1 {
9
7
  /** Session configuration */
10
8
  configuration?: AirtopSessionConfigV1;
11
9
  }
12
- export declare class AirtopSessions {
13
- private airtopClient;
10
+ export declare class AirtopSessions extends SessionsClass {
11
+ readonly _options: SessionsNamespace.Options;
14
12
  private debug;
15
- private _sessions;
16
- constructor(airtopClient: FernClient, debug?: boolean);
13
+ constructor(_options: SessionsNamespace.Options, debug?: boolean);
17
14
  log(message: any): void;
18
- list(request?: Airtop.SessionsListRequest, requestOptions?: SessionsNamespace.RequestOptions): Promise<Airtop.SessionsResponse>;
15
+ /**
16
+ * @param {Airtop.SessionRestInputV1} request
17
+ * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @example
20
+ * await client.sessions.create()
21
+ */
19
22
  create(request?: AirtopSessionRestInputV1, requestOptions?: SessionsNamespace.RequestOptions): Promise<Airtop.SessionResponse>;
20
23
  waitForSessionReady(id: string, requestOptions?: SessionsNamespace.RequestOptions): Promise<Airtop.SessionsEventsResponse | null>;
21
- getInfo(id: string, requestOptions?: SessionsNamespace.RequestOptions): Promise<Airtop.SessionResponse>;
22
- terminate(id: string, requestOptions?: SessionsNamespace.RequestOptions): Promise<void>;
23
- events(id: string, requestOptions?: SessionsNamespace.RequestOptions): Promise<core.Stream<Airtop.SessionsEventsResponse>>;
24
24
  }