@airtop/sdk 0.1.8 → 0.1.11

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 (76) hide show
  1. package/api/resources/profiles/client/Client.js +4 -4
  2. package/api/resources/sessions/client/Client.d.ts +9 -0
  3. package/api/resources/sessions/client/Client.js +63 -10
  4. package/api/resources/windows/client/Client.d.ts +10 -0
  5. package/api/resources/windows/client/Client.js +85 -22
  6. package/api/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.d.ts +23 -0
  7. package/api/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.js +5 -0
  8. package/api/resources/windows/client/requests/index.d.ts +1 -0
  9. package/api/types/ExternalProfileV1.d.ts +1 -1
  10. package/api/types/PaginatedExtractionConfig.d.ts +11 -0
  11. package/api/types/PaginatedExtractionConfig.js +5 -0
  12. package/api/types/SessionConfigV1.d.ts +2 -0
  13. package/api/types/SessionConfigV1ProxyItem.d.ts +1 -1
  14. package/api/types/SessionPageQueryHandlerRequestBody.d.ts +2 -2
  15. package/api/types/StatusMessageStatus.d.ts +3 -1
  16. package/api/types/StatusMessageStatus.js +2 -0
  17. package/api/types/index.d.ts +1 -0
  18. package/api/types/index.js +1 -0
  19. package/dist/api/resources/profiles/client/Client.js +4 -4
  20. package/dist/api/resources/sessions/client/Client.d.ts +9 -0
  21. package/dist/api/resources/sessions/client/Client.js +63 -10
  22. package/dist/api/resources/windows/client/Client.d.ts +10 -0
  23. package/dist/api/resources/windows/client/Client.js +85 -22
  24. package/dist/api/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.d.ts +23 -0
  25. package/dist/api/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.js +5 -0
  26. package/dist/api/resources/windows/client/requests/index.d.ts +1 -0
  27. package/dist/api/types/ExternalProfileV1.d.ts +1 -1
  28. package/dist/api/types/PaginatedExtractionConfig.d.ts +11 -0
  29. package/dist/api/types/PaginatedExtractionConfig.js +5 -0
  30. package/dist/api/types/SessionConfigV1.d.ts +2 -0
  31. package/dist/api/types/SessionConfigV1ProxyItem.d.ts +1 -1
  32. package/dist/api/types/SessionPageQueryHandlerRequestBody.d.ts +2 -2
  33. package/dist/api/types/StatusMessageStatus.d.ts +3 -1
  34. package/dist/api/types/StatusMessageStatus.js +2 -0
  35. package/dist/api/types/index.d.ts +1 -0
  36. package/dist/api/types/index.js +1 -0
  37. package/dist/serialization/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.d.ts +17 -0
  38. package/dist/serialization/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.js +38 -0
  39. package/dist/serialization/resources/windows/client/requests/index.d.ts +1 -0
  40. package/dist/serialization/resources/windows/client/requests/index.js +3 -1
  41. package/dist/serialization/types/PaginatedExtractionConfig.d.ts +14 -0
  42. package/dist/serialization/types/PaginatedExtractionConfig.js +35 -0
  43. package/dist/serialization/types/SessionConfigV1.d.ts +1 -0
  44. package/dist/serialization/types/SessionConfigV1.js +1 -0
  45. package/dist/serialization/types/StatusMessageStatus.d.ts +1 -1
  46. package/dist/serialization/types/StatusMessageStatus.js +1 -1
  47. package/dist/serialization/types/index.d.ts +1 -0
  48. package/dist/serialization/types/index.js +1 -0
  49. package/dist/utils/batch-operate/SessionQueue.d.ts +2 -3
  50. package/dist/utils/batch-operate/WindowQueue.d.ts +2 -3
  51. package/dist/utils/batch-operate/batch-util.d.ts +1 -1
  52. package/dist/utils/batch-operate/batch-util.js +2 -4
  53. package/dist/utils/batch-operate/types.d.ts +1 -1
  54. package/dist/wrapper/AirtopClient.d.ts +2 -0
  55. package/dist/wrapper/AirtopClient.js +36 -0
  56. package/package.json +3 -2
  57. package/reference.md +75 -15
  58. package/serialization/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.d.ts +17 -0
  59. package/serialization/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.js +38 -0
  60. package/serialization/resources/windows/client/requests/index.d.ts +1 -0
  61. package/serialization/resources/windows/client/requests/index.js +3 -1
  62. package/serialization/types/PaginatedExtractionConfig.d.ts +14 -0
  63. package/serialization/types/PaginatedExtractionConfig.js +35 -0
  64. package/serialization/types/SessionConfigV1.d.ts +1 -0
  65. package/serialization/types/SessionConfigV1.js +1 -0
  66. package/serialization/types/StatusMessageStatus.d.ts +1 -1
  67. package/serialization/types/StatusMessageStatus.js +1 -1
  68. package/serialization/types/index.d.ts +1 -0
  69. package/serialization/types/index.js +1 -0
  70. package/utils/batch-operate/SessionQueue.d.ts +2 -3
  71. package/utils/batch-operate/WindowQueue.d.ts +2 -3
  72. package/utils/batch-operate/batch-util.d.ts +1 -1
  73. package/utils/batch-operate/batch-util.js +2 -4
  74. package/utils/batch-operate/types.d.ts +1 -1
  75. package/wrapper/AirtopClient.d.ts +2 -0
  76. package/wrapper/AirtopClient.js +36 -0
