@airtop/sdk 0.1.4 → 0.1.6

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 (118) 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 +52 -2
  5. package/api/resources/windows/client/Client.js +272 -16
  6. package/api/resources/windows/client/requests/SessionClickHandlerRequestBody.d.ts +25 -0
  7. package/api/resources/windows/client/requests/SessionHoverHandlerRequestBody.d.ts +23 -0
  8. package/api/resources/windows/client/requests/SessionSummaryHandlerRequestBody.d.ts +3 -0
  9. package/api/resources/windows/client/requests/SessionTypeHandlerRequestBody.d.ts +29 -0
  10. package/api/resources/windows/client/requests/index.d.ts +3 -1
  11. package/api/types/ClickConfig.d.ts +4 -0
  12. package/api/types/CustomProxy.d.ts +1 -1
  13. package/api/types/PageQueryConfig.d.ts +7 -0
  14. package/api/types/{PromptContentExperimentalConfig.d.ts → PageQueryExperimentalConfig.d.ts} +1 -1
  15. package/api/types/SessionConfigV1Proxy.d.ts +4 -1
  16. package/api/{resources/windows/client/requests/SessionContentPromptHandlerRequestBody.d.ts → types/SessionPageQueryHandlerRequestBody.d.ts} +6 -9
  17. package/api/types/SessionPageQueryHandlerRequestBody.js +5 -0
  18. package/api/types/SummaryConfig.d.ts +2 -2
  19. package/api/types/index.d.ts +4 -2
  20. package/api/types/index.js +4 -2
  21. package/dist/api/resources/profiles/client/Client.js +4 -4
  22. package/dist/api/resources/sessions/client/Client.d.ts +2 -2
  23. package/dist/api/resources/sessions/client/Client.js +12 -12
  24. package/dist/api/resources/windows/client/Client.d.ts +52 -2
  25. package/dist/api/resources/windows/client/Client.js +272 -16
  26. package/dist/api/resources/windows/client/requests/SessionClickHandlerRequestBody.d.ts +25 -0
  27. package/dist/api/resources/windows/client/requests/SessionClickHandlerRequestBody.js +5 -0
  28. package/dist/api/resources/windows/client/requests/SessionHoverHandlerRequestBody.d.ts +23 -0
  29. package/dist/api/resources/windows/client/requests/SessionHoverHandlerRequestBody.js +5 -0
  30. package/dist/api/resources/windows/client/requests/SessionSummaryHandlerRequestBody.d.ts +3 -0
  31. package/dist/api/resources/windows/client/requests/SessionTypeHandlerRequestBody.d.ts +29 -0
  32. package/dist/api/resources/windows/client/requests/SessionTypeHandlerRequestBody.js +5 -0
  33. package/dist/api/resources/windows/client/requests/index.d.ts +3 -1
  34. package/dist/api/types/ClickConfig.d.ts +4 -0
  35. package/dist/api/types/ClickConfig.js +5 -0
  36. package/dist/api/types/CustomProxy.d.ts +1 -1
  37. package/dist/api/types/PageQueryConfig.d.ts +7 -0
  38. package/dist/api/types/PageQueryConfig.js +5 -0
  39. package/dist/api/types/{PromptContentExperimentalConfig.d.ts → PageQueryExperimentalConfig.d.ts} +1 -1
  40. package/dist/api/types/PageQueryExperimentalConfig.js +5 -0
  41. package/dist/api/types/SessionConfigV1Proxy.d.ts +4 -1
  42. package/dist/api/{resources/windows/client/requests/SessionContentPromptHandlerRequestBody.d.ts → types/SessionPageQueryHandlerRequestBody.d.ts} +6 -9
  43. package/dist/api/types/SessionPageQueryHandlerRequestBody.js +5 -0
  44. package/dist/api/types/SummaryConfig.d.ts +2 -2
  45. package/dist/api/types/index.d.ts +4 -2
  46. package/dist/api/types/index.js +4 -2
  47. package/{serialization/resources/windows/client/requests/SessionContentPromptHandlerRequestBody.d.ts → dist/serialization/resources/windows/client/requests/SessionClickHandlerRequestBody.d.ts} +5 -4
  48. package/dist/serialization/resources/windows/client/requests/SessionClickHandlerRequestBody.js +38 -0
  49. package/dist/serialization/resources/windows/client/requests/SessionHoverHandlerRequestBody.d.ts +17 -0
  50. package/dist/serialization/resources/windows/client/requests/SessionHoverHandlerRequestBody.js +38 -0
  51. package/dist/serialization/resources/windows/client/requests/SessionSummaryHandlerRequestBody.d.ts +2 -0
  52. package/dist/serialization/resources/windows/client/requests/SessionSummaryHandlerRequestBody.js +2 -0
  53. package/dist/serialization/resources/windows/client/requests/SessionTypeHandlerRequestBody.d.ts +19 -0
  54. package/dist/serialization/resources/windows/client/requests/SessionTypeHandlerRequestBody.js +40 -0
  55. package/dist/serialization/resources/windows/client/requests/index.d.ts +3 -1
  56. package/dist/serialization/resources/windows/client/requests/index.js +7 -3
  57. package/dist/serialization/types/ClickConfig.d.ts +10 -0
  58. package/dist/serialization/types/ClickConfig.js +31 -0
  59. package/dist/serialization/types/PageQueryConfig.d.ts +12 -0
  60. package/dist/serialization/types/{PromptContentConfig.js → PageQueryConfig.js} +3 -4
  61. package/dist/serialization/types/{PromptContentExperimentalConfig.d.ts → PageQueryExperimentalConfig.d.ts} +2 -2
  62. package/dist/serialization/types/{PromptContentExperimentalConfig.js → PageQueryExperimentalConfig.js} +2 -2
  63. package/dist/serialization/types/SessionConfigV1Proxy.d.ts +1 -1
  64. package/dist/serialization/types/SessionConfigV1Proxy.js +5 -1
  65. package/dist/serialization/types/SessionPageQueryHandlerRequestBody.d.ts +18 -0
  66. package/{serialization/resources/windows/client/requests/SessionContentPromptHandlerRequestBody.js → dist/serialization/types/SessionPageQueryHandlerRequestBody.js} +5 -3
  67. package/dist/serialization/types/SummaryConfig.d.ts +1 -2
  68. package/dist/serialization/types/SummaryConfig.js +1 -2
  69. package/dist/serialization/types/index.d.ts +4 -2
  70. package/dist/serialization/types/index.js +4 -2
  71. package/dist/wrapper/AirtopClient.d.ts +6 -5
  72. package/dist/wrapper/AirtopClient.js +11 -10
  73. package/dist/wrapper/AirtopSessions.d.ts +11 -11
  74. package/dist/wrapper/AirtopSessions.js +16 -17
  75. package/dist/wrapper/AirtopWindows.d.ts +62 -14
  76. package/dist/wrapper/AirtopWindows.js +73 -31
  77. package/package.json +1 -1
  78. package/reference.md +295 -3
  79. package/{dist/serialization/resources/windows/client/requests/SessionContentPromptHandlerRequestBody.d.ts → serialization/resources/windows/client/requests/SessionClickHandlerRequestBody.d.ts} +5 -4
  80. package/serialization/resources/windows/client/requests/SessionClickHandlerRequestBody.js +38 -0
  81. package/serialization/resources/windows/client/requests/SessionHoverHandlerRequestBody.d.ts +17 -0
  82. package/serialization/resources/windows/client/requests/SessionHoverHandlerRequestBody.js +38 -0
  83. package/serialization/resources/windows/client/requests/SessionSummaryHandlerRequestBody.d.ts +2 -0
  84. package/serialization/resources/windows/client/requests/SessionSummaryHandlerRequestBody.js +2 -0
  85. package/serialization/resources/windows/client/requests/SessionTypeHandlerRequestBody.d.ts +19 -0
  86. package/serialization/resources/windows/client/requests/SessionTypeHandlerRequestBody.js +40 -0
  87. package/serialization/resources/windows/client/requests/index.d.ts +3 -1
  88. package/serialization/resources/windows/client/requests/index.js +7 -3
  89. package/serialization/types/ClickConfig.d.ts +10 -0
  90. package/serialization/types/ClickConfig.js +31 -0
  91. package/serialization/types/PageQueryConfig.d.ts +12 -0
  92. package/serialization/types/{PromptContentConfig.js → PageQueryConfig.js} +3 -4
  93. package/serialization/types/{PromptContentExperimentalConfig.d.ts → PageQueryExperimentalConfig.d.ts} +2 -2
  94. package/serialization/types/{PromptContentExperimentalConfig.js → PageQueryExperimentalConfig.js} +2 -2
  95. package/serialization/types/SessionConfigV1Proxy.d.ts +1 -1
  96. package/serialization/types/SessionConfigV1Proxy.js +5 -1
  97. package/serialization/types/SessionPageQueryHandlerRequestBody.d.ts +18 -0
  98. package/{dist/serialization/resources/windows/client/requests/SessionContentPromptHandlerRequestBody.js → serialization/types/SessionPageQueryHandlerRequestBody.js} +5 -3
  99. package/serialization/types/SummaryConfig.d.ts +1 -2
  100. package/serialization/types/SummaryConfig.js +1 -2
  101. package/serialization/types/index.d.ts +4 -2
  102. package/serialization/types/index.js +4 -2
  103. package/wrapper/AirtopClient.d.ts +6 -5
  104. package/wrapper/AirtopClient.js +11 -10
  105. package/wrapper/AirtopSessions.d.ts +11 -11
  106. package/wrapper/AirtopSessions.js +16 -17
  107. package/wrapper/AirtopWindows.d.ts +62 -14
  108. package/wrapper/AirtopWindows.js +73 -31
  109. package/api/types/PromptContentConfig.d.ts +0 -8
  110. package/dist/api/types/PromptContentConfig.d.ts +0 -8
  111. package/dist/serialization/types/PromptContentConfig.d.ts +0 -13
  112. package/serialization/types/PromptContentConfig.d.ts +0 -13
  113. /package/api/resources/windows/client/requests/{SessionContentPromptHandlerRequestBody.js → SessionClickHandlerRequestBody.js} +0 -0
  114. /package/api/{types/PromptContentConfig.js → resources/windows/client/requests/SessionHoverHandlerRequestBody.js} +0 -0
  115. /package/api/{types/PromptContentExperimentalConfig.js → resources/windows/client/requests/SessionTypeHandlerRequestBody.js} +0 -0
  116. /package/{dist/api/resources/windows/client/requests/SessionContentPromptHandlerRequestBody.js → api/types/ClickConfig.js} +0 -0
  117. /package/{dist/api/types/PromptContentConfig.js → api/types/PageQueryConfig.js} +0 -0
  118. /package/{dist/api/types/PromptContentExperimentalConfig.js → api/types/PageQueryExperimentalConfig.js} +0 -0
