@airtop/sdk 0.1.6 → 0.1.7

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 (160) hide show
  1. package/Client.d.ts +3 -3
  2. package/Client.js +9 -9
  3. package/README.md +6 -6
  4. package/api/resources/index.d.ts +3 -3
  5. package/api/resources/index.js +4 -4
  6. package/api/resources/profiles/client/Client.js +4 -4
  7. package/api/resources/sessions/client/Client.js +10 -10
  8. package/api/resources/windows/client/Client.d.ts +3 -3
  9. package/api/resources/windows/client/Client.js +25 -25
  10. package/api/resources/windows/client/requests/CreateWindowInputV1Body.d.ts +1 -1
  11. package/api/resources/windows/client/requests/WindowLoadUrlV1Body.d.ts +1 -1
  12. package/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +3 -2
  13. package/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +1 -0
  14. package/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +3 -2
  15. package/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +1 -0
  16. package/api/types/ClickConfig.d.ts +5 -1
  17. package/api/types/Issue.d.ts +2 -0
  18. package/{dist/api/types/EmptyResponseJson.d.ts → api/types/OperationOutcome.d.ts} +1 -1
  19. package/api/types/{EmptyResponse.d.ts → OperationOutcomeResponse.d.ts} +3 -3
  20. package/api/types/PageQueryConfig.d.ts +3 -0
  21. package/api/types/SummaryConfig.d.ts +2 -0
  22. package/api/types/VisualAnalysisConfig.d.ts +12 -0
  23. package/api/types/VisualAnalysisConfigPartitionDirection.d.ts +12 -0
  24. package/api/types/VisualAnalysisConfigPartitionDirection.js +11 -0
  25. package/api/types/VisualAnalysisConfigScope.d.ts +11 -0
  26. package/api/types/VisualAnalysisConfigScope.js +10 -0
  27. package/api/types/index.d.ts +5 -4
  28. package/api/types/index.js +5 -4
  29. package/dist/Client.d.ts +3 -3
  30. package/dist/Client.js +9 -9
  31. package/dist/api/resources/index.d.ts +3 -3
  32. package/dist/api/resources/index.js +4 -4
  33. package/dist/api/resources/profiles/client/Client.js +4 -4
  34. package/dist/api/resources/sessions/client/Client.js +10 -10
  35. package/dist/api/resources/windows/client/Client.d.ts +3 -3
  36. package/dist/api/resources/windows/client/Client.js +25 -25
  37. package/dist/api/resources/windows/client/requests/CreateWindowInputV1Body.d.ts +1 -1
  38. package/dist/api/resources/windows/client/requests/WindowLoadUrlV1Body.d.ts +1 -1
  39. package/dist/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +3 -2
  40. package/dist/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +1 -0
  41. package/dist/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +3 -2
  42. package/dist/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +1 -0
  43. package/dist/api/types/ClickConfig.d.ts +5 -1
  44. package/dist/api/types/Issue.d.ts +2 -0
  45. package/{api/types/EmptyResponseJson.d.ts → dist/api/types/OperationOutcome.d.ts} +1 -1
  46. package/dist/api/types/{EmptyResponse.d.ts → OperationOutcomeResponse.d.ts} +3 -3
  47. package/dist/api/types/PageQueryConfig.d.ts +3 -0
  48. package/dist/api/types/SummaryConfig.d.ts +2 -0
  49. package/dist/api/types/VisualAnalysisConfig.d.ts +12 -0
  50. package/dist/api/types/VisualAnalysisConfigPartitionDirection.d.ts +12 -0
  51. package/dist/api/types/VisualAnalysisConfigPartitionDirection.js +11 -0
  52. package/dist/api/types/VisualAnalysisConfigScope.d.ts +11 -0
  53. package/dist/api/types/VisualAnalysisConfigScope.js +10 -0
  54. package/dist/api/types/index.d.ts +5 -4
  55. package/dist/api/types/index.js +5 -4
  56. package/dist/index.d.ts +1 -0
  57. package/dist/index.js +4 -0
  58. package/dist/serialization/resources/index.d.ts +3 -3
  59. package/dist/serialization/resources/index.js +4 -4
  60. package/dist/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +1 -1
  61. package/dist/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +1 -1
  62. package/dist/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +1 -1
  63. package/dist/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +1 -1
  64. package/dist/serialization/types/ClickConfig.d.ts +5 -2
  65. package/dist/serialization/types/ClickConfig.js +4 -1
  66. package/dist/serialization/types/Issue.d.ts +1 -0
  67. package/dist/serialization/types/Issue.js +1 -0
  68. package/{serialization/types/EmptyResponseJson.d.ts → dist/serialization/types/OperationOutcome.d.ts} +2 -2
  69. package/{serialization/types/EmptyResponseJson.js → dist/serialization/types/OperationOutcome.js} +2 -2
  70. package/dist/serialization/types/OperationOutcomeResponse.d.ts +18 -0
  71. package/dist/serialization/types/{EmptyResponse.js → OperationOutcomeResponse.js} +6 -6
  72. package/dist/serialization/types/PageQueryConfig.d.ts +2 -0
  73. package/dist/serialization/types/PageQueryConfig.js +2 -0
  74. package/dist/serialization/types/SummaryConfig.d.ts +2 -0
  75. package/dist/serialization/types/SummaryConfig.js +2 -0
  76. package/dist/serialization/types/VisualAnalysisConfig.d.ts +16 -0
  77. package/dist/serialization/types/{EnvelopeStatusDefaultMeta.js → VisualAnalysisConfig.js} +7 -5
  78. package/dist/serialization/types/VisualAnalysisConfigPartitionDirection.d.ts +10 -0
  79. package/dist/serialization/types/VisualAnalysisConfigPartitionDirection.js +31 -0
  80. package/dist/serialization/types/VisualAnalysisConfigScope.d.ts +10 -0
  81. package/dist/serialization/types/{EnvelopeStatusDefaultMetaStatus.js → VisualAnalysisConfigScope.js} +2 -2
  82. package/dist/serialization/types/index.d.ts +5 -4
  83. package/dist/serialization/types/index.js +5 -4
  84. package/dist/utils/batch-operate/SessionQueue.d.ts +46 -0
  85. package/dist/utils/batch-operate/SessionQueue.js +223 -0
  86. package/dist/utils/batch-operate/WindowQueue.d.ts +25 -0
  87. package/dist/utils/batch-operate/WindowQueue.js +201 -0
  88. package/dist/utils/batch-operate/batch-util.d.ts +3 -0
  89. package/dist/utils/batch-operate/batch-util.js +51 -0
  90. package/dist/utils/batch-operate/helpers.d.ts +2 -0
  91. package/dist/utils/batch-operate/helpers.js +19 -0
  92. package/dist/utils/batch-operate/types.d.ts +29 -0
  93. package/dist/utils/batch-operate/types.js +2 -0
  94. package/dist/utils/index.d.ts +2 -0
  95. package/dist/utils/index.js +18 -0
  96. package/dist/wrapper/AirtopClient.d.ts +3 -0
  97. package/dist/wrapper/AirtopClient.js +16 -0
  98. package/index.d.ts +1 -0
  99. package/index.js +4 -0
  100. package/package.json +3 -2
  101. package/reference.md +243 -243
  102. package/serialization/resources/index.d.ts +3 -3
  103. package/serialization/resources/index.js +4 -4
  104. package/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +1 -1
  105. package/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +1 -1
  106. package/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +1 -1
  107. package/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +1 -1
  108. package/serialization/types/ClickConfig.d.ts +5 -2
  109. package/serialization/types/ClickConfig.js +4 -1
  110. package/serialization/types/Issue.d.ts +1 -0
  111. package/serialization/types/Issue.js +1 -0
  112. package/{dist/serialization/types/EmptyResponseJson.d.ts → serialization/types/OperationOutcome.d.ts} +2 -2
  113. package/{dist/serialization/types/EmptyResponseJson.js → serialization/types/OperationOutcome.js} +2 -2
  114. package/serialization/types/OperationOutcomeResponse.d.ts +18 -0
  115. package/serialization/types/{EmptyResponse.js → OperationOutcomeResponse.js} +6 -6
  116. package/serialization/types/PageQueryConfig.d.ts +2 -0
  117. package/serialization/types/PageQueryConfig.js +2 -0
  118. package/serialization/types/SummaryConfig.d.ts +2 -0
  119. package/serialization/types/SummaryConfig.js +2 -0
  120. package/serialization/types/VisualAnalysisConfig.d.ts +16 -0
  121. package/serialization/types/VisualAnalysisConfig.js +37 -0
  122. package/serialization/types/VisualAnalysisConfigPartitionDirection.d.ts +10 -0
  123. package/serialization/types/VisualAnalysisConfigPartitionDirection.js +31 -0
  124. package/serialization/types/VisualAnalysisConfigScope.d.ts +10 -0
  125. package/serialization/types/{EnvelopeStatusDefaultMetaStatus.js → VisualAnalysisConfigScope.js} +2 -2
  126. package/serialization/types/index.d.ts +5 -4
  127. package/serialization/types/index.js +5 -4
  128. package/utils/batch-operate/SessionQueue.d.ts +46 -0
  129. package/utils/batch-operate/SessionQueue.js +223 -0
  130. package/utils/batch-operate/WindowQueue.d.ts +25 -0
  131. package/utils/batch-operate/WindowQueue.js +201 -0
  132. package/utils/batch-operate/batch-util.d.ts +3 -0
  133. package/utils/batch-operate/batch-util.js +51 -0
  134. package/utils/batch-operate/helpers.d.ts +2 -0
  135. package/utils/batch-operate/helpers.js +19 -0
  136. package/utils/batch-operate/types.d.ts +29 -0
  137. package/utils/batch-operate/types.js +2 -0
  138. package/utils/index.d.ts +2 -0
  139. package/utils/index.js +18 -0
  140. package/wrapper/AirtopClient.d.ts +3 -0
  141. package/wrapper/AirtopClient.js +16 -0
  142. package/api/types/EnvelopeStatusDefaultMeta.d.ts +0 -8
  143. package/api/types/EnvelopeStatusDefaultMetaStatus.d.ts +0 -9
  144. package/api/types/EnvelopeStatusDefaultMetaStatus.js +0 -11
  145. package/dist/api/types/EnvelopeStatusDefaultMeta.d.ts +0 -8
  146. package/dist/api/types/EnvelopeStatusDefaultMetaStatus.d.ts +0 -9
  147. package/dist/api/types/EnvelopeStatusDefaultMetaStatus.js +0 -11
  148. package/dist/serialization/types/EmptyResponse.d.ts +0 -18
  149. package/dist/serialization/types/EnvelopeStatusDefaultMeta.d.ts +0 -14
  150. package/dist/serialization/types/EnvelopeStatusDefaultMetaStatus.d.ts +0 -10
  151. package/serialization/types/EmptyResponse.d.ts +0 -18
  152. package/serialization/types/EnvelopeStatusDefaultMeta.d.ts +0 -14
  153. package/serialization/types/EnvelopeStatusDefaultMeta.js +0 -35
  154. package/serialization/types/EnvelopeStatusDefaultMetaStatus.d.ts +0 -10
  155. /package/api/types/{EmptyResponse.js → OperationOutcome.js} +0 -0
  156. /package/api/types/{EmptyResponseJson.js → OperationOutcomeResponse.js} +0 -0
  157. /package/api/types/{EnvelopeStatusDefaultMeta.js → VisualAnalysisConfig.js} +0 -0
  158. /package/dist/api/types/{EmptyResponse.js → OperationOutcome.js} +0 -0
  159. /package/dist/api/types/{EmptyResponseJson.js → OperationOutcomeResponse.js} +0 -0
  160. /package/dist/api/types/{EnvelopeStatusDefaultMeta.js → VisualAnalysisConfig.js} +0 -0
