@airtop/sdk 0.1.2 → 0.1.4

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 (144) hide show
  1. package/Client.d.ts +2 -2
  2. package/Client.js +1 -1
  3. package/api/errors/InternalServerError.d.ts +1 -1
  4. package/api/errors/NotFoundError.d.ts +1 -1
  5. package/api/errors/UnprocessableEntityError.d.ts +1 -1
  6. package/api/resources/profiles/client/Client.d.ts +3 -3
  7. package/api/resources/profiles/client/Client.js +6 -10
  8. package/api/resources/sessions/client/Client.d.ts +3 -3
  9. package/api/resources/sessions/client/Client.js +21 -25
  10. package/api/resources/windows/client/Client.d.ts +7 -7
  11. package/api/resources/windows/client/Client.js +24 -24
  12. package/api/resources/windows/client/requests/CreateWindowInputV1Body.d.ts +3 -1
  13. package/api/resources/windows/client/requests/{PromptContentRequest.d.ts → SessionContentPromptHandlerRequestBody.d.ts} +1 -4
  14. package/api/resources/windows/client/requests/{SummarizeContentRequest.d.ts → SessionSummaryHandlerRequestBody.d.ts} +1 -4
  15. package/api/resources/windows/client/requests/WindowLoadUrlV1Body.d.ts +3 -1
  16. package/api/resources/windows/client/requests/index.d.ts +2 -2
  17. package/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +3 -2
  18. package/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +1 -0
  19. package/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +3 -2
  20. package/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +1 -0
  21. package/api/types/CustomProxy.d.ts +14 -0
  22. package/api/types/ErrorDetail.d.ts +10 -0
  23. package/api/types/ErrorModel.d.ts +18 -0
  24. package/api/types/Proxy.d.ts +11 -0
  25. package/api/types/SessionConfigV1.d.ts +3 -0
  26. package/api/types/SessionConfigV1Proxy.d.ts +14 -0
  27. package/api/types/SessionConfigV1Proxy.js +5 -0
  28. package/api/types/SessionConfigV1ProxyItem.d.ts +12 -0
  29. package/api/types/SessionConfigV1ProxyItem.js +5 -0
  30. package/api/types/index.d.ts +6 -1
  31. package/api/types/index.js +6 -1
  32. package/dist/Client.d.ts +2 -2
  33. package/dist/Client.js +1 -1
  34. package/dist/api/errors/InternalServerError.d.ts +1 -1
  35. package/dist/api/errors/NotFoundError.d.ts +1 -1
  36. package/dist/api/errors/UnprocessableEntityError.d.ts +1 -1
  37. package/dist/api/resources/profiles/client/Client.d.ts +3 -3
  38. package/dist/api/resources/profiles/client/Client.js +6 -10
  39. package/dist/api/resources/sessions/client/Client.d.ts +3 -3
  40. package/dist/api/resources/sessions/client/Client.js +21 -25
  41. package/dist/api/resources/windows/client/Client.d.ts +7 -7
  42. package/dist/api/resources/windows/client/Client.js +24 -24
  43. package/dist/api/resources/windows/client/requests/CreateWindowInputV1Body.d.ts +3 -1
  44. package/dist/api/resources/windows/client/requests/{PromptContentRequest.d.ts → SessionContentPromptHandlerRequestBody.d.ts} +1 -4
  45. package/dist/api/resources/windows/client/requests/SessionContentPromptHandlerRequestBody.js +5 -0
  46. package/dist/api/resources/windows/client/requests/{SummarizeContentRequest.d.ts → SessionSummaryHandlerRequestBody.d.ts} +1 -4
  47. package/dist/api/resources/windows/client/requests/SessionSummaryHandlerRequestBody.js +5 -0
  48. package/dist/api/resources/windows/client/requests/WindowLoadUrlV1Body.d.ts +3 -1
  49. package/dist/api/resources/windows/client/requests/index.d.ts +2 -2
  50. package/dist/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +3 -2
  51. package/dist/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +1 -0
  52. package/dist/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +3 -2
  53. package/dist/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +1 -0
  54. package/dist/api/types/CustomProxy.d.ts +14 -0
  55. package/dist/api/types/CustomProxy.js +5 -0
  56. package/dist/api/types/ErrorDetail.d.ts +10 -0
  57. package/dist/api/types/ErrorDetail.js +5 -0
  58. package/dist/api/types/ErrorModel.d.ts +18 -0
  59. package/dist/api/types/ErrorModel.js +5 -0
  60. package/dist/api/types/Proxy.d.ts +11 -0
  61. package/dist/api/types/Proxy.js +5 -0
  62. package/dist/api/types/SessionConfigV1.d.ts +3 -0
  63. package/dist/api/types/SessionConfigV1Proxy.d.ts +14 -0
  64. package/dist/api/types/SessionConfigV1Proxy.js +5 -0
  65. package/dist/api/types/SessionConfigV1ProxyItem.d.ts +12 -0
  66. package/dist/api/types/SessionConfigV1ProxyItem.js +5 -0
  67. package/dist/api/types/index.d.ts +6 -1
  68. package/dist/api/types/index.js +6 -1
  69. package/dist/serialization/resources/windows/client/requests/CreateWindowInputV1Body.d.ts +1 -0
  70. package/dist/serialization/resources/windows/client/requests/CreateWindowInputV1Body.js +1 -0
  71. package/dist/serialization/resources/windows/client/requests/{PromptContentRequest.d.ts → SessionContentPromptHandlerRequestBody.d.ts} +2 -4
  72. package/dist/serialization/resources/windows/client/requests/{PromptContentRequest.js → SessionContentPromptHandlerRequestBody.js} +2 -4
  73. package/dist/serialization/resources/windows/client/requests/{SummarizeContentRequest.d.ts → SessionSummaryHandlerRequestBody.d.ts} +2 -4
  74. package/dist/serialization/resources/windows/client/requests/{SummarizeContentRequest.js → SessionSummaryHandlerRequestBody.js} +2 -4
  75. package/dist/serialization/resources/windows/client/requests/WindowLoadUrlV1Body.d.ts +1 -0
  76. package/dist/serialization/resources/windows/client/requests/WindowLoadUrlV1Body.js +1 -0
  77. package/dist/serialization/resources/windows/client/requests/index.d.ts +2 -2
  78. package/dist/serialization/resources/windows/client/requests/index.js +5 -5
  79. package/dist/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +1 -1
  80. package/dist/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +1 -1
  81. package/dist/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +1 -1
  82. package/dist/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +1 -1
  83. package/dist/serialization/types/CustomProxy.d.ts +11 -0
  84. package/dist/serialization/types/CustomProxy.js +32 -0
  85. package/dist/serialization/types/ErrorDetail.d.ts +14 -0
  86. package/{serialization/types/ErrorEnvelope.js → dist/serialization/types/ErrorDetail.js} +5 -9
  87. package/dist/serialization/types/ErrorModel.d.ts +18 -0
  88. package/dist/serialization/types/{ErrorEnvelope.js → ErrorModel.js} +9 -9
  89. package/dist/serialization/types/Proxy.d.ts +14 -0
  90. package/dist/serialization/types/Proxy.js +35 -0
  91. package/dist/serialization/types/SessionConfigV1.d.ts +2 -0
  92. package/dist/serialization/types/SessionConfigV1.js +2 -0
  93. package/dist/serialization/types/SessionConfigV1Proxy.d.ts +12 -0
  94. package/dist/serialization/types/SessionConfigV1Proxy.js +33 -0
  95. package/dist/serialization/types/SessionConfigV1ProxyItem.d.ts +14 -0
  96. package/dist/serialization/types/SessionConfigV1ProxyItem.js +35 -0
  97. package/dist/serialization/types/index.d.ts +6 -1
  98. package/dist/serialization/types/index.js +6 -1
  99. package/dist/wrapper/AirtopClient.d.ts +1 -1
  100. package/dist/wrapper/AirtopWindows.d.ts +2 -2
  101. package/package.json +3 -2
  102. package/reference.md +2 -2
  103. package/serialization/resources/windows/client/requests/CreateWindowInputV1Body.d.ts +1 -0
  104. package/serialization/resources/windows/client/requests/CreateWindowInputV1Body.js +1 -0
  105. package/serialization/resources/windows/client/requests/{PromptContentRequest.d.ts → SessionContentPromptHandlerRequestBody.d.ts} +2 -4
  106. package/serialization/resources/windows/client/requests/{PromptContentRequest.js → SessionContentPromptHandlerRequestBody.js} +2 -4
  107. package/serialization/resources/windows/client/requests/{SummarizeContentRequest.d.ts → SessionSummaryHandlerRequestBody.d.ts} +2 -4
  108. package/serialization/resources/windows/client/requests/{SummarizeContentRequest.js → SessionSummaryHandlerRequestBody.js} +2 -4
  109. package/serialization/resources/windows/client/requests/WindowLoadUrlV1Body.d.ts +1 -0
  110. package/serialization/resources/windows/client/requests/WindowLoadUrlV1Body.js +1 -0
  111. package/serialization/resources/windows/client/requests/index.d.ts +2 -2
  112. package/serialization/resources/windows/client/requests/index.js +5 -5
  113. package/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +1 -1
  114. package/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +1 -1
  115. package/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +1 -1
  116. package/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +1 -1
  117. package/serialization/types/CustomProxy.d.ts +11 -0
  118. package/serialization/types/CustomProxy.js +32 -0
  119. package/serialization/types/ErrorDetail.d.ts +14 -0
  120. package/serialization/types/ErrorDetail.js +35 -0
  121. package/serialization/types/ErrorModel.d.ts +18 -0
  122. package/serialization/types/ErrorModel.js +39 -0
  123. package/serialization/types/Proxy.d.ts +14 -0
  124. package/serialization/types/Proxy.js +35 -0
  125. package/serialization/types/SessionConfigV1.d.ts +2 -0
  126. package/serialization/types/SessionConfigV1.js +2 -0
  127. package/serialization/types/SessionConfigV1Proxy.d.ts +12 -0
  128. package/serialization/types/SessionConfigV1Proxy.js +33 -0
  129. package/serialization/types/SessionConfigV1ProxyItem.d.ts +14 -0
  130. package/serialization/types/SessionConfigV1ProxyItem.js +35 -0
  131. package/serialization/types/index.d.ts +6 -1
  132. package/serialization/types/index.js +6 -1
  133. package/wrapper/AirtopClient.d.ts +1 -1
  134. package/wrapper/AirtopWindows.d.ts +2 -2
  135. package/api/types/ErrorEnvelope.d.ts +0 -12
  136. package/dist/api/types/ErrorEnvelope.d.ts +0 -12
  137. package/dist/serialization/types/ErrorEnvelope.d.ts +0 -18
  138. package/serialization/types/ErrorEnvelope.d.ts +0 -18
  139. /package/api/resources/windows/client/requests/{PromptContentRequest.js → SessionContentPromptHandlerRequestBody.js} +0 -0
  140. /package/api/resources/windows/client/requests/{SummarizeContentRequest.js → SessionSummaryHandlerRequestBody.js} +0 -0
  141. /package/api/types/{ErrorEnvelope.js → CustomProxy.js} +0 -0
  142. /package/{dist/api/resources/windows/client/requests/PromptContentRequest.js → api/types/ErrorDetail.js} +0 -0
  143. /package/{dist/api/resources/windows/client/requests/SummarizeContentRequest.js → api/types/ErrorModel.js} +0 -0
  144. /package/{dist/api/types/ErrorEnvelope.js → api/types/Proxy.js} +0 -0
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Airtop from "../index";
5
+ export interface ErrorModel {
6
+ /** A human-readable explanation specific to this occurrence of the problem. */
7
+ detail?: string;
8
+ /** Optional list of individual error details */
9
+ errors?: Airtop.ErrorDetail[];
10
+ /** A URI reference that identifies the specific occurrence of the problem. */
11
+ instance?: string;
12
+ /** HTTP status code */
13
+ status?: number;
14
+ /** A short, human-readable summary of the problem type. This value should not change between occurrences of the error. */
15
+ title?: string;
16
+ /** A URI reference to human-readable documentation for the error. */
17
+ type?: string;
18
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Proxy object with url of the proxy as a parameter. Takes optional username and password.
6
+ */
7
+ export interface Proxy {
8
+ password?: string;
9
+ url: string;
10
+ username?: string;
11
+ }
@@ -1,11 +1,14 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Airtop from "../index";
4
5
  export interface SessionConfigV1 {
5
6
  /** Id of a profile to load into the session. */
6
7
  baseProfileId?: string;
7
8
  /** Persist the profile. */
8
9
  persistProfile?: boolean;
10
+ /** Proxy configuration. */
11
+ proxy?: Airtop.SessionConfigV1Proxy;
9
12
  /** Max length of session in minutes, after which it will terminate if not already deleted. */
10
13
  timeoutMinutes?: number;
11
14
  }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Airtop from "../index";
5
+ /**
6
+ * Proxy configuration.
7
+ */
8
+ export declare type SessionConfigV1Proxy =
9
+ /**
10
+ * Configuration for a single custom proxy. */
11
+ Airtop.CustomProxy
12
+ /**
13
+ * Array of proxy configurations. Includes a domain pattern and a proxy configuration to assign proxies to specific domains. */
14
+ | Airtop.SessionConfigV1ProxyItem[];
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Airtop from "../index";
5
+ /**
6
+ * You can set multiple proxies. You associate each proxy with a domain pattern. If the domain matches the pattern, the proxy is used. Pattern can contain '?' to match any single character, and '_' to match any sequence of characters. For example, '_.example.com' will match 'www.example.com' and 'sub.example.com'
7
+ */
8
+ export interface SessionConfigV1ProxyItem {
9
+ domainPattern: string;
10
+ /** Configuration for a single custom proxy. */
11
+ relay: Airtop.CustomProxy;
12
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -6,8 +6,9 @@ export * from "./EmptyResponseJson";
6
6
  export * from "./EnvelopeDefaultMeta";
7
7
  export * from "./EnvelopeStatusDefaultMetaStatus";
8
8
  export * from "./EnvelopeStatusDefaultMeta";
9
- export * from "./ErrorEnvelope";
9
+ export * from "./ErrorDetail";
10
10
  export * from "./ErrorMessage";
11
+ export * from "./ErrorModel";
11
12
  export * from "./ExternalProfileV1";
12
13
  export * from "./ExternalSessionAiResponseMetadataStatus";
13
14
  export * from "./ExternalSessionAiResponseMetadata";
@@ -23,6 +24,10 @@ export * from "./ScrapeResponse";
23
24
  export * from "./ScrapeResponseContent";
24
25
  export * from "./ScrapeResponseEnvelope";
25
26
  export * from "./ScrapeResponseOutput";
27
+ export * from "./Proxy";
28
+ export * from "./CustomProxy";
29
+ export * from "./SessionConfigV1ProxyItem";
30
+ export * from "./SessionConfigV1Proxy";
26
31
  export * from "./SessionConfigV1";
27
32
  export * from "./SessionResponse";
28
33
  export * from "./SessionsResponse";
@@ -22,8 +22,9 @@ __exportStar(require("./EmptyResponseJson"), exports);
22
22
  __exportStar(require("./EnvelopeDefaultMeta"), exports);
23
23
  __exportStar(require("./EnvelopeStatusDefaultMetaStatus"), exports);
24
24
  __exportStar(require("./EnvelopeStatusDefaultMeta"), exports);
25
- __exportStar(require("./ErrorEnvelope"), exports);
25
+ __exportStar(require("./ErrorDetail"), exports);
26
26
  __exportStar(require("./ErrorMessage"), exports);
27
+ __exportStar(require("./ErrorModel"), exports);
27
28
  __exportStar(require("./ExternalProfileV1"), exports);
28
29
  __exportStar(require("./ExternalSessionAiResponseMetadataStatus"), exports);
29
30
  __exportStar(require("./ExternalSessionAiResponseMetadata"), exports);
@@ -39,6 +40,10 @@ __exportStar(require("./ScrapeResponse"), exports);
39
40
  __exportStar(require("./ScrapeResponseContent"), exports);
40
41
  __exportStar(require("./ScrapeResponseEnvelope"), exports);
41
42
  __exportStar(require("./ScrapeResponseOutput"), exports);
43
+ __exportStar(require("./Proxy"), exports);
44
+ __exportStar(require("./CustomProxy"), exports);
45
+ __exportStar(require("./SessionConfigV1ProxyItem"), exports);
46
+ __exportStar(require("./SessionConfigV1Proxy"), exports);
42
47
  __exportStar(require("./SessionConfigV1"), exports);
43
48
  __exportStar(require("./SessionResponse"), exports);
44
49
  __exportStar(require("./SessionsResponse"), exports);
package/dist/Client.d.ts CHANGED
@@ -9,7 +9,7 @@ import { Windows } from "./api/resources/windows/client/Client";
9
9
  export declare namespace AirtopClient {
10
10
  interface Options {
11
11
  environment?: core.Supplier<environments.AirtopEnvironment | string>;
12
- apiKey?: core.Supplier<core.BearerToken | undefined>;
12
+ apiKey: core.Supplier<core.BearerToken>;
13
13
  fetcher?: core.FetchFunction;
14
14
  }
15
15
  interface RequestOptions {
@@ -23,7 +23,7 @@ export declare namespace AirtopClient {
23
23
  }
24
24
  export declare class AirtopClient {
25
25
  protected readonly _options: AirtopClient.Options;
26
- constructor(_options?: AirtopClient.Options);
26
+ constructor(_options: AirtopClient.Options);
27
27
  protected _profiles: Profiles | undefined;
28
28
  get profiles(): Profiles;
29
29
  protected _sessions: Sessions | undefined;
package/dist/Client.js CHANGED
@@ -8,7 +8,7 @@ const Client_1 = require("./api/resources/profiles/client/Client");
8
8
  const Client_2 = require("./api/resources/sessions/client/Client");
9
9
  const Client_3 = require("./api/resources/windows/client/Client");
10
10
  class AirtopClient {
11
- constructor(_options = {}) {
11
+ constructor(_options) {
12
12
  this._options = _options;
13
13
  }
14
14
  get profiles() {
@@ -4,5 +4,5 @@
4
4
  import * as errors from "../../errors/index";
5
5
  import * as Airtop from "../index";
6
6
  export declare class InternalServerError extends errors.AirtopError {
7
- constructor(body: Airtop.ErrorEnvelope);
7
+ constructor(body: Airtop.ErrorModel);
8
8
  }
@@ -4,5 +4,5 @@
4
4
  import * as errors from "../../errors/index";
5
5
  import * as Airtop from "../index";
6
6
  export declare class NotFoundError extends errors.AirtopError {
7
- constructor(body: Airtop.ErrorEnvelope);
7
+ constructor(body: Airtop.ErrorModel);
8
8
  }
@@ -4,5 +4,5 @@
4
4
  import * as errors from "../../errors/index";
5
5
  import * as Airtop from "../index";
6
6
  export declare class UnprocessableEntityError extends errors.AirtopError {
7
- constructor(body: Airtop.ErrorEnvelope);
7
+ constructor(body: Airtop.ErrorModel);
8
8
  }
@@ -7,7 +7,7 @@ import * as Airtop from "../../../index";
7
7
  export declare namespace Profiles {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.AirtopEnvironment | string>;
10
- apiKey?: core.Supplier<core.BearerToken | undefined>;
10
+ apiKey: core.Supplier<core.BearerToken>;
11
11
  fetcher?: core.FetchFunction;
12
12
  }
13
13
  interface RequestOptions {
@@ -21,7 +21,7 @@ export declare namespace Profiles {
21
21
  }
22
22
  export declare class Profiles {
23
23
  protected readonly _options: Profiles.Options;
24
- constructor(_options?: Profiles.Options);
24
+ constructor(_options: Profiles.Options);
25
25
  /**
26
26
  * Get profiles matching by id
27
27
  *
@@ -42,5 +42,5 @@ export declare class Profiles {
42
42
  * await client.profiles.delete()
43
43
  */
44
44
  delete(request?: Airtop.ProfilesDeleteRequest, requestOptions?: Profiles.RequestOptions): Promise<void>;
45
- protected _getAuthorizationHeader(): Promise<string | undefined>;
45
+ protected _getAuthorizationHeader(): Promise<string>;
46
46
  }
@@ -45,7 +45,7 @@ const url_join_1 = __importDefault(require("url-join"));
45
45
  const serializers = __importStar(require("../../../../serialization/index"));
46
46
  const errors = __importStar(require("../../../../errors/index"));
47
47
  class Profiles {
48
- constructor(_options = {}) {
48
+ constructor(_options) {
49
49
  this._options = _options;
50
50
  }
51
51
  /**
@@ -77,8 +77,8 @@ class Profiles {
77
77
  Authorization: yield this._getAuthorizationHeader(),
78
78
  "X-Fern-Language": "JavaScript",
79
79
  "X-Fern-SDK-Name": "@airtop/sdk",
80
- "X-Fern-SDK-Version": "0.1.2",
81
- "User-Agent": "@airtop/sdk/0.1.2",
80
+ "X-Fern-SDK-Version": "0.1.4",
81
+ "User-Agent": "@airtop/sdk/0.1.4",
82
82
  "X-Fern-Runtime": core.RUNTIME.type,
83
83
  "X-Fern-Runtime-Version": core.RUNTIME.version,
84
84
  },
@@ -148,8 +148,8 @@ class Profiles {
148
148
  Authorization: yield this._getAuthorizationHeader(),
149
149
  "X-Fern-Language": "JavaScript",
150
150
  "X-Fern-SDK-Name": "@airtop/sdk",
151
- "X-Fern-SDK-Version": "0.1.2",
152
- "User-Agent": "@airtop/sdk/0.1.2",
151
+ "X-Fern-SDK-Version": "0.1.4",
152
+ "User-Agent": "@airtop/sdk/0.1.4",
153
153
  "X-Fern-Runtime": core.RUNTIME.type,
154
154
  "X-Fern-Runtime-Version": core.RUNTIME.version,
155
155
  },
@@ -186,11 +186,7 @@ class Profiles {
186
186
  }
187
187
  _getAuthorizationHeader() {
188
188
  return __awaiter(this, void 0, void 0, function* () {
189
- const bearer = yield core.Supplier.get(this._options.apiKey);
190
- if (bearer != null) {
191
- return `Bearer ${bearer}`;
192
- }
193
- return undefined;
189
+ return `Bearer ${yield core.Supplier.get(this._options.apiKey)}`;
194
190
  });
195
191
  }
196
192
  }
@@ -7,7 +7,7 @@ import * as Airtop from "../../../index";
7
7
  export declare namespace Sessions {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.AirtopEnvironment | string>;
10
- apiKey?: core.Supplier<core.BearerToken | undefined>;
10
+ apiKey: core.Supplier<core.BearerToken>;
11
11
  fetcher?: core.FetchFunction;
12
12
  }
13
13
  interface RequestOptions {
@@ -21,7 +21,7 @@ export declare namespace Sessions {
21
21
  }
22
22
  export declare class Sessions {
23
23
  protected readonly _options: Sessions.Options;
24
- constructor(_options?: Sessions.Options);
24
+ constructor(_options: Sessions.Options);
25
25
  /**
26
26
  * Get a list of sessions by ID
27
27
  *
@@ -75,5 +75,5 @@ export declare class Sessions {
75
75
  * Get a session event stream for a given session ID
76
76
  */
77
77
  events(id: string, requestOptions?: Sessions.RequestOptions): Promise<core.Stream<Airtop.SessionsEventsResponse>>;
78
- protected _getAuthorizationHeader(): Promise<string | undefined>;
78
+ protected _getAuthorizationHeader(): Promise<string>;
79
79
  }
@@ -46,7 +46,7 @@ const url_join_1 = __importDefault(require("url-join"));
46
46
  const serializers = __importStar(require("../../../../serialization/index"));
47
47
  const errors = __importStar(require("../../../../errors/index"));
48
48
  class Sessions {
49
- constructor(_options = {}) {
49
+ constructor(_options) {
50
50
  this._options = _options;
51
51
  }
52
52
  /**
@@ -94,8 +94,8 @@ class Sessions {
94
94
  Authorization: yield this._getAuthorizationHeader(),
95
95
  "X-Fern-Language": "JavaScript",
96
96
  "X-Fern-SDK-Name": "@airtop/sdk",
97
- "X-Fern-SDK-Version": "0.1.2",
98
- "User-Agent": "@airtop/sdk/0.1.2",
97
+ "X-Fern-SDK-Version": "0.1.4",
98
+ "User-Agent": "@airtop/sdk/0.1.4",
99
99
  "X-Fern-Runtime": core.RUNTIME.type,
100
100
  "X-Fern-Runtime-Version": core.RUNTIME.version,
101
101
  },
@@ -118,7 +118,7 @@ class Sessions {
118
118
  if (_response.error.reason === "status-code") {
119
119
  switch (_response.error.statusCode) {
120
120
  case 404:
121
- throw new Airtop.NotFoundError(serializers.ErrorEnvelope.parseOrThrow(_response.error.body, {
121
+ throw new Airtop.NotFoundError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
122
122
  unrecognizedObjectKeys: "passthrough",
123
123
  allowUnrecognizedUnionMembers: true,
124
124
  allowUnrecognizedEnumValues: true,
@@ -126,7 +126,7 @@ class Sessions {
126
126
  breadcrumbsPrefix: ["response"],
127
127
  }));
128
128
  case 422:
129
- throw new Airtop.UnprocessableEntityError(serializers.ErrorEnvelope.parseOrThrow(_response.error.body, {
129
+ throw new Airtop.UnprocessableEntityError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
130
130
  unrecognizedObjectKeys: "passthrough",
131
131
  allowUnrecognizedUnionMembers: true,
132
132
  allowUnrecognizedEnumValues: true,
@@ -134,7 +134,7 @@ class Sessions {
134
134
  breadcrumbsPrefix: ["response"],
135
135
  }));
136
136
  case 500:
137
- throw new Airtop.InternalServerError(serializers.ErrorEnvelope.parseOrThrow(_response.error.body, {
137
+ throw new Airtop.InternalServerError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
138
138
  unrecognizedObjectKeys: "passthrough",
139
139
  allowUnrecognizedUnionMembers: true,
140
140
  allowUnrecognizedEnumValues: true,
@@ -180,8 +180,8 @@ class Sessions {
180
180
  Authorization: yield this._getAuthorizationHeader(),
181
181
  "X-Fern-Language": "JavaScript",
182
182
  "X-Fern-SDK-Name": "@airtop/sdk",
183
- "X-Fern-SDK-Version": "0.1.2",
184
- "User-Agent": "@airtop/sdk/0.1.2",
183
+ "X-Fern-SDK-Version": "0.1.4",
184
+ "User-Agent": "@airtop/sdk/0.1.4",
185
185
  "X-Fern-Runtime": core.RUNTIME.type,
186
186
  "X-Fern-Runtime-Version": core.RUNTIME.version,
187
187
  },
@@ -245,8 +245,8 @@ class Sessions {
245
245
  Authorization: yield this._getAuthorizationHeader(),
246
246
  "X-Fern-Language": "JavaScript",
247
247
  "X-Fern-SDK-Name": "@airtop/sdk",
248
- "X-Fern-SDK-Version": "0.1.2",
249
- "User-Agent": "@airtop/sdk/0.1.2",
248
+ "X-Fern-SDK-Version": "0.1.4",
249
+ "User-Agent": "@airtop/sdk/0.1.4",
250
250
  "X-Fern-Runtime": core.RUNTIME.type,
251
251
  "X-Fern-Runtime-Version": core.RUNTIME.version,
252
252
  },
@@ -268,7 +268,7 @@ class Sessions {
268
268
  if (_response.error.reason === "status-code") {
269
269
  switch (_response.error.statusCode) {
270
270
  case 404:
271
- throw new Airtop.NotFoundError(serializers.ErrorEnvelope.parseOrThrow(_response.error.body, {
271
+ throw new Airtop.NotFoundError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
272
272
  unrecognizedObjectKeys: "passthrough",
273
273
  allowUnrecognizedUnionMembers: true,
274
274
  allowUnrecognizedEnumValues: true,
@@ -276,7 +276,7 @@ class Sessions {
276
276
  breadcrumbsPrefix: ["response"],
277
277
  }));
278
278
  case 422:
279
- throw new Airtop.UnprocessableEntityError(serializers.ErrorEnvelope.parseOrThrow(_response.error.body, {
279
+ throw new Airtop.UnprocessableEntityError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
280
280
  unrecognizedObjectKeys: "passthrough",
281
281
  allowUnrecognizedUnionMembers: true,
282
282
  allowUnrecognizedEnumValues: true,
@@ -284,7 +284,7 @@ class Sessions {
284
284
  breadcrumbsPrefix: ["response"],
285
285
  }));
286
286
  case 500:
287
- throw new Airtop.InternalServerError(serializers.ErrorEnvelope.parseOrThrow(_response.error.body, {
287
+ throw new Airtop.InternalServerError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
288
288
  unrecognizedObjectKeys: "passthrough",
289
289
  allowUnrecognizedUnionMembers: true,
290
290
  allowUnrecognizedEnumValues: true,
@@ -332,8 +332,8 @@ class Sessions {
332
332
  Authorization: yield this._getAuthorizationHeader(),
333
333
  "X-Fern-Language": "JavaScript",
334
334
  "X-Fern-SDK-Name": "@airtop/sdk",
335
- "X-Fern-SDK-Version": "0.1.2",
336
- "User-Agent": "@airtop/sdk/0.1.2",
335
+ "X-Fern-SDK-Version": "0.1.4",
336
+ "User-Agent": "@airtop/sdk/0.1.4",
337
337
  "X-Fern-Runtime": core.RUNTIME.type,
338
338
  "X-Fern-Runtime-Version": core.RUNTIME.version,
339
339
  },
@@ -380,8 +380,8 @@ class Sessions {
380
380
  Authorization: yield this._getAuthorizationHeader(),
381
381
  "X-Fern-Language": "JavaScript",
382
382
  "X-Fern-SDK-Name": "@airtop/sdk",
383
- "X-Fern-SDK-Version": "0.1.2",
384
- "User-Agent": "@airtop/sdk/0.1.2",
383
+ "X-Fern-SDK-Version": "0.1.4",
384
+ "User-Agent": "@airtop/sdk/0.1.4",
385
385
  "X-Fern-Runtime": core.RUNTIME.type,
386
386
  "X-Fern-Runtime-Version": core.RUNTIME.version,
387
387
  },
@@ -414,7 +414,7 @@ class Sessions {
414
414
  if (_response.error.reason === "status-code") {
415
415
  switch (_response.error.statusCode) {
416
416
  case 404:
417
- throw new Airtop.NotFoundError(serializers.ErrorEnvelope.parseOrThrow(_response.error.body, {
417
+ throw new Airtop.NotFoundError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
418
418
  unrecognizedObjectKeys: "passthrough",
419
419
  allowUnrecognizedUnionMembers: true,
420
420
  allowUnrecognizedEnumValues: true,
@@ -422,7 +422,7 @@ class Sessions {
422
422
  breadcrumbsPrefix: ["response"],
423
423
  }));
424
424
  case 422:
425
- throw new Airtop.UnprocessableEntityError(serializers.ErrorEnvelope.parseOrThrow(_response.error.body, {
425
+ throw new Airtop.UnprocessableEntityError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
426
426
  unrecognizedObjectKeys: "passthrough",
427
427
  allowUnrecognizedUnionMembers: true,
428
428
  allowUnrecognizedEnumValues: true,
@@ -430,7 +430,7 @@ class Sessions {
430
430
  breadcrumbsPrefix: ["response"],
431
431
  }));
432
432
  case 500:
433
- throw new Airtop.InternalServerError(serializers.ErrorEnvelope.parseOrThrow(_response.error.body, {
433
+ throw new Airtop.InternalServerError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
434
434
  unrecognizedObjectKeys: "passthrough",
435
435
  allowUnrecognizedUnionMembers: true,
436
436
  allowUnrecognizedEnumValues: true,
@@ -461,11 +461,7 @@ class Sessions {
461
461
  }
462
462
  _getAuthorizationHeader() {
463
463
  return __awaiter(this, void 0, void 0, function* () {
464
- const bearer = yield core.Supplier.get(this._options.apiKey);
465
- if (bearer != null) {
466
- return `Bearer ${bearer}`;
467
- }
468
- return undefined;
464
+ return `Bearer ${yield core.Supplier.get(this._options.apiKey)}`;
469
465
  });
470
466
  }
471
467
  }
@@ -7,7 +7,7 @@ import * as Airtop from "../../../index";
7
7
  export declare namespace Windows {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.AirtopEnvironment | string>;
10
- apiKey?: core.Supplier<core.BearerToken | undefined>;
10
+ apiKey: core.Supplier<core.BearerToken>;
11
11
  fetcher?: core.FetchFunction;
12
12
  }
13
13
  interface RequestOptions {
@@ -21,7 +21,7 @@ export declare namespace Windows {
21
21
  }
22
22
  export declare class Windows {
23
23
  protected readonly _options: Windows.Options;
24
- constructor(_options?: Windows.Options);
24
+ constructor(_options: Windows.Options);
25
25
  /**
26
26
  * @param {string} sessionId - ID of the session that owns the window.
27
27
  * @param {Airtop.CreateWindowInputV1Body} request
@@ -67,7 +67,7 @@ export declare class Windows {
67
67
  /**
68
68
  * @param {string} sessionId - The session id for the window.
69
69
  * @param {string} windowId - The Airtop window id of the browser window to target with an Airtop AI prompt.
70
- * @param {Airtop.PromptContentRequest} request
70
+ * @param {Airtop.SessionContentPromptHandlerRequestBody} request
71
71
  * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
72
72
  *
73
73
  * @example
@@ -75,7 +75,7 @@ export declare class Windows {
75
75
  * prompt: "What is the main idea of this page?"
76
76
  * })
77
77
  */
78
- promptContent(sessionId: string, windowId: string, request: Airtop.PromptContentRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiPromptResponse>;
78
+ promptContent(sessionId: string, windowId: string, request: Airtop.SessionContentPromptHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiPromptResponse>;
79
79
  /**
80
80
  * @param {string} sessionId - The session id for the window.
81
81
  * @param {string} windowId - The Airtop window id of the browser window to scrape.
@@ -89,12 +89,12 @@ export declare class Windows {
89
89
  /**
90
90
  * @param {string} sessionId - The session id for the window.
91
91
  * @param {string} windowId - The Airtop window id of the browser window to summarize.
92
- * @param {Airtop.SummarizeContentRequest} request
92
+ * @param {Airtop.SessionSummaryHandlerRequestBody} request
93
93
  * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
94
94
  *
95
95
  * @example
96
96
  * await client.windows.summarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
97
97
  */
98
- summarizeContent(sessionId: string, windowId: string, request?: Airtop.SummarizeContentRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiPromptResponse>;
99
- protected _getAuthorizationHeader(): Promise<string | undefined>;
98
+ summarizeContent(sessionId: string, windowId: string, request?: Airtop.SessionSummaryHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiPromptResponse>;
99
+ protected _getAuthorizationHeader(): Promise<string>;
100
100
  }
@@ -45,7 +45,7 @@ const serializers = __importStar(require("../../../../serialization/index"));
45
45
  const url_join_1 = __importDefault(require("url-join"));
46
46
  const errors = __importStar(require("../../../../errors/index"));
47
47
  class Windows {
48
- constructor(_options = {}) {
48
+ constructor(_options) {
49
49
  this._options = _options;
50
50
  }
51
51
  /**
@@ -66,8 +66,8 @@ class Windows {
66
66
  Authorization: yield this._getAuthorizationHeader(),
67
67
  "X-Fern-Language": "JavaScript",
68
68
  "X-Fern-SDK-Name": "@airtop/sdk",
69
- "X-Fern-SDK-Version": "0.1.2",
70
- "User-Agent": "@airtop/sdk/0.1.2",
69
+ "X-Fern-SDK-Version": "0.1.4",
70
+ "User-Agent": "@airtop/sdk/0.1.4",
71
71
  "X-Fern-Runtime": core.RUNTIME.type,
72
72
  "X-Fern-Runtime-Version": core.RUNTIME.version,
73
73
  },
@@ -140,8 +140,8 @@ class Windows {
140
140
  Authorization: yield this._getAuthorizationHeader(),
141
141
  "X-Fern-Language": "JavaScript",
142
142
  "X-Fern-SDK-Name": "@airtop/sdk",
143
- "X-Fern-SDK-Version": "0.1.2",
144
- "User-Agent": "@airtop/sdk/0.1.2",
143
+ "X-Fern-SDK-Version": "0.1.4",
144
+ "User-Agent": "@airtop/sdk/0.1.4",
145
145
  "X-Fern-Runtime": core.RUNTIME.type,
146
146
  "X-Fern-Runtime-Version": core.RUNTIME.version,
147
147
  },
@@ -203,8 +203,8 @@ class Windows {
203
203
  Authorization: yield this._getAuthorizationHeader(),
204
204
  "X-Fern-Language": "JavaScript",
205
205
  "X-Fern-SDK-Name": "@airtop/sdk",
206
- "X-Fern-SDK-Version": "0.1.2",
207
- "User-Agent": "@airtop/sdk/0.1.2",
206
+ "X-Fern-SDK-Version": "0.1.4",
207
+ "User-Agent": "@airtop/sdk/0.1.4",
208
208
  "X-Fern-Runtime": core.RUNTIME.type,
209
209
  "X-Fern-Runtime-Version": core.RUNTIME.version,
210
210
  },
@@ -263,8 +263,8 @@ class Windows {
263
263
  Authorization: yield this._getAuthorizationHeader(),
264
264
  "X-Fern-Language": "JavaScript",
265
265
  "X-Fern-SDK-Name": "@airtop/sdk",
266
- "X-Fern-SDK-Version": "0.1.2",
267
- "User-Agent": "@airtop/sdk/0.1.2",
266
+ "X-Fern-SDK-Version": "0.1.4",
267
+ "User-Agent": "@airtop/sdk/0.1.4",
268
268
  "X-Fern-Runtime": core.RUNTIME.type,
269
269
  "X-Fern-Runtime-Version": core.RUNTIME.version,
270
270
  },
@@ -307,7 +307,7 @@ class Windows {
307
307
  /**
308
308
  * @param {string} sessionId - The session id for the window.
309
309
  * @param {string} windowId - The Airtop window id of the browser window to target with an Airtop AI prompt.
310
- * @param {Airtop.PromptContentRequest} request
310
+ * @param {Airtop.SessionContentPromptHandlerRequestBody} request
311
311
  * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
312
312
  *
313
313
  * @example
@@ -325,14 +325,16 @@ class Windows {
325
325
  Authorization: yield this._getAuthorizationHeader(),
326
326
  "X-Fern-Language": "JavaScript",
327
327
  "X-Fern-SDK-Name": "@airtop/sdk",
328
- "X-Fern-SDK-Version": "0.1.2",
329
- "User-Agent": "@airtop/sdk/0.1.2",
328
+ "X-Fern-SDK-Version": "0.1.4",
329
+ "User-Agent": "@airtop/sdk/0.1.4",
330
330
  "X-Fern-Runtime": core.RUNTIME.type,
331
331
  "X-Fern-Runtime-Version": core.RUNTIME.version,
332
332
  },
333
333
  contentType: "application/json",
334
334
  requestType: "json",
335
- body: serializers.PromptContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
335
+ body: serializers.SessionContentPromptHandlerRequestBody.jsonOrThrow(request, {
336
+ unrecognizedObjectKeys: "strip",
337
+ }),
336
338
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
337
339
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
338
340
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -386,8 +388,8 @@ class Windows {
386
388
  Authorization: yield this._getAuthorizationHeader(),
387
389
  "X-Fern-Language": "JavaScript",
388
390
  "X-Fern-SDK-Name": "@airtop/sdk",
389
- "X-Fern-SDK-Version": "0.1.2",
390
- "User-Agent": "@airtop/sdk/0.1.2",
391
+ "X-Fern-SDK-Version": "0.1.4",
392
+ "User-Agent": "@airtop/sdk/0.1.4",
391
393
  "X-Fern-Runtime": core.RUNTIME.type,
392
394
  "X-Fern-Runtime-Version": core.RUNTIME.version,
393
395
  },
@@ -431,7 +433,7 @@ class Windows {
431
433
  /**
432
434
  * @param {string} sessionId - The session id for the window.
433
435
  * @param {string} windowId - The Airtop window id of the browser window to summarize.
434
- * @param {Airtop.SummarizeContentRequest} request
436
+ * @param {Airtop.SessionSummaryHandlerRequestBody} request
435
437
  * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
436
438
  *
437
439
  * @example
@@ -447,14 +449,16 @@ class Windows {
447
449
  Authorization: yield this._getAuthorizationHeader(),
448
450
  "X-Fern-Language": "JavaScript",
449
451
  "X-Fern-SDK-Name": "@airtop/sdk",
450
- "X-Fern-SDK-Version": "0.1.2",
451
- "User-Agent": "@airtop/sdk/0.1.2",
452
+ "X-Fern-SDK-Version": "0.1.4",
453
+ "User-Agent": "@airtop/sdk/0.1.4",
452
454
  "X-Fern-Runtime": core.RUNTIME.type,
453
455
  "X-Fern-Runtime-Version": core.RUNTIME.version,
454
456
  },
455
457
  contentType: "application/json",
456
458
  requestType: "json",
457
- body: serializers.SummarizeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
459
+ body: serializers.SessionSummaryHandlerRequestBody.jsonOrThrow(request, {
460
+ unrecognizedObjectKeys: "strip",
461
+ }),
458
462
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
459
463
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
460
464
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -491,11 +495,7 @@ class Windows {
491
495
  }
492
496
  _getAuthorizationHeader() {
493
497
  return __awaiter(this, void 0, void 0, function* () {
494
- const bearer = yield core.Supplier.get(this._options.apiKey);
495
- if (bearer != null) {
496
- return `Bearer ${bearer}`;
497
- }
498
- return undefined;
498
+ return `Bearer ${yield core.Supplier.get(this._options.apiKey)}`;
499
499
  });
500
500
  }
501
501
  }
@@ -11,6 +11,8 @@ export interface CreateWindowInputV1Body {
11
11
  screenResolution?: string;
12
12
  /** Initial url to navigate to */
13
13
  url?: string;
14
- /** Wait until the specified loading event occurs. Defaults to 'load', which waits until the page has loaded */
14
+ /** Wait until the specified loading event occurs. Defaults to 'load', which waits until the page dom and it's assets have loaded. 'domContentLoaded' will wait until the dom has loaded, and 'complete' will wait until the page and all it's iframes have loaded it's dom and assets. */
15
15
  waitUntil?: Airtop.CreateWindowInputV1BodyWaitUntil;
16
+ /** Maximum time in seconds to wait for the specified loading event to occur before timing out. */
17
+ waitUntilTimeoutSeconds?: number;
16
18
  }