@noldova/browser.protocol 0.0.0-stage → 0.0.1
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/LICENSE +21 -0
- package/README.md +6 -2
- package/package.json +44 -4
- package/src/api/index.d.ts +1767 -0
- package/src/api/index.js +35 -0
- package/src/enums/address-kind.js +14 -0
- package/src/enums/page-action.js +15 -0
- package/src/enums/page-activity-state.js +12 -0
- package/src/enums/typed-address-answer-kind.js +11 -0
- package/src/enums/typed-address-refusal.js +15 -0
- package/src/models/address-kinds.js +62 -0
- package/src/models/browser-events.js +10 -0
- package/src/models/browser-methods.js +23 -0
- package/src/models/browser-tool-names.js +30 -0
- package/src/models/browsing-data-request.js +25 -0
- package/src/models/held-pages.js +29 -0
- package/src/models/local-sites.js +46 -0
- package/src/models/open-pages-request.js +25 -0
- package/src/models/page-activity.js +69 -0
- package/src/models/page-agent.js +27 -0
- package/src/models/page-box.js +43 -0
- package/src/models/page-change-script.js +53 -0
- package/src/models/page-claim.js +40 -0
- package/src/models/page-point.js +32 -0
- package/src/models/page-record.js +29 -0
- package/src/models/page-refusal.js +33 -0
- package/src/models/page-request.js +25 -0
- package/src/models/page-stop-request.js +27 -0
- package/src/models/typed-address-allowed.js +30 -0
- package/src/models/typed-address-refused.js +32 -0
- package/src/models/typed-address-request.js +27 -0
- package/src/models/typed-redirect-request.js +29 -0
- package/src/resources.js +73 -0
- package/src/services/typed-address-answer.reader.js +19 -0
- package/src/services/wire-contract.js +28 -0
- package/src/types/browser-tool-name.js +8 -0
- package/src/types/typed-address-answer.js +8 -0
|
@@ -0,0 +1,1767 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { JsonObject } from "@noldova/context.json";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The name of an agent tool that the browser module registers with the base's tool registry.
|
|
13
|
+
*/
|
|
14
|
+
export declare type BrowserToolName =
|
|
15
|
+
| "browser_navigate"
|
|
16
|
+
| "browser_snapshot"
|
|
17
|
+
| "browser_click"
|
|
18
|
+
| "browser_type"
|
|
19
|
+
| "browser_press_key"
|
|
20
|
+
| "browser_screenshot"
|
|
21
|
+
| "browser_console"
|
|
22
|
+
| "browser_wait_for";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The browser module's agent tool names.
|
|
26
|
+
*/
|
|
27
|
+
export declare class BrowserToolNames {
|
|
28
|
+
/**
|
|
29
|
+
* `browser_navigate`: Opens an address in the page.
|
|
30
|
+
*/
|
|
31
|
+
public static readonly navigate: BrowserToolName;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* `browser_snapshot`: Reads the page's accessibility tree, with a reference for each element.
|
|
35
|
+
*/
|
|
36
|
+
public static readonly snapshot: BrowserToolName;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* `browser_click`: Clicks an element by its reference.
|
|
40
|
+
*/
|
|
41
|
+
public static readonly click: BrowserToolName;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* `browser_type`: Types text into an element by its reference.
|
|
45
|
+
*/
|
|
46
|
+
public static readonly type: BrowserToolName;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* `browser_press_key`: Presses a key in the page.
|
|
50
|
+
*/
|
|
51
|
+
public static readonly pressKey: BrowserToolName;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* `browser_screenshot`: Captures the page, or an area of it.
|
|
55
|
+
*/
|
|
56
|
+
public static readonly screenshot: BrowserToolName;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* `browser_console`: Reads the page's console messages.
|
|
60
|
+
*/
|
|
61
|
+
public static readonly console: BrowserToolName;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* `browser_wait_for`: Waits until text appears in the page or leaves it.
|
|
65
|
+
*/
|
|
66
|
+
public static readonly waitFor: BrowserToolName;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Every tool name, each once, in the order the module registers the tools.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* import { BrowserToolNames } from "@noldova/browser.protocol";
|
|
74
|
+
*
|
|
75
|
+
* const registered: number = BrowserToolNames.all.length;
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
public static readonly all: readonly BrowserToolName[];
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Tells whether a name, such as one a tool call carries, is one of the module's tool names.
|
|
82
|
+
*
|
|
83
|
+
* @param value The name to look up; it matches only exactly, case included.
|
|
84
|
+
* @returns `true` when `value` is one of {@link BrowserToolNames.all}, which narrows it to {@link BrowserToolName}; `false` otherwise.
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* import { BrowserToolNames } from "@noldova/browser.protocol";
|
|
88
|
+
*
|
|
89
|
+
* BrowserToolNames.includes("browser_click");
|
|
90
|
+
* BrowserToolNames.includes("Browser_Click");
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
public static includes(value: string): value is BrowserToolName;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The names of the events the browser module's runtime part sends its window part.
|
|
98
|
+
*/
|
|
99
|
+
export declare class BrowserEvents {
|
|
100
|
+
/**
|
|
101
|
+
* The event that tells every window what an agent does on a page document, from the moment its call reaches the page until the call ends.
|
|
102
|
+
* It carries a {@link PageActivity} in its wire form; the last one of an activity has the state `Ended`.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```ts
|
|
106
|
+
* import { BrowserEvents, PageAction, PageActivity, PageActivityState, PageBox, PagePoint } from "@noldova/browser.protocol";
|
|
107
|
+
*
|
|
108
|
+
* const activity: PageActivity = new PageActivity("0f8fad5b-d9cb-469f-a165-70867728950e", "5b1c2a7e-3d4f-4e8a-9b0c-1d2e3f4a5b6c", "Scout",
|
|
109
|
+
* PageAction.Clicking, PageActivityState.Acting, new PageBox(120, 340, 96, 32), new PagePoint(168, 356), null, false);
|
|
110
|
+
* const event: string = BrowserEvents.pageActivity;
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
public static readonly pageActivity: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The names of the requests the browser module's window part sends its runtime part.
|
|
118
|
+
*/
|
|
119
|
+
export declare class BrowserMethods {
|
|
120
|
+
/**
|
|
121
|
+
* The request that allows the origin of an address the person typed in a pane, for the workspace the pane's profile key names.
|
|
122
|
+
* It carries an {@link TypedAddressRequest} and is answered with a {@link TypedAddressAnswer}.
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```ts
|
|
126
|
+
* import { BrowserMethods, TypedAddressRequest } from "@noldova/browser.protocol";
|
|
127
|
+
*
|
|
128
|
+
* const request: TypedAddressRequest = new TypedAddressRequest("folder-1", "https://example.com/");
|
|
129
|
+
* const method: string = BrowserMethods.allowTypedAddress;
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
public static readonly allowTypedAddress: string;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The request that lets a page's view follow a redirect of the address the person typed there, to an origin its workspace doesn't allow.
|
|
136
|
+
* The runtime part judges the redirect's address as a typed one and allows its origin for that view only, without keeping it, so it never
|
|
137
|
+
* joins the workspace; the view keeps it until {@link BrowserMethods.endTypedRedirects}, an agent acts on the page, or the view closes.
|
|
138
|
+
* Once an agent's call ended the view's redirects, the request fails for that view until {@link BrowserMethods.endTypedRedirects}.
|
|
139
|
+
* It carries an {@link TypedRedirectRequest} and is answered with a {@link TypedAddressAnswer}.
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* ```ts
|
|
143
|
+
* import { BrowserMethods, TypedRedirectRequest } from "@noldova/browser.protocol";
|
|
144
|
+
*
|
|
145
|
+
* const request: TypedRedirectRequest = new TypedRedirectRequest("0f8fad5b-d9cb-469f-a165-70867728950e", "folder-1", "https://www.example.com/");
|
|
146
|
+
* const method: string = BrowserMethods.passTypedRedirect;
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
public static readonly passTypedRedirect: string;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The request that ends the redirects a page's view follows, once the typed load ends: the view has only its workspace's origins again,
|
|
153
|
+
* and the next typed load's redirects may pass.
|
|
154
|
+
* It carries an {@link PageRequest} and is answered with null.
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```ts
|
|
158
|
+
* import { BrowserMethods, PageRequest } from "@noldova/browser.protocol";
|
|
159
|
+
*
|
|
160
|
+
* const request: PageRequest = new PageRequest("0f8fad5b-d9cb-469f-a165-70867728950e");
|
|
161
|
+
* const method: string = BrowserMethods.endTypedRedirects;
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
public static readonly endTypedRedirects: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The request that gives a page's new view its workspace's origins, as the view's `Opened` event does, and answers once the view has them,
|
|
168
|
+
* so the window part sends the view to its first address only then: a page another page opened, or one the window restores.
|
|
169
|
+
* It carries an {@link PageRequest} and is answered with null.
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```ts
|
|
173
|
+
* import { BrowserMethods, PageRequest } from "@noldova/browser.protocol";
|
|
174
|
+
*
|
|
175
|
+
* const request: PageRequest = new PageRequest("0f8fad5b-d9cb-469f-a165-70867728950e");
|
|
176
|
+
* const method: string = BrowserMethods.readyPage;
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
public static readonly readyPage: string;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The request that keeps a page document's workspace and last address, so a page the window restores opens in its workspace again.
|
|
183
|
+
* It carries an {@link PageRecord} and is answered with null.
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```ts
|
|
187
|
+
* import { BrowserMethods, PageRecord } from "@noldova/browser.protocol";
|
|
188
|
+
*
|
|
189
|
+
* const record: PageRecord = new PageRecord("0f8fad5b-d9cb-469f-a165-70867728950e", "folder-1", "https://example.com/");
|
|
190
|
+
* const method: string = BrowserMethods.rememberPage;
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
public static readonly rememberPage: string;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* The request that gives a page document's record. It carries an {@link PageRequest} and is answered with the
|
|
197
|
+
* {@link PageRecord}, or null when the module keeps none for the instance.
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* ```ts
|
|
201
|
+
* import { BrowserMethods, PageRequest } from "@noldova/browser.protocol";
|
|
202
|
+
*
|
|
203
|
+
* const request: PageRequest = new PageRequest("0f8fad5b-d9cb-469f-a165-70867728950e");
|
|
204
|
+
* const method: string = BrowserMethods.readPage;
|
|
205
|
+
* ```
|
|
206
|
+
*/
|
|
207
|
+
public static readonly readPage: string;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* The request that forgets a page document that closed. It carries an {@link PageRequest} and is answered with null.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```ts
|
|
214
|
+
* import { BrowserMethods } from "@noldova/browser.protocol";
|
|
215
|
+
*
|
|
216
|
+
* const method: string = BrowserMethods.forgetPage;
|
|
217
|
+
* ```
|
|
218
|
+
*/
|
|
219
|
+
public static readonly forgetPage: string;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* The request that clears a workspace's cookies, storage and cache, and ends the pending calls of its views.
|
|
223
|
+
* It carries an {@link BrowsingDataRequest} and is answered with null.
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* ```ts
|
|
227
|
+
* import { BrowserMethods, BrowsingDataRequest } from "@noldova/browser.protocol";
|
|
228
|
+
*
|
|
229
|
+
* const request: BrowsingDataRequest = new BrowsingDataRequest("folder-1");
|
|
230
|
+
* const method: string = BrowserMethods.clearBrowsingData;
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
public static readonly clearBrowsingData: string;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* The request for the name of the app the module runs in, as the app's build names it.
|
|
237
|
+
* It carries nothing and is answered with the name, a string; it fails when the build's product file can't be read.
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* ```ts
|
|
241
|
+
* import { BrowserMethods } from "@noldova/browser.protocol";
|
|
242
|
+
*
|
|
243
|
+
* const method: string = BrowserMethods.readAppName;
|
|
244
|
+
* ```
|
|
245
|
+
*/
|
|
246
|
+
public static readonly readAppName: string;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* The request that ends the agent calls running on a page, from the person's Stop or Take over in the page's bar: each fails as stopped.
|
|
250
|
+
* Take over also refuses the later calls on the page of the session that last acted on it, until that session ends.
|
|
251
|
+
* It carries an {@link PageStopRequest} and is answered with null.
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
* ```ts
|
|
255
|
+
* import { BrowserMethods, PageStopRequest } from "@noldova/browser.protocol";
|
|
256
|
+
*
|
|
257
|
+
* const request: PageStopRequest = new PageStopRequest("0f8fad5b-d9cb-469f-a165-70867728950e", true);
|
|
258
|
+
* const method: string = BrowserMethods.stopPage;
|
|
259
|
+
* ```
|
|
260
|
+
*/
|
|
261
|
+
public static readonly stopPage: string;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* The request that gives the activities of the agent calls running on the pages, as {@link PageActivity} values, each as its last
|
|
265
|
+
* `browser.pageActivity` event said; a window reads them again after the runtime started again, since the events sent meanwhile are lost.
|
|
266
|
+
* It carries null and is answered with the array.
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* ```ts
|
|
270
|
+
* import { BrowserMethods } from "@noldova/browser.protocol";
|
|
271
|
+
*
|
|
272
|
+
* const method: string = BrowserMethods.readActivities;
|
|
273
|
+
* ```
|
|
274
|
+
*/
|
|
275
|
+
public static readonly readActivities: string;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* The request that makes a page document the asking window's, unless another window has it, checking and holding in one step, so of
|
|
279
|
+
* two windows that claim a page at once only one has it. A window has a page until it forgets it, it closes for good or its connection
|
|
280
|
+
* goes. It carries an {@link PageRequest} and is answered with an {@link PageClaim}.
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* ```ts
|
|
284
|
+
* import { BrowserMethods, PageRequest } from "@noldova/browser.protocol";
|
|
285
|
+
*
|
|
286
|
+
* const request: PageRequest = new PageRequest("0f8fad5b-d9cb-469f-a165-70867728950e");
|
|
287
|
+
* const method: string = BrowserMethods.claimPage;
|
|
288
|
+
* ```
|
|
289
|
+
*/
|
|
290
|
+
public static readonly claimPage: string;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* The request that makes the page documents a window has open, shown or not, the window's, apart from those another window has.
|
|
294
|
+
* It carries an {@link OpenPagesRequest} and is answered with an {@link HeldPages}, which names the ones another window has.
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* ```ts
|
|
298
|
+
* import { BrowserMethods, OpenPagesRequest } from "@noldova/browser.protocol";
|
|
299
|
+
*
|
|
300
|
+
* const request: OpenPagesRequest = new OpenPagesRequest(["0f8fad5b-d9cb-469f-a165-70867728950e"]);
|
|
301
|
+
* const method: string = BrowserMethods.holdPages;
|
|
302
|
+
* ```
|
|
303
|
+
*/
|
|
304
|
+
public static readonly holdPages: string;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* The request that lets go of a page document the asking window has, keeping its record, as when Noldova Desktop refuses to open a page the
|
|
308
|
+
* window claimed; a page another window has stays that window's. It carries an {@link PageRequest} and is answered with null.
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* ```ts
|
|
312
|
+
* import { BrowserMethods, PageRequest } from "@noldova/browser.protocol";
|
|
313
|
+
*
|
|
314
|
+
* const request: PageRequest = new PageRequest("0f8fad5b-d9cb-469f-a165-70867728950e");
|
|
315
|
+
* const method: string = BrowserMethods.letGoPage;
|
|
316
|
+
* ```
|
|
317
|
+
*/
|
|
318
|
+
public static readonly letGoPage: string;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* The person's Stop or Take over on a page an agent acts on.
|
|
323
|
+
*/
|
|
324
|
+
export declare class PageStopRequest {
|
|
325
|
+
/**
|
|
326
|
+
* The page document's instance, a UUID in lowercase.
|
|
327
|
+
*/
|
|
328
|
+
public readonly instance: string;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Whether the person takes the page over, which also refuses the later calls of the session that last acted on it.
|
|
332
|
+
*/
|
|
333
|
+
public readonly isTakingOver: boolean;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Creates the request.
|
|
337
|
+
*
|
|
338
|
+
* @param instance The page document's instance.
|
|
339
|
+
* @param isTakingOver Whether the person takes the page over rather than only stopping its calls.
|
|
340
|
+
*
|
|
341
|
+
* @example
|
|
342
|
+
* ```ts
|
|
343
|
+
* import { PageStopRequest } from "@noldova/browser.protocol";
|
|
344
|
+
*
|
|
345
|
+
* const request: PageStopRequest = new PageStopRequest("0f8fad5b-d9cb-469f-a165-70867728950e", false);
|
|
346
|
+
* ```
|
|
347
|
+
*/
|
|
348
|
+
public constructor(instance: string, isTakingOver: boolean);
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Reads the request from its wire form, `{ instance, isTakingOver }`.
|
|
352
|
+
*
|
|
353
|
+
* @param value The parsed JSON value.
|
|
354
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
355
|
+
* @returns The request.
|
|
356
|
+
* @throws JsonException synchronously when the value isn't an object, a field is missing, of the wrong type or not one of these two,
|
|
357
|
+
* with the path of the field.
|
|
358
|
+
*
|
|
359
|
+
* @example
|
|
360
|
+
* ```ts
|
|
361
|
+
* import { PageStopRequest } from "@noldova/browser.protocol";
|
|
362
|
+
*
|
|
363
|
+
* const request: PageStopRequest = PageStopRequest.fromJson({ instance: "0f8fad5b-d9cb-469f-a165-70867728950e", isTakingOver: true });
|
|
364
|
+
* ```
|
|
365
|
+
*/
|
|
366
|
+
public static fromJson(value: unknown, path?: string): PageStopRequest;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Writes the request in its wire form.
|
|
370
|
+
*
|
|
371
|
+
* @returns A new JSON object with `instance` and `isTakingOver`.
|
|
372
|
+
*
|
|
373
|
+
* @example
|
|
374
|
+
* ```ts
|
|
375
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
376
|
+
* import { PageStopRequest } from "@noldova/browser.protocol";
|
|
377
|
+
*
|
|
378
|
+
* const json: JsonObject = new PageStopRequest("0f8fad5b-d9cb-469f-a165-70867728950e", true).toJson();
|
|
379
|
+
* ```
|
|
380
|
+
*/
|
|
381
|
+
public toJson(): JsonObject;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* A page document the window part opened, as the runtime part keeps it.
|
|
386
|
+
*/
|
|
387
|
+
export declare class PageRecord {
|
|
388
|
+
/**
|
|
389
|
+
* The instance Noldova Desktop opened the document with, a UUID in lowercase.
|
|
390
|
+
*/
|
|
391
|
+
public readonly instance: string;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* The profile key of the workspace the page's view browses.
|
|
395
|
+
*/
|
|
396
|
+
public readonly profileKey: string;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* The address the page last showed, or empty before its first.
|
|
400
|
+
*/
|
|
401
|
+
public readonly url: string;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Creates the record.
|
|
405
|
+
*
|
|
406
|
+
* @param instance The page document's instance.
|
|
407
|
+
* @param profileKey The workspace's profile key.
|
|
408
|
+
* @param url The address the page last showed, or empty before its first.
|
|
409
|
+
*
|
|
410
|
+
* @example
|
|
411
|
+
* ```ts
|
|
412
|
+
* import { PageRecord } from "@noldova/browser.protocol";
|
|
413
|
+
*
|
|
414
|
+
* const record: PageRecord = new PageRecord("0f8fad5b-d9cb-469f-a165-70867728950e", "folder-1", "");
|
|
415
|
+
* ```
|
|
416
|
+
*/
|
|
417
|
+
public constructor(instance: string, profileKey: string, url: string);
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Reads the record from its wire form, `{ instance, profileKey, url }`.
|
|
421
|
+
*
|
|
422
|
+
* @param value The parsed JSON value.
|
|
423
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
424
|
+
* @returns The record.
|
|
425
|
+
* @throws JsonException synchronously when the value isn't an object, a field is missing, isn't a string or isn't one of these three,
|
|
426
|
+
* with the path of the field.
|
|
427
|
+
*
|
|
428
|
+
* @example
|
|
429
|
+
* ```ts
|
|
430
|
+
* import { PageRecord } from "@noldova/browser.protocol";
|
|
431
|
+
*
|
|
432
|
+
* const record: PageRecord = PageRecord.fromJson({ instance: "0f8fad5b-d9cb-469f-a165-70867728950e", profileKey: "folder-1", url: "https://example.com/" });
|
|
433
|
+
* ```
|
|
434
|
+
*/
|
|
435
|
+
public static fromJson(value: unknown, path?: string): PageRecord;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Writes the record in its wire form.
|
|
439
|
+
*
|
|
440
|
+
* @returns A new JSON object with `instance`, `profileKey` and `url`.
|
|
441
|
+
*
|
|
442
|
+
* @example
|
|
443
|
+
* ```ts
|
|
444
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
445
|
+
* import { PageRecord } from "@noldova/browser.protocol";
|
|
446
|
+
*
|
|
447
|
+
* const json: JsonObject = new PageRecord("0f8fad5b-d9cb-469f-a165-70867728950e", "folder-1", "").toJson();
|
|
448
|
+
* ```
|
|
449
|
+
*/
|
|
450
|
+
public toJson(): JsonObject;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Names one page document.
|
|
455
|
+
*/
|
|
456
|
+
export declare class PageRequest {
|
|
457
|
+
/**
|
|
458
|
+
* The instance Noldova Desktop opened the document with.
|
|
459
|
+
*/
|
|
460
|
+
public readonly instance: string;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Creates the request.
|
|
464
|
+
*
|
|
465
|
+
* @param instance The page document's instance.
|
|
466
|
+
*
|
|
467
|
+
* @example
|
|
468
|
+
* ```ts
|
|
469
|
+
* import { PageRequest } from "@noldova/browser.protocol";
|
|
470
|
+
*
|
|
471
|
+
* const request: PageRequest = new PageRequest("0f8fad5b-d9cb-469f-a165-70867728950e");
|
|
472
|
+
* ```
|
|
473
|
+
*/
|
|
474
|
+
public constructor(instance: string);
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Reads the request from its wire form, `{ instance }`.
|
|
478
|
+
*
|
|
479
|
+
* @param value The parsed JSON value.
|
|
480
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
481
|
+
* @returns The request.
|
|
482
|
+
* @throws JsonException synchronously when the value isn't an object, `instance` is missing or isn't a string, or it holds another
|
|
483
|
+
* field, with the path of the field.
|
|
484
|
+
*
|
|
485
|
+
* @example
|
|
486
|
+
* ```ts
|
|
487
|
+
* import { PageRequest } from "@noldova/browser.protocol";
|
|
488
|
+
*
|
|
489
|
+
* const request: PageRequest = PageRequest.fromJson({ instance: "0f8fad5b-d9cb-469f-a165-70867728950e" });
|
|
490
|
+
* ```
|
|
491
|
+
*/
|
|
492
|
+
public static fromJson(value: unknown, path?: string): PageRequest;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Writes the request in its wire form.
|
|
496
|
+
*
|
|
497
|
+
* @returns A new JSON object with `instance`.
|
|
498
|
+
*
|
|
499
|
+
* @example
|
|
500
|
+
* ```ts
|
|
501
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
502
|
+
* import { PageRequest } from "@noldova/browser.protocol";
|
|
503
|
+
*
|
|
504
|
+
* const json: JsonObject = new PageRequest("0f8fad5b-d9cb-469f-a165-70867728950e").toJson();
|
|
505
|
+
* ```
|
|
506
|
+
*/
|
|
507
|
+
public toJson(): JsonObject;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* The agent whose call last acted on a page document, as the runtime part records it.
|
|
512
|
+
*/
|
|
513
|
+
export declare class PageAgent {
|
|
514
|
+
/**
|
|
515
|
+
* The page document's instance.
|
|
516
|
+
*/
|
|
517
|
+
public readonly instance: string;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* The agent's name as the app binds it to the session, or empty when the app binds none.
|
|
521
|
+
*/
|
|
522
|
+
public readonly agentName: string;
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Creates the record of the agent.
|
|
526
|
+
*
|
|
527
|
+
* @param instance The page document's instance.
|
|
528
|
+
* @param agentName The agent's name, or empty.
|
|
529
|
+
*
|
|
530
|
+
* @example
|
|
531
|
+
* ```ts
|
|
532
|
+
* import { PageAgent } from "@noldova/browser.protocol";
|
|
533
|
+
*
|
|
534
|
+
* const agent: PageAgent = new PageAgent("0f8fad5b-d9cb-469f-a165-70867728950e", "Scout");
|
|
535
|
+
* ```
|
|
536
|
+
*/
|
|
537
|
+
public constructor(instance: string, agentName: string);
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Reads the record from its wire form, `{ instance, agentName }`.
|
|
541
|
+
*
|
|
542
|
+
* @param value The parsed JSON value.
|
|
543
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
544
|
+
* @returns The record of the agent.
|
|
545
|
+
* @throws JsonException synchronously when the value isn't an object, a field is missing, isn't a string or isn't one of these two,
|
|
546
|
+
* with the path of the field.
|
|
547
|
+
*
|
|
548
|
+
* @example
|
|
549
|
+
* ```ts
|
|
550
|
+
* import { PageAgent } from "@noldova/browser.protocol";
|
|
551
|
+
*
|
|
552
|
+
* const agent: PageAgent = PageAgent.fromJson({ instance: "0f8fad5b-d9cb-469f-a165-70867728950e", agentName: "" });
|
|
553
|
+
* ```
|
|
554
|
+
*/
|
|
555
|
+
public static fromJson(value: unknown, path?: string): PageAgent;
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Writes the record in its wire form.
|
|
559
|
+
*
|
|
560
|
+
* @returns A new JSON object with `instance` and `agentName`.
|
|
561
|
+
*
|
|
562
|
+
* @example
|
|
563
|
+
* ```ts
|
|
564
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
565
|
+
* import { PageAgent } from "@noldova/browser.protocol";
|
|
566
|
+
*
|
|
567
|
+
* const json: JsonObject = new PageAgent("0f8fad5b-d9cb-469f-a165-70867728950e", "Scout").toJson();
|
|
568
|
+
* ```
|
|
569
|
+
*/
|
|
570
|
+
public toJson(): JsonObject;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* The answer to a window reporting the page documents it has open.
|
|
575
|
+
*/
|
|
576
|
+
export declare class HeldPages {
|
|
577
|
+
/**
|
|
578
|
+
* The instances another window has, which stay that window's; the window shows no view of them until it claims them again.
|
|
579
|
+
*/
|
|
580
|
+
public readonly refused: readonly string[];
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* The agent last on each page the window now holds, for the pages the module records one for.
|
|
584
|
+
*/
|
|
585
|
+
public readonly agents: readonly PageAgent[];
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Creates the answer.
|
|
589
|
+
*
|
|
590
|
+
* @param refused The instances another window has; the answer keeps the array it is given.
|
|
591
|
+
* @param agents The agent last on each held page the module records one for; the answer keeps the array it is given.
|
|
592
|
+
*
|
|
593
|
+
* @example
|
|
594
|
+
* ```ts
|
|
595
|
+
* import { HeldPages, PageAgent } from "@noldova/browser.protocol";
|
|
596
|
+
*
|
|
597
|
+
* const held: HeldPages = new HeldPages(["0f8fad5b-d9cb-469f-a165-70867728950e"], [new PageAgent("5b1c2a7e-3d4f-4e8a-9b0c-1d2e3f4a5b6c", "Scout")]);
|
|
598
|
+
* const none: HeldPages = new HeldPages([], []);
|
|
599
|
+
* ```
|
|
600
|
+
*/
|
|
601
|
+
public constructor(refused: readonly string[], agents: readonly PageAgent[]);
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* Reads the answer from its wire form, `{ refused, agents }`, where `agents` is an array of {@link PageAgent}'s wire forms.
|
|
605
|
+
*
|
|
606
|
+
* @param value The parsed JSON value.
|
|
607
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
608
|
+
* @returns The answer.
|
|
609
|
+
* @throws JsonException synchronously when the value isn't an object, `refused` is missing or isn't an array of strings, `agents` is
|
|
610
|
+
* missing or isn't an array of agents, or it holds another field, with the path of the field or the item, such as `$.agents.0.agentName`.
|
|
611
|
+
*
|
|
612
|
+
* @example
|
|
613
|
+
* ```ts
|
|
614
|
+
* import { HeldPages } from "@noldova/browser.protocol";
|
|
615
|
+
*
|
|
616
|
+
* const held: HeldPages = HeldPages.fromJson({ refused: [], agents: [] });
|
|
617
|
+
* ```
|
|
618
|
+
*/
|
|
619
|
+
public static fromJson(value: unknown, path?: string): HeldPages;
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Writes the answer in its wire form.
|
|
623
|
+
*
|
|
624
|
+
* @returns A new JSON object with `refused` and `agents`, each agent in its wire form.
|
|
625
|
+
*
|
|
626
|
+
* @example
|
|
627
|
+
* ```ts
|
|
628
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
629
|
+
* import { HeldPages } from "@noldova/browser.protocol";
|
|
630
|
+
*
|
|
631
|
+
* const json: JsonObject = new HeldPages([], []).toJson();
|
|
632
|
+
* ```
|
|
633
|
+
*/
|
|
634
|
+
public toJson(): JsonObject;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Names the page documents a window has open, shown or not.
|
|
639
|
+
*/
|
|
640
|
+
export declare class OpenPagesRequest {
|
|
641
|
+
/**
|
|
642
|
+
* The instances Noldova Desktop opened the documents with.
|
|
643
|
+
*/
|
|
644
|
+
public readonly instances: readonly string[];
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* Creates the request.
|
|
648
|
+
*
|
|
649
|
+
* @param instances The instances; the request keeps the array it is given.
|
|
650
|
+
*
|
|
651
|
+
* @example
|
|
652
|
+
* ```ts
|
|
653
|
+
* import { OpenPagesRequest } from "@noldova/browser.protocol";
|
|
654
|
+
*
|
|
655
|
+
* const request: OpenPagesRequest = new OpenPagesRequest(["0f8fad5b-d9cb-469f-a165-70867728950e"]);
|
|
656
|
+
* ```
|
|
657
|
+
*/
|
|
658
|
+
public constructor(instances: readonly string[]);
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Reads the request from its wire form, `{ instances }`.
|
|
662
|
+
*
|
|
663
|
+
* @param value The parsed JSON value.
|
|
664
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
665
|
+
* @returns The request.
|
|
666
|
+
* @throws JsonException synchronously when the value isn't an object, `instances` is missing or isn't an array of strings, or it holds
|
|
667
|
+
* another field, with the path of the field or the item.
|
|
668
|
+
*
|
|
669
|
+
* @example
|
|
670
|
+
* ```ts
|
|
671
|
+
* import { OpenPagesRequest } from "@noldova/browser.protocol";
|
|
672
|
+
*
|
|
673
|
+
* const request: OpenPagesRequest = OpenPagesRequest.fromJson({ instances: [] });
|
|
674
|
+
* ```
|
|
675
|
+
*/
|
|
676
|
+
public static fromJson(value: unknown, path?: string): OpenPagesRequest;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Writes the request in its wire form.
|
|
680
|
+
*
|
|
681
|
+
* @returns A new JSON object with `instances`.
|
|
682
|
+
*
|
|
683
|
+
* @example
|
|
684
|
+
* ```ts
|
|
685
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
686
|
+
* import { OpenPagesRequest } from "@noldova/browser.protocol";
|
|
687
|
+
*
|
|
688
|
+
* const json: JsonObject = new OpenPagesRequest([]).toJson();
|
|
689
|
+
* ```
|
|
690
|
+
*/
|
|
691
|
+
public toJson(): JsonObject;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* The answer to a window claiming a page document.
|
|
696
|
+
*/
|
|
697
|
+
export declare class PageClaim {
|
|
698
|
+
/**
|
|
699
|
+
* Whether the page is the asking window's now; false when another window has it.
|
|
700
|
+
*/
|
|
701
|
+
public readonly isClaimed: boolean;
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Whether the page was already the asking window's, as one it has open, shown or not.
|
|
705
|
+
*/
|
|
706
|
+
public readonly isHere: boolean;
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* The page's record, when the window claimed it and the module keeps one; null otherwise.
|
|
710
|
+
*/
|
|
711
|
+
public readonly record: PageRecord | null;
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* The name of the agent whose call last acted on the page, when the window claimed it and the module keeps one; null otherwise.
|
|
715
|
+
*/
|
|
716
|
+
public readonly agentName: string | null;
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* Creates the answer.
|
|
720
|
+
*
|
|
721
|
+
* @param isClaimed Whether the page is the asking window's now.
|
|
722
|
+
* @param isHere Whether the page was already the asking window's.
|
|
723
|
+
* @param record The page's record, or null.
|
|
724
|
+
* @param agentName The agent last on the page, or null.
|
|
725
|
+
*
|
|
726
|
+
* @example
|
|
727
|
+
* ```ts
|
|
728
|
+
* import { PageClaim } from "@noldova/browser.protocol";
|
|
729
|
+
*
|
|
730
|
+
* const claim: PageClaim = new PageClaim(true, false, null, null);
|
|
731
|
+
* ```
|
|
732
|
+
*/
|
|
733
|
+
public constructor(isClaimed: boolean, isHere: boolean, record: PageRecord | null, agentName: string | null);
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* Reads the answer from its wire form, `{ isClaimed, isHere, record, agentName }`, where `record` is a {@link PageRecord}'s wire form
|
|
737
|
+
* or null and `agentName` a string or null; none of the four may be left out.
|
|
738
|
+
*
|
|
739
|
+
* @param value The parsed JSON value.
|
|
740
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
741
|
+
* @returns The answer.
|
|
742
|
+
* @throws JsonException synchronously when the value isn't an object, a field is missing, of the wrong type or not one of these four,
|
|
743
|
+
* or the record isn't a record, with the path of the field, such as `$.record.url`.
|
|
744
|
+
*
|
|
745
|
+
* @example
|
|
746
|
+
* ```ts
|
|
747
|
+
* import { PageClaim } from "@noldova/browser.protocol";
|
|
748
|
+
*
|
|
749
|
+
* const claim: PageClaim = PageClaim.fromJson({ isClaimed: false, isHere: false, record: null, agentName: null });
|
|
750
|
+
* ```
|
|
751
|
+
*/
|
|
752
|
+
public static fromJson(value: unknown, path?: string): PageClaim;
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* Writes the answer in its wire form.
|
|
756
|
+
*
|
|
757
|
+
* @returns A new JSON object with `isClaimed`, `isHere`, `record`, the record's wire form or null, and `agentName`.
|
|
758
|
+
*
|
|
759
|
+
* @example
|
|
760
|
+
* ```ts
|
|
761
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
762
|
+
* import { PageClaim, PageRecord } from "@noldova/browser.protocol";
|
|
763
|
+
*
|
|
764
|
+
* const json: JsonObject = new PageClaim(true, true, new PageRecord("0f8fad5b-d9cb-469f-a165-70867728950e", "folder-1", ""), "Scout").toJson();
|
|
765
|
+
* ```
|
|
766
|
+
*/
|
|
767
|
+
public toJson(): JsonObject;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Names the workspace whose browsing data the person clears.
|
|
772
|
+
*/
|
|
773
|
+
export declare class BrowsingDataRequest {
|
|
774
|
+
/**
|
|
775
|
+
* The workspace's profile key.
|
|
776
|
+
*/
|
|
777
|
+
public readonly profileKey: string;
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* Creates the request.
|
|
781
|
+
*
|
|
782
|
+
* @param profileKey The workspace's profile key.
|
|
783
|
+
*
|
|
784
|
+
* @example
|
|
785
|
+
* ```ts
|
|
786
|
+
* import { BrowsingDataRequest } from "@noldova/browser.protocol";
|
|
787
|
+
*
|
|
788
|
+
* const request: BrowsingDataRequest = new BrowsingDataRequest("folder-1");
|
|
789
|
+
* ```
|
|
790
|
+
*/
|
|
791
|
+
public constructor(profileKey: string);
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* Reads the request from its wire form, `{ profileKey }`.
|
|
795
|
+
*
|
|
796
|
+
* @param value The parsed JSON value.
|
|
797
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
798
|
+
* @returns The request.
|
|
799
|
+
* @throws JsonException synchronously when the value isn't an object, `profileKey` is missing or isn't a string, or it holds another
|
|
800
|
+
* field, with the path of the field.
|
|
801
|
+
*
|
|
802
|
+
* @example
|
|
803
|
+
* ```ts
|
|
804
|
+
* import { BrowsingDataRequest } from "@noldova/browser.protocol";
|
|
805
|
+
*
|
|
806
|
+
* const request: BrowsingDataRequest = BrowsingDataRequest.fromJson({ profileKey: "folder-1" });
|
|
807
|
+
* ```
|
|
808
|
+
*/
|
|
809
|
+
public static fromJson(value: unknown, path?: string): BrowsingDataRequest;
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* Writes the request in its wire form.
|
|
813
|
+
*
|
|
814
|
+
* @returns A new JSON object with `profileKey`.
|
|
815
|
+
*
|
|
816
|
+
* @example
|
|
817
|
+
* ```ts
|
|
818
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
819
|
+
* import { BrowsingDataRequest } from "@noldova/browser.protocol";
|
|
820
|
+
*
|
|
821
|
+
* const json: JsonObject = new BrowsingDataRequest("folder-1").toJson();
|
|
822
|
+
* ```
|
|
823
|
+
*/
|
|
824
|
+
public toJson(): JsonObject;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* Why the runtime part refused to allow an address the person typed.
|
|
829
|
+
*
|
|
830
|
+
* @example
|
|
831
|
+
* ```ts
|
|
832
|
+
* import { TypedAddressAnswerKind, TypedAddressRefusal, type TypedAddressAnswer } from "@noldova/browser.protocol";
|
|
833
|
+
*
|
|
834
|
+
* function isLocal(answer: TypedAddressAnswer): boolean {
|
|
835
|
+
* return answer.kind === TypedAddressAnswerKind.Refused && answer.reason === TypedAddressRefusal.Local;
|
|
836
|
+
* }
|
|
837
|
+
* ```
|
|
838
|
+
*/
|
|
839
|
+
export declare const TypedAddressRefusal: {
|
|
840
|
+
/**
|
|
841
|
+
* The text isn't a web address, such as words with spaces, wire value `"NotAnAddress"`.
|
|
842
|
+
*/
|
|
843
|
+
readonly NotAnAddress: "NotAnAddress";
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* The address's scheme is neither `http:` nor `https:`, wire value `"NotWeb"`.
|
|
847
|
+
*/
|
|
848
|
+
readonly NotWeb: "NotWeb";
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* The address is longer than 32,768 characters, wire value `"TooLong"`.
|
|
852
|
+
*/
|
|
853
|
+
readonly TooLong: "TooLong";
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* The address carries a user name or a password, wire value `"Credentials"`.
|
|
857
|
+
*/
|
|
858
|
+
readonly Credentials: "Credentials";
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* The address is on this machine or its local network, and the app's settings don't name its origin, wire value `"Local"`.
|
|
862
|
+
*/
|
|
863
|
+
readonly Local: "Local";
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* The address is one Browser never opens, such as a link-local or unspecified address, wire value `"NeverAllowed"`.
|
|
867
|
+
*/
|
|
868
|
+
readonly NeverAllowed: "NeverAllowed";
|
|
869
|
+
};
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* One of {@link TypedAddressRefusal}'s wire values: `"NotAnAddress"`, `"NotWeb"`, `"TooLong"`, `"Credentials"`, `"Local"` or `"NeverAllowed"`.
|
|
873
|
+
*/
|
|
874
|
+
export type TypedAddressRefusal = (typeof TypedAddressRefusal)[keyof typeof TypedAddressRefusal];
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* An address the person typed in a pane, for the runtime part to allow.
|
|
878
|
+
*/
|
|
879
|
+
export declare class TypedAddressRequest {
|
|
880
|
+
/**
|
|
881
|
+
* The pane's profile key, which names its workspace.
|
|
882
|
+
*/
|
|
883
|
+
public readonly profileKey: string;
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* The whole address the person typed, with its scheme.
|
|
887
|
+
*/
|
|
888
|
+
public readonly url: string;
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* Creates the request.
|
|
892
|
+
*
|
|
893
|
+
* @param profileKey The pane's profile key.
|
|
894
|
+
* @param url The whole address the person typed.
|
|
895
|
+
*
|
|
896
|
+
* @example
|
|
897
|
+
* ```ts
|
|
898
|
+
* import { TypedAddressRequest } from "@noldova/browser.protocol";
|
|
899
|
+
*
|
|
900
|
+
* const request: TypedAddressRequest = new TypedAddressRequest("folder-1", "https://example.com/docs");
|
|
901
|
+
* ```
|
|
902
|
+
*/
|
|
903
|
+
public constructor(profileKey: string, url: string);
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* Reads the request from its wire form, `{ profileKey, url }`.
|
|
907
|
+
*
|
|
908
|
+
* @param value The parsed JSON value.
|
|
909
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
910
|
+
* @returns The request.
|
|
911
|
+
* @throws JsonException synchronously when the value isn't an object, a field is missing, isn't a string or isn't one of these two,
|
|
912
|
+
* with the path of the field.
|
|
913
|
+
*
|
|
914
|
+
* @example
|
|
915
|
+
* ```ts
|
|
916
|
+
* import { TypedAddressRequest } from "@noldova/browser.protocol";
|
|
917
|
+
*
|
|
918
|
+
* const request: TypedAddressRequest = TypedAddressRequest.fromJson({ profileKey: "folder-1", url: "https://example.com/docs" });
|
|
919
|
+
* ```
|
|
920
|
+
*/
|
|
921
|
+
public static fromJson(value: unknown, path?: string): TypedAddressRequest;
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* Writes the request in its wire form.
|
|
925
|
+
*
|
|
926
|
+
* @returns A new JSON object with `profileKey` and `url`.
|
|
927
|
+
*
|
|
928
|
+
* @example
|
|
929
|
+
* ```ts
|
|
930
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
931
|
+
* import { TypedAddressRequest } from "@noldova/browser.protocol";
|
|
932
|
+
*
|
|
933
|
+
* const json: JsonObject = new TypedAddressRequest("folder-1", "https://example.com/docs").toJson();
|
|
934
|
+
* ```
|
|
935
|
+
*/
|
|
936
|
+
public toJson(): JsonObject;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
/**
|
|
940
|
+
* A redirect of an address the person typed on a page, for the runtime part to let the page's view follow for that load only.
|
|
941
|
+
*/
|
|
942
|
+
export declare class TypedRedirectRequest {
|
|
943
|
+
/**
|
|
944
|
+
* The page document's instance, whose view follows the redirect.
|
|
945
|
+
*/
|
|
946
|
+
public readonly instance: string;
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* The page's profile key, which names its workspace.
|
|
950
|
+
*/
|
|
951
|
+
public readonly profileKey: string;
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* The redirect's whole address.
|
|
955
|
+
*/
|
|
956
|
+
public readonly url: string;
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* Creates the request.
|
|
960
|
+
*
|
|
961
|
+
* @param instance The page document's instance.
|
|
962
|
+
* @param profileKey The page's profile key.
|
|
963
|
+
* @param url The redirect's whole address.
|
|
964
|
+
*
|
|
965
|
+
* @example
|
|
966
|
+
* ```ts
|
|
967
|
+
* import { TypedRedirectRequest } from "@noldova/browser.protocol";
|
|
968
|
+
*
|
|
969
|
+
* const request: TypedRedirectRequest = new TypedRedirectRequest("0f8fad5b-d9cb-469f-a165-70867728950e", "folder-1", "https://www.example.com/");
|
|
970
|
+
* ```
|
|
971
|
+
*/
|
|
972
|
+
public constructor(instance: string, profileKey: string, url: string);
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Reads the request from its wire form, `{ instance, profileKey, url }`.
|
|
976
|
+
*
|
|
977
|
+
* @param value The parsed JSON value.
|
|
978
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
979
|
+
* @returns The request.
|
|
980
|
+
* @throws JsonException synchronously when the value isn't an object, a field is missing, isn't a string or isn't one of these three,
|
|
981
|
+
* with the path of the field.
|
|
982
|
+
*
|
|
983
|
+
* @example
|
|
984
|
+
* ```ts
|
|
985
|
+
* import { TypedRedirectRequest } from "@noldova/browser.protocol";
|
|
986
|
+
*
|
|
987
|
+
* const request: TypedRedirectRequest = TypedRedirectRequest.fromJson({ instance: "0f8fad5b-d9cb-469f-a165-70867728950e", profileKey: "folder-1", url: "https://www.example.com/" });
|
|
988
|
+
* ```
|
|
989
|
+
*/
|
|
990
|
+
public static fromJson(value: unknown, path?: string): TypedRedirectRequest;
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* Writes the request in its wire form.
|
|
994
|
+
*
|
|
995
|
+
* @returns A new JSON object with `instance`, `profileKey` and `url`.
|
|
996
|
+
*
|
|
997
|
+
* @example
|
|
998
|
+
* ```ts
|
|
999
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
1000
|
+
* import { TypedRedirectRequest } from "@noldova/browser.protocol";
|
|
1001
|
+
*
|
|
1002
|
+
* const json: JsonObject = new TypedRedirectRequest("0f8fad5b-d9cb-469f-a165-70867728950e", "folder-1", "https://www.example.com/").toJson();
|
|
1003
|
+
* ```
|
|
1004
|
+
*/
|
|
1005
|
+
public toJson(): JsonObject;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* The runtime part allowed the typed address's origin in the workspace, and the pane may go there.
|
|
1010
|
+
*/
|
|
1011
|
+
export declare class TypedAddressAllowed {
|
|
1012
|
+
/**
|
|
1013
|
+
* Marks this answer in a {@link TypedAddressAnswer}, always `Allowed`.
|
|
1014
|
+
*/
|
|
1015
|
+
public readonly kind: typeof TypedAddressAnswerKind.Allowed;
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* The origin now allowed, such as `https://example.com`.
|
|
1019
|
+
*/
|
|
1020
|
+
public readonly origin: string;
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Creates the answer.
|
|
1024
|
+
*
|
|
1025
|
+
* @param origin The origin now allowed.
|
|
1026
|
+
*
|
|
1027
|
+
* @example
|
|
1028
|
+
* ```ts
|
|
1029
|
+
* import { TypedAddressAllowed } from "@noldova/browser.protocol";
|
|
1030
|
+
*
|
|
1031
|
+
* const answer: TypedAddressAllowed = new TypedAddressAllowed("https://example.com");
|
|
1032
|
+
* ```
|
|
1033
|
+
*/
|
|
1034
|
+
public constructor(origin: string);
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* Reads the answer from its wire form, `{ kind: "Allowed", origin }`.
|
|
1038
|
+
*
|
|
1039
|
+
* @param value The parsed JSON value.
|
|
1040
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
1041
|
+
* @returns The answer.
|
|
1042
|
+
* @throws JsonException synchronously when the value isn't an object, its kind isn't `Allowed`, `origin` is missing or isn't a string,
|
|
1043
|
+
* or it holds another field, with the path of the field.
|
|
1044
|
+
*
|
|
1045
|
+
* @example
|
|
1046
|
+
* ```ts
|
|
1047
|
+
* import { TypedAddressAllowed } from "@noldova/browser.protocol";
|
|
1048
|
+
*
|
|
1049
|
+
* const answer: TypedAddressAllowed = TypedAddressAllowed.fromJson({ kind: "Allowed", origin: "https://example.com" });
|
|
1050
|
+
* ```
|
|
1051
|
+
*/
|
|
1052
|
+
public static fromJson(value: unknown, path?: string): TypedAddressAllowed;
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* Writes the answer in its wire form.
|
|
1056
|
+
*
|
|
1057
|
+
* @returns A new JSON object with `kind` and `origin`.
|
|
1058
|
+
*
|
|
1059
|
+
* @example
|
|
1060
|
+
* ```ts
|
|
1061
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
1062
|
+
* import { TypedAddressAllowed } from "@noldova/browser.protocol";
|
|
1063
|
+
*
|
|
1064
|
+
* const json: JsonObject = new TypedAddressAllowed("https://example.com").toJson();
|
|
1065
|
+
* ```
|
|
1066
|
+
*/
|
|
1067
|
+
public toJson(): JsonObject;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
/**
|
|
1071
|
+
* The runtime part refused the typed address, allowed nothing, and the pane doesn't go there.
|
|
1072
|
+
*/
|
|
1073
|
+
export declare class TypedAddressRefused {
|
|
1074
|
+
/**
|
|
1075
|
+
* Marks this answer in a {@link TypedAddressAnswer}, always `Refused`.
|
|
1076
|
+
*/
|
|
1077
|
+
public readonly kind: typeof TypedAddressAnswerKind.Refused;
|
|
1078
|
+
|
|
1079
|
+
/**
|
|
1080
|
+
* Why the address was refused.
|
|
1081
|
+
*/
|
|
1082
|
+
public readonly reason: TypedAddressRefusal;
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Creates the answer.
|
|
1086
|
+
*
|
|
1087
|
+
* @param reason Why the address was refused.
|
|
1088
|
+
*
|
|
1089
|
+
* @example
|
|
1090
|
+
* ```ts
|
|
1091
|
+
* import { TypedAddressRefusal, TypedAddressRefused } from "@noldova/browser.protocol";
|
|
1092
|
+
*
|
|
1093
|
+
* const answer: TypedAddressRefused = new TypedAddressRefused(TypedAddressRefusal.Local);
|
|
1094
|
+
* ```
|
|
1095
|
+
*/
|
|
1096
|
+
public constructor(reason: TypedAddressRefusal);
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* Reads the answer from its wire form, `{ kind: "Refused", reason }`.
|
|
1100
|
+
*
|
|
1101
|
+
* @param value The parsed JSON value.
|
|
1102
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
1103
|
+
* @returns The answer.
|
|
1104
|
+
* @throws JsonException synchronously when the value isn't an object, its kind isn't `Refused`, `reason` is missing or isn't one of
|
|
1105
|
+
* {@link TypedAddressRefusal}'s values, or it holds another field, with the path of the field.
|
|
1106
|
+
*
|
|
1107
|
+
* @example
|
|
1108
|
+
* ```ts
|
|
1109
|
+
* import { TypedAddressRefused } from "@noldova/browser.protocol";
|
|
1110
|
+
*
|
|
1111
|
+
* const answer: TypedAddressRefused = TypedAddressRefused.fromJson({ kind: "Refused", reason: "NotWeb" });
|
|
1112
|
+
* ```
|
|
1113
|
+
*/
|
|
1114
|
+
public static fromJson(value: unknown, path?: string): TypedAddressRefused;
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* Writes the answer in its wire form.
|
|
1118
|
+
*
|
|
1119
|
+
* @returns A new JSON object with `kind` and `reason`.
|
|
1120
|
+
*
|
|
1121
|
+
* @example
|
|
1122
|
+
* ```ts
|
|
1123
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
1124
|
+
* import { TypedAddressRefusal, TypedAddressRefused } from "@noldova/browser.protocol";
|
|
1125
|
+
*
|
|
1126
|
+
* const json: JsonObject = new TypedAddressRefused(TypedAddressRefusal.TooLong).toJson();
|
|
1127
|
+
* ```
|
|
1128
|
+
*/
|
|
1129
|
+
public toJson(): JsonObject;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
/**
|
|
1133
|
+
* Which answer the runtime part gave to an {@link TypedAddressRequest}, which marks a {@link TypedAddressAnswer}.
|
|
1134
|
+
*
|
|
1135
|
+
* @example
|
|
1136
|
+
* ```ts
|
|
1137
|
+
* import { TypedAddressAnswerKind, type TypedAddressAnswer } from "@noldova/browser.protocol";
|
|
1138
|
+
*
|
|
1139
|
+
* function describe(answer: TypedAddressAnswer): string {
|
|
1140
|
+
* return answer.kind === TypedAddressAnswerKind.Allowed ? answer.origin : answer.reason;
|
|
1141
|
+
* }
|
|
1142
|
+
* ```
|
|
1143
|
+
*/
|
|
1144
|
+
export declare const TypedAddressAnswerKind: {
|
|
1145
|
+
/**
|
|
1146
|
+
* The origin is allowed: an {@link TypedAddressAllowed}, wire value `"Allowed"`.
|
|
1147
|
+
*/
|
|
1148
|
+
readonly Allowed: "Allowed";
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* The address is refused: an {@link TypedAddressRefused}, wire value `"Refused"`.
|
|
1152
|
+
*/
|
|
1153
|
+
readonly Refused: "Refused";
|
|
1154
|
+
};
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* One of {@link TypedAddressAnswerKind}'s wire values: `"Allowed"` or `"Refused"`.
|
|
1158
|
+
*/
|
|
1159
|
+
export type TypedAddressAnswerKind = (typeof TypedAddressAnswerKind)[keyof typeof TypedAddressAnswerKind];
|
|
1160
|
+
|
|
1161
|
+
/**
|
|
1162
|
+
* The runtime part's answer to a {@link TypedAddressRequest}: allowed with the origin, or refused with the reason.
|
|
1163
|
+
*
|
|
1164
|
+
* @example
|
|
1165
|
+
* ```ts
|
|
1166
|
+
* import { TypedAddressAnswerKind, type TypedAddressAnswer } from "@noldova/browser.protocol";
|
|
1167
|
+
*
|
|
1168
|
+
* function describe(answer: TypedAddressAnswer): string {
|
|
1169
|
+
* return answer.kind === TypedAddressAnswerKind.Allowed ? answer.origin : answer.reason;
|
|
1170
|
+
* }
|
|
1171
|
+
* ```
|
|
1172
|
+
*/
|
|
1173
|
+
export declare type TypedAddressAnswer = TypedAddressAllowed | TypedAddressRefused;
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* Reads a {@link TypedAddressAnswer} from its wire form, by its kind.
|
|
1177
|
+
*/
|
|
1178
|
+
export declare class TypedAddressAnswerReader {
|
|
1179
|
+
/**
|
|
1180
|
+
* Reads the answer, a {@link TypedAddressAllowed} for the kind `Allowed` and a {@link TypedAddressRefused} for `Refused`.
|
|
1181
|
+
*
|
|
1182
|
+
* @param value The parsed JSON value.
|
|
1183
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
1184
|
+
* @returns The answer of its kind.
|
|
1185
|
+
* @throws JsonException synchronously when the value isn't an object, its kind is missing or neither `Allowed` nor `Refused`, or it
|
|
1186
|
+
* isn't an answer of that kind, with the path of the field.
|
|
1187
|
+
*
|
|
1188
|
+
* @example
|
|
1189
|
+
* ```ts
|
|
1190
|
+
* import { TypedAddressAnswerReader, type TypedAddressAnswer } from "@noldova/browser.protocol";
|
|
1191
|
+
*
|
|
1192
|
+
* const answer: TypedAddressAnswer = TypedAddressAnswerReader.read({ kind: "Refused", reason: "Local" });
|
|
1193
|
+
* ```
|
|
1194
|
+
*/
|
|
1195
|
+
public static read(value: unknown, path?: string): TypedAddressAnswer;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* What an agent does on a page.
|
|
1200
|
+
*
|
|
1201
|
+
* @example
|
|
1202
|
+
* ```ts
|
|
1203
|
+
* import { PageAction, type PageActivity } from "@noldova/browser.protocol";
|
|
1204
|
+
*
|
|
1205
|
+
* function isAiming(activity: PageActivity): boolean {
|
|
1206
|
+
* return activity.action === PageAction.Clicking || activity.action === PageAction.Typing;
|
|
1207
|
+
* }
|
|
1208
|
+
* ```
|
|
1209
|
+
*/
|
|
1210
|
+
export declare const PageAction: {
|
|
1211
|
+
/**
|
|
1212
|
+
* It moves the page to an address, or back, forward or reload, wire value `"Navigating"`.
|
|
1213
|
+
*/
|
|
1214
|
+
readonly Navigating: "Navigating";
|
|
1215
|
+
|
|
1216
|
+
/**
|
|
1217
|
+
* It reads the page, wire value `"Reading"`.
|
|
1218
|
+
*/
|
|
1219
|
+
readonly Reading: "Reading";
|
|
1220
|
+
|
|
1221
|
+
/**
|
|
1222
|
+
* It clicks an element, wire value `"Clicking"`.
|
|
1223
|
+
*/
|
|
1224
|
+
readonly Clicking: "Clicking";
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* It types into an element, wire value `"Typing"`.
|
|
1228
|
+
*/
|
|
1229
|
+
readonly Typing: "Typing";
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* It presses a key, wire value `"PressingKey"`.
|
|
1233
|
+
*/
|
|
1234
|
+
readonly PressingKey: "PressingKey";
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* It waits for something on the page, wire value `"Waiting"`.
|
|
1238
|
+
*/
|
|
1239
|
+
readonly Waiting: "Waiting";
|
|
1240
|
+
};
|
|
1241
|
+
|
|
1242
|
+
/**
|
|
1243
|
+
* One of {@link PageAction}'s wire values: `"Navigating"`, `"Reading"`, `"Clicking"`, `"Typing"`, `"PressingKey"` or `"Waiting"`.
|
|
1244
|
+
*/
|
|
1245
|
+
export type PageAction = (typeof PageAction)[keyof typeof PageAction];
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* How far an agent's call on a page got.
|
|
1249
|
+
*
|
|
1250
|
+
* @example
|
|
1251
|
+
* ```ts
|
|
1252
|
+
* import { PageActivityState, type PageActivity } from "@noldova/browser.protocol";
|
|
1253
|
+
*
|
|
1254
|
+
* function isOver(activity: PageActivity): boolean {
|
|
1255
|
+
* return activity.state === PageActivityState.Ended;
|
|
1256
|
+
* }
|
|
1257
|
+
* ```
|
|
1258
|
+
*/
|
|
1259
|
+
export declare const PageActivityState: {
|
|
1260
|
+
/**
|
|
1261
|
+
* The call works on the page, wire value `"Acting"`.
|
|
1262
|
+
*/
|
|
1263
|
+
readonly Acting: "Acting";
|
|
1264
|
+
|
|
1265
|
+
/**
|
|
1266
|
+
* The call's permission request waits for the person, wire value `"Asking"`.
|
|
1267
|
+
*/
|
|
1268
|
+
readonly Asking: "Asking";
|
|
1269
|
+
|
|
1270
|
+
/**
|
|
1271
|
+
* The call is over, by its result or its failure, wire value `"Ended"`.
|
|
1272
|
+
*/
|
|
1273
|
+
readonly Ended: "Ended";
|
|
1274
|
+
};
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
* One of {@link PageActivityState}'s wire values: `"Acting"`, `"Asking"` or `"Ended"`.
|
|
1278
|
+
*/
|
|
1279
|
+
export type PageActivityState = (typeof PageActivityState)[keyof typeof PageActivityState];
|
|
1280
|
+
|
|
1281
|
+
/**
|
|
1282
|
+
* A rectangle in a page's viewport, in CSS pixels from its top left corner.
|
|
1283
|
+
*/
|
|
1284
|
+
export declare class PageBox {
|
|
1285
|
+
/**
|
|
1286
|
+
* The left edge, a finite number.
|
|
1287
|
+
*/
|
|
1288
|
+
public readonly x: number;
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* The top edge, a finite number.
|
|
1292
|
+
*/
|
|
1293
|
+
public readonly y: number;
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
* The width, a finite number of zero or more.
|
|
1297
|
+
*/
|
|
1298
|
+
public readonly width: number;
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* The height, a finite number of zero or more.
|
|
1302
|
+
*/
|
|
1303
|
+
public readonly height: number;
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* Creates the box.
|
|
1307
|
+
*
|
|
1308
|
+
* @param x The left edge, any finite number.
|
|
1309
|
+
* @param y The top edge, any finite number.
|
|
1310
|
+
* @param width The width, finite and zero or more.
|
|
1311
|
+
* @param height The height, finite and zero or more.
|
|
1312
|
+
* @throws ArgumentException synchronously when an edge isn't finite, or the width or the height isn't finite or is below zero,
|
|
1313
|
+
* naming the parameter.
|
|
1314
|
+
*
|
|
1315
|
+
* @example
|
|
1316
|
+
* ```ts
|
|
1317
|
+
* import { PageBox } from "@noldova/browser.protocol";
|
|
1318
|
+
*
|
|
1319
|
+
* const box: PageBox = new PageBox(120, 340, 96, 32);
|
|
1320
|
+
* const line: PageBox = new PageBox(-8, 0, 0, 12);
|
|
1321
|
+
* ```
|
|
1322
|
+
*/
|
|
1323
|
+
public constructor(x: number, y: number, width: number, height: number);
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* Reads the box from its wire form, `{ x, y, width, height }`.
|
|
1327
|
+
*
|
|
1328
|
+
* @param value The parsed JSON value.
|
|
1329
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
1330
|
+
* @returns The box.
|
|
1331
|
+
* @throws JsonException synchronously when the value isn't an object, a field is missing, isn't a number or isn't one of these four,
|
|
1332
|
+
* or the width or the height is below zero, with the path of the field, such as `$.box.width`.
|
|
1333
|
+
*
|
|
1334
|
+
* @example
|
|
1335
|
+
* ```ts
|
|
1336
|
+
* import { PageBox } from "@noldova/browser.protocol";
|
|
1337
|
+
*
|
|
1338
|
+
* const box: PageBox = PageBox.fromJson({ x: 120, y: 340, width: 96, height: 32 });
|
|
1339
|
+
* ```
|
|
1340
|
+
*/
|
|
1341
|
+
public static fromJson(value: unknown, path?: string): PageBox;
|
|
1342
|
+
|
|
1343
|
+
/**
|
|
1344
|
+
* Tells whether another box has the same edges and size.
|
|
1345
|
+
*
|
|
1346
|
+
* @param box The other box.
|
|
1347
|
+
* @returns True when its `x`, `y`, `width` and `height` all equal this box's.
|
|
1348
|
+
*
|
|
1349
|
+
* @example
|
|
1350
|
+
* ```ts
|
|
1351
|
+
* import { PageBox } from "@noldova/browser.protocol";
|
|
1352
|
+
*
|
|
1353
|
+
* const isSame: boolean = new PageBox(1, 2, 3, 4).isSame(new PageBox(1, 2, 3, 5));
|
|
1354
|
+
* ```
|
|
1355
|
+
*/
|
|
1356
|
+
public isSame(box: PageBox): boolean;
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* Writes the box in its wire form.
|
|
1360
|
+
*
|
|
1361
|
+
* @returns A new JSON object with `x`, `y`, `width` and `height`.
|
|
1362
|
+
*
|
|
1363
|
+
* @example
|
|
1364
|
+
* ```ts
|
|
1365
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
1366
|
+
* import { PageBox } from "@noldova/browser.protocol";
|
|
1367
|
+
*
|
|
1368
|
+
* const json: JsonObject = new PageBox(120, 340, 96, 32).toJson();
|
|
1369
|
+
* ```
|
|
1370
|
+
*/
|
|
1371
|
+
public toJson(): JsonObject;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* A point in a page's viewport, in CSS pixels from its top left corner.
|
|
1376
|
+
*/
|
|
1377
|
+
export declare class PagePoint {
|
|
1378
|
+
/**
|
|
1379
|
+
* The distance from the left edge, a finite number.
|
|
1380
|
+
*/
|
|
1381
|
+
public readonly x: number;
|
|
1382
|
+
|
|
1383
|
+
/**
|
|
1384
|
+
* The distance from the top edge, a finite number.
|
|
1385
|
+
*/
|
|
1386
|
+
public readonly y: number;
|
|
1387
|
+
|
|
1388
|
+
/**
|
|
1389
|
+
* Creates the point.
|
|
1390
|
+
*
|
|
1391
|
+
* @param x The distance from the left edge, any finite number.
|
|
1392
|
+
* @param y The distance from the top edge, any finite number.
|
|
1393
|
+
* @throws ArgumentException synchronously when a coordinate isn't finite, naming the parameter.
|
|
1394
|
+
*
|
|
1395
|
+
* @example
|
|
1396
|
+
* ```ts
|
|
1397
|
+
* import { PagePoint } from "@noldova/browser.protocol";
|
|
1398
|
+
*
|
|
1399
|
+
* const point: PagePoint = new PagePoint(168, 356);
|
|
1400
|
+
* ```
|
|
1401
|
+
*/
|
|
1402
|
+
public constructor(x: number, y: number);
|
|
1403
|
+
|
|
1404
|
+
/**
|
|
1405
|
+
* Reads the point from its wire form, `{ x, y }`.
|
|
1406
|
+
*
|
|
1407
|
+
* @param value The parsed JSON value.
|
|
1408
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
1409
|
+
* @returns The point.
|
|
1410
|
+
* @throws JsonException synchronously when the value isn't an object, a field is missing, isn't a number or isn't one of these two,
|
|
1411
|
+
* with the path of the field.
|
|
1412
|
+
*
|
|
1413
|
+
* @example
|
|
1414
|
+
* ```ts
|
|
1415
|
+
* import { PagePoint } from "@noldova/browser.protocol";
|
|
1416
|
+
*
|
|
1417
|
+
* const point: PagePoint = PagePoint.fromJson({ x: 168, y: 356 });
|
|
1418
|
+
* ```
|
|
1419
|
+
*/
|
|
1420
|
+
public static fromJson(value: unknown, path?: string): PagePoint;
|
|
1421
|
+
|
|
1422
|
+
/**
|
|
1423
|
+
* Writes the point in its wire form.
|
|
1424
|
+
*
|
|
1425
|
+
* @returns A new JSON object with `x` and `y`.
|
|
1426
|
+
*
|
|
1427
|
+
* @example
|
|
1428
|
+
* ```ts
|
|
1429
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
1430
|
+
* import { PagePoint } from "@noldova/browser.protocol";
|
|
1431
|
+
*
|
|
1432
|
+
* const json: JsonObject = new PagePoint(168, 356).toJson();
|
|
1433
|
+
* ```
|
|
1434
|
+
*/
|
|
1435
|
+
public toJson(): JsonObject;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
/**
|
|
1439
|
+
* One agent call on a page document, as the runtime part reports it to every window.
|
|
1440
|
+
*/
|
|
1441
|
+
export declare class PageActivity {
|
|
1442
|
+
/**
|
|
1443
|
+
* The page document's instance.
|
|
1444
|
+
*/
|
|
1445
|
+
public readonly instance: string;
|
|
1446
|
+
|
|
1447
|
+
/**
|
|
1448
|
+
* The call's own id, a UUID in lowercase, the same in each event of the call.
|
|
1449
|
+
*/
|
|
1450
|
+
public readonly activity: string;
|
|
1451
|
+
|
|
1452
|
+
/**
|
|
1453
|
+
* The agent's name as the app binds it to the session, or empty when the app binds none.
|
|
1454
|
+
*/
|
|
1455
|
+
public readonly agentName: string;
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* What the call does on the page.
|
|
1459
|
+
*/
|
|
1460
|
+
public readonly action: PageAction;
|
|
1461
|
+
|
|
1462
|
+
/**
|
|
1463
|
+
* How far the call got.
|
|
1464
|
+
*/
|
|
1465
|
+
public readonly state: PageActivityState;
|
|
1466
|
+
|
|
1467
|
+
/**
|
|
1468
|
+
* The element the call acts on, once the call knows it, or null.
|
|
1469
|
+
*/
|
|
1470
|
+
public readonly box: PageBox | null;
|
|
1471
|
+
|
|
1472
|
+
/**
|
|
1473
|
+
* Where a click lands, once the call knows it, or null.
|
|
1474
|
+
*/
|
|
1475
|
+
public readonly point: PagePoint | null;
|
|
1476
|
+
|
|
1477
|
+
/**
|
|
1478
|
+
* In a navigation's end, the address it didn't open because the person denied its site, or null.
|
|
1479
|
+
*/
|
|
1480
|
+
public readonly refusal: PageRefusal | null;
|
|
1481
|
+
|
|
1482
|
+
/**
|
|
1483
|
+
* In a typing or key press's end, true when the person chose to do it themself, so the window that holds the page brings it to them,
|
|
1484
|
+
* focused on the field; false otherwise.
|
|
1485
|
+
*/
|
|
1486
|
+
public readonly isHandedOver: boolean;
|
|
1487
|
+
|
|
1488
|
+
/**
|
|
1489
|
+
* Creates the activity.
|
|
1490
|
+
*
|
|
1491
|
+
* @param instance The page document's instance.
|
|
1492
|
+
* @param activity The call's own id.
|
|
1493
|
+
* @param agentName The agent's name, or empty.
|
|
1494
|
+
* @param action What the call does.
|
|
1495
|
+
* @param state How far the call got.
|
|
1496
|
+
* @param box The element the call acts on, or null.
|
|
1497
|
+
* @param point Where a click lands, or null.
|
|
1498
|
+
* @param refusal The address a navigation didn't open, or null.
|
|
1499
|
+
* @param isHandedOver Whether the person chose to type or press the key themself.
|
|
1500
|
+
*
|
|
1501
|
+
* @example
|
|
1502
|
+
* ```ts
|
|
1503
|
+
* import { PageAction, PageActivity, PageActivityState } from "@noldova/browser.protocol";
|
|
1504
|
+
*
|
|
1505
|
+
* const activity: PageActivity = new PageActivity("0f8fad5b-d9cb-469f-a165-70867728950e", "5b1c2a7e-3d4f-4e8a-9b0c-1d2e3f4a5b6c", "Scout",
|
|
1506
|
+
* PageAction.Typing, PageActivityState.Asking, null, null, null, false);
|
|
1507
|
+
* ```
|
|
1508
|
+
*/
|
|
1509
|
+
public constructor(
|
|
1510
|
+
instance: string,
|
|
1511
|
+
activity: string,
|
|
1512
|
+
agentName: string,
|
|
1513
|
+
action: PageAction,
|
|
1514
|
+
state: PageActivityState,
|
|
1515
|
+
box: PageBox | null,
|
|
1516
|
+
point: PagePoint | null,
|
|
1517
|
+
refusal: PageRefusal | null,
|
|
1518
|
+
isHandedOver: boolean);
|
|
1519
|
+
|
|
1520
|
+
/**
|
|
1521
|
+
* Reads the activity from its wire form, `{ instance, activity, agentName, action, state, box, point, refusal, isHandedOver }`, where
|
|
1522
|
+
* `box`, `point` and `refusal` are each their class's wire form or null, and none of the nine may be left out.
|
|
1523
|
+
*
|
|
1524
|
+
* @param value The parsed JSON value.
|
|
1525
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
1526
|
+
* @returns The activity.
|
|
1527
|
+
* @throws JsonException synchronously when the value isn't an object, a field is missing, of the wrong type, not one of the nine or
|
|
1528
|
+
* not one of its enum's values, or the box, the point or the refusal isn't one, with the path of the field, such as `$.refusal.origin`.
|
|
1529
|
+
*
|
|
1530
|
+
* @example
|
|
1531
|
+
* ```ts
|
|
1532
|
+
* import { PageActivity } from "@noldova/browser.protocol";
|
|
1533
|
+
*
|
|
1534
|
+
* const activity: PageActivity = PageActivity.fromJson({
|
|
1535
|
+
* instance: "0f8fad5b-d9cb-469f-a165-70867728950e", activity: "5b1c2a7e-3d4f-4e8a-9b0c-1d2e3f4a5b6c", agentName: "", action: "Reading",
|
|
1536
|
+
* state: "Ended", box: null, point: null, refusal: null, isHandedOver: false
|
|
1537
|
+
* });
|
|
1538
|
+
* ```
|
|
1539
|
+
*/
|
|
1540
|
+
public static fromJson(value: unknown, path?: string): PageActivity;
|
|
1541
|
+
|
|
1542
|
+
/**
|
|
1543
|
+
* Writes the activity in its wire form.
|
|
1544
|
+
*
|
|
1545
|
+
* @returns A new JSON object with all nine fields, `box`, `point` and `refusal` as their wire forms or null.
|
|
1546
|
+
*
|
|
1547
|
+
* @example
|
|
1548
|
+
* ```ts
|
|
1549
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
1550
|
+
* import { PageAction, PageActivity, PageActivityState, PageBox } from "@noldova/browser.protocol";
|
|
1551
|
+
*
|
|
1552
|
+
* const json: JsonObject = new PageActivity("0f8fad5b-d9cb-469f-a165-70867728950e", "5b1c2a7e-3d4f-4e8a-9b0c-1d2e3f4a5b6c", "Scout",
|
|
1553
|
+
* PageAction.Clicking, PageActivityState.Asking, new PageBox(120, 340, 96, 32), null, null, false).toJson();
|
|
1554
|
+
* ```
|
|
1555
|
+
*/
|
|
1556
|
+
public toJson(): JsonObject;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* An address an agent's navigation didn't open because the person denied its site; the page offers the person to allow it.
|
|
1561
|
+
*/
|
|
1562
|
+
export declare class PageRefusal {
|
|
1563
|
+
/**
|
|
1564
|
+
* The address the navigation would have opened, an `http:` or `https:` address.
|
|
1565
|
+
*/
|
|
1566
|
+
public readonly url: string;
|
|
1567
|
+
|
|
1568
|
+
/**
|
|
1569
|
+
* Its origin, which the person denied.
|
|
1570
|
+
*/
|
|
1571
|
+
public readonly origin: string;
|
|
1572
|
+
|
|
1573
|
+
/**
|
|
1574
|
+
* Creates the refusal.
|
|
1575
|
+
*
|
|
1576
|
+
* @param url The address, an `http:` or `https:` address.
|
|
1577
|
+
* @param origin The address's origin, exactly as `URL` gives it.
|
|
1578
|
+
* @throws ArgumentException synchronously when the address isn't an `http:` or `https:` address, naming `url`, or the origin isn't its
|
|
1579
|
+
* origin, naming `origin`.
|
|
1580
|
+
*
|
|
1581
|
+
* @example
|
|
1582
|
+
* ```ts
|
|
1583
|
+
* import { PageRefusal } from "@noldova/browser.protocol";
|
|
1584
|
+
*
|
|
1585
|
+
* const refusal: PageRefusal = new PageRefusal("https://docs.example.com/pricing", "https://docs.example.com");
|
|
1586
|
+
* ```
|
|
1587
|
+
*/
|
|
1588
|
+
public constructor(url: string, origin: string);
|
|
1589
|
+
|
|
1590
|
+
/**
|
|
1591
|
+
* Reads the refusal from its wire form, `{ url, origin }`.
|
|
1592
|
+
*
|
|
1593
|
+
* @param value The parsed JSON value.
|
|
1594
|
+
* @param path The JSON path a rejection reports; `$` by default.
|
|
1595
|
+
* @returns The refusal.
|
|
1596
|
+
* @throws JsonException synchronously when the value isn't an object, a field is missing, isn't a string or isn't one of these two,
|
|
1597
|
+
* the address isn't a web address or the origin isn't its origin, with the path of the field.
|
|
1598
|
+
*
|
|
1599
|
+
* @example
|
|
1600
|
+
* ```ts
|
|
1601
|
+
* import { PageRefusal } from "@noldova/browser.protocol";
|
|
1602
|
+
*
|
|
1603
|
+
* const refusal: PageRefusal = PageRefusal.fromJson({ url: "https://docs.example.com/pricing", origin: "https://docs.example.com" });
|
|
1604
|
+
* ```
|
|
1605
|
+
*/
|
|
1606
|
+
public static fromJson(value: unknown, path?: string): PageRefusal;
|
|
1607
|
+
|
|
1608
|
+
/**
|
|
1609
|
+
* Writes the refusal in its wire form.
|
|
1610
|
+
*
|
|
1611
|
+
* @returns A new JSON object with `url` and `origin`.
|
|
1612
|
+
*
|
|
1613
|
+
* @example
|
|
1614
|
+
* ```ts
|
|
1615
|
+
* import type { JsonObject } from "@noldova/context.json";
|
|
1616
|
+
* import { PageRefusal } from "@noldova/browser.protocol";
|
|
1617
|
+
*
|
|
1618
|
+
* const json: JsonObject = new PageRefusal("https://docs.example.com/pricing", "https://docs.example.com").toJson();
|
|
1619
|
+
* ```
|
|
1620
|
+
*/
|
|
1621
|
+
public toJson(): JsonObject;
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
/**
|
|
1625
|
+
* What kind of address a URL's host is, judged without resolving it.
|
|
1626
|
+
*
|
|
1627
|
+
* @example
|
|
1628
|
+
* ```ts
|
|
1629
|
+
* import { AddressKind, AddressKinds } from "@noldova/browser.protocol";
|
|
1630
|
+
*
|
|
1631
|
+
* const isLoopback: boolean = AddressKinds.ofHost("127.0.0.1") === AddressKind.Loopback;
|
|
1632
|
+
* ```
|
|
1633
|
+
*/
|
|
1634
|
+
export declare const AddressKind: {
|
|
1635
|
+
/**
|
|
1636
|
+
* Any other host, such as a name on the network or a public IP address, wire value `"Public"`.
|
|
1637
|
+
*/
|
|
1638
|
+
readonly Public: "Public";
|
|
1639
|
+
|
|
1640
|
+
/**
|
|
1641
|
+
* `localhost`, a name that ends in `.localhost`, or an address on this computer, such as `127.0.0.1` or `[::1]`, wire value `"Loopback"`.
|
|
1642
|
+
*/
|
|
1643
|
+
readonly Loopback: "Loopback";
|
|
1644
|
+
|
|
1645
|
+
/**
|
|
1646
|
+
* An address on a private network, such as `192.168.1.20`, `10.0.0.1`, `100.64.0.1` or `[fd12::1]`, wire value `"Private"`.
|
|
1647
|
+
*/
|
|
1648
|
+
readonly Private: "Private";
|
|
1649
|
+
|
|
1650
|
+
/**
|
|
1651
|
+
* A link-local address, such as `169.254.169.254` or `[fe80::1]`, which Browser never opens, wire value `"LinkLocal"`.
|
|
1652
|
+
*/
|
|
1653
|
+
readonly LinkLocal: "LinkLocal";
|
|
1654
|
+
|
|
1655
|
+
/**
|
|
1656
|
+
* An address of no host, such as `0.0.0.0` or `[::]`, which Browser never opens, wire value `"Unspecified"`.
|
|
1657
|
+
*/
|
|
1658
|
+
readonly Unspecified: "Unspecified";
|
|
1659
|
+
};
|
|
1660
|
+
|
|
1661
|
+
/**
|
|
1662
|
+
* One of {@link AddressKind}'s wire values: `"Public"`, `"Loopback"`, `"Private"`, `"LinkLocal"` or `"Unspecified"`.
|
|
1663
|
+
*/
|
|
1664
|
+
export type AddressKind = (typeof AddressKind)[keyof typeof AddressKind];
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
* The address kinds of URL hosts, as the browser module judges a typed address and the sites on this computer or network.
|
|
1668
|
+
*/
|
|
1669
|
+
export declare class AddressKinds {
|
|
1670
|
+
/**
|
|
1671
|
+
* Tells what kind of address a host is. An IPv6 address that carries an IPv4 one, mapped, compatible or NAT64, is judged as that IPv4 address.
|
|
1672
|
+
*
|
|
1673
|
+
* @param hostname A URL's `hostname`, which the URL parser writes in its canonical form: an IPv4 address as four decimal parts, whatever form it was typed in, and an IPv6 one in brackets.
|
|
1674
|
+
* @returns The host's {@link AddressKind}.
|
|
1675
|
+
* @example
|
|
1676
|
+
* ```ts
|
|
1677
|
+
* import { AddressKinds } from "@noldova/browser.protocol";
|
|
1678
|
+
*
|
|
1679
|
+
* AddressKinds.ofHost(new URL("http://0x7f.0.0.1:4173/").hostname);
|
|
1680
|
+
* ```
|
|
1681
|
+
*/
|
|
1682
|
+
public static ofHost(hostname: string): AddressKind;
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* The sites the setting Sites on this computer or network, `browser.localSites`, names, read from its text.
|
|
1687
|
+
* The runtime part allows their origins, and Settings refuses the entries it leaves out.
|
|
1688
|
+
*/
|
|
1689
|
+
export declare class LocalSites {
|
|
1690
|
+
/**
|
|
1691
|
+
* The origins read, each once, in the URL parser's form: lower case, with a default port left out.
|
|
1692
|
+
*/
|
|
1693
|
+
public readonly origins: readonly string[];
|
|
1694
|
+
|
|
1695
|
+
/**
|
|
1696
|
+
* The places, from 1, of the entries left out, among the entries that aren't blank.
|
|
1697
|
+
*/
|
|
1698
|
+
public readonly ignored: readonly number[];
|
|
1699
|
+
|
|
1700
|
+
/**
|
|
1701
|
+
* The entries left out, as the person wrote them, trimmed.
|
|
1702
|
+
*/
|
|
1703
|
+
public readonly ignoredEntries: readonly string[];
|
|
1704
|
+
|
|
1705
|
+
private constructor();
|
|
1706
|
+
|
|
1707
|
+
/**
|
|
1708
|
+
* Reads the setting's text: `http:` or `https:` origins alone separated by commas, whose host is `localhost`, a name that ends in `.localhost`, or a loopback or private IP address.
|
|
1709
|
+
* Blanks and spaces are ignored; any other entry, with a path, query, fragment, user or password, another scheme, another host, or a host that holds a `*` or an empty label, is left out.
|
|
1710
|
+
*
|
|
1711
|
+
* @param text The setting's text.
|
|
1712
|
+
* @returns The sites it names and the entries it leaves out.
|
|
1713
|
+
* @example
|
|
1714
|
+
* ```ts
|
|
1715
|
+
* import { LocalSites } from "@noldova/browser.protocol";
|
|
1716
|
+
*
|
|
1717
|
+
* const sites: LocalSites = LocalSites.read("http://127.0.0.1:4173, http://0.0.0.0:3000");
|
|
1718
|
+
* ```
|
|
1719
|
+
*/
|
|
1720
|
+
public static read(text: string): LocalSites;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
/**
|
|
1724
|
+
* The function that tells the runtime part when a frame's page may have moved an element, which the runtime part runs with
|
|
1725
|
+
* `Runtime.callFunctionOn` in the module's own isolated world of each frame, and which `webViews.json` pins, so Noldova Desktop's host refuses
|
|
1726
|
+
* any other function.
|
|
1727
|
+
* While heard, a scroll, a resize, a pinch zoom, a change to the document, a loaded image or font and an ended transition or animation call
|
|
1728
|
+
* the world's binding once a frame at most, with no data.
|
|
1729
|
+
*/
|
|
1730
|
+
export declare class PageChangeScript {
|
|
1731
|
+
/**
|
|
1732
|
+
* The isolated world's name, which `webViews.json` pins for `Page.createIsolatedWorld` and `Runtime.addBinding`.
|
|
1733
|
+
*
|
|
1734
|
+
* @example
|
|
1735
|
+
* ```ts
|
|
1736
|
+
* import { PageChangeScript } from "@noldova/browser.protocol";
|
|
1737
|
+
*
|
|
1738
|
+
* const world: string = PageChangeScript.worldName;
|
|
1739
|
+
* ```
|
|
1740
|
+
*/
|
|
1741
|
+
public static readonly worldName: string;
|
|
1742
|
+
|
|
1743
|
+
/**
|
|
1744
|
+
* The binding's name, which `webViews.json` pins for `Runtime.addBinding`; each call of it is a `Runtime.bindingCalled` event.
|
|
1745
|
+
*
|
|
1746
|
+
* @example
|
|
1747
|
+
* ```ts
|
|
1748
|
+
* import { PageChangeScript } from "@noldova/browser.protocol";
|
|
1749
|
+
*
|
|
1750
|
+
* const binding: string = PageChangeScript.bindingName;
|
|
1751
|
+
* ```
|
|
1752
|
+
*/
|
|
1753
|
+
public static readonly bindingName: string;
|
|
1754
|
+
|
|
1755
|
+
/**
|
|
1756
|
+
* The function's text, which takes true to start hearing the page and false to stop, and returns true, or false for any other argument
|
|
1757
|
+
* or a world without the binding.
|
|
1758
|
+
*
|
|
1759
|
+
* @example
|
|
1760
|
+
* ```ts
|
|
1761
|
+
* import { PageChangeScript } from "@noldova/browser.protocol";
|
|
1762
|
+
*
|
|
1763
|
+
* const declaration: string = PageChangeScript.functionDeclaration;
|
|
1764
|
+
* ```
|
|
1765
|
+
*/
|
|
1766
|
+
public static readonly functionDeclaration: string;
|
|
1767
|
+
}
|