@@ -1,6 +1,6 @@
1
- export * as sessions from "./sessions";
2
- export * from "./sessions/types";
3
1
  export * as windows from "./windows";
4
2
  export * from "./windows/types";
5
- export * from "./sessions/client/requests";
3
+ export * as sessions from "./sessions";
4
+ export * from "./sessions/types";
6
5
  export * from "./windows/client/requests";
6
+ export * from "./sessions/client/requests";
@@ -26,10 +26,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.windows = exports.sessions = void 0;
30
- exports.sessions = __importStar(require("./sessions"));
31
- __exportStar(require("./sessions/types"), exports);
29
+ exports.sessions = exports.windows = void 0;
32
30
  exports.windows = __importStar(require("./windows"));
33
31
  __exportStar(require("./windows/types"), exports);
34
- __exportStar(require("./sessions/client/requests"), exports);
32
+ exports.sessions = __importStar(require("./sessions"));
33
+ __exportStar(require("./sessions/types"), exports);
35
34
  __exportStar(require("./windows/client/requests"), exports);
35
+ __exportStar(require("./sessions/client/requests"), exports);
@@ -6,5 +6,5 @@ import * as Airtop from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
7
  export declare const CreateWindowInputV1BodyWaitUntil: core.serialization.Schema<serializers.CreateWindowInputV1BodyWaitUntil.Raw, Airtop.CreateWindowInputV1BodyWaitUntil>;
