@airtop/sdk 0.1.37-beta1 → 0.1.37

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 (141) hide show
  1. package/README.md +10 -9
  2. package/api/resources/automations/client/Client.js +4 -4
  3. package/api/resources/files/client/Client.js +4 -4
  4. package/api/resources/profiles/client/Client.js +1 -1
  5. package/api/resources/requests/client/Client.js +1 -1
  6. package/api/resources/sessions/client/Client.js +6 -6
  7. package/api/resources/sessions/types/SessionsEventsResponse.d.ts +7 -7
  8. package/api/resources/sessions/types/index.d.ts +2 -2
  9. package/api/resources/sessions/types/index.js +2 -2
  10. package/api/resources/windows/client/Client.d.ts +0 -126
  11. package/api/resources/windows/client/Client.js +21 -577
  12. package/api/resources/windows/client/requests/index.d.ts +0 -10
  13. package/api/types/index.d.ts +0 -1
  14. package/api/types/index.js +0 -1
  15. package/dist/api/resources/automations/client/Client.js +4 -4
  16. package/dist/api/resources/files/client/Client.js +4 -4
  17. package/dist/api/resources/profiles/client/Client.js +1 -1
  18. package/dist/api/resources/requests/client/Client.js +1 -1
  19. package/dist/api/resources/sessions/client/Client.js +6 -6
  20. package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +7 -7
  21. package/dist/api/resources/sessions/types/index.d.ts +2 -2
  22. package/dist/api/resources/sessions/types/index.js +2 -2
  23. package/dist/api/resources/windows/client/Client.d.ts +0 -126
  24. package/dist/api/resources/windows/client/Client.js +21 -577
  25. package/dist/api/resources/windows/client/requests/index.d.ts +0 -10
  26. package/dist/api/types/index.d.ts +0 -1
  27. package/dist/api/types/index.js +0 -1
  28. package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +9 -9
  29. package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +4 -4
  30. package/dist/serialization/resources/sessions/types/index.d.ts +2 -2
  31. package/dist/serialization/resources/sessions/types/index.js +2 -2
  32. package/dist/serialization/resources/windows/client/requests/index.d.ts +0 -10
  33. package/dist/serialization/resources/windows/client/requests/index.js +1 -21
  34. package/dist/serialization/types/index.d.ts +0 -1
  35. package/dist/serialization/types/index.js +0 -1
  36. package/dist/version.d.ts +1 -1
  37. package/dist/version.js +1 -1
  38. package/dist/wrapper/AirtopSessions.d.ts +21 -22
  39. package/dist/wrapper/AirtopSessions.js +40 -25
  40. package/package.json +1 -1
  41. package/reference.md +24 -766
  42. package/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +9 -9
  43. package/serialization/resources/sessions/types/SessionsEventsResponse.js +4 -4
  44. package/serialization/resources/sessions/types/index.d.ts +2 -2
  45. package/serialization/resources/sessions/types/index.js +2 -2
  46. package/serialization/resources/windows/client/requests/index.d.ts +0 -10
  47. package/serialization/resources/windows/client/requests/index.js +1 -21
  48. package/serialization/types/index.d.ts +0 -1
  49. package/serialization/types/index.js +0 -1
  50. package/version.d.ts +1 -1
  51. package/version.js +1 -1
  52. package/wrapper/AirtopSessions.d.ts +21 -22
  53. package/wrapper/AirtopSessions.js +40 -25
  54. package/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
  55. package/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
  56. package/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
  57. package/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
  58. package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
  59. package/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
  60. package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
  61. package/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
  62. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
  63. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
  64. package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
  65. package/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
  66. package/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
  67. package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
  68. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
  69. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
  70. package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
  71. package/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
  72. package/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -25
  73. package/api/resources/windows/client/requests/OperatorPromptV1Body.js +0 -5
  74. package/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -9
  75. package/api/types/AsyncOperatorPromptResponseEnvelope.js +0 -5
  76. package/dist/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
  77. package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
  78. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
  79. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
  80. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
  81. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
  82. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
  83. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
  84. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
  85. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
  86. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
  87. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
  88. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
  89. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
  90. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
  91. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
  92. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
  93. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
  94. package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -25
  95. package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.js +0 -5
  96. package/dist/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -9
  97. package/dist/api/types/AsyncOperatorPromptResponseEnvelope.js +0 -5
  98. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
  99. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -51
  100. package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -19
  101. package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -50
  102. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -19
  103. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -50
  104. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
  105. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -51
  106. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
  107. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -50
  108. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
  109. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -51
  110. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
  111. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -49
  112. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
  113. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -50
  114. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
  115. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -55
  116. package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -17
  117. package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +0 -48
  118. package/dist/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -15
  119. package/dist/serialization/types/AsyncOperatorPromptResponseEnvelope.js +0 -46
  120. package/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
  121. package/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -51
  122. package/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -19
  123. package/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -50
  124. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -19
  125. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -50
  126. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
  127. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -51
  128. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
  129. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -50
  130. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
  131. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -51
  132. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
  133. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -49
  134. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
  135. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -50
  136. package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
  137. package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -55
  138. package/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -17
  139. package/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +0 -48
  140. package/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -15
  141. package/serialization/types/AsyncOperatorPromptResponseEnvelope.js +0 -46