@@ -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.8",
98
- "User-Agent": "@airtop/sdk/0.1.8",
97
+ "X-Fern-SDK-Version": "0.1.11",
98
+ "User-Agent": "@airtop/sdk/0.1.11",
99
99
  "X-Fern-Runtime": core.RUNTIME.type,
100
100
  "X-Fern-Runtime-Version": core.RUNTIME.version,
101
101
  },
@@ -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.8",
184
- "User-Agent": "@airtop/sdk/0.1.8",
183
+ "X-Fern-SDK-Version": "0.1.11",
184
+ "User-Agent": "@airtop/sdk/0.1.11",
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.8",
249
- "User-Agent": "@airtop/sdk/0.1.8",
248
+ "X-Fern-SDK-Version": "0.1.11",
249
+ "User-Agent": "@airtop/sdk/0.1.11",
250
250
  "X-Fern-Runtime": core.RUNTIME.type,
251
251
  "X-Fern-Runtime-Version": core.RUNTIME.version,
252
252
  },
@@ -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.8",
336
- "User-Agent": "@airtop/sdk/0.1.8",
335
+ "X-Fern-SDK-Version": "0.1.11",
336
+ "User-Agent": "@airtop/sdk/0.1.11",
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.8",
384
- "User-Agent": "@airtop/sdk/0.1.8",
383
+ "X-Fern-SDK-Version": "0.1.11",
384
+ "User-Agent": "@airtop/sdk/0.1.11",
385
385
  "X-Fern-Runtime": core.RUNTIME.type,
386
386
  "X-Fern-Runtime-Version": core.RUNTIME.version,
387
387
  },
@@ -459,6 +459,59 @@ class Sessions {
459
459
  }
460
460
  });
461
461
  }