@@ -14,22 +14,70 @@ declare namespace seleniumWebdriver {
14
14
  createCDPConnection(domain: string): Promise<any>;
15
15
  }
16
16
  }
17
- import { AirtopClient as FernClient } from '../Client';
18
- import * as Airtop from '../api';
19
- import { Windows as WindowsNamespace } from '../api/resources/windows/client/Client';
20
- import * as core from '../core';
21
- export declare class AirtopWindows {
22
- private airtopClient;
17
+ import * as Airtop from "../api";
18
+ import { Windows as WindowsClass, Windows as WindowsNamespace } from "../api/resources/windows/client/Client";
19
+ import * as core from "../core";
20
+ export declare class AirtopWindows extends WindowsClass {
21
+ readonly _options: WindowsNamespace.Options;
23
22
  private apiKeySupplier;
24
- private _windows;
25
- constructor(airtopClient: FernClient, apiKeySupplier: core.Supplier<core.BearerToken | undefined>);
26
- create(sessionId: string, request: Airtop.CreateWindowInputV1Body, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowIdResponse>;
27
- loadUrl(sessionId: string, windowId: string, request: Airtop.WindowLoadUrlV1Body, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.EmptyResponse>;
28
- close(sessionId: string, windowId: string, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowIdResponse>;
29
- getWindowInfo(sessionId: string, windowId: string, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowResponse>;
30
- promptContent(sessionId: string, windowId: string, request: Airtop.SessionContentPromptHandlerRequestBody, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.AiPromptResponse>;
23
+ constructor(_options: WindowsNamespace.Options, apiKeySupplier: core.Supplier<core.BearerToken | undefined>);
24
+ /**
25
+ * @param {string} sessionId - The session id for the window.
26
+ * @param {string} windowId - The Airtop window id of the browser window to target with an Airtop AI prompt.
27
+ * @param {Airtop.SessionContentPromptHandlerRequestBody} request
28
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
29
+ *
30
+ * @deprecated Use pageQuery instead
31
+ * @example
32
+ * await client.windows.promptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
33
+ * prompt: "What is the main idea of this page?"
34
+ * })
35
+ */
36
+ promptContent(sessionId: string, windowId: string, request: Omit<Airtop.SessionPageQueryHandlerRequestBody, "configuration"> & {
37
+ configuration?: Omit<Airtop.SessionPageQueryHandlerRequestBody["configuration"], "outputSchema"> & {
38
+ outputSchema?: string | object;
39
+ };
40
+ }, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.AiPromptResponse>;
41
+ /**
42
+ * @param {string} sessionId - The session id for the window.
43
+ * @param {string} windowId - The Airtop window id of the browser window to target with an Airtop AI prompt.
44
+ * @param {Airtop.SessionPageQueryHandlerRequestBody} request
45
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
46
+ *
47
+ * @example
48
+ * await client.windows.pageQuery("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
49
+ * prompt: "What is the main idea of this page?"
50
+ * })
51
+ */
52
+ pageQuery(sessionId: string, windowId: string, request: Omit<Airtop.SessionPageQueryHandlerRequestBody, "configuration"> & {
53
+ configuration?: Omit<Airtop.SessionPageQueryHandlerRequestBody["configuration"], "outputSchema"> & {
54
+ outputSchema?: string | object;
55
+ };
56
+ }, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.AiPromptResponse>;
57
+ /**
58
+ * @param {string} sessionId - The session id for the window.
59
+ * @param {string} windowId - The Airtop window id of the browser window to scrape.
60
+ * @param {Airtop.ScrapeContentRequest} request
61
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
62
+ *
63
+ * @example
64
+ * await client.windows.scrapeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
65
+ */
31
66
  scrapeContent(sessionId: string, windowId: string, request?: Airtop.ScrapeContentRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.ScrapeResponse>;
32
- summarizeContent(sessionId: string, windowId: string, request?: Airtop.SessionSummaryHandlerRequestBody, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.AiPromptResponse>;
67
+ /**
68
+ * @param {string} sessionId - The session id for the window.
69
+ * @param {string} windowId - The Airtop window id of the browser window to summarize.
70
+ * @param {Airtop.SessionSummaryHandlerRequestBody} request
71
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
72
+ *
73
+ * @example
74
+ * await client.windows.summarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
75
+ */
76
+ summarizeContent(sessionId: string, windowId: string, request?: Omit<Airtop.SessionSummaryHandlerRequestBody, "configuration"> & {
77
+ configuration?: Omit<Airtop.SessionSummaryHandlerRequestBody["configuration"], "outputSchema"> & {
78
+ outputSchema?: string | object;
79
+ };
80
+ }, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.AiPromptResponse>;
33
81
  getWindowInfoForPuppeteerPage(session: Airtop.ExternalSessionWithConnectionInfo, page: puppeteer.Page, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowResponse>;
34
82
  getWindowInfoForPlaywrightPage(session: Airtop.ExternalSessionWithConnectionInfo, page: playwright.Page, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowResponse>;
35
83
  private executeSeleniumCDPCommand;
@@ -37,43 +37,85 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
38
  exports.AirtopWindows = void 0;
39
39
  const node_fetch_1 = __importDefault(require("node-fetch"));
40
+ const Client_1 = require("../api/resources/windows/client/Client");
40
41
  const core = __importStar(require("../core"));
41
- class AirtopWindows {
42
- constructor(airtopClient, apiKeySupplier) {
43
- this.airtopClient = airtopClient;
42
+ class AirtopWindows extends Client_1.Windows {
43
+ constructor(_options, apiKeySupplier) {
44
+ super(_options);
45
+ this._options = _options;
44
46
  this.apiKeySupplier = apiKeySupplier;
45
- this._windows = airtopClient.windows;
46
47
  }
47
- create(sessionId, request, requestOptions) {
48
- return __awaiter(this, void 0, void 0, function* () {
49
- return this._windows.create(sessionId, request, requestOptions);
50
- });
51
- }
52
- loadUrl(sessionId, windowId, request, requestOptions) {
53
- return __awaiter(this, void 0, void 0, function* () {
54
- return this._windows.loadUrl(sessionId, windowId, request, requestOptions);
48
+ /**
49
+ * @param {string} sessionId - The session id for the window.
50
+ * @param {string} windowId - The Airtop window id of the browser window to target with an Airtop AI prompt.
51
+ * @param {Airtop.SessionContentPromptHandlerRequestBody} request
52
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
53
+ *
54
+ * @deprecated Use pageQuery instead
55
+ * @example
56
+ * await client.windows.promptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
57
+ * prompt: "What is the main idea of this page?"
58
+ * })
59
+ */
60
+ promptContent(sessionId, windowId, request, requestOptions) {
61
+ const _super = Object.create(null, {
62
+ promptContent: { get: () => super.promptContent }
55
63
  });
56
- }
57
- close(sessionId, windowId, requestOptions) {
64
+ var _a, _b;
58
65
  return __awaiter(this, void 0, void 0, function* () {
59
- return this._windows.close(sessionId, windowId, requestOptions);
66
+ return _super.promptContent.call(this, sessionId, windowId, Object.assign(Object.assign({}, request), { configuration: Object.assign(Object.assign({}, request.configuration), { outputSchema: typeof ((_a = request.configuration) === null || _a === void 0 ? void 0 : _a.outputSchema) === "object"
67
+ ? JSON.stringify(request.configuration.outputSchema)
68
+ : (_b = request.configuration) === null || _b === void 0 ? void 0 : _b.outputSchema }) }), Object.assign(Object.assign({ timeoutInSeconds: 600 }, requestOptions), { maxRetries: 0 }));
60
69
  });
61
70
  }
62
- getWindowInfo(sessionId, windowId, request, requestOptions) {
63
- return __awaiter(this, void 0, void 0, function* () {
64
- return this._windows.getWindowInfo(sessionId, windowId, request, requestOptions);
71
+ /**
72
+ * @param {string} sessionId - The session id for the window.
73
+ * @param {string} windowId - The Airtop window id of the browser window to target with an Airtop AI prompt.
74
+ * @param {Airtop.SessionPageQueryHandlerRequestBody} request
75
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
76
+ *
77
+ * @example
78
+ * await client.windows.pageQuery("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
79
+ * prompt: "What is the main idea of this page?"
80
+ * })
81
+ */
82
+ pageQuery(sessionId, windowId, request, requestOptions) {
83
+ const _super = Object.create(null, {
84
+ pageQuery: { get: () => super.pageQuery }
65
85
  });
66
- }
67
- promptContent(sessionId, windowId, request, requestOptions) {
86
+ var _a, _b;
68
87
  return __awaiter(this, void 0, void 0, function* () {
69
- return this._windows.promptContent(sessionId, windowId, request, Object.assign(Object.assign({ timeoutInSeconds: 600 }, requestOptions), { maxRetries: 0 }));
88
+ return _super.pageQuery.call(this, sessionId, windowId, Object.assign(Object.assign({}, request), { configuration: Object.assign(Object.assign({}, request.configuration), { outputSchema: typeof ((_a = request.configuration) === null || _a === void 0 ? void 0 : _a.outputSchema) === "object"
89
+ ? JSON.stringify(request.configuration.outputSchema)
90
+ : (_b = request.configuration) === null || _b === void 0 ? void 0 : _b.outputSchema }) }), Object.assign(Object.assign({ timeoutInSeconds: 600 }, requestOptions), { maxRetries: 0 }));
70
91
  });
71
92
  }
93
+ /**
94
+ * @param {string} sessionId - The session id for the window.
95
+ * @param {string} windowId - The Airtop window id of the browser window to scrape.
96
+ * @param {Airtop.ScrapeContentRequest} request
97
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
98
+ *
99
+ * @example
100
+ * await client.windows.scrapeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
101
+ */
72
102
  scrapeContent(sessionId, windowId, request, requestOptions) {
73
- return this._windows.scrapeContent(sessionId, windowId, request, Object.assign({ timeoutInSeconds: 600 }, requestOptions));
103
+ return super.scrapeContent(sessionId, windowId, request, Object.assign({ timeoutInSeconds: 600 }, requestOptions));
74
104
  }
105
+ /**
106
+ * @param {string} sessionId - The session id for the window.
107
+ * @param {string} windowId - The Airtop window id of the browser window to summarize.
108
+ * @param {Airtop.SessionSummaryHandlerRequestBody} request
109
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
110
+ *
111
+ * @example
112
+ * await client.windows.summarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
113
+ */
75
114
  summarizeContent(sessionId, windowId, request, requestOptions) {
76
- return this._windows.summarizeContent(sessionId, windowId, request, Object.assign(Object.assign({ timeoutInSeconds: 600 }, requestOptions), { maxRetries: 0 }));
115
+ var _a, _b, _c;
116
+ return super.summarizeContent(sessionId, windowId, Object.assign(Object.assign({}, request), { configuration: Object.assign(Object.assign({}, request === null || request === void 0 ? void 0 : request.configuration), { outputSchema: typeof ((_a = request === null || request === void 0 ? void 0 : request.configuration) === null || _a === void 0 ? void 0 : _a.outputSchema) === "object"
117
+ ? JSON.stringify((_b = request === null || request === void 0 ? void 0 : request.configuration) === null || _b === void 0 ? void 0 : _b.outputSchema)
118
+ : (_c = request === null || request === void 0 ? void 0 : request.configuration) === null || _c === void 0 ? void 0 : _c.outputSchema }) }), Object.assign(Object.assign({ timeoutInSeconds: 600 }, requestOptions), { maxRetries: 0 }));
77
119
  }
78
120
  getWindowInfoForPuppeteerPage(session, page, request, requestOptions) {
79
121
  return __awaiter(this, void 0, void 0, function* () {
@@ -85,10 +127,10 @@ class AirtopWindows {
85
127
  return __awaiter(this, void 0, void 0, function* () {
86
128
  // Retrieve target information
87
129
  const cdpSession = yield page.context().newCDPSession(page);
88
- const { targetInfo } = yield cdpSession.send('Target.getTargetInfo');
130
+ const { targetInfo } = yield cdpSession.send("Target.getTargetInfo");
89
131
  const targetId = targetInfo.targetId;
90
132
  if (!targetId) {
91
- throw new Error('TargetId not found');
133
+ throw new Error("TargetId not found");
92
134
  }
93
135
  return yield this.getWindowInfo(session.id, targetId, request, requestOptions);
94
136
  });
@@ -98,17 +140,17 @@ class AirtopWindows {
98
140
  // Get the current WebDriver session ID
99
141
  const webDriverSessionId = (yield driver.getSession()).getId();
100
142
  if (!webDriverSessionId) {
101
- throw new Error('No WebDriver session available');
143
+ throw new Error("No WebDriver session available");
102
144
  }
103
145
  const chromedriverSessionUrl = `${session.chromedriverUrl}/session/${webDriverSessionId}/chromium/send_command_and_get_result`;
104
146
  const response = yield (0, node_fetch_1.default)(chromedriverSessionUrl, {
105
- method: 'POST',
147
+ method: "POST",
106
148
  headers: {
107
- 'Content-Type': 'application/json',
149
+ "Content-Type": "application/json",
108
150
  Authorization: `Bearer ${apiKey}`,
109
151
  },
110
152
  body: JSON.stringify({
111
- cmd: 'Target.getTargetInfo',
153
+ cmd: "Target.getTargetInfo",
112
154
  params: {},
113
155
  }),
114
156
  });
@@ -119,10 +161,10 @@ class AirtopWindows {
119
161
  var _a, _b;
120
162
  return __awaiter(this, void 0, void 0, function* () {
121
163
  const apiKey = yield core.Supplier.get(this.apiKeySupplier);
122
- const result = yield this.executeSeleniumCDPCommand(driver, session, apiKey || '');
164
+ const result = yield this.executeSeleniumCDPCommand(driver, session, apiKey || "");
123
165
  const targetId = (_b = (_a = result === null || result === void 0 ? void 0 : result.value) === null || _a === void 0 ? void 0 : _a.targetInfo) === null || _b === void 0 ? void 0 : _b.targetId;
124
166
  if (!targetId) {
125
- throw new Error('TargetId not found');
167
+ throw new Error("TargetId not found");
126
168
  }
127
169
  return yield this.getWindowInfo(session.id, targetId, request, requestOptions);
128
170
  });
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Airtop from "../index";
5
- export interface PromptContentConfig {
6
- /** Experimental configuration options. These may be subject to change and are not guaranteed to be stable across versions. */
7
- experimental?: Airtop.PromptContentExperimentalConfig;
8
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Airtop from "../index";
5
- export interface PromptContentConfig {
6
- /** Experimental configuration options. These may be subject to change and are not guaranteed to be stable across versions. */
7
- experimental?: Airtop.PromptContentExperimentalConfig;
8
- }
@@ -1,13 +0,0 @@
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 { PromptContentExperimentalConfig } from "./PromptContentExperimentalConfig";
8
- export declare const PromptContentConfig: core.serialization.ObjectSchema<serializers.PromptContentConfig.Raw, Airtop.PromptContentConfig>;
9
- export declare namespace PromptContentConfig {
10
- interface Raw {
11
- experimental?: PromptContentExperimentalConfig.Raw | null;
12
- }
13
- }
@@ -1,13 +0,0 @@
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 { PromptContentExperimentalConfig } from "./PromptContentExperimentalConfig";
8
- export declare const PromptContentConfig: core.serialization.ObjectSchema<serializers.PromptContentConfig.Raw, Airtop.PromptContentConfig>;
9
- export declare namespace PromptContentConfig {
10
- interface Raw {
11
- experimental?: PromptContentExperimentalConfig.Raw | null;
12
- }
13
- }