8
8
  export declare namespace CreateWindowInputV1BodyWaitUntil {
9
- type Raw = "load" | "domContentLoaded" | "complete";
9
+ type Raw = "load" | "domContentLoaded" | "complete" | "noWait";
10
10
  }
@@ -28,4 +28,4 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.CreateWindowInputV1BodyWaitUntil = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
- exports.CreateWindowInputV1BodyWaitUntil = core.serialization.enum_(["load", "domContentLoaded", "complete"]);
31
+ exports.CreateWindowInputV1BodyWaitUntil = core.serialization.enum_(["load", "domContentLoaded", "complete", "noWait"]);
@@ -6,5 +6,5 @@ import * as Airtop from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
7
  export declare const WindowLoadUrlV1BodyWaitUntil: core.serialization.Schema<serializers.WindowLoadUrlV1BodyWaitUntil.Raw, Airtop.WindowLoadUrlV1BodyWaitUntil>;
8
8
  export declare namespace WindowLoadUrlV1BodyWaitUntil {
9
- type Raw = "load" | "domContentLoaded" | "complete";
9
+ type Raw = "load" | "domContentLoaded" | "complete" | "noWait";
10
10
  }
@@ -28,4 +28,4 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.WindowLoadUrlV1BodyWaitUntil = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
- exports.WindowLoadUrlV1BodyWaitUntil = core.serialization.enum_(["load", "domContentLoaded", "complete"]);
31
+ exports.WindowLoadUrlV1BodyWaitUntil = core.serialization.enum_(["load", "domContentLoaded", "complete", "noWait"]);
@@ -4,7 +4,10 @@
4
4
  import * as serializers from "../index";