462
+ /**
463
+ * @param {string} sessionId - ID of the session that owns the window.
464
+ * @param {string} profileName - Name under which to save the profile.
465
+ * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
466
+ *
467
+ * @example
468
+ * await client.sessions.saveProfileOnTermination("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "myProfile")
469
+ */
470
+ saveProfileOnTermination(sessionId, profileName, requestOptions) {
471
+ var _a, _b;
472
+ return __awaiter(this, void 0, void 0, function* () {
473
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
474
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/save-profile-on-termination/${encodeURIComponent(profileName)}`),
475
+ method: "PUT",
476
+ headers: {
477
+ Authorization: yield this._getAuthorizationHeader(),
478
+ "X-Fern-Language": "JavaScript",
479
+ "X-Fern-SDK-Name": "@airtop/sdk",
480
+ "X-Fern-SDK-Version": "0.1.11",
481
+ "User-Agent": "@airtop/sdk/0.1.11",
482
+ "X-Fern-Runtime": core.RUNTIME.type,
483
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
484
+ },
485
+ contentType: "application/json",
486
+ requestType: "json",
487
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
488
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
489
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
490
+ });
491
+ if (_response.ok) {
492
+ return;
493
+ }
494
+ if (_response.error.reason === "status-code") {
495
+ throw new errors.AirtopError({
496
+ statusCode: _response.error.statusCode,
497
+ body: _response.error.body,
498
+ });
499
+ }
500
+ switch (_response.error.reason) {
501
+ case "non-json":
502
+ throw new errors.AirtopError({
503
+ statusCode: _response.error.statusCode,
504
+ body: _response.error.rawBody,
505
+ });
506
+ case "timeout":
507
+ throw new errors.AirtopTimeoutError();
508
+ case "unknown":
509
+ throw new errors.AirtopError({
510
+ message: _response.error.errorMessage,
511
+ });
512
+ }
513
+ });
514
+ }
462
515
  _getAuthorizationHeader() {
463
516
  return __awaiter(this, void 0, void 0, function* () {
464
517
  return `Bearer ${yield core.Supplier.get(this._options.apiKey)}`;
@@ -98,6 +98,16 @@ export declare class Windows {
98
98
  * })
99
99
  */
100
100
  pageQuery(sessionId: string, windowId: string, request: Airtop.SessionPageQueryHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiPromptResponse>;
101
+ /**
102
+ * @param {string} sessionId - The session id for the window.
103
+ * @param {string} windowId - The Airtop window id of the browser window.
104
+ * @param {Airtop.SessionPaginatedExtractionHandlerRequestBody} request
105
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
106
+ *
107
+ * @example
108
+ * await client.windows.paginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
109
+ */
110
+ paginatedExtraction(sessionId: string, windowId: string, request?: Airtop.SessionPaginatedExtractionHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiPromptResponse>;
101
111
  /**
102
112
  * This endpoint is deprecated. Please use the `pageQuery` endpoint instead.
103
113
  *
@@ -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.8",
70
- "User-Agent": "@airtop/sdk/0.1.8",
69
+ "X-Fern-SDK-Version": "0.1.11",
70
+ "User-Agent": "@airtop/sdk/0.1.11",
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.8",
144
- "User-Agent": "@airtop/sdk/0.1.8",
143
+ "X-Fern-SDK-Version": "0.1.11",
144
+ "User-Agent": "@airtop/sdk/0.1.11",
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.8",
207
- "User-Agent": "@airtop/sdk/0.1.8",
206
+ "X-Fern-SDK-Version": "0.1.11",
207
+ "User-Agent": "@airtop/sdk/0.1.11",
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.8",
267
- "User-Agent": "@airtop/sdk/0.1.8",
266
+ "X-Fern-SDK-Version": "0.1.11",
267
+ "User-Agent": "@airtop/sdk/0.1.11",
268
268
  "X-Fern-Runtime": core.RUNTIME.type,
269
269
  "X-Fern-Runtime-Version": core.RUNTIME.version,
270
270
  },
@@ -325,8 +325,8 @@ 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.8",
329
- "User-Agent": "@airtop/sdk/0.1.8",
328
+ "X-Fern-SDK-Version": "0.1.11",
329
+ "User-Agent": "@airtop/sdk/0.1.11",
330
330
  "X-Fern-Runtime": core.RUNTIME.type,
331
331
  "X-Fern-Runtime-Version": core.RUNTIME.version,
332
332
  },
@@ -386,8 +386,8 @@ class Windows {
386
386
  Authorization: yield this._getAuthorizationHeader(),
387
387
  "X-Fern-Language": "JavaScript",
388
388
  "X-Fern-SDK-Name": "@airtop/sdk",
389
- "X-Fern-SDK-Version": "0.1.8",
390
- "User-Agent": "@airtop/sdk/0.1.8",
389
+ "X-Fern-SDK-Version": "0.1.11",
390
+ "User-Agent": "@airtop/sdk/0.1.11",
391
391
  "X-Fern-Runtime": core.RUNTIME.type,
392
392
  "X-Fern-Runtime-Version": core.RUNTIME.version,
393
393
  },
@@ -449,8 +449,8 @@ class Windows {
449
449
  Authorization: yield this._getAuthorizationHeader(),
450
450
  "X-Fern-Language": "JavaScript",
451
451
  "X-Fern-SDK-Name": "@airtop/sdk",
452
- "X-Fern-SDK-Version": "0.1.8",
453
- "User-Agent": "@airtop/sdk/0.1.8",
452
+ "X-Fern-SDK-Version": "0.1.11",
453
+ "User-Agent": "@airtop/sdk/0.1.11",
454
454
  "X-Fern-Runtime": core.RUNTIME.type,
455
455
  "X-Fern-Runtime-Version": core.RUNTIME.version,
456
456
  },
@@ -493,6 +493,69 @@ class Windows {
493
493
  }
494
494
  });
495
495
  }
496
+ /**
497
+ * @param {string} sessionId - The session id for the window.
498
+ * @param {string} windowId - The Airtop window id of the browser window.
499
+ * @param {Airtop.SessionPaginatedExtractionHandlerRequestBody} request
500
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
501
+ *
502
+ * @example
503
+ * await client.windows.paginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
504
+ */
505
+ paginatedExtraction(sessionId, windowId, request = {}, requestOptions) {
506
+ var _a, _b;
507
+ return __awaiter(this, void 0, void 0, function* () {
508
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
509
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/paginated-extraction`),
510
+ method: "POST",
511
+ headers: {
512
+ Authorization: yield this._getAuthorizationHeader(),
513
+ "X-Fern-Language": "JavaScript",
514
+ "X-Fern-SDK-Name": "@airtop/sdk",
515
+ "X-Fern-SDK-Version": "0.1.11",
516
+ "User-Agent": "@airtop/sdk/0.1.11",
517
+ "X-Fern-Runtime": core.RUNTIME.type,
518
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
519
+ },
520
+ contentType: "application/json",
521
+ requestType: "json",
522
+ body: serializers.SessionPaginatedExtractionHandlerRequestBody.jsonOrThrow(request, {
523
+ unrecognizedObjectKeys: "strip",
524
+ }),
525
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
526
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
527
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
528
+ });
529
+ if (_response.ok) {
530
+ return serializers.AiPromptResponse.parseOrThrow(_response.body, {
531
+ unrecognizedObjectKeys: "passthrough",
532
+ allowUnrecognizedUnionMembers: true,
533
+ allowUnrecognizedEnumValues: true,
534
+ skipValidation: true,
535
+ breadcrumbsPrefix: ["response"],
536
+ });
537
+ }
538
+ if (_response.error.reason === "status-code") {
539
+ throw new errors.AirtopError({
540
+ statusCode: _response.error.statusCode,
541
+ body: _response.error.body,
542
+ });
543
+ }
544
+ switch (_response.error.reason) {
545
+ case "non-json":
546
+ throw new errors.AirtopError({
547
+ statusCode: _response.error.statusCode,
548
+ body: _response.error.rawBody,
549
+ });
550
+ case "timeout":
551
+ throw new errors.AirtopTimeoutError();
552
+ case "unknown":
553
+ throw new errors.AirtopError({
554
+ message: _response.error.errorMessage,
555
+ });
556
+ }
557
+ });
558
+ }
496
559
  /**
497
560
  * This endpoint is deprecated. Please use the `pageQuery` endpoint instead.
498
561
  *
@@ -516,8 +579,8 @@ class Windows {
516
579
  Authorization: yield this._getAuthorizationHeader(),
517
580
  "X-Fern-Language": "JavaScript",
518
581
  "X-Fern-SDK-Name": "@airtop/sdk",
519
- "X-Fern-SDK-Version": "0.1.8",
520
- "User-Agent": "@airtop/sdk/0.1.8",
582
+ "X-Fern-SDK-Version": "0.1.11",
583
+ "User-Agent": "@airtop/sdk/0.1.11",
521
584
  "X-Fern-Runtime": core.RUNTIME.type,
522
585
  "X-Fern-Runtime-Version": core.RUNTIME.version,
523
586
  },
@@ -579,8 +642,8 @@ class Windows {
579
642
  Authorization: yield this._getAuthorizationHeader(),
580
643
  "X-Fern-Language": "JavaScript",
581
644
  "X-Fern-SDK-Name": "@airtop/sdk",
582
- "X-Fern-SDK-Version": "0.1.8",
583
- "User-Agent": "@airtop/sdk/0.1.8",
645
+ "X-Fern-SDK-Version": "0.1.11",
646
+ "User-Agent": "@airtop/sdk/0.1.11",
584
647
  "X-Fern-Runtime": core.RUNTIME.type,
585
648
  "X-Fern-Runtime-Version": core.RUNTIME.version,
586
649
  },
@@ -642,8 +705,8 @@ class Windows {
642
705
  Authorization: yield this._getAuthorizationHeader(),
643
706
  "X-Fern-Language": "JavaScript",
644
707
  "X-Fern-SDK-Name": "@airtop/sdk",
645
- "X-Fern-SDK-Version": "0.1.8",
646
- "User-Agent": "@airtop/sdk/0.1.8",
708
+ "X-Fern-SDK-Version": "0.1.11",
709
+ "User-Agent": "@airtop/sdk/0.1.11",
647
710
  "X-Fern-Runtime": core.RUNTIME.type,
648
711
  "X-Fern-Runtime-Version": core.RUNTIME.version,
649
712
  },
@@ -707,8 +770,8 @@ class Windows {
707
770
  Authorization: yield this._getAuthorizationHeader(),
708
771
  "X-Fern-Language": "JavaScript",
709
772
  "X-Fern-SDK-Name": "@airtop/sdk",
710
- "X-Fern-SDK-Version": "0.1.8",
711
- "User-Agent": "@airtop/sdk/0.1.8",
773
+ "X-Fern-SDK-Version": "0.1.11",
774
+ "User-Agent": "@airtop/sdk/0.1.11",
712
775
  "X-Fern-Runtime": core.RUNTIME.type,
713
776
  "X-Fern-Runtime-Version": core.RUNTIME.version,
714
777
  },
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Airtop from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {}
8
+ */
9
+ export interface SessionPaginatedExtractionHandlerRequestBody {
10
+ clientRequestId?: string;
11
+ /** Request configuration */
12
+ configuration?: Airtop.PaginatedExtractionConfig;
13
+ /** A credit threshold that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended). */
14
+ costThresholdCredits?: number;
15
+ /** A prompt providing the Airtop AI model with additional direction or constraints about the page and the details you want to extract from the page. */
16
+ prompt?: string;
17
+ /**
18
+ * A time threshold in seconds that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended).
19
+ *
20
+ * This setting does not extend the maximum session duration provided at the time of session creation.
21
+ */
22
+ timeThresholdSeconds?: number;
23
+ }
@@ -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 });
@@ -3,6 +3,7 @@ export { type GetWindowInfoRequest } from "./GetWindowInfoRequest";
3
3
  export { type WindowLoadUrlV1Body } from "./WindowLoadUrlV1Body";
