@oya-ai/browser 1.0.87 → 1.0.88
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 +4 -3
- package/dist/index.d.cts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +4 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -205,9 +205,10 @@ var Browser = class {
|
|
|
205
205
|
return res.text;
|
|
206
206
|
}
|
|
207
207
|
/**
|
|
208
|
-
* Save the last `ask()` on this browser as a named playbook.
|
|
209
|
-
*
|
|
210
|
-
*
|
|
208
|
+
* Save the last `ask()` on this browser as a named playbook. Every value that was
|
|
209
|
+
* typed, picked or clicked becomes a variable, with what the run used kept in
|
|
210
|
+
* `defaults`, so `play()` with nothing repeats the run and any one value can be
|
|
211
|
+
* swapped. `code` is the same flow as a Playwright module, to read or run yourself.
|
|
211
212
|
*/
|
|
212
213
|
toPlaybook(name) {
|
|
213
214
|
return this.http.request("POST", `/api/browsers/${this.id}/playbooks`, { name }, 12e4);
|
package/dist/index.d.cts
CHANGED
|
@@ -112,6 +112,8 @@ interface Playbook {
|
|
|
112
112
|
name: string;
|
|
113
113
|
/** Inputs `play()` accepts; any left out reuse the recorded value. */
|
|
114
114
|
variables: string[];
|
|
115
|
+
/** What each variable was recorded with. A secret has none — it never left the page. */
|
|
116
|
+
defaults: Record<string, string>;
|
|
115
117
|
steps: number;
|
|
116
118
|
/** The same flow as a Playwright module: `export default async function run(page, vars)`. */
|
|
117
119
|
code: string;
|
|
@@ -514,9 +516,10 @@ declare class Browser {
|
|
|
514
516
|
secrets?: RunData;
|
|
515
517
|
}): Promise<string>;
|
|
516
518
|
/**
|
|
517
|
-
* Save the last `ask()` on this browser as a named playbook.
|
|
518
|
-
*
|
|
519
|
-
*
|
|
519
|
+
* Save the last `ask()` on this browser as a named playbook. Every value that was
|
|
520
|
+
* typed, picked or clicked becomes a variable, with what the run used kept in
|
|
521
|
+
* `defaults`, so `play()` with nothing repeats the run and any one value can be
|
|
522
|
+
* swapped. `code` is the same flow as a Playwright module, to read or run yourself.
|
|
520
523
|
*/
|
|
521
524
|
toPlaybook(name: string): Promise<Playbook>;
|
|
522
525
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -112,6 +112,8 @@ interface Playbook {
|
|
|
112
112
|
name: string;
|
|
113
113
|
/** Inputs `play()` accepts; any left out reuse the recorded value. */
|
|
114
114
|
variables: string[];
|
|
115
|
+
/** What each variable was recorded with. A secret has none — it never left the page. */
|
|
116
|
+
defaults: Record<string, string>;
|
|
115
117
|
steps: number;
|
|
116
118
|
/** The same flow as a Playwright module: `export default async function run(page, vars)`. */
|
|
117
119
|
code: string;
|
|
@@ -514,9 +516,10 @@ declare class Browser {
|
|
|
514
516
|
secrets?: RunData;
|
|
515
517
|
}): Promise<string>;
|
|
516
518
|
/**
|
|
517
|
-
* Save the last `ask()` on this browser as a named playbook.
|
|
518
|
-
*
|
|
519
|
-
*
|
|
519
|
+
* Save the last `ask()` on this browser as a named playbook. Every value that was
|
|
520
|
+
* typed, picked or clicked becomes a variable, with what the run used kept in
|
|
521
|
+
* `defaults`, so `play()` with nothing repeats the run and any one value can be
|
|
522
|
+
* swapped. `code` is the same flow as a Playwright module, to read or run yourself.
|
|
520
523
|
*/
|
|
521
524
|
toPlaybook(name: string): Promise<Playbook>;
|
|
522
525
|
/**
|
package/dist/index.js
CHANGED
|
@@ -173,9 +173,10 @@ var Browser = class {
|
|
|
173
173
|
return res.text;
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
|
-
* Save the last `ask()` on this browser as a named playbook.
|
|
177
|
-
*
|
|
178
|
-
*
|
|
176
|
+
* Save the last `ask()` on this browser as a named playbook. Every value that was
|
|
177
|
+
* typed, picked or clicked becomes a variable, with what the run used kept in
|
|
178
|
+
* `defaults`, so `play()` with nothing repeats the run and any one value can be
|
|
179
|
+
* swapped. `code` is the same flow as a Playwright module, to read or run yourself.
|
|
179
180
|
*/
|
|
180
181
|
toPlaybook(name) {
|
|
181
182
|
return this.http.request("POST", `/api/browsers/${this.id}/playbooks`, { name }, 12e4);
|
package/package.json
CHANGED