@@ -58,63 +58,6 @@ class Windows {
58
58
  constructor(_options) {
59
59
  this._options = _options;
60
60
  }
61
- /**
62
- * Execute a click interaction in a specific browser window asynchronously
63
- *
64
- * @param {string} sessionId - The session id for the window.
65
- * @param {string} windowId - The Airtop window id of the browser window.
66
- * @param {Airtop.AsyncClickRequest} request
67
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
68
- *
69
- * @example
70
- * await client.windows.asyncClick("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
71
- * elementDescription: "The login button"
72
- * })
73
- */
74
- asyncClick(sessionId, windowId, request, requestOptions) {
75
- return __awaiter(this, void 0, void 0, function* () {
76
- var _a, _b, _c;
77
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/click`),
79
- method: "POST",
80
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
- contentType: "application/json",
82
- requestType: "json",
83
- body: serializers.AsyncClickRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
84
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
85
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
86
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
87
- });
88
- if (_response.ok) {
89
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
90
- unrecognizedObjectKeys: "passthrough",
91
- allowUnrecognizedUnionMembers: true,
92
- allowUnrecognizedEnumValues: true,
93
- skipValidation: true,
94
- breadcrumbsPrefix: ["response"],
95
- });
96
- }
97
- if (_response.error.reason === "status-code") {
98
- throw new errors.AirtopError({
99
- statusCode: _response.error.statusCode,
100
- body: _response.error.body,
101
- });
102
- }
103
- switch (_response.error.reason) {
104
- case "non-json":
105
- throw new errors.AirtopError({
106
- statusCode: _response.error.statusCode,
107
- body: _response.error.rawBody,
108
- });
109
- case "timeout":
110
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/click.");
111
- case "unknown":
112
- throw new errors.AirtopError({
113
- message: _response.error.errorMessage,
114
- });
115
- }
116
- });
117
- }
118
61
  /**
119
62
  * Create an automation of a browser window asynchronously
120
63
  *
@@ -132,7 +75,7 @@ class Windows {
132
75
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
133
76
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-automation`),
134
77
  method: "POST",
135
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
78
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
136
79
  contentType: "application/json",
137
80
  requestType: "json",
138
81
  body: serializers.AsyncCreateAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -187,7 +130,7 @@ class Windows {
187
130
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
188
131
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-form-filler`),
189
132
  method: "POST",
190
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
133
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
191
134
  contentType: "application/json",
192
135
  requestType: "json",
193
136
  body: serializers.AsyncCreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -244,7 +187,7 @@ class Windows {
244
187
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
245
188
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/execute-automation`),
246
189
  method: "POST",
247
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
190
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
248
191
  contentType: "application/json",
249
192
  requestType: "json",
250
193
  body: serializers.AsyncExecuteAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -301,7 +244,7 @@ class Windows {
301
244
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
302
245
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/fill-form`),
303
246
  method: "POST",
304
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
247
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
305
248
  contentType: "application/json",
306
249
  requestType: "json",
307
250
  body: serializers.AsyncFillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -339,448 +282,6 @@ class Windows {
339
282
  }
340
283
  });
341
284
  }
342
- /**
343
- * @param {string} sessionId - The session id for the window.
344
- * @param {string} windowId - The Airtop window id of the browser window.
345
- * @param {Airtop.AsyncHoverRequest} request
346
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
347
- *
348
- * @example
349
- * await client.windows.asyncHover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
350
- * elementDescription: "The search box input in the top right corner"
351
- * })
352
- */
353
- asyncHover(sessionId, windowId, request, requestOptions) {
354
- return __awaiter(this, void 0, void 0, function* () {
355
- var _a, _b, _c;
356
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
357
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/hover`),
358
- method: "POST",
359
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
360
- contentType: "application/json",
361
- requestType: "json",
362
- body: serializers.AsyncHoverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
363
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
364
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
365
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
366
- });
367
- if (_response.ok) {
368
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
369
- unrecognizedObjectKeys: "passthrough",
370
- allowUnrecognizedUnionMembers: true,
371
- allowUnrecognizedEnumValues: true,
372
- skipValidation: true,
373
- breadcrumbsPrefix: ["response"],
374
- });
375
- }
376
- if (_response.error.reason === "status-code") {
377
- throw new errors.AirtopError({
378
- statusCode: _response.error.statusCode,
379
- body: _response.error.body,
380
- });
381
- }
382
- switch (_response.error.reason) {
383
- case "non-json":
384
- throw new errors.AirtopError({
385
- statusCode: _response.error.statusCode,
386
- body: _response.error.rawBody,
387
- });
388
- case "timeout":
389
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/hover.");
390
- case "unknown":
391
- throw new errors.AirtopError({
392
- message: _response.error.errorMessage,
393
- });
394
- }
395
- });
396
- }
397
- /**
398
- * @param {string} sessionId - The session id for the window.
399
- * @param {string} windowId - The Airtop window id of the browser window.
400
- * @param {Airtop.AsyncMonitorRequest} request
401
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
402
- *
403
- * @example
404
- * await client.windows.asyncMonitor("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
405
- * condition: "Determine if the user appears to be signed in to the website"
406
- * })
407
- */
408
- asyncMonitor(sessionId, windowId, request, requestOptions) {
409
- return __awaiter(this, void 0, void 0, function* () {
410
- var _a, _b, _c;
411
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
412
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/monitor`),
413
- method: "POST",
414
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
415
- contentType: "application/json",
416
- requestType: "json",
417
- body: serializers.AsyncMonitorRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
418
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
419
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
420
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
421
- });
422
- if (_response.ok) {
423
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
424
- unrecognizedObjectKeys: "passthrough",
425
- allowUnrecognizedUnionMembers: true,
426
- allowUnrecognizedEnumValues: true,
427
- skipValidation: true,
428
- breadcrumbsPrefix: ["response"],
429
- });
430
- }
431
- if (_response.error.reason === "status-code") {
432
- throw new errors.AirtopError({
433
- statusCode: _response.error.statusCode,
434
- body: _response.error.body,
435
- });
436
- }
437
- switch (_response.error.reason) {
438
- case "non-json":
439
- throw new errors.AirtopError({
440
- statusCode: _response.error.statusCode,
441
- body: _response.error.rawBody,
442
- });
443
- case "timeout":
444
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/monitor.");
445
- case "unknown":
446
- throw new errors.AirtopError({
447
- message: _response.error.errorMessage,
448
- });
449
- }
450
- });
451
- }
452
- /**
453
- * @param {string} sessionId - The session id for the window.
454
- * @param {string} windowId - The Airtop window id of the browser window.
455
- * @param {Airtop.AsyncPageQueryRequest} request
456
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
457
- *
458
- * @example
459
- * await client.windows.asyncPageQuery("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
460
- * prompt: "What is the main idea of this page?"
461
- * })
462
- */
463
- asyncPageQuery(sessionId, windowId, request, requestOptions) {
464
- return __awaiter(this, void 0, void 0, function* () {
465
- var _a, _b, _c;
466
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
467
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/page-query`),
468
- method: "POST",
469
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
470
- contentType: "application/json",
471
- requestType: "json",
472
- body: serializers.AsyncPageQueryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
473
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
474
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
475
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
476
- });
477
- if (_response.ok) {
478
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
479
- unrecognizedObjectKeys: "passthrough",
480
- allowUnrecognizedUnionMembers: true,
481
- allowUnrecognizedEnumValues: true,
482
- skipValidation: true,
483
- breadcrumbsPrefix: ["response"],
484
- });
485
- }
486
- if (_response.error.reason === "status-code") {
487
- throw new errors.AirtopError({
488
- statusCode: _response.error.statusCode,
489
- body: _response.error.body,
490
- });
491
- }
492
- switch (_response.error.reason) {
493
- case "non-json":
494
- throw new errors.AirtopError({
495
- statusCode: _response.error.statusCode,
496
- body: _response.error.rawBody,
497
- });
498
- case "timeout":
499
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/page-query.");
500
- case "unknown":
501
- throw new errors.AirtopError({
502
- message: _response.error.errorMessage,
503
- });
504
- }
505
- });
506
- }
507
- /**
508
- * @param {string} sessionId - The session id for the window.
509
- * @param {string} windowId - The Airtop window id of the browser window.
510
- * @param {Airtop.AsyncPaginatedExtractionRequest} request
511
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
512
- *
513
- * @example
514
- * await client.windows.asyncPaginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
515
- * prompt: "This site contains a list of results about <provide details about the list>. Navigate through 3 pages of results and return the title and <provide details about the data you want to extract> about each result in this list."
516
- * })
517
- */
518
- asyncPaginatedExtraction(sessionId, windowId, request, requestOptions) {
519
- return __awaiter(this, void 0, void 0, function* () {
520
- var _a, _b, _c;
521
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
522
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/paginated-extraction`),
523
- method: "POST",
524
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
525
- contentType: "application/json",
526
- requestType: "json",
527
- body: serializers.AsyncPaginatedExtractionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
528
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
529
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
530
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
531
- });
532
- if (_response.ok) {
533
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
534
- unrecognizedObjectKeys: "passthrough",
535
- allowUnrecognizedUnionMembers: true,
536
- allowUnrecognizedEnumValues: true,
537
- skipValidation: true,
538
- breadcrumbsPrefix: ["response"],
539
- });
540
- }
541
- if (_response.error.reason === "status-code") {
542
- throw new errors.AirtopError({
543
- statusCode: _response.error.statusCode,
544
- body: _response.error.body,
545
- });
546
- }
547
- switch (_response.error.reason) {
548
- case "non-json":
549
- throw new errors.AirtopError({
550
- statusCode: _response.error.statusCode,
551
- body: _response.error.rawBody,
552
- });
553
- case "timeout":
554
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/paginated-extraction.");
555
- case "unknown":
556
- throw new errors.AirtopError({
557
- message: _response.error.errorMessage,
558
- });
559
- }
560
- });
561
- }
562
- /**
563
- * This endpoint is deprecated. Please use the `pageQuery` endpoint instead.
564
- *
565
- * @param {string} sessionId - The session id for the window.
566
- * @param {string} windowId - The Airtop window id of the browser window.
567
- * @param {Airtop.AsyncPromptContentRequest} request
568
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
569
- *
570
- * @example
571
- * await client.windows.asyncPromptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
572
- * prompt: "What is the main idea of this page?"
573
- * })
574
- */
575
- asyncPromptContent(sessionId, windowId, request, requestOptions) {
576
- return __awaiter(this, void 0, void 0, function* () {
577
- var _a, _b, _c;
578
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
579
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
580
- method: "POST",
581
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
582
- contentType: "application/json",
583
- requestType: "json",
584
- body: serializers.AsyncPromptContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
585
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
586
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
587
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
588
- });
589
- if (_response.ok) {
590
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
591
- unrecognizedObjectKeys: "passthrough",
592
- allowUnrecognizedUnionMembers: true,
593
- allowUnrecognizedEnumValues: true,
594
- skipValidation: true,
595
- breadcrumbsPrefix: ["response"],
596
- });
597
- }
598
- if (_response.error.reason === "status-code") {
599
- throw new errors.AirtopError({
600
- statusCode: _response.error.statusCode,
601
- body: _response.error.body,
602
- });
603
- }
604
- switch (_response.error.reason) {
605
- case "non-json":
606
- throw new errors.AirtopError({
607
- statusCode: _response.error.statusCode,
608
- body: _response.error.rawBody,
609
- });
610
- case "timeout":
611
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/prompt-content.");
612
- case "unknown":
613
- throw new errors.AirtopError({
614
- message: _response.error.errorMessage,
615
- });
616
- }
617
- });
618
- }
619
- /**
620
- * Take a screenshot of the current viewport of a browser window asynchronously
621
- *
622
- * @param {string} sessionId - The session id for the window.
623
- * @param {string} windowId - The Airtop window id of the browser window.
624
- * @param {Airtop.AsyncScreenshotRequest} request
625
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
626
- *
627
- * @example
628
- * await client.windows.asyncScreenshot("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
629
- */
630
- asyncScreenshot(sessionId_1, windowId_1) {
631
- return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
632
- var _a, _b, _c;
633
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
634
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/screenshot`),
635
- method: "POST",
636
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
637
- contentType: "application/json",
638
- requestType: "json",
639
- body: serializers.AsyncScreenshotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
640
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
641
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
642
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
643
- });
644
- if (_response.ok) {
645
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
646
- unrecognizedObjectKeys: "passthrough",
647
- allowUnrecognizedUnionMembers: true,
648
- allowUnrecognizedEnumValues: true,
649
- skipValidation: true,
650
- breadcrumbsPrefix: ["response"],
651
- });
652
- }
653
- if (_response.error.reason === "status-code") {
654
- throw new errors.AirtopError({
655
- statusCode: _response.error.statusCode,
656
- body: _response.error.body,
657
- });
658
- }
659
- switch (_response.error.reason) {
660
- case "non-json":
661
- throw new errors.AirtopError({
662
- statusCode: _response.error.statusCode,
663
- body: _response.error.rawBody,
664
- });
665
- case "timeout":
666
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/screenshot.");
667
- case "unknown":
668
- throw new errors.AirtopError({
669
- message: _response.error.errorMessage,
670
- });
671
- }
672
- });
673
- }
674
- /**
675
- * This endpoint is deprecated. Please use the `pageQuery` endpoint and ask for a summary in the prompt instead.
676
- *
677
- * @param {string} sessionId - The session id for the window.
678
- * @param {string} windowId - The Airtop window id of the browser window to summarize.
679
- * @param {Airtop.AsyncSummarizeContentRequest} request
680
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
681
- *
682
- * @example
683
- * await client.windows.asyncSummarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
684
- */
685
- asyncSummarizeContent(sessionId_1, windowId_1) {
686
- return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
687
- var _a, _b, _c;
688
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
689
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/summarize-content`),
690
- method: "POST",
691
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
692
- contentType: "application/json",
693
- requestType: "json",
694
- body: serializers.AsyncSummarizeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
695
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
696
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
697
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
698
- });
699
- if (_response.ok) {
700
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
701
- unrecognizedObjectKeys: "passthrough",
702
- allowUnrecognizedUnionMembers: true,
703
- allowUnrecognizedEnumValues: true,
704
- skipValidation: true,
705
- breadcrumbsPrefix: ["response"],
706
- });
707
- }
708
- if (_response.error.reason === "status-code") {
709
- throw new errors.AirtopError({
710
- statusCode: _response.error.statusCode,
711
- body: _response.error.body,
712
- });
713
- }
714
- switch (_response.error.reason) {
715
- case "non-json":
716
- throw new errors.AirtopError({
717
- statusCode: _response.error.statusCode,
718
- body: _response.error.rawBody,
719
- });
720
- case "timeout":
721
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/summarize-content.");
722
- case "unknown":
723
- throw new errors.AirtopError({
724
- message: _response.error.errorMessage,
725
- });
726
- }
727
- });
728
- }
729
- /**
730
- * @param {string} sessionId - The session id for the window.
731
- * @param {string} windowId - The Airtop window id of the browser window.
732
- * @param {Airtop.AsyncTypeRequest} request
733
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
734
- *
735
- * @example
736
- * await client.windows.asyncType("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
737
- * text: "Example text"
738
- * })
739
- */
740
- asyncType(sessionId, windowId, request, requestOptions) {
741
- return __awaiter(this, void 0, void 0, function* () {
742
- var _a, _b, _c;
743
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
744
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/type`),
745
- method: "POST",
746
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
747
- contentType: "application/json",
748
- requestType: "json",
749
- body: serializers.AsyncTypeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
750
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
751
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
752
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
753
- });
754
- if (_response.ok) {
755
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
756
- unrecognizedObjectKeys: "passthrough",
757
- allowUnrecognizedUnionMembers: true,
758
- allowUnrecognizedEnumValues: true,
759
- skipValidation: true,
760
- breadcrumbsPrefix: ["response"],
761
- });
762
- }
763
- if (_response.error.reason === "status-code") {
764
- throw new errors.AirtopError({
765
- statusCode: _response.error.statusCode,
766
- body: _response.error.body,
767
- });
768
- }
769
- switch (_response.error.reason) {
770
- case "non-json":
771
- throw new errors.AirtopError({
772
- statusCode: _response.error.statusCode,
773
- body: _response.error.rawBody,
774
- });
775
- case "timeout":
776
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/type.");
777
- case "unknown":
778
- throw new errors.AirtopError({
779
- message: _response.error.errorMessage,
780
- });
781
- }
782
- });
783
- }
784
285
  /**
785
286
  * Creates a new browser window in a session. Optionally, you can specify a url to load on the window upon creation.
786
287
  *
@@ -797,7 +298,7 @@ class Windows {
797
298
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
798
299
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows`),
799
300
  method: "POST",
800
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
301
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
801
302
  contentType: "application/json",
802
303
  requestType: "json",
803
304
  body: serializers.CreateWindowInputV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -865,7 +366,7 @@ class Windows {
865
366
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
866
367
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
867
368
  method: "GET",
868
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
369
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
869
370
  contentType: "application/json",
870
371
  queryParameters: _queryParams,
871
372
  requestType: "json",
@@ -922,7 +423,7 @@ class Windows {
922
423
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
923
424
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
924
425
  method: "POST",
925
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
426
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
926
427
  contentType: "application/json",
927
428
  requestType: "json",
928
429
  body: serializers.WindowLoadUrlV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -976,7 +477,7 @@ class Windows {
976
477
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
977
478
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
978
479
  method: "DELETE",
979
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
480
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
980
481
  contentType: "application/json",
981
482
  requestType: "json",
982
483
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1032,7 +533,7 @@ class Windows {
1032
533
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1033
534
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/click`),
1034
535
  method: "POST",
1035
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
536
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1036
537
  contentType: "application/json",
1037
538
  requestType: "json",
1038
539
  body: serializers.SessionClickHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1087,7 +588,7 @@ class Windows {
1087
588
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1088
589
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-form-filler`),
1089
590
  method: "POST",
1090
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
591
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1091
592
  contentType: "application/json",
1092
593
  requestType: "json",
1093
594
  body: serializers.CreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1144,7 +645,7 @@ class Windows {
1144
645
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1145
646
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/fill-form`),
1146
647
  method: "POST",
1147
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
648
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1148
649
  contentType: "application/json",
1149
650
  requestType: "json",
1150
651
  body: serializers.FillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1201,7 +702,7 @@ class Windows {
1201
702
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1202
703
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/hover`),
1203
704
  method: "POST",
1204
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
705
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1205
706
  contentType: "application/json",
1206
707
  requestType: "json",
1207
708
  body: serializers.SessionHoverHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1256,7 +757,7 @@ class Windows {
1256
757
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1257
758
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/monitor`),
1258
759
  method: "POST",
1259
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
760
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1260
761
  contentType: "application/json",
1261
762
  requestType: "json",
1262
763
  body: serializers.SessionMonitorHandlerRequestBody.jsonOrThrow(request, {
@@ -1296,63 +797,6 @@ class Windows {
1296
797
  }
1297
798
  });
1298
799
  }
1299
- /**
1300
- * Prompt OpenAI Operator
1301
- *
1302
- * @param {string} sessionId - ID of the session that owns the window.
1303
- * @param {string} windowId - Airtop window ID of the browser window.
1304
- * @param {Airtop.OperatorPromptV1Body} request
1305
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
1306
- *
1307
- * @example
1308
- * await client.windows.operatorPrompt("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430", {
1309
- * prompt: "What is the latest news about OpenAI?"
1310
- * })
1311
- */
1312
- operatorPrompt(sessionId, windowId, request, requestOptions) {
1313
- return __awaiter(this, void 0, void 0, function* () {
1314
- var _a, _b, _c;
1315
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1316
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/operator`),
1317
- method: "POST",
1318
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1319
- contentType: "application/json",
1320
- requestType: "json",
1321
- body: serializers.OperatorPromptV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1322
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1323
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1324
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1325
- });
1326
- if (_response.ok) {
1327
- return serializers.AsyncOperatorPromptResponseEnvelope.parseOrThrow(_response.body, {
1328
- unrecognizedObjectKeys: "passthrough",
1329
- allowUnrecognizedUnionMembers: true,
1330
- allowUnrecognizedEnumValues: true,
1331
- skipValidation: true,
1332
- breadcrumbsPrefix: ["response"],
1333
- });
1334
- }
1335
- if (_response.error.reason === "status-code") {
1336
- throw new errors.AirtopError({
1337
- statusCode: _response.error.statusCode,
1338
- body: _response.error.body,
1339
- });
1340
- }
1341
- switch (_response.error.reason) {
1342
- case "non-json":
1343
- throw new errors.AirtopError({
1344
- statusCode: _response.error.statusCode,
1345
- body: _response.error.rawBody,
1346
- });
1347
- case "timeout":
1348
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/operator.");
1349
- case "unknown":
1350
- throw new errors.AirtopError({
1351
- message: _response.error.errorMessage,
1352
- });
1353
- }
1354
- });
1355
- }
1356
800
  /**
1357
801
  * Submit a prompt that queries the content of a specific browser window. You may extract content from the page, or ask a question about the page and allow the AI to answer it (ex. Is the user logged in?).
1358
802
  *
@@ -1372,7 +816,7 @@ class Windows {
1372
816
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1373
817
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/page-query`),
1374
818
  method: "POST",
1375
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
819
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1376
820
  contentType: "application/json",
1377
821
  requestType: "json",
1378
822
  body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
@@ -1431,7 +875,7 @@ class Windows {
1431
875
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1432
876
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/paginated-extraction`),
1433
877
  method: "POST",
1434
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
878
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1435
879
  contentType: "application/json",
1436
880
  requestType: "json",
1437
881
  body: serializers.SessionPaginatedExtractionHandlerRequestBody.jsonOrThrow(request, {
@@ -1490,7 +934,7 @@ class Windows {
1490
934
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1491
935
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
1492
936
  method: "POST",
1493
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
937
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1494
938
  contentType: "application/json",
1495
939
  requestType: "json",
1496
940
  body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
@@ -1547,7 +991,7 @@ class Windows {
1547
991
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1548
992
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/scrape-content`),
1549
993
  method: "POST",
1550
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
994
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1551
995
  contentType: "application/json",
1552
996
  requestType: "json",
1553
997
  body: serializers.ScrapeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1602,7 +1046,7 @@ class Windows {
1602
1046
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1603
1047
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/screenshot`),
1604
1048
  method: "POST",
1605
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1049
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1606
1050
  contentType: "application/json",
1607
1051
  requestType: "json",
1608
1052
  body: serializers.SessionScreenshotHandlerRequestBody.jsonOrThrow(request, {
@@ -1659,7 +1103,7 @@ class Windows {
1659
1103
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1660
1104
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/scroll`),
1661
1105
  method: "POST",
1662
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1106
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1663
1107
  contentType: "application/json",
1664
1108
  requestType: "json",
1665
1109
  body: serializers.SessionScrollHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1714,7 +1158,7 @@ class Windows {
1714
1158
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1715
1159
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/summarize-content`),
1716
1160
  method: "POST",
1717
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1161
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1718
1162
  contentType: "application/json",
1719
1163
  requestType: "json",
1720
1164
  body: serializers.SessionSummaryHandlerRequestBody.jsonOrThrow(request, {
@@ -1773,7 +1217,7 @@ class Windows {
1773
1217
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1774
1218
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/type`),
1775
1219
  method: "POST",
1776
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37-beta1", "User-Agent": "@airtop/sdk/0.1.37-beta1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1220
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.37", "User-Agent": "@airtop/sdk/0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1777
1221
  contentType: "application/json",
1778
1222
  requestType: "json",
1779
1223
  body: serializers.SessionTypeHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),