5
5
  import * as Airtop from "../../api/index";
6
6
  import * as core from "../../core";
7
- export declare const ClickConfig: core.serialization.Schema<serializers.ClickConfig.Raw, Airtop.ClickConfig>;
7
+ import { VisualAnalysisConfig } from "./VisualAnalysisConfig";
8
+ export declare const ClickConfig: core.serialization.ObjectSchema<serializers.ClickConfig.Raw, Airtop.ClickConfig>;
8
9
  export declare namespace ClickConfig {
9
- type Raw = Record<string, unknown>;
10
+ interface Raw {
11
+ visualAnalysis?: VisualAnalysisConfig.Raw | null;
12
+ }
10
13
  }
@@ -28,4 +28,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ClickConfig = void 0;
30
30
  const core = __importStar(require("../../core"));
31
- exports.ClickConfig = core.serialization.record(core.serialization.string(), core.serialization.unknown());
31
+ const VisualAnalysisConfig_1 = require("./VisualAnalysisConfig");
32
+ exports.ClickConfig = core.serialization.object({
33
+ visualAnalysis: VisualAnalysisConfig_1.VisualAnalysisConfig.optional(),
34
+ });
@@ -10,5 +10,6 @@ export declare namespace Issue {
10
10
  code?: string | null;
11
11
  details?: Record<string, unknown> | null;
12
12
  message: string;
13
+ reason?: string | null;
13
14
  }
