@airtop/sdk 0.0.4 → 0.0.7-b
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.
- package/api/resources/profiles/client/Client.js +6 -6
- package/api/resources/sessions/client/Client.d.ts +3 -6
- package/api/resources/sessions/client/Client.js +24 -36
- package/api/resources/sessions/client/requests/SessionPromptContentRequest.d.ts +3 -0
- package/api/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +3 -0
- package/api/resources/sessions/client/requests/index.d.ts +0 -1
- package/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
- package/api/resources/sessions/types/index.d.ts +1 -1
- package/api/resources/sessions/types/index.js +1 -1
- package/api/types/ClientProvidedResponseMetadata.d.ts +6 -0
- package/api/types/LiveViewUrlOutputV1Body.d.ts +4 -0
- package/api/types/SessionAiResponseMetadata.d.ts +2 -0
- package/api/types/SessionAiResponseMetadataUsage.d.ts +5 -0
- package/api/types/SessionAiResponseResponseMetadataModelUsage.d.ts +10 -0
- package/api/types/SessionConfig.d.ts +0 -2
- package/api/types/SessionConfigV1.d.ts +0 -2
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/dist/api/resources/profiles/client/Client.js +6 -6
- package/dist/api/resources/sessions/client/Client.d.ts +3 -6
- package/dist/api/resources/sessions/client/Client.js +24 -36
- package/dist/api/resources/sessions/client/requests/SessionPromptContentRequest.d.ts +3 -0
- package/dist/api/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +3 -0
- package/dist/api/resources/sessions/client/requests/index.d.ts +0 -1
- package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
- package/dist/api/resources/sessions/types/index.d.ts +1 -1
- package/dist/api/resources/sessions/types/index.js +1 -1
- package/dist/api/types/ClientProvidedResponseMetadata.d.ts +6 -0
- package/dist/api/types/ClientProvidedResponseMetadata.js +5 -0
- package/dist/api/types/LiveViewUrlOutputV1Body.d.ts +4 -0
- package/dist/api/types/SessionAiResponseMetadata.d.ts +2 -0
- package/dist/api/types/SessionAiResponseMetadataUsage.d.ts +5 -0
- package/dist/api/types/SessionAiResponseResponseMetadataModelUsage.d.ts +10 -0
- package/dist/api/types/SessionAiResponseResponseMetadataModelUsage.js +5 -0
- package/dist/api/types/SessionConfig.d.ts +0 -2
- package/dist/api/types/SessionConfigV1.d.ts +0 -2
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/serialization/resources/sessions/client/requests/SessionPromptContentRequest.d.ts +3 -0
- package/dist/serialization/resources/sessions/client/requests/SessionPromptContentRequest.js +3 -0
- package/dist/serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +3 -0
- package/dist/serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.js +3 -0
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
- package/dist/serialization/resources/sessions/types/index.d.ts +1 -1
- package/dist/serialization/resources/sessions/types/index.js +1 -1
- package/dist/serialization/types/ClientProvidedResponseMetadata.d.ts +12 -0
- package/dist/serialization/types/ClientProvidedResponseMetadata.js +33 -0
- package/dist/serialization/types/LiveViewUrlOutputV1Body.d.ts +2 -0
- package/dist/serialization/types/LiveViewUrlOutputV1Body.js +2 -0
- package/dist/serialization/types/SessionAiResponseMetadata.d.ts +2 -0
- package/dist/serialization/types/SessionAiResponseMetadata.js +2 -0
- package/dist/serialization/types/SessionAiResponseMetadataUsage.d.ts +3 -0
- package/dist/serialization/types/SessionAiResponseMetadataUsage.js +3 -0
- package/dist/serialization/types/SessionAiResponseResponseMetadataModelUsage.d.ts +16 -0
- package/dist/serialization/types/SessionAiResponseResponseMetadataModelUsage.js +37 -0
- package/dist/serialization/types/SessionConfig.d.ts +0 -1
- package/dist/serialization/types/SessionConfig.js +0 -1
- package/dist/serialization/types/SessionConfigV1.d.ts +0 -1
- package/dist/serialization/types/SessionConfigV1.js +0 -1
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/serialization/types/index.js +2 -0
- package/package.json +1 -1
- package/reference.md +3 -6
- package/serialization/resources/sessions/client/requests/SessionPromptContentRequest.d.ts +3 -0
- package/serialization/resources/sessions/client/requests/SessionPromptContentRequest.js +3 -0
- package/serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +3 -0
- package/serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.js +3 -0
- package/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
- package/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
- package/serialization/resources/sessions/types/index.d.ts +1 -1
- package/serialization/resources/sessions/types/index.js +1 -1
- package/serialization/types/ClientProvidedResponseMetadata.d.ts +12 -0
- package/serialization/types/ClientProvidedResponseMetadata.js +33 -0
- package/serialization/types/LiveViewUrlOutputV1Body.d.ts +2 -0
- package/serialization/types/LiveViewUrlOutputV1Body.js +2 -0
- package/serialization/types/SessionAiResponseMetadata.d.ts +2 -0
- package/serialization/types/SessionAiResponseMetadata.js +2 -0
- package/serialization/types/SessionAiResponseMetadataUsage.d.ts +3 -0
- package/serialization/types/SessionAiResponseMetadataUsage.js +3 -0
- package/serialization/types/SessionAiResponseResponseMetadataModelUsage.d.ts +16 -0
- package/serialization/types/SessionAiResponseResponseMetadataModelUsage.js +37 -0
- package/serialization/types/SessionConfig.d.ts +0 -1
- package/serialization/types/SessionConfig.js +0 -1
- package/serialization/types/SessionConfigV1.d.ts +0 -1
- package/serialization/types/SessionConfigV1.js +0 -1
- package/serialization/types/index.d.ts +2 -0
- package/serialization/types/index.js +2 -0
- package/api/resources/sessions/client/requests/CreateLiveViewUrlRequest.d.ts +0 -20
- package/dist/api/resources/sessions/client/requests/CreateLiveViewUrlRequest.d.ts +0 -20
- /package/api/{resources/sessions/client/requests/CreateLiveViewUrlRequest.js → types/ClientProvidedResponseMetadata.js} +0 -0
- /package/{dist/api/resources/sessions/client/requests/CreateLiveViewUrlRequest.js → api/types/SessionAiResponseResponseMetadataModelUsage.js} +0 -0
@@ -85,8 +85,8 @@ class Profiles {
|
|
85
85
|
: undefined,
|
86
86
|
"X-Fern-Language": "JavaScript",
|
87
87
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
88
|
-
"X-Fern-SDK-Version": "0.0.
|
89
|
-
"User-Agent": "@airtop/sdk/0.0.
|
88
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
89
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
90
90
|
"X-Fern-Runtime": core.RUNTIME.type,
|
91
91
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
92
92
|
},
|
@@ -163,8 +163,8 @@ class Profiles {
|
|
163
163
|
: undefined,
|
164
164
|
"X-Fern-Language": "JavaScript",
|
165
165
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
166
|
-
"X-Fern-SDK-Version": "0.0.
|
167
|
-
"User-Agent": "@airtop/sdk/0.0.
|
166
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
167
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
168
168
|
"X-Fern-Runtime": core.RUNTIME.type,
|
169
169
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
170
170
|
},
|
@@ -224,8 +224,8 @@ class Profiles {
|
|
224
224
|
: undefined,
|
225
225
|
"X-Fern-Language": "JavaScript",
|
226
226
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
227
|
-
"X-Fern-SDK-Version": "0.0.
|
228
|
-
"User-Agent": "@airtop/sdk/0.0.
|
227
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
228
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
229
229
|
"X-Fern-Runtime": core.RUNTIME.type,
|
230
230
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
231
231
|
},
|
@@ -77,16 +77,13 @@ export declare class Sessions {
|
|
77
77
|
events(id: string, requestOptions?: Sessions.RequestOptions): Promise<core.Stream<Airtop.SessionsEventsResponse>>;
|
78
78
|
/**
|
79
79
|
* @param {string} id - UUID of the session to create a url for
|
80
|
-
* @param {
|
80
|
+
* @param {string} windowId - id of the browser window, either the browserId (uuid) or targetId (simple string)
|
81
81
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
82
82
|
*
|
83
83
|
* @example
|
84
|
-
* await client.sessions.
|
85
|
-
* browserId: "7334da2a-91b0-42c5-6156-76a5eba87430",
|
86
|
-
* targetId: "123456"
|
87
|
-
* })
|
84
|
+
* await client.sessions.window("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430")
|
88
85
|
*/
|
89
|
-
|
86
|
+
window(id: string, windowId: string, requestOptions?: Sessions.RequestOptions): Promise<Airtop.LiveViewUrlOutputV1Body>;
|
90
87
|
/**
|
91
88
|
* @param {string} sessionId - The session id to scrape
|
92
89
|
* @param {string} windowId - The window id to scrape
|
@@ -84,8 +84,8 @@ class Sessions {
|
|
84
84
|
: undefined,
|
85
85
|
"X-Fern-Language": "JavaScript",
|
86
86
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
87
|
-
"X-Fern-SDK-Version": "0.0.
|
88
|
-
"User-Agent": "@airtop/sdk/0.0.
|
87
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
88
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
89
89
|
"X-Fern-Runtime": core.RUNTIME.type,
|
90
90
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
91
91
|
},
|
@@ -172,8 +172,8 @@ class Sessions {
|
|
172
172
|
: undefined,
|
173
173
|
"X-Fern-Language": "JavaScript",
|
174
174
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
175
|
-
"X-Fern-SDK-Version": "0.0.
|
176
|
-
"User-Agent": "@airtop/sdk/0.0.
|
175
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
176
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
177
177
|
"X-Fern-Runtime": core.RUNTIME.type,
|
178
178
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
179
179
|
},
|
@@ -239,8 +239,8 @@ class Sessions {
|
|
239
239
|
: undefined,
|
240
240
|
"X-Fern-Language": "JavaScript",
|
241
241
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
242
|
-
"X-Fern-SDK-Version": "0.0.
|
243
|
-
"User-Agent": "@airtop/sdk/0.0.
|
242
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
243
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
244
244
|
"X-Fern-Runtime": core.RUNTIME.type,
|
245
245
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
246
246
|
},
|
@@ -328,8 +328,8 @@ class Sessions {
|
|
328
328
|
: undefined,
|
329
329
|
"X-Fern-Language": "JavaScript",
|
330
330
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
331
|
-
"X-Fern-SDK-Version": "0.0.
|
332
|
-
"User-Agent": "@airtop/sdk/0.0.
|
331
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
332
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
333
333
|
"X-Fern-Runtime": core.RUNTIME.type,
|
334
334
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
335
335
|
},
|
@@ -378,8 +378,8 @@ class Sessions {
|
|
378
378
|
: undefined,
|
379
379
|
"X-Fern-Language": "JavaScript",
|
380
380
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
381
|
-
"X-Fern-SDK-Version": "0.0.
|
382
|
-
"User-Agent": "@airtop/sdk/0.0.
|
381
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
382
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
383
383
|
"X-Fern-Runtime": core.RUNTIME.type,
|
384
384
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
385
385
|
},
|
@@ -459,28 +459,17 @@ class Sessions {
|
|
459
459
|
}
|
460
460
|
/**
|
461
461
|
* @param {string} id - UUID of the session to create a url for
|
462
|
-
* @param {
|
462
|
+
* @param {string} windowId - id of the browser window, either the browserId (uuid) or targetId (simple string)
|
463
463
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
464
464
|
*
|
465
465
|
* @example
|
466
|
-
* await client.sessions.
|
467
|
-
* browserId: "7334da2a-91b0-42c5-6156-76a5eba87430",
|
468
|
-
* targetId: "123456"
|
469
|
-
* })
|
466
|
+
* await client.sessions.window("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430")
|
470
467
|
*/
|
471
|
-
|
468
|
+
window(id, windowId, requestOptions) {
|
472
469
|
var _a, _b;
|
473
470
|
return __awaiter(this, void 0, void 0, function* () {
|
474
|
-
const { browserId, targetId } = request;
|
475
|
-
const _queryParams = {};
|
476
|
-
if (browserId != null) {
|
477
|
-
_queryParams["browserId"] = browserId;
|
478
|
-
}
|
479
|
-
if (targetId != null) {
|
480
|
-
_queryParams["targetId"] = targetId;
|
481
|
-
}
|
482
471
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
483
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(id)}/
|
472
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(id)}/window/${encodeURIComponent(windowId)}`),
|
484
473
|
method: "GET",
|
485
474
|
headers: {
|
486
475
|
"x-airtop-token": (yield core.Supplier.get(this._options.airtopToken)) != null
|
@@ -488,13 +477,12 @@ class Sessions {
|
|
488
477
|
: undefined,
|
489
478
|
"X-Fern-Language": "JavaScript",
|
490
479
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
491
|
-
"X-Fern-SDK-Version": "0.0.
|
492
|
-
"User-Agent": "@airtop/sdk/0.0.
|
480
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
481
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
493
482
|
"X-Fern-Runtime": core.RUNTIME.type,
|
494
483
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
495
484
|
},
|
496
485
|
contentType: "application/json",
|
497
|
-
queryParameters: _queryParams,
|
498
486
|
requestType: "json",
|
499
487
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
500
488
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -550,8 +538,8 @@ class Sessions {
|
|
550
538
|
: undefined,
|
551
539
|
"X-Fern-Language": "JavaScript",
|
552
540
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
553
|
-
"X-Fern-SDK-Version": "0.0.
|
554
|
-
"User-Agent": "@airtop/sdk/0.0.
|
541
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
542
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
555
543
|
"X-Fern-Runtime": core.RUNTIME.type,
|
556
544
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
557
545
|
},
|
@@ -614,8 +602,8 @@ class Sessions {
|
|
614
602
|
: undefined,
|
615
603
|
"X-Fern-Language": "JavaScript",
|
616
604
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
617
|
-
"X-Fern-SDK-Version": "0.0.
|
618
|
-
"User-Agent": "@airtop/sdk/0.0.
|
605
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
606
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
619
607
|
"X-Fern-Runtime": core.RUNTIME.type,
|
620
608
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
621
609
|
},
|
@@ -679,8 +667,8 @@ class Sessions {
|
|
679
667
|
: undefined,
|
680
668
|
"X-Fern-Language": "JavaScript",
|
681
669
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
682
|
-
"X-Fern-SDK-Version": "0.0.
|
683
|
-
"User-Agent": "@airtop/sdk/0.0.
|
670
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
671
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
684
672
|
"X-Fern-Runtime": core.RUNTIME.type,
|
685
673
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
686
674
|
},
|
@@ -743,8 +731,8 @@ class Sessions {
|
|
743
731
|
: undefined,
|
744
732
|
"X-Fern-Language": "JavaScript",
|
745
733
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
746
|
-
"X-Fern-SDK-Version": "0.0.
|
747
|
-
"User-Agent": "@airtop/sdk/0.0.
|
734
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
735
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
748
736
|
"X-Fern-Runtime": core.RUNTIME.type,
|
749
737
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
750
738
|
},
|
@@ -10,6 +10,9 @@
|
|
10
10
|
export interface SessionPromptContentRequest {
|
11
11
|
/** A URL to the JSON Schema for this object. */
|
12
12
|
schema?: string;
|
13
|
+
costThresholdCredits?: number;
|
14
|
+
customerRequestId?: string;
|
13
15
|
/** The prompt to submit about the content in the browser window */
|
14
16
|
prompt: string;
|
17
|
+
timeThresholdMs?: number;
|
15
18
|
}
|
@@ -10,6 +10,9 @@
|
|
10
10
|
export interface SessionPromptPaginatedExtractionRequest {
|
11
11
|
/** A URL to the JSON Schema for this object. */
|
12
12
|
schema?: string;
|
13
|
+
costThresholdCredits?: number;
|
14
|
+
customerRequestId?: string;
|
13
15
|
/** The prompt to perform a paginated extraction with */
|
14
16
|
prompt: string;
|
17
|
+
timeThresholdMs?: number;
|
15
18
|
}
|
@@ -1,5 +1,4 @@
|
|
1
1
|
export { type SessionsListRequest } from "./SessionsListRequest";
|
2
2
|
export { type SessionRestInputV1 } from "./SessionRestInputV1";
|
3
|
-
export { type CreateLiveViewUrlRequest } from "./CreateLiveViewUrlRequest";
|
4
3
|
export { type SessionPromptContentRequest } from "./SessionPromptContentRequest";
|
5
4
|
export { type SessionPromptPaginatedExtractionRequest } from "./SessionPromptPaginatedExtractionRequest";
|
@@ -5,12 +5,12 @@ import * as Airtop from "../../../index";
|
|
5
5
|
/**
|
6
6
|
* Each oneOf object in the array represents one possible Server Sent Events (SSE) message, serialized as UTF-8 text according to the SSE specification.
|
7
7
|
*/
|
8
|
-
export declare type SessionsEventsResponse = Airtop.SessionsEventsResponse.
|
8
|
+
export declare type SessionsEventsResponse = Airtop.SessionsEventsResponse.Error_ | Airtop.SessionsEventsResponse.Status;
|
9
9
|
export declare namespace SessionsEventsResponse {
|
10
|
-
interface Status extends Airtop.SessionsEventsResponseStatus {
|
11
|
-
event: "status";
|
12
|
-
}
|
13
10
|
interface Error_ extends Airtop.SessionsEventsResponseError {
|
14
11
|
event: "error";
|
15
12
|
}
|
13
|
+
interface Status extends Airtop.SessionsEventsResponseStatus {
|
14
|
+
event: "status";
|
15
|
+
}
|
16
16
|
}
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./SessionsEventsResponseStatus"), exports);
|
18
17
|
__exportStar(require("./SessionsEventsResponseError"), exports);
|
18
|
+
__exportStar(require("./SessionsEventsResponseStatus"), exports);
|
19
19
|
__exportStar(require("./SessionsEventsResponse"), exports);
|
@@ -4,6 +4,10 @@
|
|
4
4
|
export interface LiveViewUrlOutputV1Body {
|
5
5
|
/** A URL to the JSON Schema for this object. */
|
6
6
|
schema?: string;
|
7
|
+
/** Browser ID for live view session */
|
8
|
+
browserId: string;
|
9
|
+
/** Token for authenticating to a live view session */
|
10
|
+
token: string;
|
7
11
|
/** Url for live view session */
|
8
12
|
url: string;
|
9
13
|
}
|
@@ -3,6 +3,8 @@
|
|
3
3
|
*/
|
4
4
|
import * as Airtop from "../index";
|
5
5
|
export interface SessionAiResponseMetadata {
|
6
|
+
/** The customer provided metadata for this request */
|
7
|
+
clientProvided?: Airtop.ClientProvidedResponseMetadata;
|
6
8
|
/** The usage metadata for this request */
|
7
9
|
usage: Airtop.SessionAiResponseMetadataUsage;
|
8
10
|
}
|
@@ -1,9 +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 SessionAiResponseMetadataUsage {
|
5
6
|
/** The credit usage for this request */
|
6
7
|
credits: number;
|
8
|
+
/** The id of the request */
|
9
|
+
id: string;
|
10
|
+
/** The private usage data about specific models for this request */
|
11
|
+
models?: Airtop.SessionAiResponseResponseMetadataModelUsage[];
|
7
12
|
/** The total internal cost of this request */
|
8
13
|
totalCost: number;
|
9
14
|
}
|
@@ -2,8 +2,6 @@
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
3
3
|
*/
|
4
4
|
export interface SessionConfig {
|
5
|
-
/** Whether to enable the CDP */
|
6
|
-
enableCdp?: boolean;
|
7
5
|
/** Persist the profile */
|
8
6
|
persistProfile?: boolean;
|
9
7
|
/** Profile name to persist resulting profile (required when persist_profile is true). Must contain A-Za-z0-9 only */
|
@@ -2,8 +2,6 @@
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
3
3
|
*/
|
4
4
|
export interface SessionConfigV1 {
|
5
|
-
/** Whether to enable the CDP */
|
6
|
-
enableCdp?: boolean;
|
7
5
|
/** Persist the profile */
|
8
6
|
persistProfile?: boolean;
|
9
7
|
/** Profile name to persist resulting profile (required when persist_profile is true). Must contain A-Za-z0-9 only */
|
package/api/types/index.d.ts
CHANGED
@@ -2,6 +2,7 @@ export * from "./CleanScrapeResponse";
|
|
2
2
|
export * from "./CleanScrapeResponseDataStatus";
|
3
3
|
export * from "./CleanScrapeResponseData";
|
4
4
|
export * from "./CleanScrapeResponseOutput";
|
5
|
+
export * from "./ClientProvidedResponseMetadata";
|
5
6
|
export * from "./ConnectionInfo";
|
6
7
|
export * from "./ErrorDetail";
|
7
8
|
export * from "./ErrorMessage";
|
@@ -19,6 +20,7 @@ export * from "./SessionAiResponseData";
|
|
19
20
|
export * from "./SessionAiResponseIssue";
|
20
21
|
export * from "./SessionAiResponseMetadata";
|
21
22
|
export * from "./SessionAiResponseMetadataUsage";
|
23
|
+
export * from "./SessionAiResponseResponseMetadataModelUsage";
|
22
24
|
export * from "./SessionConfig";
|
23
25
|
export * from "./SessionConfigV1";
|
24
26
|
export * from "./SessionOutputV1Body";
|
package/api/types/index.js
CHANGED
@@ -18,6 +18,7 @@ __exportStar(require("./CleanScrapeResponse"), exports);
|
|
18
18
|
__exportStar(require("./CleanScrapeResponseDataStatus"), exports);
|
19
19
|
__exportStar(require("./CleanScrapeResponseData"), exports);
|
20
20
|
__exportStar(require("./CleanScrapeResponseOutput"), exports);
|
21
|
+
__exportStar(require("./ClientProvidedResponseMetadata"), exports);
|
21
22
|
__exportStar(require("./ConnectionInfo"), exports);
|
22
23
|
__exportStar(require("./ErrorDetail"), exports);
|
23
24
|
__exportStar(require("./ErrorMessage"), exports);
|
@@ -35,6 +36,7 @@ __exportStar(require("./SessionAiResponseData"), exports);
|
|
35
36
|
__exportStar(require("./SessionAiResponseIssue"), exports);
|
36
37
|
__exportStar(require("./SessionAiResponseMetadata"), exports);
|
37
38
|
__exportStar(require("./SessionAiResponseMetadataUsage"), exports);
|
39
|
+
__exportStar(require("./SessionAiResponseResponseMetadataModelUsage"), exports);
|
38
40
|
__exportStar(require("./SessionConfig"), exports);
|
39
41
|
__exportStar(require("./SessionConfigV1"), exports);
|
40
42
|
__exportStar(require("./SessionOutputV1Body"), exports);
|
@@ -85,8 +85,8 @@ class Profiles {
|
|
85
85
|
: undefined,
|
86
86
|
"X-Fern-Language": "JavaScript",
|
87
87
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
88
|
-
"X-Fern-SDK-Version": "0.0.
|
89
|
-
"User-Agent": "@airtop/sdk/0.0.
|
88
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
89
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
90
90
|
"X-Fern-Runtime": core.RUNTIME.type,
|
91
91
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
92
92
|
},
|
@@ -163,8 +163,8 @@ class Profiles {
|
|
163
163
|
: undefined,
|
164
164
|
"X-Fern-Language": "JavaScript",
|
165
165
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
166
|
-
"X-Fern-SDK-Version": "0.0.
|
167
|
-
"User-Agent": "@airtop/sdk/0.0.
|
166
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
167
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
168
168
|
"X-Fern-Runtime": core.RUNTIME.type,
|
169
169
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
170
170
|
},
|
@@ -224,8 +224,8 @@ class Profiles {
|
|
224
224
|
: undefined,
|
225
225
|
"X-Fern-Language": "JavaScript",
|
226
226
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
227
|
-
"X-Fern-SDK-Version": "0.0.
|
228
|
-
"User-Agent": "@airtop/sdk/0.0.
|
227
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
228
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
229
229
|
"X-Fern-Runtime": core.RUNTIME.type,
|
230
230
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
231
231
|
},
|
@@ -77,16 +77,13 @@ export declare class Sessions {
|
|
77
77
|
events(id: string, requestOptions?: Sessions.RequestOptions): Promise<core.Stream<Airtop.SessionsEventsResponse>>;
|
78
78
|
/**
|
79
79
|
* @param {string} id - UUID of the session to create a url for
|
80
|
-
* @param {
|
80
|
+
* @param {string} windowId - id of the browser window, either the browserId (uuid) or targetId (simple string)
|
81
81
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
82
82
|
*
|
83
83
|
* @example
|
84
|
-
* await client.sessions.
|
85
|
-
* browserId: "7334da2a-91b0-42c5-6156-76a5eba87430",
|
86
|
-
* targetId: "123456"
|
87
|
-
* })
|
84
|
+
* await client.sessions.window("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430")
|
88
85
|
*/
|
89
|
-
|
86
|
+
window(id: string, windowId: string, requestOptions?: Sessions.RequestOptions): Promise<Airtop.LiveViewUrlOutputV1Body>;
|
90
87
|
/**
|
91
88
|
* @param {string} sessionId - The session id to scrape
|
92
89
|
* @param {string} windowId - The window id to scrape
|
@@ -84,8 +84,8 @@ class Sessions {
|
|
84
84
|
: undefined,
|
85
85
|
"X-Fern-Language": "JavaScript",
|
86
86
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
87
|
-
"X-Fern-SDK-Version": "0.0.
|
88
|
-
"User-Agent": "@airtop/sdk/0.0.
|
87
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
88
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
89
89
|
"X-Fern-Runtime": core.RUNTIME.type,
|
90
90
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
91
91
|
},
|
@@ -172,8 +172,8 @@ class Sessions {
|
|
172
172
|
: undefined,
|
173
173
|
"X-Fern-Language": "JavaScript",
|
174
174
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
175
|
-
"X-Fern-SDK-Version": "0.0.
|
176
|
-
"User-Agent": "@airtop/sdk/0.0.
|
175
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
176
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
177
177
|
"X-Fern-Runtime": core.RUNTIME.type,
|
178
178
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
179
179
|
},
|
@@ -239,8 +239,8 @@ class Sessions {
|
|
239
239
|
: undefined,
|
240
240
|
"X-Fern-Language": "JavaScript",
|
241
241
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
242
|
-
"X-Fern-SDK-Version": "0.0.
|
243
|
-
"User-Agent": "@airtop/sdk/0.0.
|
242
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
243
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
244
244
|
"X-Fern-Runtime": core.RUNTIME.type,
|
245
245
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
246
246
|
},
|
@@ -328,8 +328,8 @@ class Sessions {
|
|
328
328
|
: undefined,
|
329
329
|
"X-Fern-Language": "JavaScript",
|
330
330
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
331
|
-
"X-Fern-SDK-Version": "0.0.
|
332
|
-
"User-Agent": "@airtop/sdk/0.0.
|
331
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
332
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
333
333
|
"X-Fern-Runtime": core.RUNTIME.type,
|
334
334
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
335
335
|
},
|
@@ -378,8 +378,8 @@ class Sessions {
|
|
378
378
|
: undefined,
|
379
379
|
"X-Fern-Language": "JavaScript",
|
380
380
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
381
|
-
"X-Fern-SDK-Version": "0.0.
|
382
|
-
"User-Agent": "@airtop/sdk/0.0.
|
381
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
382
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
383
383
|
"X-Fern-Runtime": core.RUNTIME.type,
|
384
384
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
385
385
|
},
|
@@ -459,28 +459,17 @@ class Sessions {
|
|
459
459
|
}
|
460
460
|
/**
|
461
461
|
* @param {string} id - UUID of the session to create a url for
|
462
|
-
* @param {
|
462
|
+
* @param {string} windowId - id of the browser window, either the browserId (uuid) or targetId (simple string)
|
463
463
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
464
464
|
*
|
465
465
|
* @example
|
466
|
-
* await client.sessions.
|
467
|
-
* browserId: "7334da2a-91b0-42c5-6156-76a5eba87430",
|
468
|
-
* targetId: "123456"
|
469
|
-
* })
|
466
|
+
* await client.sessions.window("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430")
|
470
467
|
*/
|
471
|
-
|
468
|
+
window(id, windowId, requestOptions) {
|
472
469
|
var _a, _b;
|
473
470
|
return __awaiter(this, void 0, void 0, function* () {
|
474
|
-
const { browserId, targetId } = request;
|
475
|
-
const _queryParams = {};
|
476
|
-
if (browserId != null) {
|
477
|
-
_queryParams["browserId"] = browserId;
|
478
|
-
}
|
479
|
-
if (targetId != null) {
|
480
|
-
_queryParams["targetId"] = targetId;
|
481
|
-
}
|
482
471
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
483
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(id)}/
|
472
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(id)}/window/${encodeURIComponent(windowId)}`),
|
484
473
|
method: "GET",
|
485
474
|
headers: {
|
486
475
|
"x-airtop-token": (yield core.Supplier.get(this._options.airtopToken)) != null
|
@@ -488,13 +477,12 @@ class Sessions {
|
|
488
477
|
: undefined,
|
489
478
|
"X-Fern-Language": "JavaScript",
|
490
479
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
491
|
-
"X-Fern-SDK-Version": "0.0.
|
492
|
-
"User-Agent": "@airtop/sdk/0.0.
|
480
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
481
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
493
482
|
"X-Fern-Runtime": core.RUNTIME.type,
|
494
483
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
495
484
|
},
|
496
485
|
contentType: "application/json",
|
497
|
-
queryParameters: _queryParams,
|
498
486
|
requestType: "json",
|
499
487
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
500
488
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
@@ -550,8 +538,8 @@ class Sessions {
|
|
550
538
|
: undefined,
|
551
539
|
"X-Fern-Language": "JavaScript",
|
552
540
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
553
|
-
"X-Fern-SDK-Version": "0.0.
|
554
|
-
"User-Agent": "@airtop/sdk/0.0.
|
541
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
542
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
555
543
|
"X-Fern-Runtime": core.RUNTIME.type,
|
556
544
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
557
545
|
},
|
@@ -614,8 +602,8 @@ class Sessions {
|
|
614
602
|
: undefined,
|
615
603
|
"X-Fern-Language": "JavaScript",
|
616
604
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
617
|
-
"X-Fern-SDK-Version": "0.0.
|
618
|
-
"User-Agent": "@airtop/sdk/0.0.
|
605
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
606
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
619
607
|
"X-Fern-Runtime": core.RUNTIME.type,
|
620
608
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
621
609
|
},
|
@@ -679,8 +667,8 @@ class Sessions {
|
|
679
667
|
: undefined,
|
680
668
|
"X-Fern-Language": "JavaScript",
|
681
669
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
682
|
-
"X-Fern-SDK-Version": "0.0.
|
683
|
-
"User-Agent": "@airtop/sdk/0.0.
|
670
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
671
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
684
672
|
"X-Fern-Runtime": core.RUNTIME.type,
|
685
673
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
686
674
|
},
|
@@ -743,8 +731,8 @@ class Sessions {
|
|
743
731
|
: undefined,
|
744
732
|
"X-Fern-Language": "JavaScript",
|
745
733
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
746
|
-
"X-Fern-SDK-Version": "0.0.
|
747
|
-
"User-Agent": "@airtop/sdk/0.0.
|
734
|
+
"X-Fern-SDK-Version": "0.0.7-b",
|
735
|
+
"User-Agent": "@airtop/sdk/0.0.7-b",
|
748
736
|
"X-Fern-Runtime": core.RUNTIME.type,
|
749
737
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
750
738
|
},
|
@@ -10,6 +10,9 @@
|
|
10
10
|
export interface SessionPromptContentRequest {
|
11
11
|
/** A URL to the JSON Schema for this object. */
|
12
12
|
schema?: string;
|
13
|
+
costThresholdCredits?: number;
|
14
|
+
customerRequestId?: string;
|
13
15
|
/** The prompt to submit about the content in the browser window */
|
14
16
|
prompt: string;
|
17
|
+
timeThresholdMs?: number;
|
15
18
|
}
|
package/dist/api/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts
CHANGED
@@ -10,6 +10,9 @@
|
|
10
10
|
export interface SessionPromptPaginatedExtractionRequest {
|
11
11
|
/** A URL to the JSON Schema for this object. */
|
12
12
|
schema?: string;
|
13
|
+
costThresholdCredits?: number;
|
14
|
+
customerRequestId?: string;
|
13
15
|
/** The prompt to perform a paginated extraction with */
|
14
16
|
prompt: string;
|
17
|
+
timeThresholdMs?: number;
|
15
18
|
}
|
@@ -1,5 +1,4 @@
|
|
1
1
|
export { type SessionsListRequest } from "./SessionsListRequest";
|
2
2
|
export { type SessionRestInputV1 } from "./SessionRestInputV1";
|
3
|
-
export { type CreateLiveViewUrlRequest } from "./CreateLiveViewUrlRequest";
|
4
3
|
export { type SessionPromptContentRequest } from "./SessionPromptContentRequest";
|
5
4
|
export { type SessionPromptPaginatedExtractionRequest } from "./SessionPromptPaginatedExtractionRequest";
|
@@ -5,12 +5,12 @@ import * as Airtop from "../../../index";
|
|
5
5
|
/**
|
6
6
|
* Each oneOf object in the array represents one possible Server Sent Events (SSE) message, serialized as UTF-8 text according to the SSE specification.
|
7
7
|
*/
|
8
|
-
export declare type SessionsEventsResponse = Airtop.SessionsEventsResponse.
|
8
|
+
export declare type SessionsEventsResponse = Airtop.SessionsEventsResponse.Error_ | Airtop.SessionsEventsResponse.Status;
|
9
9
|
export declare namespace SessionsEventsResponse {
|
10
|
-
interface Status extends Airtop.SessionsEventsResponseStatus {
|
11
|
-
event: "status";
|
12
|
-
}
|
13
10
|
interface Error_ extends Airtop.SessionsEventsResponseError {
|
14
11
|
event: "error";
|
15
12
|
}
|
13
|
+
interface Status extends Airtop.SessionsEventsResponseStatus {
|
14
|
+
event: "status";
|
15
|
+
}
|
16
16
|
}
|