4
4
  export { type SessionClickHandlerRequestBody } from "./SessionClickHandlerRequestBody";
5
5
  export { type SessionHoverHandlerRequestBody } from "./SessionHoverHandlerRequestBody";
6
+ export { type SessionPaginatedExtractionHandlerRequestBody } from "./SessionPaginatedExtractionHandlerRequestBody";
6
7
  export { type ScrapeContentRequest } from "./ScrapeContentRequest";
7
8
  export { type SessionSummaryHandlerRequestBody } from "./SessionSummaryHandlerRequestBody";
8
9
  export { type SessionTypeHandlerRequestBody } from "./SessionTypeHandlerRequestBody";
@@ -4,6 +4,6 @@
4
4
  export interface ExternalProfileV1 {
5
5
  /** Id of the profile. */
6
6
  profileId: string;
7
- /** Status of the profile. */
7
+ /** DEPRECATED. */
8
8
  status?: string;
9
9
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface PaginatedExtractionConfig {
5
+ /** The mode to use for interaction. If set to 'auto', Airtop AI will automatically choose the most cost-effective interaction mode. If set to 'accurate', Airtop AI will use the most accurate interaction mode. If set to 'cost-efficient', Airtop AI will use the most cost-effective interaction mode. */
6
+ interactionMode?: string;
7
+ /** JSON schema defining the structure of the output. If not provided, the format of the output might vary. */
8
+ outputSchema?: string;
9
+ /** The mode to use for pagination. If set to 'auto', Airtop AI will automatically look for pagination links first and then attempt infinite scrolling to load more content. If set to 'paginated', Airtop AI will follow pagination links to load more content. If set to 'infinite-scroll', Airtop AI will scroll the page to load more content. */
10
+ paginationMode?: string;
11
+ }
@@ -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 });
@@ -5,6 +5,8 @@ import * as Airtop from "../index";
5
5
  export interface SessionConfigV1 {
6
6
  /** Id of a profile to load into the session. */
7
7
  baseProfileId?: string;
8
+ /** - */
9
+ extensionIds?: string[];
8
10
  /** Persist the profile. */
9
11
  persistProfile?: boolean;
10
12
  /** Proxy configuration. */
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as Airtop from "../index";
5
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'
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
7
  */
8
8
  export interface SessionConfigV1ProxyItem {
9
9
  domainPattern: string;
@@ -6,14 +6,14 @@ export interface SessionPageQueryHandlerRequestBody {
6
6
  clientRequestId?: string;
7
7
  /** Request configuration */
8
8
  configuration?: Airtop.PageQueryConfig;
9
- /** A credit threshold that, once exceeded, will cause the operation to be cancelled. Note that this is _not_ a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended). */
9
+ /** A credit threshold that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended). */
10
10
  costThresholdCredits?: number;
11
11
  /** Make a best effort attempt to load more content items than are originally displayed on the page, e.g. by following pagination links, clicking controls to load more content, utilizing infinite scrolling, etc. This can be quite a bit more costly, but may be necessary for sites that require additional interaction to show the needed results. You can provide constraints in your prompt (e.g. on the total number of pages or results to consider). */
12
12
  followPaginationLinks?: boolean;
13
13
  /** The prompt to submit about the content in the browser window. */
14
14
  prompt: string;
15
15
  /**
16
- * A time threshold in seconds that, once exceeded, will cause the operation to be cancelled. Note that this is _not_ a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended).
16
+ * A time threshold in seconds that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended).
17
17
  *
18
18
  * This setting does not extend the maximum session duration provided at the time of session creation.
19
19
  */
@@ -4,10 +4,12 @@
4
4
  /**
5
5
  * Status of the session
6
6
  */
7
- export declare type StatusMessageStatus = "awaitingCapacity" | "initializing" | "running" | "ended";
7
+ export declare type StatusMessageStatus = "awaitingCapacity" | "initializing" | "running" | "ended" | "error" | "disconnected";
8
8
  export declare const StatusMessageStatus: {
9
9
  readonly AwaitingCapacity: "awaitingCapacity";
10
10
  readonly Initializing: "initializing";
11
11
  readonly Running: "running";
12
12
  readonly Ended: "ended";
13
+ readonly Error: "error";
14
+ readonly Disconnected: "disconnected";
13
15
  };
@@ -9,4 +9,6 @@ exports.StatusMessageStatus = {
9
9
  Initializing: "initializing",
10
10
  Running: "running",
11
11
  Ended: "ended",
12
+ Error: "error",
13
+ Disconnected: "disconnected",
12
14
  };
@@ -17,6 +17,7 @@ export * from "./OperationOutcome";
17
17
  export * from "./OperationOutcomeResponse";
18
18
  export * from "./PageQueryConfig";
19
19
  export * from "./PageQueryExperimentalConfig";
20
+ export * from "./PaginatedExtractionConfig";
20
21
  export * from "./Pagination";
21
22
  export * from "./ProfilesResponse";
22
23
  export * from "./ScrapeResponse";
@@ -33,6 +33,7 @@ __exportStar(require("./OperationOutcome"), exports);
33
33
  __exportStar(require("./OperationOutcomeResponse"), exports);
34
34
  __exportStar(require("./PageQueryConfig"), exports);
35
35
  __exportStar(require("./PageQueryExperimentalConfig"), exports);
36
+ __exportStar(require("./PaginatedExtractionConfig"), exports);
36
37
  __exportStar(require("./Pagination"), exports);
37
38
  __exportStar(require("./ProfilesResponse"), exports);
38
39
  __exportStar(require("./ScrapeResponse"), exports);
@@ -0,0 +1,17 @@
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 { PaginatedExtractionConfig } from "../../../../types/PaginatedExtractionConfig";
8
+ export declare const SessionPaginatedExtractionHandlerRequestBody: core.serialization.Schema<serializers.SessionPaginatedExtractionHandlerRequestBody.Raw, Airtop.SessionPaginatedExtractionHandlerRequestBody>;
9
+ export declare namespace SessionPaginatedExtractionHandlerRequestBody {
10
+ interface Raw {
11
+ clientRequestId?: string | null;
12
+ configuration?: PaginatedExtractionConfig.Raw | null;
13
+ costThresholdCredits?: number | null;
14
+ prompt?: string | null;
15
+ timeThresholdSeconds?: number | null;
16
+ }
17
+ }
@@ -0,0 +1,38 @@
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.SessionPaginatedExtractionHandlerRequestBody = void 0;
30
+ const core = __importStar(require("../../../../../core"));
31
+ const PaginatedExtractionConfig_1 = require("../../../../types/PaginatedExtractionConfig");
32
+ exports.SessionPaginatedExtractionHandlerRequestBody = core.serialization.object({
33
+ clientRequestId: core.serialization.string().optional(),
34
+ configuration: PaginatedExtractionConfig_1.PaginatedExtractionConfig.optional(),
35
+ costThresholdCredits: core.serialization.number().optional(),
36
+ prompt: core.serialization.string().optional(),
37
+ timeThresholdSeconds: core.serialization.number().optional(),
38
+ });
@@ -2,6 +2,7 @@ export { CreateWindowInputV1Body } from "./CreateWindowInputV1Body";
2
2
  export { WindowLoadUrlV1Body } from "./WindowLoadUrlV1Body";
3
3
  export { SessionClickHandlerRequestBody } from "./SessionClickHandlerRequestBody";
4
4
  export { SessionHoverHandlerRequestBody } from "./SessionHoverHandlerRequestBody";
5
+ export { SessionPaginatedExtractionHandlerRequestBody } from "./SessionPaginatedExtractionHandlerRequestBody";
5
6
  export { ScrapeContentRequest } from "./ScrapeContentRequest";
6
7
  export { SessionSummaryHandlerRequestBody } from "./SessionSummaryHandlerRequestBody";
7
8
  export { SessionTypeHandlerRequestBody } from "./SessionTypeHandlerRequestBody";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SessionTypeHandlerRequestBody = exports.SessionSummaryHandlerRequestBody = exports.ScrapeContentRequest = exports.SessionHoverHandlerRequestBody = exports.SessionClickHandlerRequestBody = exports.WindowLoadUrlV1Body = exports.CreateWindowInputV1Body = void 0;
3
+ exports.SessionTypeHandlerRequestBody = exports.SessionSummaryHandlerRequestBody = exports.ScrapeContentRequest = exports.SessionPaginatedExtractionHandlerRequestBody = exports.SessionHoverHandlerRequestBody = exports.SessionClickHandlerRequestBody = exports.WindowLoadUrlV1Body = exports.CreateWindowInputV1Body = void 0;
4
4
  var CreateWindowInputV1Body_1 = require("./CreateWindowInputV1Body");
5
5
  Object.defineProperty(exports, "CreateWindowInputV1Body", { enumerable: true, get: function () { return CreateWindowInputV1Body_1.CreateWindowInputV1Body; } });
6
6
  var WindowLoadUrlV1Body_1 = require("./WindowLoadUrlV1Body");
@@ -9,6 +9,8 @@ var SessionClickHandlerRequestBody_1 = require("./SessionClickHandlerRequestBody
9
9
  Object.defineProperty(exports, "SessionClickHandlerRequestBody", { enumerable: true, get: function () { return SessionClickHandlerRequestBody_1.SessionClickHandlerRequestBody; } });
10
10
  var SessionHoverHandlerRequestBody_1 = require("./SessionHoverHandlerRequestBody");
11
11
  Object.defineProperty(exports, "SessionHoverHandlerRequestBody", { enumerable: true, get: function () { return SessionHoverHandlerRequestBody_1.SessionHoverHandlerRequestBody; } });
12
+ var SessionPaginatedExtractionHandlerRequestBody_1 = require("./SessionPaginatedExtractionHandlerRequestBody");
13
+ Object.defineProperty(exports, "SessionPaginatedExtractionHandlerRequestBody", { enumerable: true, get: function () { return SessionPaginatedExtractionHandlerRequestBody_1.SessionPaginatedExtractionHandlerRequestBody; } });
12
14
  var ScrapeContentRequest_1 = require("./ScrapeContentRequest");
13
15
  Object.defineProperty(exports, "ScrapeContentRequest", { enumerable: true, get: function () { return ScrapeContentRequest_1.ScrapeContentRequest; } });
14
16
  var SessionSummaryHandlerRequestBody_1 = require("./SessionSummaryHandlerRequestBody");
@@ -0,0 +1,14 @@
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 PaginatedExtractionConfig: core.serialization.ObjectSchema<serializers.PaginatedExtractionConfig.Raw, Airtop.PaginatedExtractionConfig>;
8
+ export declare namespace PaginatedExtractionConfig {
9
+ interface Raw {
10
+ interactionMode?: string | null;
11
+ outputSchema?: string | null;
12
+ paginationMode?: string | null;
13
+ }
14
+ }
@@ -0,0 +1,35 @@
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.PaginatedExtractionConfig = void 0;
30
+ const core = __importStar(require("../../core"));
31
+ exports.PaginatedExtractionConfig = core.serialization.object({
32
+ interactionMode: core.serialization.string().optional(),
33
+ outputSchema: core.serialization.string().optional(),
34
+ paginationMode: core.serialization.string().optional(),
35
+ });
@@ -9,6 +9,7 @@ export declare const SessionConfigV1: core.serialization.ObjectSchema<serializer
9
9
  export declare namespace SessionConfigV1 {
10
10
  interface Raw {
11
11
  baseProfileId?: string | null;
12
+ extensionIds?: string[] | null;
12
13
  persistProfile?: boolean | null;
13
14
  proxy?: SessionConfigV1Proxy.Raw | null;
14
15
  timeoutMinutes?: number | null;
@@ -31,6 +31,7 @@ const core = __importStar(require("../../core"));
31
31
  const SessionConfigV1Proxy_1 = require("./SessionConfigV1Proxy");
32
32
  exports.SessionConfigV1 = core.serialization.object({
33
33
  baseProfileId: core.serialization.string().optional(),
34
+ extensionIds: core.serialization.list(core.serialization.string()).optional(),
34
35
  persistProfile: core.serialization.boolean().optional(),
35
36
  proxy: SessionConfigV1Proxy_1.SessionConfigV1Proxy.optional(),
36
37
  timeoutMinutes: core.serialization.number().optional(),