14
15
  }
@@ -32,4 +32,5 @@ exports.Issue = core.serialization.object({
32
32
  code: core.serialization.string().optional(),
33
33
  details: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(),
34
34
  message: core.serialization.string(),
35
+ reason: core.serialization.string().optional(),
35
36
  });
@@ -4,8 +4,8 @@
4
4
  import * as serializers from "../index";
5
5
  import * as Airtop from "../../api/index";
6
6
  import * as core from "../../core";
7
- export declare const EmptyResponseJson: core.serialization.ObjectSchema<serializers.EmptyResponseJson.Raw, Airtop.EmptyResponseJson>;
8
- export declare namespace EmptyResponseJson {
7
+ export declare const OperationOutcome: core.serialization.ObjectSchema<serializers.OperationOutcome.Raw, Airtop.OperationOutcome>;
8
+ export declare namespace OperationOutcome {
9
9
  interface Raw {
10
10
  success: boolean;
11
11
  }
@@ -26,8 +26,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.EmptyResponseJson = void 0;
29
+ exports.OperationOutcome = void 0;
30
30
  const core = __importStar(require("../../core"));
31
- exports.EmptyResponseJson = core.serialization.object({
31
+ exports.OperationOutcome = core.serialization.object({
32
32
  success: core.serialization.boolean(),
33
33
  });
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../index";
5
+ import * as Airtop from "../../api/index";
6
+ import * as core from "../../core";
7
+ import { OperationOutcome } from "./OperationOutcome";
8
+ import { Issue } from "./Issue";
9
+ import { EnvelopeDefaultMeta } from "./EnvelopeDefaultMeta";
10
+ export declare const OperationOutcomeResponse: core.serialization.ObjectSchema<serializers.OperationOutcomeResponse.Raw, Airtop.OperationOutcomeResponse>;
11
+ export declare namespace OperationOutcomeResponse {
12
+ interface Raw {
13
+ data: OperationOutcome.Raw;
14
+ errors?: Issue.Raw[] | null;
15
+ meta: EnvelopeDefaultMeta.Raw;
16
+ warnings?: Issue.Raw[] | null;
17
+ }
18
+ }
@@ -26,14 +26,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.EmptyResponse = void 0;
29
+ exports.OperationOutcomeResponse = void 0;
30
30
  const core = __importStar(require("../../core"));
31
- const EmptyResponseJson_1 = require("./EmptyResponseJson");
31
+ const OperationOutcome_1 = require("./OperationOutcome");
32
32
  const Issue_1 = require("./Issue");
33
- const EnvelopeStatusDefaultMeta_1 = require("./EnvelopeStatusDefaultMeta");
34
- exports.EmptyResponse = core.serialization.object({
35
- data: EmptyResponseJson_1.EmptyResponseJson,
33
+ const EnvelopeDefaultMeta_1 = require("./EnvelopeDefaultMeta");
34
+ exports.OperationOutcomeResponse = core.serialization.object({
35
+ data: OperationOutcome_1.OperationOutcome,
36
36
  errors: core.serialization.list(Issue_1.Issue).optional(),
37
- meta: EnvelopeStatusDefaultMeta_1.EnvelopeStatusDefaultMeta,
37
+ meta: EnvelopeDefaultMeta_1.EnvelopeDefaultMeta,
38
38
  warnings: core.serialization.list(Issue_1.Issue).optional(),
39
39
  });
@@ -4,9 +4,11 @@
4
4
  import * as serializers from "../index";
5
5
  import * as Airtop from "../../api/index";
6
6
  import * as core from "../../core";
7
+ import { PageQueryExperimentalConfig } from "./PageQueryExperimentalConfig";
7
8
  export declare const PageQueryConfig: core.serialization.ObjectSchema<serializers.PageQueryConfig.Raw, Airtop.PageQueryConfig>;
8
9
  export declare namespace PageQueryConfig {
9
10
  interface Raw {
11
+ experimental?: PageQueryExperimentalConfig.Raw | null;
10
12
  outputSchema?: string | null;
11
13
  }
12
14
  }
@@ -28,6 +28,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.PageQueryConfig = void 0;
30
30
  const core = __importStar(require("../../core"));
31
+ const PageQueryExperimentalConfig_1 = require("./PageQueryExperimentalConfig");
31
32
  exports.PageQueryConfig = core.serialization.object({
33
+ experimental: PageQueryExperimentalConfig_1.PageQueryExperimentalConfig.optional(),
32
34
  outputSchema: core.serialization.string().optional(),
33
35
  });
@@ -4,9 +4,11 @@
4
4
  import * as serializers from "../index";
5
5
  import * as Airtop from "../../api/index";
6
6
  import * as core from "../../core";
7
+ import { SummaryExperimentalConfig } from "./SummaryExperimentalConfig";
7
8
  export declare const SummaryConfig: core.serialization.ObjectSchema<serializers.SummaryConfig.Raw, Airtop.SummaryConfig>;
8
9
  export declare namespace SummaryConfig {
9
10
  interface Raw {
11
+ experimental?: SummaryExperimentalConfig.Raw | null;
10
12
  outputSchema?: string | null;
11
13
  }
12
14
  }
@@ -28,6 +28,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.SummaryConfig = void 0;
30
30
  const core = __importStar(require("../../core"));
31
+ const SummaryExperimentalConfig_1 = require("./SummaryExperimentalConfig");
31
32
  exports.SummaryConfig = core.serialization.object({
33
+ experimental: SummaryExperimentalConfig_1.SummaryExperimentalConfig.optional(),
32
34
  outputSchema: core.serialization.string().optional(),
33
35
  });
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../index";
5
+ import * as Airtop from "../../api/index";
6
+ import * as core from "../../core";
7
+ import { VisualAnalysisConfigPartitionDirection } from "./VisualAnalysisConfigPartitionDirection";
8
+ import { VisualAnalysisConfigScope } from "./VisualAnalysisConfigScope";
9
+ export declare const VisualAnalysisConfig: core.serialization.ObjectSchema<serializers.VisualAnalysisConfig.Raw, Airtop.VisualAnalysisConfig>;
10
+ export declare namespace VisualAnalysisConfig {
11
+ interface Raw {
12
+ overlapPercentage?: number | null;
13
+ partitionDirection?: VisualAnalysisConfigPartitionDirection.Raw | null;
14
+ scope?: VisualAnalysisConfigScope.Raw | null;
15
+ }
16
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.VisualAnalysisConfig = void 0;
30
+ const core = __importStar(require("../../core"));
31
+ const VisualAnalysisConfigPartitionDirection_1 = require("./VisualAnalysisConfigPartitionDirection");
32
+ const VisualAnalysisConfigScope_1 = require("./VisualAnalysisConfigScope");
33
+ exports.VisualAnalysisConfig = core.serialization.object({
34
+ overlapPercentage: core.serialization.number().optional(),
35
+ partitionDirection: VisualAnalysisConfigPartitionDirection_1.VisualAnalysisConfigPartitionDirection.optional(),
36
+ scope: VisualAnalysisConfigScope_1.VisualAnalysisConfigScope.optional(),
37
+ });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../index";
5
+ import * as Airtop from "../../api/index";
6
+ import * as core from "../../core";
7
+ export declare const VisualAnalysisConfigPartitionDirection: core.serialization.Schema<serializers.VisualAnalysisConfigPartitionDirection.Raw, Airtop.VisualAnalysisConfigPartitionDirection>;
8
+ export declare namespace VisualAnalysisConfigPartitionDirection {
9
+ type Raw = "vertical" | "horizontal" | "bidirectional";
10
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.VisualAnalysisConfigPartitionDirection = void 0;
30
+ const core = __importStar(require("../../core"));
31
+ exports.VisualAnalysisConfigPartitionDirection = core.serialization.enum_(["vertical", "horizontal", "bidirectional"]);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../index";
5
+ import * as Airtop from "../../api/index";
6
+ import * as core from "../../core";
7
+ export declare const VisualAnalysisConfigScope: core.serialization.Schema<serializers.VisualAnalysisConfigScope.Raw, Airtop.VisualAnalysisConfigScope>;
8
+ export declare namespace VisualAnalysisConfigScope {
9
+ type Raw = "viewport" | "page";
10
+ }
@@ -26,6 +26,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.EnvelopeStatusDefaultMetaStatus = void 0;
29
+ exports.VisualAnalysisConfigScope = void 0;
30
30
  const core = __importStar(require("../../core"));
31
- exports.EnvelopeStatusDefaultMetaStatus = core.serialization.enum_(["success", " failure", " timeout"]);
31
+ exports.VisualAnalysisConfigScope = core.serialization.enum_(["viewport", "page"]);
@@ -2,11 +2,7 @@ export * from "./AiPromptResponse";
2
2
  export * from "./AiResponseEnvelope";
3
3
  export * from "./ClickConfig";
4
4
  export * from "./ClientProvidedResponseMetadata";
5
- export * from "./EmptyResponse";
6
- export * from "./EmptyResponseJson";
7
5
  export * from "./EnvelopeDefaultMeta";
8
- export * from "./EnvelopeStatusDefaultMetaStatus";
9
- export * from "./EnvelopeStatusDefaultMeta";
10
6
  export * from "./ErrorDetail";
11
7
  export * from "./ErrorMessage";
12
8
  export * from "./ErrorModel";
@@ -17,6 +13,8 @@ export * from "./ExternalSessionAiResponseMetadataUsage";
17
13
  export * from "./ExternalSessionConfig";
18
14
  export * from "./ExternalSessionWithConnectionInfo";
19
15
  export * from "./Issue";
16
+ export * from "./OperationOutcome";
17
+ export * from "./OperationOutcomeResponse";
20
18
  export * from "./PageQueryConfig";
21
19
  export * from "./PageQueryExperimentalConfig";
22
20
  export * from "./Pagination";
@@ -38,6 +36,9 @@ export * from "./StatusMessageStatus";
38
36
  export * from "./StatusMessage";
39
37
  export * from "./SummaryConfig";
40
38
  export * from "./SummaryExperimentalConfig";
39
+ export * from "./VisualAnalysisConfigPartitionDirection";
40
+ export * from "./VisualAnalysisConfigScope";
41
+ export * from "./VisualAnalysisConfig";
41
42
  export * from "./Window";
42
43
  export * from "./WindowId";
43
44
  export * from "./WindowIdResponse";
@@ -18,11 +18,7 @@ __exportStar(require("./AiPromptResponse"), exports);
18
18
  __exportStar(require("./AiResponseEnvelope"), exports);
19
19
  __exportStar(require("./ClickConfig"), exports);
20
20
  __exportStar(require("./ClientProvidedResponseMetadata"), exports);
21
- __exportStar(require("./EmptyResponse"), exports);
22
- __exportStar(require("./EmptyResponseJson"), exports);
23
21
  __exportStar(require("./EnvelopeDefaultMeta"), exports);
24
- __exportStar(require("./EnvelopeStatusDefaultMetaStatus"), exports);
25
- __exportStar(require("./EnvelopeStatusDefaultMeta"), exports);
26
22
  __exportStar(require("./ErrorDetail"), exports);
27
23
  __exportStar(require("./ErrorMessage"), exports);
28
24
  __exportStar(require("./ErrorModel"), exports);
@@ -33,6 +29,8 @@ __exportStar(require("./ExternalSessionAiResponseMetadataUsage"), exports);
33
29
  __exportStar(require("./ExternalSessionConfig"), exports);
34
30
  __exportStar(require("./ExternalSessionWithConnectionInfo"), exports);
35
31
  __exportStar(require("./Issue"), exports);
32
+ __exportStar(require("./OperationOutcome"), exports);
33
+ __exportStar(require("./OperationOutcomeResponse"), exports);
36
34
  __exportStar(require("./PageQueryConfig"), exports);
37
35
  __exportStar(require("./PageQueryExperimentalConfig"), exports);
38
36
  __exportStar(require("./Pagination"), exports);
@@ -54,6 +52,9 @@ __exportStar(require("./StatusMessageStatus"), exports);
54
52
  __exportStar(require("./StatusMessage"), exports);
55
53
  __exportStar(require("./SummaryConfig"), exports);
56
54
  __exportStar(require("./SummaryExperimentalConfig"), exports);
55
+ __exportStar(require("./VisualAnalysisConfigPartitionDirection"), exports);
56
+ __exportStar(require("./VisualAnalysisConfigScope"), exports);
57
+ __exportStar(require("./VisualAnalysisConfig"), exports);
57
58
  __exportStar(require("./Window"), exports);
58
59
  __exportStar(require("./WindowId"), exports);
59
60
  __exportStar(require("./WindowIdResponse"), exports);
@@ -0,0 +1,46 @@
1
+ /// <reference types="node" />
2
+ import type { AirtopClient } from "wrapper/AirtopClient";
3
+ import type { BatchOperationError, BatchOperationInput, BatchOperationResponse, BatchOperationUrl } from "./types";
4
+ import type { EventEmitter } from "node:events";
5
+ import type { AirtopSessionConfigV1 } from "wrapper/AirtopSessions";
6
+ export declare class SessionQueue<T> {
7
+ private activePromises;
8
+ private activePromisesMutex;
9
+ private maxConcurrentSessions;
10
+ private runEmitter;
11
+ private maxWindowsPerSession;
12
+ private sessionConfig?;
13
+ private initialBatches;
14
+ private operation;
15
+ private onError?;
16
+ private isHalted;
17
+ private batchQueue;
18
+ private batchQueueMutex;
19
+ private latestProcessingPromise;
20
+ private processingPromisesCount;
21
+ private client;
22
+ private sessionPool;
23
+ private sessionPoolMutex;
24
+ private results;
25
+ constructor({ maxConcurrentSessions, runEmitter, maxWindowsPerSession, initialBatches, operation, client, sessionConfig, onError, }: {
26
+ maxConcurrentSessions: number;
27
+ runEmitter: EventEmitter;
28
+ maxWindowsPerSession: number;
29
+ initialBatches: BatchOperationUrl[][];
30
+ operation: (input: BatchOperationInput) => Promise<BatchOperationResponse<T>>;
31
+ client: AirtopClient;
32
+ sessionConfig?: AirtopSessionConfigV1;
33
+ onError?: (error: BatchOperationError) => Promise<void>;
34
+ });
35
+ handleHaltEvent(): void;
36
+ addUrlsToBatchQueue(newBatch: BatchOperationUrl[]): Promise<void>;
37
+ processInitialBatches(): Promise<void>;
38
+ waitForProcessingToComplete(): Promise<T[]>;
39
+ private terminateAllSessions;
40
+ private processPendingBatches;
41
+ private handleErrorWithCallback;
42
+ private logErrorForUrls;
43
+ private safelyTerminateSession;
44
+ private formatError;
45
+ private handleErrorAndWarningResponses;
46
+ }