@opengeni/sdk 0.52.1 → 0.57.0
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/README.md +61 -7
- package/dist/artifacts.js +5 -5
- package/dist/{chunk-V5F253OG.js → chunk-GU6JF75T.js} +6 -3
- package/dist/chunk-GU6JF75T.js.map +1 -0
- package/dist/{chunk-FRJFNDIR.js → chunk-HJ3HHUT5.js} +5 -1
- package/dist/chunk-HJ3HHUT5.js.map +1 -0
- package/dist/{chunk-KIHGPM7H.js → chunk-JDLDDRNE.js} +20 -14
- package/dist/chunk-JDLDDRNE.js.map +1 -0
- package/dist/{chunk-FHI4DFIG.js → chunk-JRPFWI6T.js} +2 -2
- package/dist/{chunk-ILQZR5N6.js → chunk-PKQ377ED.js} +693 -34
- package/dist/chunk-PKQ377ED.js.map +1 -0
- package/dist/{chunk-MZWTWOX6.js → chunk-ST5DDKJP.js} +327 -1
- package/dist/chunk-ST5DDKJP.js.map +1 -0
- package/dist/{chunk-DXDL7EEW.js → chunk-YKZME56C.js} +197 -113
- package/dist/chunk-YKZME56C.js.map +1 -0
- package/dist/client.d.ts +106 -16
- package/dist/codex-realtime-controller.d.ts +3 -0
- package/dist/codex-realtime-controller.js +2 -2
- package/dist/core.js +7 -7
- package/dist/desktop.d.ts +8 -0
- package/dist/editable-artifacts.js +4 -4
- package/dist/gateway-realtime-transport.d.ts +1 -0
- package/dist/gateway-realtime-transport.js +5 -3
- package/dist/index.d.ts +6 -2
- package/dist/index.js +68 -34
- package/dist/index.js.map +1 -1
- package/dist/interaction-revision-stream.d.ts +11 -0
- package/dist/interaction.d.ts +604 -5
- package/dist/interaction.js +27 -1
- package/dist/realtime.d.ts +3 -3
- package/dist/realtime.js +11 -7
- package/dist/realtime.js.map +1 -1
- package/dist/types.d.ts +267 -64
- package/dist/workspace-live-stream.d.ts +14 -0
- package/package.json +2 -2
- package/src/client.ts +861 -60
- package/src/codex-realtime-controller.ts +25 -7
- package/src/codex-realtime-lifecycle.ts +1 -0
- package/src/desktop.ts +11 -1
- package/src/errors.ts +16 -2
- package/src/gateway-realtime-transport.ts +252 -109
- package/src/index.ts +42 -13
- package/src/interaction-revision-stream.ts +117 -0
- package/src/interaction.ts +1049 -5
- package/src/realtime.ts +14 -4
- package/src/types.ts +336 -67
- package/src/workspace-live-stream.ts +137 -0
- package/dist/chunk-DXDL7EEW.js.map +0 -1
- package/dist/chunk-FRJFNDIR.js.map +0 -1
- package/dist/chunk-ILQZR5N6.js.map +0 -1
- package/dist/chunk-KIHGPM7H.js.map +0 -1
- package/dist/chunk-MZWTWOX6.js.map +0 -1
- package/dist/chunk-V5F253OG.js.map +0 -1
- /package/dist/{chunk-FHI4DFIG.js.map → chunk-JRPFWI6T.js.map} +0 -0
package/src/interaction.ts
CHANGED
|
@@ -11,6 +11,15 @@ export const BROWSER_FRAME_MAX_BYTES = 24 * 1024 * 1024;
|
|
|
11
11
|
export const BROWSER_FRAME_MAX_DIMENSION = 32_768;
|
|
12
12
|
export const BROWSER_FRAME_MAX_PIXELS = 100_000_000;
|
|
13
13
|
|
|
14
|
+
/** Latest-wins invalidation cursor for workspace Browser/Computer resources. */
|
|
15
|
+
export type WorkspaceInteractionRevisionEvent = {
|
|
16
|
+
workspaceId: string;
|
|
17
|
+
sequence: number;
|
|
18
|
+
revision: number;
|
|
19
|
+
type: "workspace.interaction.changed";
|
|
20
|
+
occurredAt: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
14
23
|
export type InteractionJsonValue =
|
|
15
24
|
| null
|
|
16
25
|
| string
|
|
@@ -103,6 +112,7 @@ export type BrowserSessionCapabilities = {
|
|
|
103
112
|
downloads: boolean;
|
|
104
113
|
uploads: boolean;
|
|
105
114
|
clipboard: boolean;
|
|
115
|
+
permissions: boolean;
|
|
106
116
|
diagnostics: boolean;
|
|
107
117
|
rawCdp: boolean;
|
|
108
118
|
linkedComputer: boolean;
|
|
@@ -135,6 +145,353 @@ export type BrowserSession = {
|
|
|
135
145
|
failureCode: string | null;
|
|
136
146
|
};
|
|
137
147
|
|
|
148
|
+
export type BrowserClipboard = {
|
|
149
|
+
browserSessionId: string;
|
|
150
|
+
controllerGeneration: string;
|
|
151
|
+
revision: number;
|
|
152
|
+
text: string;
|
|
153
|
+
source: "empty" | "write" | "clear" | "copy" | "paste";
|
|
154
|
+
sourceTargetId: string | null;
|
|
155
|
+
updatedAt: string | null;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export type InteractionCredentialAuthorityRef = {
|
|
159
|
+
connectionId: string;
|
|
160
|
+
connectionSubjectId: string | null;
|
|
161
|
+
providerDomain: string;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
export type NetworkRouteConfiguration =
|
|
165
|
+
| { kind: "direct" }
|
|
166
|
+
| {
|
|
167
|
+
kind: "proxy";
|
|
168
|
+
protocol: "http" | "https" | "socks5";
|
|
169
|
+
host: string;
|
|
170
|
+
port: number;
|
|
171
|
+
credential: InteractionCredentialAuthorityRef | null;
|
|
172
|
+
}
|
|
173
|
+
| {
|
|
174
|
+
kind: "managed";
|
|
175
|
+
providerId: string;
|
|
176
|
+
routeId: string;
|
|
177
|
+
egressClass: "datacenter" | "residential" | "isp";
|
|
178
|
+
region: string | null;
|
|
179
|
+
credential: InteractionCredentialAuthorityRef | null;
|
|
180
|
+
}
|
|
181
|
+
| { kind: "tunnel"; placement: InteractionPlacement; tunnelId: string };
|
|
182
|
+
|
|
183
|
+
export type NetworkRouteConsistency = {
|
|
184
|
+
dns: "placement" | "proxy" | "provider";
|
|
185
|
+
expectedPublicIp: string | null;
|
|
186
|
+
expectedRegion: string | null;
|
|
187
|
+
locale: string | null;
|
|
188
|
+
timezone: string | null;
|
|
189
|
+
geolocation: {
|
|
190
|
+
latitude: number;
|
|
191
|
+
longitude: number;
|
|
192
|
+
accuracyMeters: number;
|
|
193
|
+
} | null;
|
|
194
|
+
webRtc: "default" | "disable_non_proxied_udp" | "proxy_only";
|
|
195
|
+
stability: "session" | "sticky" | "persistent";
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export type NetworkRoute = {
|
|
199
|
+
id: string;
|
|
200
|
+
accountId: string;
|
|
201
|
+
workspaceId: string;
|
|
202
|
+
name: string;
|
|
203
|
+
status: "active" | "archived";
|
|
204
|
+
configuration: NetworkRouteConfiguration;
|
|
205
|
+
consistency: NetworkRouteConsistency;
|
|
206
|
+
version: number;
|
|
207
|
+
createdBySubjectId: string;
|
|
208
|
+
createdAt: string;
|
|
209
|
+
updatedAt: string;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export type NetworkRouteListResponse = { revision: number; routes: NetworkRoute[] };
|
|
213
|
+
export type CreateNetworkRouteRequest = {
|
|
214
|
+
operationId: string;
|
|
215
|
+
name: string;
|
|
216
|
+
configuration: NetworkRouteConfiguration;
|
|
217
|
+
consistency: NetworkRouteConsistency;
|
|
218
|
+
};
|
|
219
|
+
export type UpdateNetworkRouteRequest = {
|
|
220
|
+
operationId: string;
|
|
221
|
+
expectedVersion: number;
|
|
222
|
+
name?: string | undefined;
|
|
223
|
+
status?: "active" | "archived" | undefined;
|
|
224
|
+
configuration?: NetworkRouteConfiguration | undefined;
|
|
225
|
+
consistency?: NetworkRouteConsistency | undefined;
|
|
226
|
+
};
|
|
227
|
+
export type NetworkRouteMutationResponse = {
|
|
228
|
+
route: NetworkRoute;
|
|
229
|
+
operationId: string;
|
|
230
|
+
replayed: boolean;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
export type SiteAuthFieldPurpose = "identifier" | "password" | "secret" | "totp";
|
|
234
|
+
export type SiteAuthAuthority =
|
|
235
|
+
| {
|
|
236
|
+
id: string;
|
|
237
|
+
kind: "connection_fields";
|
|
238
|
+
label: string;
|
|
239
|
+
credential: InteractionCredentialAuthorityRef;
|
|
240
|
+
fields: Array<{
|
|
241
|
+
id: string;
|
|
242
|
+
purpose: SiteAuthFieldPurpose;
|
|
243
|
+
credentialKey: string;
|
|
244
|
+
digits?: number | undefined;
|
|
245
|
+
periodSeconds?: number | undefined;
|
|
246
|
+
algorithm?: "sha1" | "sha256" | "sha512" | undefined;
|
|
247
|
+
}>;
|
|
248
|
+
}
|
|
249
|
+
| {
|
|
250
|
+
id: string;
|
|
251
|
+
kind: "human";
|
|
252
|
+
label: string;
|
|
253
|
+
fields: Array<{ id: string; purpose: SiteAuthFieldPurpose }>;
|
|
254
|
+
}
|
|
255
|
+
| {
|
|
256
|
+
id: string;
|
|
257
|
+
kind: "external_provider";
|
|
258
|
+
label: string;
|
|
259
|
+
adapterId: string;
|
|
260
|
+
connectionId: string;
|
|
261
|
+
credential: InteractionCredentialAuthorityRef | null;
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
export type SiteAuthMethod = {
|
|
265
|
+
id: string;
|
|
266
|
+
kind: "password" | "sso" | "magic_link" | "passkey" | "external";
|
|
267
|
+
label: string;
|
|
268
|
+
authorityIds: string[];
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
export type SiteAuthHealthPolicy = {
|
|
272
|
+
mode: "on_use" | "maintained";
|
|
273
|
+
intervalSeconds: number | null;
|
|
274
|
+
automaticRepair: boolean;
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
export type SiteAuthConnectionConfiguration = {
|
|
278
|
+
name: string;
|
|
279
|
+
accountLabel: string;
|
|
280
|
+
origins: string[];
|
|
281
|
+
loginUrl: string | null;
|
|
282
|
+
verificationUrlPrefixes: string[];
|
|
283
|
+
authorities: SiteAuthAuthority[];
|
|
284
|
+
methods: SiteAuthMethod[];
|
|
285
|
+
preferredIdentityId: string | null;
|
|
286
|
+
preferredPlacement: InteractionPlacement | null;
|
|
287
|
+
preferredNetworkRouteId: string | null;
|
|
288
|
+
healthPolicy: SiteAuthHealthPolicy;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
export type SiteAuthConnection = SiteAuthConnectionConfiguration & {
|
|
292
|
+
id: string;
|
|
293
|
+
accountId: string;
|
|
294
|
+
workspaceId: string;
|
|
295
|
+
status: "active" | "archived";
|
|
296
|
+
verificationState: "unknown" | "verified" | "needs_repair" | "failed";
|
|
297
|
+
lastVerifiedAt: string | null;
|
|
298
|
+
lastVerifiedUrl: string | null;
|
|
299
|
+
lastCheckedAt: string | null;
|
|
300
|
+
nextCheckAt: string | null;
|
|
301
|
+
maintenance: {
|
|
302
|
+
action: "health_check" | "repair";
|
|
303
|
+
sessionId: string | null;
|
|
304
|
+
dueAt: string;
|
|
305
|
+
startedAt: string | null;
|
|
306
|
+
} | null;
|
|
307
|
+
repairCode: string | null;
|
|
308
|
+
version: number;
|
|
309
|
+
createdBySubjectId: string;
|
|
310
|
+
createdAt: string;
|
|
311
|
+
updatedAt: string;
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
export type SiteAuthConnectionListResponse = {
|
|
315
|
+
revision: number;
|
|
316
|
+
connections: SiteAuthConnection[];
|
|
317
|
+
};
|
|
318
|
+
export type CreateSiteAuthConnectionRequest = SiteAuthConnectionConfiguration & {
|
|
319
|
+
operationId: string;
|
|
320
|
+
};
|
|
321
|
+
export type UpdateSiteAuthConnectionRequest = Partial<SiteAuthConnectionConfiguration> & {
|
|
322
|
+
operationId: string;
|
|
323
|
+
expectedVersion: number;
|
|
324
|
+
status?: "active" | "archived" | undefined;
|
|
325
|
+
};
|
|
326
|
+
export type SiteAuthConnectionMutationResponse = {
|
|
327
|
+
connection: SiteAuthConnection;
|
|
328
|
+
operationId: string;
|
|
329
|
+
replayed: boolean;
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
export type AuthRun = {
|
|
333
|
+
id: string;
|
|
334
|
+
accountId: string;
|
|
335
|
+
workspaceId: string;
|
|
336
|
+
siteAuthConnectionId: string;
|
|
337
|
+
browserSessionId: string;
|
|
338
|
+
targetId: string;
|
|
339
|
+
controllerGeneration: string;
|
|
340
|
+
targetGeneration: string;
|
|
341
|
+
documentGeneration: string | null;
|
|
342
|
+
purpose: "authenticate" | "health_check" | "repair";
|
|
343
|
+
methodId: string | null;
|
|
344
|
+
authorityId: string | null;
|
|
345
|
+
state:
|
|
346
|
+
| "discovering"
|
|
347
|
+
| "awaiting_choice"
|
|
348
|
+
| "awaiting_secret"
|
|
349
|
+
| "awaiting_external_action"
|
|
350
|
+
| "working"
|
|
351
|
+
| "verified"
|
|
352
|
+
| "failed"
|
|
353
|
+
| "cancelled";
|
|
354
|
+
choices: Array<{ id: string; label: string; methodId: string }>;
|
|
355
|
+
pendingFields: Array<{ id: string; label: string; purpose: SiteAuthFieldPurpose }>;
|
|
356
|
+
externalAction: {
|
|
357
|
+
kind: "push" | "security_key" | "passkey" | "device" | "human" | "other";
|
|
358
|
+
label: string;
|
|
359
|
+
expiresAt: string | null;
|
|
360
|
+
} | null;
|
|
361
|
+
interventionId: string | null;
|
|
362
|
+
verifiedUrl: string | null;
|
|
363
|
+
failureCode: string | null;
|
|
364
|
+
version: number;
|
|
365
|
+
operationId: string;
|
|
366
|
+
createdBySubjectId: string;
|
|
367
|
+
createdAt: string;
|
|
368
|
+
updatedAt: string;
|
|
369
|
+
settledAt: string | null;
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
export type AuthRunListResponse = { runs: AuthRun[] };
|
|
373
|
+
export type AuthRunMutationResponse = { run: AuthRun; operationId: string; replayed: boolean };
|
|
374
|
+
export type StartAuthRunRequest = {
|
|
375
|
+
operationId: string;
|
|
376
|
+
siteAuthConnectionId: string;
|
|
377
|
+
targetId: string;
|
|
378
|
+
expectedTargetGeneration: string;
|
|
379
|
+
expectedDocumentGeneration: string | null;
|
|
380
|
+
purpose?: "authenticate" | "health_check" | "repair" | undefined;
|
|
381
|
+
methodId?: string | undefined;
|
|
382
|
+
authorityId?: string | undefined;
|
|
383
|
+
};
|
|
384
|
+
export type ReportAuthRunRequest = {
|
|
385
|
+
operationId: string;
|
|
386
|
+
expectedVersion: number;
|
|
387
|
+
methodId?: string | undefined;
|
|
388
|
+
authorityId?: string | undefined;
|
|
389
|
+
state:
|
|
390
|
+
| "awaiting_choice"
|
|
391
|
+
| "awaiting_secret"
|
|
392
|
+
| "awaiting_external_action"
|
|
393
|
+
| "working"
|
|
394
|
+
| "failed"
|
|
395
|
+
| "cancelled";
|
|
396
|
+
choices?: AuthRun["choices"] | undefined;
|
|
397
|
+
pendingFields?: AuthRun["pendingFields"] | undefined;
|
|
398
|
+
externalAction?: AuthRun["externalAction"] | undefined;
|
|
399
|
+
failureCode?: string | null | undefined;
|
|
400
|
+
};
|
|
401
|
+
export type ProtectedAuthFillRequest = {
|
|
402
|
+
operationId: string;
|
|
403
|
+
expectedVersion: number;
|
|
404
|
+
expectedTargetGeneration: string;
|
|
405
|
+
expectedDocumentGeneration: string | null;
|
|
406
|
+
expectedFrameId: string | null;
|
|
407
|
+
authorityId: string;
|
|
408
|
+
fields: Array<{ fieldId: string; locator: BrowserLocator }>;
|
|
409
|
+
submit:
|
|
410
|
+
| { type: "none" }
|
|
411
|
+
| { type: "click"; locator: BrowserLocator }
|
|
412
|
+
| { type: "press"; key: string; locator?: BrowserLocator | undefined };
|
|
413
|
+
};
|
|
414
|
+
export type ProtectedAuthFillResponse = {
|
|
415
|
+
run: AuthRun;
|
|
416
|
+
status: "submitted" | "working" | "needs_human" | "stale" | "failed";
|
|
417
|
+
operationId: string;
|
|
418
|
+
replayed: boolean;
|
|
419
|
+
};
|
|
420
|
+
export type ExternalAuthRunRequest = {
|
|
421
|
+
operationId: string;
|
|
422
|
+
expectedVersion: number;
|
|
423
|
+
action: "start" | "poll";
|
|
424
|
+
};
|
|
425
|
+
export type ExternalAuthRunResponse = {
|
|
426
|
+
run: AuthRun;
|
|
427
|
+
status: "working" | "needs_human" | "ready_to_verify" | "failed";
|
|
428
|
+
operationId: string;
|
|
429
|
+
replayed: boolean;
|
|
430
|
+
};
|
|
431
|
+
export type ExternalAuthInteractiveRequest = {
|
|
432
|
+
operationId: string;
|
|
433
|
+
expectedVersion: number;
|
|
434
|
+
};
|
|
435
|
+
export type ExternalAuthInteractiveResponse = {
|
|
436
|
+
authRunId: string;
|
|
437
|
+
url: string;
|
|
438
|
+
expiresAt: string | null;
|
|
439
|
+
};
|
|
440
|
+
export type VerifyAuthRunRequest = { operationId: string; expectedVersion: number };
|
|
441
|
+
|
|
442
|
+
export type InteractionIntervention = {
|
|
443
|
+
id: string;
|
|
444
|
+
accountId: string;
|
|
445
|
+
workspaceId: string;
|
|
446
|
+
resourceKind: "browser_session" | "computer_session";
|
|
447
|
+
resourceId: string;
|
|
448
|
+
targetId: string;
|
|
449
|
+
controllerGeneration: string;
|
|
450
|
+
targetGeneration: string;
|
|
451
|
+
documentGeneration: string | null;
|
|
452
|
+
kind: "manual_login" | "mfa" | "external_action" | "confirmation" | "other";
|
|
453
|
+
reason: string;
|
|
454
|
+
status: "open" | "completed" | "dismissed" | "expired" | "cancelled";
|
|
455
|
+
authRunId: string | null;
|
|
456
|
+
originatingSessionId: string;
|
|
457
|
+
originatingTurnId: string | null;
|
|
458
|
+
originatingAttemptId: string | null;
|
|
459
|
+
originatingToolOperationId: string | null;
|
|
460
|
+
responseActorSubjectId: string | null;
|
|
461
|
+
version: number;
|
|
462
|
+
operationId: string;
|
|
463
|
+
expiresAt: string;
|
|
464
|
+
createdAt: string;
|
|
465
|
+
updatedAt: string;
|
|
466
|
+
settledAt: string | null;
|
|
467
|
+
};
|
|
468
|
+
export type InteractionInterventionListResponse = {
|
|
469
|
+
interventions: InteractionIntervention[];
|
|
470
|
+
};
|
|
471
|
+
export type CreateInteractionInterventionRequest = {
|
|
472
|
+
operationId: string;
|
|
473
|
+
resourceKind: "browser_session" | "computer_session";
|
|
474
|
+
resourceId: string;
|
|
475
|
+
targetId: string;
|
|
476
|
+
expectedControllerGeneration: string;
|
|
477
|
+
expectedTargetGeneration: string;
|
|
478
|
+
expectedDocumentGeneration: string | null;
|
|
479
|
+
kind: InteractionIntervention["kind"];
|
|
480
|
+
reason: string;
|
|
481
|
+
authRunId?: string | undefined;
|
|
482
|
+
expiresInSeconds?: number | undefined;
|
|
483
|
+
};
|
|
484
|
+
export type ResolveInteractionInterventionRequest = {
|
|
485
|
+
operationId: string;
|
|
486
|
+
expectedVersion: number;
|
|
487
|
+
outcome: "completed" | "dismissed";
|
|
488
|
+
};
|
|
489
|
+
export type InteractionInterventionMutationResponse = {
|
|
490
|
+
intervention: InteractionIntervention;
|
|
491
|
+
operationId: string;
|
|
492
|
+
replayed: boolean;
|
|
493
|
+
};
|
|
494
|
+
|
|
138
495
|
export type BrowserIdentityStatus = "active" | "archived";
|
|
139
496
|
export type BrowserRevisionComponentKind =
|
|
140
497
|
| "chromium_profile"
|
|
@@ -185,6 +542,7 @@ export type BrowserIdentity = {
|
|
|
185
542
|
workspaceId: string;
|
|
186
543
|
name: string;
|
|
187
544
|
status: BrowserIdentityStatus;
|
|
545
|
+
version: number;
|
|
188
546
|
defaultRevisionId: string | null;
|
|
189
547
|
headGeneration: number;
|
|
190
548
|
revisionCount: number;
|
|
@@ -208,6 +566,14 @@ export type CreateBrowserIdentityRequest = {
|
|
|
208
566
|
name: string;
|
|
209
567
|
};
|
|
210
568
|
|
|
569
|
+
export type UpdateBrowserIdentityRequest = {
|
|
570
|
+
operationId: string;
|
|
571
|
+
expectedVersion: number;
|
|
572
|
+
name?: string | undefined;
|
|
573
|
+
status?: BrowserIdentityStatus | undefined;
|
|
574
|
+
defaultRevisionId?: string | undefined;
|
|
575
|
+
};
|
|
576
|
+
|
|
211
577
|
export type BrowserIdentityMutationResponse = {
|
|
212
578
|
identity: BrowserIdentity;
|
|
213
579
|
operationId: string;
|
|
@@ -242,6 +608,51 @@ export type BrowserTarget = {
|
|
|
242
608
|
createdAt: string;
|
|
243
609
|
};
|
|
244
610
|
|
|
611
|
+
export type BrowserDownloadStatus =
|
|
612
|
+
| "in_progress"
|
|
613
|
+
| "completed"
|
|
614
|
+
| "cancelled"
|
|
615
|
+
| "failed"
|
|
616
|
+
| "unavailable";
|
|
617
|
+
|
|
618
|
+
/** One browser-produced file. Its bytes remain private to the exact browser
|
|
619
|
+
* controller until an explicit save publishes them into the workspace. */
|
|
620
|
+
export type BrowserDownload = {
|
|
621
|
+
id: string;
|
|
622
|
+
browserSessionId: string;
|
|
623
|
+
controllerGeneration: string;
|
|
624
|
+
targetId: string | null;
|
|
625
|
+
filename: string;
|
|
626
|
+
status: BrowserDownloadStatus;
|
|
627
|
+
receivedBytes: number;
|
|
628
|
+
totalBytes: number | null;
|
|
629
|
+
sha256: string | null;
|
|
630
|
+
version: number;
|
|
631
|
+
startedAt: string;
|
|
632
|
+
settledAt: string | null;
|
|
633
|
+
failureCode: string | null;
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
export type BrowserDownloadListResponse = {
|
|
637
|
+
browserSessionId: string;
|
|
638
|
+
controllerGeneration: string;
|
|
639
|
+
downloads: BrowserDownload[];
|
|
640
|
+
};
|
|
641
|
+
|
|
642
|
+
export type BrowserDownloadSaveRequest = {
|
|
643
|
+
operationId: string;
|
|
644
|
+
destinationPath: string;
|
|
645
|
+
overwrite?: boolean | undefined;
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
export type BrowserDownloadSaveResponse = {
|
|
649
|
+
download: BrowserDownload;
|
|
650
|
+
destinationPath: string;
|
|
651
|
+
fileId: string;
|
|
652
|
+
operationId: string;
|
|
653
|
+
replayed: boolean;
|
|
654
|
+
};
|
|
655
|
+
|
|
245
656
|
export type InteractionRect = {
|
|
246
657
|
x: number;
|
|
247
658
|
y: number;
|
|
@@ -348,6 +759,20 @@ export type BrowserLocator =
|
|
|
348
759
|
| { kind: "test_id"; value: string }
|
|
349
760
|
| { kind: "css"; selector: string };
|
|
350
761
|
|
|
762
|
+
export type BrowserPermission =
|
|
763
|
+
| "geolocation"
|
|
764
|
+
| "notifications"
|
|
765
|
+
| "camera"
|
|
766
|
+
| "microphone"
|
|
767
|
+
| "midi"
|
|
768
|
+
| "midi_sysex"
|
|
769
|
+
| "sensors"
|
|
770
|
+
| "idle_detection"
|
|
771
|
+
| "local_fonts"
|
|
772
|
+
| "window_management";
|
|
773
|
+
|
|
774
|
+
export type BrowserPermissionSetting = "granted" | "denied" | "prompt";
|
|
775
|
+
|
|
351
776
|
export type BrowserAction =
|
|
352
777
|
| { type: "navigate"; url: string }
|
|
353
778
|
| {
|
|
@@ -379,6 +804,7 @@ export type BrowserAction =
|
|
|
379
804
|
deltaX?: number | undefined;
|
|
380
805
|
deltaY?: number | undefined;
|
|
381
806
|
button?: "left" | "right" | "middle" | undefined;
|
|
807
|
+
clickCount?: 1 | 2 | undefined;
|
|
382
808
|
}
|
|
383
809
|
| {
|
|
384
810
|
type: "handle_dialog";
|
|
@@ -386,6 +812,18 @@ export type BrowserAction =
|
|
|
386
812
|
promptText?: string | undefined;
|
|
387
813
|
}
|
|
388
814
|
| { type: "upload"; locator: BrowserLocator; workspaceFileIds: string[] }
|
|
815
|
+
| {
|
|
816
|
+
type: "clipboard";
|
|
817
|
+
operation: "write" | "clear" | "copy" | "paste";
|
|
818
|
+
text?: string | undefined;
|
|
819
|
+
locator?: BrowserLocator | undefined;
|
|
820
|
+
content?: "selection" | "value" | "text" | undefined;
|
|
821
|
+
}
|
|
822
|
+
| {
|
|
823
|
+
type: "permission";
|
|
824
|
+
permission: BrowserPermission;
|
|
825
|
+
setting: BrowserPermissionSetting;
|
|
826
|
+
}
|
|
389
827
|
| {
|
|
390
828
|
type: "wait";
|
|
391
829
|
condition: "load" | "network_idle" | "visible" | "hidden";
|
|
@@ -448,9 +886,11 @@ export type CreateBrowserSessionRequest = {
|
|
|
448
886
|
name?: string | undefined;
|
|
449
887
|
initialUrl?: string | undefined;
|
|
450
888
|
headless?: boolean | undefined;
|
|
889
|
+
engine?: "chromium" | "lightpanda" | undefined;
|
|
451
890
|
placement?: InteractionPlacement | undefined;
|
|
452
891
|
identityId?: string | undefined;
|
|
453
892
|
baseRevisionId?: string | undefined;
|
|
893
|
+
networkRouteId?: string | undefined;
|
|
454
894
|
linkedComputerSessionId?: string | undefined;
|
|
455
895
|
};
|
|
456
896
|
|
|
@@ -488,6 +928,10 @@ export type InteractionFrameStreamAttachment<RelayKind extends 3 | 4 = 3 | 4> =
|
|
|
488
928
|
};
|
|
489
929
|
};
|
|
490
930
|
|
|
931
|
+
export type ComputerFrameStreamAttachment =
|
|
932
|
+
| InteractionFrameStreamAttachment<4>
|
|
933
|
+
| { kind: "direct_rfb"; url: string; protocols: string[] };
|
|
934
|
+
|
|
491
935
|
export type BrowserSessionAttachment = {
|
|
492
936
|
browserSessionId: string;
|
|
493
937
|
controllerGeneration: string;
|
|
@@ -508,6 +952,7 @@ export type BrowserActionRequest = {
|
|
|
508
952
|
expectedTargetGeneration: string;
|
|
509
953
|
expectedDocumentGeneration: string | null;
|
|
510
954
|
expectedFrameId: string | null;
|
|
955
|
+
observationMode?: "full" | "none" | undefined;
|
|
511
956
|
action: BrowserAction | BrowserActionBatch;
|
|
512
957
|
};
|
|
513
958
|
|
|
@@ -539,10 +984,19 @@ export type ComputerSessionCapabilities = {
|
|
|
539
984
|
semanticActions: boolean;
|
|
540
985
|
pointerInput: boolean;
|
|
541
986
|
keyboardInput: boolean;
|
|
987
|
+
clipboard: boolean;
|
|
542
988
|
backgroundActions: boolean;
|
|
543
989
|
parallelApps: boolean;
|
|
544
990
|
};
|
|
545
991
|
|
|
992
|
+
export type ComputerClipboard = {
|
|
993
|
+
computerSessionId: string;
|
|
994
|
+
controllerGeneration: string;
|
|
995
|
+
text: string | null;
|
|
996
|
+
truncated: boolean;
|
|
997
|
+
observedAt: string;
|
|
998
|
+
};
|
|
999
|
+
|
|
546
1000
|
export type ComputerSession = {
|
|
547
1001
|
id: string;
|
|
548
1002
|
accountId: string;
|
|
@@ -632,6 +1086,11 @@ export type ComputerAction =
|
|
|
632
1086
|
button?: "left" | "right" | "middle" | undefined;
|
|
633
1087
|
}
|
|
634
1088
|
| { type: "keyboard"; action: "type" | "press"; value: string }
|
|
1089
|
+
| {
|
|
1090
|
+
type: "clipboard";
|
|
1091
|
+
operation: "write" | "clear" | "copy" | "paste";
|
|
1092
|
+
text?: string | undefined;
|
|
1093
|
+
}
|
|
635
1094
|
| { type: "focus"; targetId: string }
|
|
636
1095
|
| { type: "launch"; applicationId: string };
|
|
637
1096
|
|
|
@@ -674,7 +1133,7 @@ export type ComputerSessionAttachment = {
|
|
|
674
1133
|
computerSessionId: string;
|
|
675
1134
|
controllerGeneration: string;
|
|
676
1135
|
targetId: string;
|
|
677
|
-
stream:
|
|
1136
|
+
stream: ComputerFrameStreamAttachment;
|
|
678
1137
|
expiresAt: string;
|
|
679
1138
|
};
|
|
680
1139
|
|
|
@@ -721,6 +1180,113 @@ export type BrowserDiagnosticsOptions = {
|
|
|
721
1180
|
|
|
722
1181
|
/** The exact HTTP surface needed by the framework-free interaction client. */
|
|
723
1182
|
export interface InteractionTransport {
|
|
1183
|
+
listNetworkRoutes(
|
|
1184
|
+
workspaceId: string,
|
|
1185
|
+
options?: NetworkRouteListOptions,
|
|
1186
|
+
): Promise<NetworkRouteListResponse>;
|
|
1187
|
+
getNetworkRoute(
|
|
1188
|
+
workspaceId: string,
|
|
1189
|
+
networkRouteId: string,
|
|
1190
|
+
options?: OpenGeniRequestOptions,
|
|
1191
|
+
): Promise<NetworkRoute>;
|
|
1192
|
+
createNetworkRoute(
|
|
1193
|
+
workspaceId: string,
|
|
1194
|
+
request: CreateNetworkRouteRequest,
|
|
1195
|
+
options?: OpenGeniRequestOptions,
|
|
1196
|
+
): Promise<NetworkRouteMutationResponse>;
|
|
1197
|
+
updateNetworkRoute(
|
|
1198
|
+
workspaceId: string,
|
|
1199
|
+
networkRouteId: string,
|
|
1200
|
+
request: UpdateNetworkRouteRequest,
|
|
1201
|
+
options?: OpenGeniRequestOptions,
|
|
1202
|
+
): Promise<NetworkRouteMutationResponse>;
|
|
1203
|
+
listSiteAuthConnections(
|
|
1204
|
+
workspaceId: string,
|
|
1205
|
+
options?: SiteAuthConnectionListOptions,
|
|
1206
|
+
): Promise<SiteAuthConnectionListResponse>;
|
|
1207
|
+
getSiteAuthConnection(
|
|
1208
|
+
workspaceId: string,
|
|
1209
|
+
siteAuthConnectionId: string,
|
|
1210
|
+
options?: OpenGeniRequestOptions,
|
|
1211
|
+
): Promise<SiteAuthConnection>;
|
|
1212
|
+
createSiteAuthConnection(
|
|
1213
|
+
workspaceId: string,
|
|
1214
|
+
request: CreateSiteAuthConnectionRequest,
|
|
1215
|
+
options?: OpenGeniRequestOptions,
|
|
1216
|
+
): Promise<SiteAuthConnectionMutationResponse>;
|
|
1217
|
+
updateSiteAuthConnection(
|
|
1218
|
+
workspaceId: string,
|
|
1219
|
+
siteAuthConnectionId: string,
|
|
1220
|
+
request: UpdateSiteAuthConnectionRequest,
|
|
1221
|
+
options?: OpenGeniRequestOptions,
|
|
1222
|
+
): Promise<SiteAuthConnectionMutationResponse>;
|
|
1223
|
+
listAuthRuns(workspaceId: string, options?: AuthRunListOptions): Promise<AuthRunListResponse>;
|
|
1224
|
+
getAuthRun(
|
|
1225
|
+
workspaceId: string,
|
|
1226
|
+
authRunId: string,
|
|
1227
|
+
options?: OpenGeniRequestOptions,
|
|
1228
|
+
): Promise<AuthRun>;
|
|
1229
|
+
startBrowserAuthRun(
|
|
1230
|
+
workspaceId: string,
|
|
1231
|
+
browserSessionId: string,
|
|
1232
|
+
request: StartAuthRunRequest,
|
|
1233
|
+
options?: OpenGeniRequestOptions,
|
|
1234
|
+
): Promise<AuthRunMutationResponse>;
|
|
1235
|
+
reportBrowserAuthRun(
|
|
1236
|
+
workspaceId: string,
|
|
1237
|
+
browserSessionId: string,
|
|
1238
|
+
authRunId: string,
|
|
1239
|
+
request: ReportAuthRunRequest,
|
|
1240
|
+
options?: OpenGeniRequestOptions,
|
|
1241
|
+
): Promise<AuthRunMutationResponse>;
|
|
1242
|
+
protectedBrowserAuthFill(
|
|
1243
|
+
workspaceId: string,
|
|
1244
|
+
browserSessionId: string,
|
|
1245
|
+
authRunId: string,
|
|
1246
|
+
request: ProtectedAuthFillRequest,
|
|
1247
|
+
options?: OpenGeniRequestOptions,
|
|
1248
|
+
): Promise<ProtectedAuthFillResponse>;
|
|
1249
|
+
advanceExternalBrowserAuthRun(
|
|
1250
|
+
workspaceId: string,
|
|
1251
|
+
browserSessionId: string,
|
|
1252
|
+
authRunId: string,
|
|
1253
|
+
request: ExternalAuthRunRequest,
|
|
1254
|
+
options?: OpenGeniRequestOptions,
|
|
1255
|
+
): Promise<ExternalAuthRunResponse>;
|
|
1256
|
+
openExternalBrowserAuthFlow(
|
|
1257
|
+
workspaceId: string,
|
|
1258
|
+
browserSessionId: string,
|
|
1259
|
+
authRunId: string,
|
|
1260
|
+
request: ExternalAuthInteractiveRequest,
|
|
1261
|
+
options?: OpenGeniRequestOptions,
|
|
1262
|
+
): Promise<ExternalAuthInteractiveResponse>;
|
|
1263
|
+
verifyBrowserAuthRun(
|
|
1264
|
+
workspaceId: string,
|
|
1265
|
+
browserSessionId: string,
|
|
1266
|
+
authRunId: string,
|
|
1267
|
+
request: VerifyAuthRunRequest,
|
|
1268
|
+
options?: OpenGeniRequestOptions,
|
|
1269
|
+
): Promise<AuthRunMutationResponse>;
|
|
1270
|
+
listInteractionInterventions(
|
|
1271
|
+
workspaceId: string,
|
|
1272
|
+
options?: InteractionInterventionListOptions,
|
|
1273
|
+
): Promise<InteractionInterventionListResponse>;
|
|
1274
|
+
getInteractionIntervention(
|
|
1275
|
+
workspaceId: string,
|
|
1276
|
+
interventionId: string,
|
|
1277
|
+
options?: OpenGeniRequestOptions,
|
|
1278
|
+
): Promise<InteractionIntervention>;
|
|
1279
|
+
createInteractionIntervention(
|
|
1280
|
+
workspaceId: string,
|
|
1281
|
+
request: CreateInteractionInterventionRequest,
|
|
1282
|
+
options?: OpenGeniRequestOptions,
|
|
1283
|
+
): Promise<InteractionInterventionMutationResponse>;
|
|
1284
|
+
resolveInteractionIntervention(
|
|
1285
|
+
workspaceId: string,
|
|
1286
|
+
interventionId: string,
|
|
1287
|
+
request: ResolveInteractionInterventionRequest,
|
|
1288
|
+
options?: OpenGeniRequestOptions,
|
|
1289
|
+
): Promise<InteractionInterventionMutationResponse>;
|
|
724
1290
|
listAttachedBrowsers(
|
|
725
1291
|
workspaceId: string,
|
|
726
1292
|
options?: AttachedBrowserDeviceListOptions,
|
|
@@ -744,6 +1310,12 @@ export interface InteractionTransport {
|
|
|
744
1310
|
request: CreateBrowserIdentityRequest,
|
|
745
1311
|
options?: OpenGeniRequestOptions,
|
|
746
1312
|
): Promise<BrowserIdentityMutationResponse>;
|
|
1313
|
+
updateBrowserIdentity(
|
|
1314
|
+
workspaceId: string,
|
|
1315
|
+
identityId: string,
|
|
1316
|
+
request: UpdateBrowserIdentityRequest,
|
|
1317
|
+
options?: OpenGeniRequestOptions,
|
|
1318
|
+
): Promise<BrowserIdentityMutationResponse>;
|
|
747
1319
|
listBrowserRevisions(
|
|
748
1320
|
workspaceId: string,
|
|
749
1321
|
identityId: string,
|
|
@@ -758,6 +1330,29 @@ export interface InteractionTransport {
|
|
|
758
1330
|
browserSessionId: string,
|
|
759
1331
|
options?: OpenGeniRequestOptions,
|
|
760
1332
|
): Promise<BrowserSession>;
|
|
1333
|
+
readBrowserClipboard(
|
|
1334
|
+
workspaceId: string,
|
|
1335
|
+
browserSessionId: string,
|
|
1336
|
+
options?: OpenGeniRequestOptions,
|
|
1337
|
+
): Promise<BrowserClipboard>;
|
|
1338
|
+
listBrowserDownloads(
|
|
1339
|
+
workspaceId: string,
|
|
1340
|
+
browserSessionId: string,
|
|
1341
|
+
options?: OpenGeniRequestOptions,
|
|
1342
|
+
): Promise<BrowserDownloadListResponse>;
|
|
1343
|
+
getBrowserDownload(
|
|
1344
|
+
workspaceId: string,
|
|
1345
|
+
browserSessionId: string,
|
|
1346
|
+
downloadId: string,
|
|
1347
|
+
options?: OpenGeniRequestOptions,
|
|
1348
|
+
): Promise<BrowserDownload>;
|
|
1349
|
+
saveBrowserDownload(
|
|
1350
|
+
workspaceId: string,
|
|
1351
|
+
browserSessionId: string,
|
|
1352
|
+
downloadId: string,
|
|
1353
|
+
request: BrowserDownloadSaveRequest,
|
|
1354
|
+
options?: OpenGeniRequestOptions,
|
|
1355
|
+
): Promise<BrowserDownloadSaveResponse>;
|
|
761
1356
|
createBrowserSession(
|
|
762
1357
|
workspaceId: string,
|
|
763
1358
|
request: CreateBrowserSessionRequest,
|
|
@@ -773,13 +1368,13 @@ export interface InteractionTransport {
|
|
|
773
1368
|
browserSessionId: string,
|
|
774
1369
|
request?: BrowserOpenTargetRequest,
|
|
775
1370
|
options?: OpenGeniRequestOptions,
|
|
776
|
-
): Promise<
|
|
1371
|
+
): Promise<BrowserObservation>;
|
|
777
1372
|
selectBrowserTarget(
|
|
778
1373
|
workspaceId: string,
|
|
779
1374
|
browserSessionId: string,
|
|
780
1375
|
targetId: string,
|
|
781
1376
|
options?: OpenGeniRequestOptions,
|
|
782
|
-
): Promise<
|
|
1377
|
+
): Promise<BrowserObservation>;
|
|
783
1378
|
closeBrowserTarget(
|
|
784
1379
|
workspaceId: string,
|
|
785
1380
|
browserSessionId: string,
|
|
@@ -854,6 +1449,11 @@ export interface InteractionTransport {
|
|
|
854
1449
|
computerSessionId: string,
|
|
855
1450
|
options?: OpenGeniRequestOptions,
|
|
856
1451
|
): Promise<ComputerSession>;
|
|
1452
|
+
readComputerClipboard(
|
|
1453
|
+
workspaceId: string,
|
|
1454
|
+
computerSessionId: string,
|
|
1455
|
+
options?: OpenGeniRequestOptions,
|
|
1456
|
+
): Promise<ComputerClipboard>;
|
|
857
1457
|
createComputerSession(
|
|
858
1458
|
workspaceId: string,
|
|
859
1459
|
request: CreateComputerSessionRequest,
|
|
@@ -908,10 +1508,35 @@ export type BrowserIdentityListOptions = OpenGeniRequestOptions & {
|
|
|
908
1508
|
includeArchived?: boolean | undefined;
|
|
909
1509
|
};
|
|
910
1510
|
|
|
1511
|
+
export type NetworkRouteListOptions = OpenGeniRequestOptions & {
|
|
1512
|
+
includeArchived?: boolean | undefined;
|
|
1513
|
+
};
|
|
1514
|
+
|
|
1515
|
+
export type SiteAuthConnectionListOptions = OpenGeniRequestOptions & {
|
|
1516
|
+
includeArchived?: boolean | undefined;
|
|
1517
|
+
};
|
|
1518
|
+
|
|
1519
|
+
export type AuthRunListOptions = OpenGeniRequestOptions & {
|
|
1520
|
+
browserSessionId?: string | undefined;
|
|
1521
|
+
siteAuthConnectionId?: string | undefined;
|
|
1522
|
+
includeSettled?: boolean | undefined;
|
|
1523
|
+
};
|
|
1524
|
+
|
|
1525
|
+
export type InteractionInterventionListOptions = OpenGeniRequestOptions & {
|
|
1526
|
+
resourceKind?: "browser_session" | "computer_session" | undefined;
|
|
1527
|
+
resourceId?: string | undefined;
|
|
1528
|
+
includeSettled?: boolean | undefined;
|
|
1529
|
+
};
|
|
1530
|
+
|
|
911
1531
|
export type AttachedBrowserDeviceListOptions = OpenGeniRequestOptions & {
|
|
912
1532
|
includeDisconnected?: boolean | undefined;
|
|
913
1533
|
};
|
|
914
1534
|
|
|
1535
|
+
export type BrowserDownloadSaveOptions = OpenGeniRequestOptions & {
|
|
1536
|
+
operationId?: string | undefined;
|
|
1537
|
+
overwrite?: boolean | undefined;
|
|
1538
|
+
};
|
|
1539
|
+
|
|
915
1540
|
export type CurrentOrOpenBrowserOptions = {
|
|
916
1541
|
workspaceId: string;
|
|
917
1542
|
associationSessionId: string;
|
|
@@ -922,6 +1547,7 @@ export type CurrentOrOpenBrowserOptions = {
|
|
|
922
1547
|
placement?: InteractionPlacement | undefined;
|
|
923
1548
|
identityId?: string | undefined;
|
|
924
1549
|
baseRevisionId?: string | undefined;
|
|
1550
|
+
networkRouteId?: string | undefined;
|
|
925
1551
|
linkedComputerSessionId?: string | undefined;
|
|
926
1552
|
signal?: AbortSignal | undefined;
|
|
927
1553
|
};
|
|
@@ -938,15 +1564,303 @@ export type CurrentOrOpenComputerOptions = {
|
|
|
938
1564
|
/** Framework-free resource facade over the public interaction HTTP API. */
|
|
939
1565
|
export class OpenGeniInteractionClient {
|
|
940
1566
|
readonly attachedBrowsers: AttachedBrowserDeviceCollection;
|
|
1567
|
+
readonly authRuns: AuthRunCollection;
|
|
941
1568
|
readonly browsers: BrowserSessionCollection;
|
|
942
1569
|
readonly computers: ComputerSessionCollection;
|
|
943
1570
|
readonly identities: BrowserIdentityCollection;
|
|
1571
|
+
readonly interventions: InteractionInterventionCollection;
|
|
1572
|
+
readonly networkRoutes: NetworkRouteCollection;
|
|
1573
|
+
readonly siteAuthConnections: SiteAuthConnectionCollection;
|
|
944
1574
|
|
|
945
1575
|
constructor(transport: BrowserInteractionTransport) {
|
|
946
1576
|
this.attachedBrowsers = new AttachedBrowserDeviceCollection(transport);
|
|
1577
|
+
this.authRuns = new AuthRunCollection(transport);
|
|
947
1578
|
this.browsers = new BrowserSessionCollection(transport);
|
|
948
1579
|
this.computers = new ComputerSessionCollection(transport);
|
|
949
1580
|
this.identities = new BrowserIdentityCollection(transport);
|
|
1581
|
+
this.interventions = new InteractionInterventionCollection(transport);
|
|
1582
|
+
this.networkRoutes = new NetworkRouteCollection(transport);
|
|
1583
|
+
this.siteAuthConnections = new SiteAuthConnectionCollection(transport);
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
export class NetworkRouteCollection {
|
|
1588
|
+
constructor(private readonly transport: BrowserInteractionTransport) {}
|
|
1589
|
+
|
|
1590
|
+
async list(
|
|
1591
|
+
workspaceId: string,
|
|
1592
|
+
options: NetworkRouteListOptions = {},
|
|
1593
|
+
): Promise<NetworkRouteListResponse> {
|
|
1594
|
+
return await this.transport.listNetworkRoutes(workspaceId, options);
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
route(workspaceId: string, networkRouteId: string): NetworkRouteResource {
|
|
1598
|
+
return new NetworkRouteResource(this.transport, workspaceId, networkRouteId);
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
async create(
|
|
1602
|
+
workspaceId: string,
|
|
1603
|
+
request: CreateNetworkRouteRequest,
|
|
1604
|
+
options: OpenGeniRequestOptions = {},
|
|
1605
|
+
): Promise<NetworkRouteResource> {
|
|
1606
|
+
const response = await this.transport.createNetworkRoute(workspaceId, request, options);
|
|
1607
|
+
return this.route(workspaceId, response.route.id);
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
export class NetworkRouteResource {
|
|
1612
|
+
constructor(
|
|
1613
|
+
private readonly transport: BrowserInteractionTransport,
|
|
1614
|
+
readonly workspaceId: string,
|
|
1615
|
+
readonly id: string,
|
|
1616
|
+
) {}
|
|
1617
|
+
|
|
1618
|
+
async get(options: OpenGeniRequestOptions = {}): Promise<NetworkRoute> {
|
|
1619
|
+
return await this.transport.getNetworkRoute(this.workspaceId, this.id, options);
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
async update(
|
|
1623
|
+
request: UpdateNetworkRouteRequest,
|
|
1624
|
+
options: OpenGeniRequestOptions = {},
|
|
1625
|
+
): Promise<NetworkRouteMutationResponse> {
|
|
1626
|
+
return await this.transport.updateNetworkRoute(this.workspaceId, this.id, request, options);
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
export class SiteAuthConnectionCollection {
|
|
1631
|
+
constructor(private readonly transport: BrowserInteractionTransport) {}
|
|
1632
|
+
|
|
1633
|
+
async list(
|
|
1634
|
+
workspaceId: string,
|
|
1635
|
+
options: SiteAuthConnectionListOptions = {},
|
|
1636
|
+
): Promise<SiteAuthConnectionListResponse> {
|
|
1637
|
+
return await this.transport.listSiteAuthConnections(workspaceId, options);
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
connection(workspaceId: string, connectionId: string): SiteAuthConnectionResource {
|
|
1641
|
+
return new SiteAuthConnectionResource(this.transport, workspaceId, connectionId);
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
async create(
|
|
1645
|
+
workspaceId: string,
|
|
1646
|
+
request: CreateSiteAuthConnectionRequest,
|
|
1647
|
+
options: OpenGeniRequestOptions = {},
|
|
1648
|
+
): Promise<SiteAuthConnectionResource> {
|
|
1649
|
+
const response = await this.transport.createSiteAuthConnection(workspaceId, request, options);
|
|
1650
|
+
return this.connection(workspaceId, response.connection.id);
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
export class SiteAuthConnectionResource {
|
|
1655
|
+
constructor(
|
|
1656
|
+
private readonly transport: BrowserInteractionTransport,
|
|
1657
|
+
readonly workspaceId: string,
|
|
1658
|
+
readonly id: string,
|
|
1659
|
+
) {}
|
|
1660
|
+
|
|
1661
|
+
async get(options: OpenGeniRequestOptions = {}): Promise<SiteAuthConnection> {
|
|
1662
|
+
return await this.transport.getSiteAuthConnection(this.workspaceId, this.id, options);
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
async update(
|
|
1666
|
+
request: UpdateSiteAuthConnectionRequest,
|
|
1667
|
+
options: OpenGeniRequestOptions = {},
|
|
1668
|
+
): Promise<SiteAuthConnectionMutationResponse> {
|
|
1669
|
+
return await this.transport.updateSiteAuthConnection(
|
|
1670
|
+
this.workspaceId,
|
|
1671
|
+
this.id,
|
|
1672
|
+
request,
|
|
1673
|
+
options,
|
|
1674
|
+
);
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
export class AuthRunCollection {
|
|
1679
|
+
constructor(private readonly transport: BrowserInteractionTransport) {}
|
|
1680
|
+
|
|
1681
|
+
async list(workspaceId: string, options: AuthRunListOptions = {}): Promise<AuthRunListResponse> {
|
|
1682
|
+
return await this.transport.listAuthRuns(workspaceId, options);
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
async get(
|
|
1686
|
+
workspaceId: string,
|
|
1687
|
+
authRunId: string,
|
|
1688
|
+
options: OpenGeniRequestOptions = {},
|
|
1689
|
+
): Promise<AuthRun> {
|
|
1690
|
+
return await this.transport.getAuthRun(workspaceId, authRunId, options);
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
run(workspaceId: string, browserSessionId: string, authRunId: string): AuthRunResource {
|
|
1694
|
+
return new AuthRunResource(this.transport, workspaceId, browserSessionId, authRunId);
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
export class BrowserAuthRunCollection {
|
|
1699
|
+
constructor(
|
|
1700
|
+
private readonly transport: BrowserInteractionTransport,
|
|
1701
|
+
readonly workspaceId: string,
|
|
1702
|
+
readonly browserSessionId: string,
|
|
1703
|
+
) {}
|
|
1704
|
+
|
|
1705
|
+
async list(
|
|
1706
|
+
options: Omit<AuthRunListOptions, "browserSessionId"> = {},
|
|
1707
|
+
): Promise<AuthRunListResponse> {
|
|
1708
|
+
return await this.transport.listAuthRuns(this.workspaceId, {
|
|
1709
|
+
...options,
|
|
1710
|
+
browserSessionId: this.browserSessionId,
|
|
1711
|
+
});
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
run(authRunId: string): AuthRunResource {
|
|
1715
|
+
return new AuthRunResource(this.transport, this.workspaceId, this.browserSessionId, authRunId);
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
async start(
|
|
1719
|
+
request: StartAuthRunRequest,
|
|
1720
|
+
options: OpenGeniRequestOptions = {},
|
|
1721
|
+
): Promise<AuthRunResource> {
|
|
1722
|
+
const response = await this.transport.startBrowserAuthRun(
|
|
1723
|
+
this.workspaceId,
|
|
1724
|
+
this.browserSessionId,
|
|
1725
|
+
request,
|
|
1726
|
+
options,
|
|
1727
|
+
);
|
|
1728
|
+
return this.run(response.run.id);
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
export class AuthRunResource {
|
|
1733
|
+
constructor(
|
|
1734
|
+
private readonly transport: BrowserInteractionTransport,
|
|
1735
|
+
readonly workspaceId: string,
|
|
1736
|
+
readonly browserSessionId: string,
|
|
1737
|
+
readonly id: string,
|
|
1738
|
+
) {}
|
|
1739
|
+
|
|
1740
|
+
async get(options: OpenGeniRequestOptions = {}): Promise<AuthRun> {
|
|
1741
|
+
const run = await this.transport.getAuthRun(this.workspaceId, this.id, options);
|
|
1742
|
+
if (run.browserSessionId !== this.browserSessionId) {
|
|
1743
|
+
throw new Error("AuthRun belongs to another BrowserSession");
|
|
1744
|
+
}
|
|
1745
|
+
return run;
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
async report(
|
|
1749
|
+
request: ReportAuthRunRequest,
|
|
1750
|
+
options: OpenGeniRequestOptions = {},
|
|
1751
|
+
): Promise<AuthRunMutationResponse> {
|
|
1752
|
+
return await this.transport.reportBrowserAuthRun(
|
|
1753
|
+
this.workspaceId,
|
|
1754
|
+
this.browserSessionId,
|
|
1755
|
+
this.id,
|
|
1756
|
+
request,
|
|
1757
|
+
options,
|
|
1758
|
+
);
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
async protectedFill(
|
|
1762
|
+
request: ProtectedAuthFillRequest,
|
|
1763
|
+
options: OpenGeniRequestOptions = {},
|
|
1764
|
+
): Promise<ProtectedAuthFillResponse> {
|
|
1765
|
+
return await this.transport.protectedBrowserAuthFill(
|
|
1766
|
+
this.workspaceId,
|
|
1767
|
+
this.browserSessionId,
|
|
1768
|
+
this.id,
|
|
1769
|
+
request,
|
|
1770
|
+
options,
|
|
1771
|
+
);
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
async advanceExternal(
|
|
1775
|
+
request: ExternalAuthRunRequest,
|
|
1776
|
+
options: OpenGeniRequestOptions = {},
|
|
1777
|
+
): Promise<ExternalAuthRunResponse> {
|
|
1778
|
+
return await this.transport.advanceExternalBrowserAuthRun(
|
|
1779
|
+
this.workspaceId,
|
|
1780
|
+
this.browserSessionId,
|
|
1781
|
+
this.id,
|
|
1782
|
+
request,
|
|
1783
|
+
options,
|
|
1784
|
+
);
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
/** Human-session helper. Hosted provider URLs never appear in model tools. */
|
|
1788
|
+
async openExternalFlow(
|
|
1789
|
+
request: ExternalAuthInteractiveRequest,
|
|
1790
|
+
options: OpenGeniRequestOptions = {},
|
|
1791
|
+
): Promise<ExternalAuthInteractiveResponse> {
|
|
1792
|
+
return await this.transport.openExternalBrowserAuthFlow(
|
|
1793
|
+
this.workspaceId,
|
|
1794
|
+
this.browserSessionId,
|
|
1795
|
+
this.id,
|
|
1796
|
+
request,
|
|
1797
|
+
options,
|
|
1798
|
+
);
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
async verify(
|
|
1802
|
+
request: VerifyAuthRunRequest,
|
|
1803
|
+
options: OpenGeniRequestOptions = {},
|
|
1804
|
+
): Promise<AuthRunMutationResponse> {
|
|
1805
|
+
return await this.transport.verifyBrowserAuthRun(
|
|
1806
|
+
this.workspaceId,
|
|
1807
|
+
this.browserSessionId,
|
|
1808
|
+
this.id,
|
|
1809
|
+
request,
|
|
1810
|
+
options,
|
|
1811
|
+
);
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
export class InteractionInterventionCollection {
|
|
1816
|
+
constructor(private readonly transport: BrowserInteractionTransport) {}
|
|
1817
|
+
|
|
1818
|
+
async list(
|
|
1819
|
+
workspaceId: string,
|
|
1820
|
+
options: InteractionInterventionListOptions = {},
|
|
1821
|
+
): Promise<InteractionInterventionListResponse> {
|
|
1822
|
+
return await this.transport.listInteractionInterventions(workspaceId, options);
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
intervention(workspaceId: string, interventionId: string): InteractionInterventionResource {
|
|
1826
|
+
return new InteractionInterventionResource(this.transport, workspaceId, interventionId);
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
async create(
|
|
1830
|
+
workspaceId: string,
|
|
1831
|
+
request: CreateInteractionInterventionRequest,
|
|
1832
|
+
options: OpenGeniRequestOptions = {},
|
|
1833
|
+
): Promise<InteractionInterventionResource> {
|
|
1834
|
+
const response = await this.transport.createInteractionIntervention(
|
|
1835
|
+
workspaceId,
|
|
1836
|
+
request,
|
|
1837
|
+
options,
|
|
1838
|
+
);
|
|
1839
|
+
return this.intervention(workspaceId, response.intervention.id);
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
export class InteractionInterventionResource {
|
|
1844
|
+
constructor(
|
|
1845
|
+
private readonly transport: BrowserInteractionTransport,
|
|
1846
|
+
readonly workspaceId: string,
|
|
1847
|
+
readonly id: string,
|
|
1848
|
+
) {}
|
|
1849
|
+
|
|
1850
|
+
async get(options: OpenGeniRequestOptions = {}): Promise<InteractionIntervention> {
|
|
1851
|
+
return await this.transport.getInteractionIntervention(this.workspaceId, this.id, options);
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
async resolve(
|
|
1855
|
+
request: ResolveInteractionInterventionRequest,
|
|
1856
|
+
options: OpenGeniRequestOptions = {},
|
|
1857
|
+
): Promise<InteractionInterventionMutationResponse> {
|
|
1858
|
+
return await this.transport.resolveInteractionIntervention(
|
|
1859
|
+
this.workspaceId,
|
|
1860
|
+
this.id,
|
|
1861
|
+
request,
|
|
1862
|
+
options,
|
|
1863
|
+
);
|
|
950
1864
|
}
|
|
951
1865
|
}
|
|
952
1866
|
|
|
@@ -1015,6 +1929,13 @@ export class BrowserIdentityResource {
|
|
|
1015
1929
|
async revisions(options: OpenGeniRequestOptions = {}): Promise<BrowserRevisionListResponse> {
|
|
1016
1930
|
return await this.transport.listBrowserRevisions(this.workspaceId, this.id, options);
|
|
1017
1931
|
}
|
|
1932
|
+
|
|
1933
|
+
async update(
|
|
1934
|
+
request: UpdateBrowserIdentityRequest,
|
|
1935
|
+
options: OpenGeniRequestOptions = {},
|
|
1936
|
+
): Promise<BrowserIdentityMutationResponse> {
|
|
1937
|
+
return await this.transport.updateBrowserIdentity(this.workspaceId, this.id, request, options);
|
|
1938
|
+
}
|
|
1018
1939
|
}
|
|
1019
1940
|
|
|
1020
1941
|
export class BrowserSessionCollection {
|
|
@@ -1065,6 +1986,7 @@ export class BrowserSessionCollection {
|
|
|
1065
1986
|
...(options.placement !== undefined ? { placement: options.placement } : {}),
|
|
1066
1987
|
...(options.identityId !== undefined ? { identityId: options.identityId } : {}),
|
|
1067
1988
|
...(options.baseRevisionId !== undefined ? { baseRevisionId: options.baseRevisionId } : {}),
|
|
1989
|
+
...(options.networkRouteId !== undefined ? { networkRouteId: options.networkRouteId } : {}),
|
|
1068
1990
|
...(options.linkedComputerSessionId !== undefined
|
|
1069
1991
|
? { linkedComputerSessionId: options.linkedComputerSessionId }
|
|
1070
1992
|
: {}),
|
|
@@ -1075,6 +1997,9 @@ export class BrowserSessionCollection {
|
|
|
1075
1997
|
}
|
|
1076
1998
|
|
|
1077
1999
|
export class BrowserSessionResource {
|
|
2000
|
+
readonly auth: BrowserAuthRunCollection;
|
|
2001
|
+
readonly clipboard: BrowserClipboardResource;
|
|
2002
|
+
readonly downloads: BrowserDownloadCollection;
|
|
1078
2003
|
readonly tabs: BrowserTargetCollection;
|
|
1079
2004
|
/** Alias for hosts that prefer the protocol term. */
|
|
1080
2005
|
readonly targets: BrowserTargetCollection;
|
|
@@ -1084,6 +2009,9 @@ export class BrowserSessionResource {
|
|
|
1084
2009
|
readonly workspaceId: string,
|
|
1085
2010
|
readonly id: string,
|
|
1086
2011
|
) {
|
|
2012
|
+
this.auth = new BrowserAuthRunCollection(transport, workspaceId, id);
|
|
2013
|
+
this.clipboard = new BrowserClipboardResource(transport, workspaceId, id);
|
|
2014
|
+
this.downloads = new BrowserDownloadCollection(transport, workspaceId, id);
|
|
1087
2015
|
this.tabs = new BrowserTargetCollection(transport, workspaceId, id);
|
|
1088
2016
|
this.targets = this.tabs;
|
|
1089
2017
|
}
|
|
@@ -1176,6 +2104,97 @@ export class BrowserSessionResource {
|
|
|
1176
2104
|
}
|
|
1177
2105
|
}
|
|
1178
2106
|
|
|
2107
|
+
export class BrowserClipboardResource {
|
|
2108
|
+
constructor(
|
|
2109
|
+
private readonly transport: BrowserInteractionTransport,
|
|
2110
|
+
readonly workspaceId: string,
|
|
2111
|
+
readonly browserSessionId: string,
|
|
2112
|
+
) {}
|
|
2113
|
+
|
|
2114
|
+
async read(options: OpenGeniRequestOptions = {}): Promise<BrowserClipboard> {
|
|
2115
|
+
const clipboard = await this.transport.readBrowserClipboard(
|
|
2116
|
+
this.workspaceId,
|
|
2117
|
+
this.browserSessionId,
|
|
2118
|
+
options,
|
|
2119
|
+
);
|
|
2120
|
+
if (clipboard.browserSessionId !== this.browserSessionId) {
|
|
2121
|
+
throw new Error("Browser clipboard belongs to another BrowserSession");
|
|
2122
|
+
}
|
|
2123
|
+
return clipboard;
|
|
2124
|
+
}
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
export class BrowserDownloadCollection {
|
|
2128
|
+
constructor(
|
|
2129
|
+
private readonly transport: BrowserInteractionTransport,
|
|
2130
|
+
readonly workspaceId: string,
|
|
2131
|
+
readonly browserSessionId: string,
|
|
2132
|
+
) {}
|
|
2133
|
+
|
|
2134
|
+
async list(options: OpenGeniRequestOptions = {}): Promise<BrowserDownloadListResponse> {
|
|
2135
|
+
return await this.transport.listBrowserDownloads(
|
|
2136
|
+
this.workspaceId,
|
|
2137
|
+
this.browserSessionId,
|
|
2138
|
+
options,
|
|
2139
|
+
);
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
download(downloadId: string): BrowserDownloadResource {
|
|
2143
|
+
return new BrowserDownloadResource(
|
|
2144
|
+
this.transport,
|
|
2145
|
+
this.workspaceId,
|
|
2146
|
+
this.browserSessionId,
|
|
2147
|
+
downloadId,
|
|
2148
|
+
);
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
export class BrowserDownloadResource {
|
|
2153
|
+
constructor(
|
|
2154
|
+
private readonly transport: BrowserInteractionTransport,
|
|
2155
|
+
readonly workspaceId: string,
|
|
2156
|
+
readonly browserSessionId: string,
|
|
2157
|
+
readonly id: string,
|
|
2158
|
+
) {}
|
|
2159
|
+
|
|
2160
|
+
async get(options: OpenGeniRequestOptions = {}): Promise<BrowserDownload> {
|
|
2161
|
+
const download = await this.transport.getBrowserDownload(
|
|
2162
|
+
this.workspaceId,
|
|
2163
|
+
this.browserSessionId,
|
|
2164
|
+
this.id,
|
|
2165
|
+
options,
|
|
2166
|
+
);
|
|
2167
|
+
if (download.browserSessionId !== this.browserSessionId) {
|
|
2168
|
+
throw new Error("BrowserDownload belongs to another BrowserSession");
|
|
2169
|
+
}
|
|
2170
|
+
return download;
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
/** Publish this exact private browser download into the source session's
|
|
2174
|
+
* workspace. Pass an operationId when the caller needs retry identity across
|
|
2175
|
+
* process boundaries; otherwise one is generated for this call. */
|
|
2176
|
+
async saveToWorkspace(
|
|
2177
|
+
destinationPath: string,
|
|
2178
|
+
options: BrowserDownloadSaveOptions = {},
|
|
2179
|
+
): Promise<BrowserDownloadSaveResponse> {
|
|
2180
|
+
const { operationId = crypto.randomUUID(), overwrite = false, ...requestOptions } = options;
|
|
2181
|
+
const response = await this.transport.saveBrowserDownload(
|
|
2182
|
+
this.workspaceId,
|
|
2183
|
+
this.browserSessionId,
|
|
2184
|
+
this.id,
|
|
2185
|
+
{ operationId, destinationPath, overwrite },
|
|
2186
|
+
requestOptions,
|
|
2187
|
+
);
|
|
2188
|
+
if (
|
|
2189
|
+
response.download.id !== this.id ||
|
|
2190
|
+
response.download.browserSessionId !== this.browserSessionId
|
|
2191
|
+
) {
|
|
2192
|
+
throw new Error("BrowserDownload save returned another resource");
|
|
2193
|
+
}
|
|
2194
|
+
return response;
|
|
2195
|
+
}
|
|
2196
|
+
}
|
|
2197
|
+
|
|
1179
2198
|
export class BrowserTargetCollection {
|
|
1180
2199
|
constructor(
|
|
1181
2200
|
private readonly transport: BrowserInteractionTransport,
|
|
@@ -1191,7 +2210,7 @@ export class BrowserTargetCollection {
|
|
|
1191
2210
|
);
|
|
1192
2211
|
}
|
|
1193
2212
|
|
|
1194
|
-
async open(url?: string, options: OpenGeniRequestOptions = {}): Promise<
|
|
2213
|
+
async open(url?: string, options: OpenGeniRequestOptions = {}): Promise<BrowserObservation> {
|
|
1195
2214
|
return await this.transport.openBrowserTarget(
|
|
1196
2215
|
this.workspaceId,
|
|
1197
2216
|
this.browserSessionId,
|
|
@@ -1200,7 +2219,10 @@ export class BrowserTargetCollection {
|
|
|
1200
2219
|
);
|
|
1201
2220
|
}
|
|
1202
2221
|
|
|
1203
|
-
async select(
|
|
2222
|
+
async select(
|
|
2223
|
+
targetId: string,
|
|
2224
|
+
options: OpenGeniRequestOptions = {},
|
|
2225
|
+
): Promise<BrowserObservation> {
|
|
1204
2226
|
return await this.transport.selectBrowserTarget(
|
|
1205
2227
|
this.workspaceId,
|
|
1206
2228
|
this.browserSessionId,
|
|
@@ -1269,6 +2291,7 @@ export class ComputerSessionResource {
|
|
|
1269
2291
|
readonly targets: ComputerTargetCollection;
|
|
1270
2292
|
/** Native application/window targets are also the public app collection. */
|
|
1271
2293
|
readonly apps: ComputerTargetCollection;
|
|
2294
|
+
readonly clipboard: ComputerClipboardResource;
|
|
1272
2295
|
|
|
1273
2296
|
constructor(
|
|
1274
2297
|
private readonly transport: BrowserInteractionTransport,
|
|
@@ -1277,6 +2300,7 @@ export class ComputerSessionResource {
|
|
|
1277
2300
|
) {
|
|
1278
2301
|
this.targets = new ComputerTargetCollection(transport, workspaceId, id);
|
|
1279
2302
|
this.apps = this.targets;
|
|
2303
|
+
this.clipboard = new ComputerClipboardResource(transport, workspaceId, id);
|
|
1280
2304
|
}
|
|
1281
2305
|
|
|
1282
2306
|
async get(options: OpenGeniRequestOptions = {}): Promise<ComputerSession> {
|
|
@@ -1328,6 +2352,26 @@ export class ComputerSessionResource {
|
|
|
1328
2352
|
}
|
|
1329
2353
|
}
|
|
1330
2354
|
|
|
2355
|
+
export class ComputerClipboardResource {
|
|
2356
|
+
constructor(
|
|
2357
|
+
private readonly transport: BrowserInteractionTransport,
|
|
2358
|
+
readonly workspaceId: string,
|
|
2359
|
+
readonly computerSessionId: string,
|
|
2360
|
+
) {}
|
|
2361
|
+
|
|
2362
|
+
async read(options: OpenGeniRequestOptions = {}): Promise<ComputerClipboard> {
|
|
2363
|
+
const clipboard = await this.transport.readComputerClipboard(
|
|
2364
|
+
this.workspaceId,
|
|
2365
|
+
this.computerSessionId,
|
|
2366
|
+
options,
|
|
2367
|
+
);
|
|
2368
|
+
if (clipboard.computerSessionId !== this.computerSessionId) {
|
|
2369
|
+
throw new Error("Computer clipboard belongs to another ComputerSession");
|
|
2370
|
+
}
|
|
2371
|
+
return clipboard;
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
|
|
1331
2375
|
export class ComputerTargetCollection {
|
|
1332
2376
|
constructor(
|
|
1333
2377
|
private readonly transport: BrowserInteractionTransport,
|