@oya-ai/browser 1.0.61 → 1.0.64
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/dist/index.cjs +24 -4
- package/dist/index.d.cts +16 -3
- package/dist/index.d.ts +16 -3
- package/dist/index.js +24 -4
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -196,12 +196,32 @@ var Browser = class {
|
|
|
196
196
|
return res.text;
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
|
-
* Watch it work:
|
|
200
|
-
*
|
|
201
|
-
*
|
|
199
|
+
* Watch it work: the console, opened on this browser.
|
|
200
|
+
*
|
|
201
|
+
* This used to return the raw frame stream with the project's API key in the
|
|
202
|
+
* query string — a permanent credential in browser history, Referer headers
|
|
203
|
+
* and every proxy log on the way, and a URL that renders as a wall of
|
|
204
|
+
* text/event-stream if a person actually opens it. It is the console deep
|
|
205
|
+
* link now, the same one the server hands back from `completeMfa()`, and it
|
|
206
|
+
* carries no credential at all.
|
|
207
|
+
*
|
|
208
|
+
* For the frames themselves, use `liveStreamUrl()`.
|
|
202
209
|
*/
|
|
203
210
|
liveViewUrl() {
|
|
204
|
-
return `${this.http.baseUrl}/
|
|
211
|
+
return `${this.http.baseUrl}/dashboard/?browser=${encodeURIComponent(this.id)}`;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* The SSE stream of JPEG frames, for embedding in your own UI. EventSource
|
|
215
|
+
* cannot set headers, so the URL carries a connection ticket: single use,
|
|
216
|
+
* 60 seconds. Mint one per viewer — the first connection spends it.
|
|
217
|
+
*/
|
|
218
|
+
async liveStreamUrl() {
|
|
219
|
+
const { ticket } = await this.http.request(
|
|
220
|
+
"POST",
|
|
221
|
+
`/api/control/sessions/${encodeURIComponent(this.id)}/ticket`,
|
|
222
|
+
{}
|
|
223
|
+
);
|
|
224
|
+
return `${this.http.baseUrl}/api/live/${this.id}?ticket=${encodeURIComponent(ticket)}`;
|
|
205
225
|
}
|
|
206
226
|
/** Counters, health and the last 50 things this browser did. */
|
|
207
227
|
status() {
|
package/dist/index.d.cts
CHANGED
|
@@ -331,11 +331,24 @@ declare class Browser {
|
|
|
331
331
|
/** Natural-language control, using this key's configured model. */
|
|
332
332
|
ask(prompt: string): Promise<string>;
|
|
333
333
|
/**
|
|
334
|
-
* Watch it work:
|
|
335
|
-
*
|
|
336
|
-
*
|
|
334
|
+
* Watch it work: the console, opened on this browser.
|
|
335
|
+
*
|
|
336
|
+
* This used to return the raw frame stream with the project's API key in the
|
|
337
|
+
* query string — a permanent credential in browser history, Referer headers
|
|
338
|
+
* and every proxy log on the way, and a URL that renders as a wall of
|
|
339
|
+
* text/event-stream if a person actually opens it. It is the console deep
|
|
340
|
+
* link now, the same one the server hands back from `completeMfa()`, and it
|
|
341
|
+
* carries no credential at all.
|
|
342
|
+
*
|
|
343
|
+
* For the frames themselves, use `liveStreamUrl()`.
|
|
337
344
|
*/
|
|
338
345
|
liveViewUrl(): string;
|
|
346
|
+
/**
|
|
347
|
+
* The SSE stream of JPEG frames, for embedding in your own UI. EventSource
|
|
348
|
+
* cannot set headers, so the URL carries a connection ticket: single use,
|
|
349
|
+
* 60 seconds. Mint one per viewer — the first connection spends it.
|
|
350
|
+
*/
|
|
351
|
+
liveStreamUrl(): Promise<string>;
|
|
339
352
|
/** Counters, health and the last 50 things this browser did. */
|
|
340
353
|
status(): Promise<BrowserDetail>;
|
|
341
354
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -331,11 +331,24 @@ declare class Browser {
|
|
|
331
331
|
/** Natural-language control, using this key's configured model. */
|
|
332
332
|
ask(prompt: string): Promise<string>;
|
|
333
333
|
/**
|
|
334
|
-
* Watch it work:
|
|
335
|
-
*
|
|
336
|
-
*
|
|
334
|
+
* Watch it work: the console, opened on this browser.
|
|
335
|
+
*
|
|
336
|
+
* This used to return the raw frame stream with the project's API key in the
|
|
337
|
+
* query string — a permanent credential in browser history, Referer headers
|
|
338
|
+
* and every proxy log on the way, and a URL that renders as a wall of
|
|
339
|
+
* text/event-stream if a person actually opens it. It is the console deep
|
|
340
|
+
* link now, the same one the server hands back from `completeMfa()`, and it
|
|
341
|
+
* carries no credential at all.
|
|
342
|
+
*
|
|
343
|
+
* For the frames themselves, use `liveStreamUrl()`.
|
|
337
344
|
*/
|
|
338
345
|
liveViewUrl(): string;
|
|
346
|
+
/**
|
|
347
|
+
* The SSE stream of JPEG frames, for embedding in your own UI. EventSource
|
|
348
|
+
* cannot set headers, so the URL carries a connection ticket: single use,
|
|
349
|
+
* 60 seconds. Mint one per viewer — the first connection spends it.
|
|
350
|
+
*/
|
|
351
|
+
liveStreamUrl(): Promise<string>;
|
|
339
352
|
/** Counters, health and the last 50 things this browser did. */
|
|
340
353
|
status(): Promise<BrowserDetail>;
|
|
341
354
|
/**
|
package/dist/index.js
CHANGED
|
@@ -167,12 +167,32 @@ var Browser = class {
|
|
|
167
167
|
return res.text;
|
|
168
168
|
}
|
|
169
169
|
/**
|
|
170
|
-
* Watch it work:
|
|
171
|
-
*
|
|
172
|
-
*
|
|
170
|
+
* Watch it work: the console, opened on this browser.
|
|
171
|
+
*
|
|
172
|
+
* This used to return the raw frame stream with the project's API key in the
|
|
173
|
+
* query string — a permanent credential in browser history, Referer headers
|
|
174
|
+
* and every proxy log on the way, and a URL that renders as a wall of
|
|
175
|
+
* text/event-stream if a person actually opens it. It is the console deep
|
|
176
|
+
* link now, the same one the server hands back from `completeMfa()`, and it
|
|
177
|
+
* carries no credential at all.
|
|
178
|
+
*
|
|
179
|
+
* For the frames themselves, use `liveStreamUrl()`.
|
|
173
180
|
*/
|
|
174
181
|
liveViewUrl() {
|
|
175
|
-
return `${this.http.baseUrl}/
|
|
182
|
+
return `${this.http.baseUrl}/dashboard/?browser=${encodeURIComponent(this.id)}`;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* The SSE stream of JPEG frames, for embedding in your own UI. EventSource
|
|
186
|
+
* cannot set headers, so the URL carries a connection ticket: single use,
|
|
187
|
+
* 60 seconds. Mint one per viewer — the first connection spends it.
|
|
188
|
+
*/
|
|
189
|
+
async liveStreamUrl() {
|
|
190
|
+
const { ticket } = await this.http.request(
|
|
191
|
+
"POST",
|
|
192
|
+
`/api/control/sessions/${encodeURIComponent(this.id)}/ticket`,
|
|
193
|
+
{}
|
|
194
|
+
);
|
|
195
|
+
return `${this.http.baseUrl}/api/live/${this.id}?ticket=${encodeURIComponent(ticket)}`;
|
|
176
196
|
}
|
|
177
197
|
/** Counters, health and the last 50 things this browser did. */
|
|
178
198
|
status() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oya-ai/browser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.64",
|
|
4
4
|
"description": "Rotate thousands of browsers behind one API — personas, proxies, stealth, CAPTCHA and MFA.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://browser.getoya.ai",
|
|
@@ -52,5 +52,6 @@
|
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"tsup": "^8.0.0",
|
|
54
54
|
"typescript": "^5.4.0"
|
|
55
|
-
}
|
|
55
|
+
},
|
|
56
|
+
"author": "mk@getoya.ai"
|
|
56
57
|
}
|