instavm 0.11.0 → 0.13.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/LICENSE +21 -0
- package/README.md +219 -132
- package/dist/index.d.mts +116 -3
- package/dist/index.d.ts +116 -3
- package/dist/index.js +273 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +272 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -7
package/dist/index.d.mts
CHANGED
|
@@ -15,7 +15,7 @@ interface HttpClientConfig {
|
|
|
15
15
|
apiKey: string;
|
|
16
16
|
}
|
|
17
17
|
interface RequestConfig {
|
|
18
|
-
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS';
|
|
18
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS' | 'HEAD';
|
|
19
19
|
url: string;
|
|
20
20
|
headers?: Record<string, string>;
|
|
21
21
|
data?: any;
|
|
@@ -336,6 +336,7 @@ interface VMCreateRequest extends JsonMap {
|
|
|
336
336
|
share?: JsonMap | null;
|
|
337
337
|
custom_domain?: JsonMap | null;
|
|
338
338
|
image_variant?: string | null;
|
|
339
|
+
volumes?: VMVolumeMountRequest[] | null;
|
|
339
340
|
}
|
|
340
341
|
interface VMUpdateRequest extends JsonMap {
|
|
341
342
|
memory_mb?: number | null;
|
|
@@ -370,6 +371,69 @@ interface SnapshotCreateRequest extends JsonMap {
|
|
|
370
371
|
interface SnapshotQueryOptions {
|
|
371
372
|
type?: 'user' | 'system';
|
|
372
373
|
}
|
|
374
|
+
interface VolumeCreateRequest extends JsonMap {
|
|
375
|
+
name: string;
|
|
376
|
+
quota_bytes: number;
|
|
377
|
+
}
|
|
378
|
+
interface VolumeUpdateRequest extends JsonMap {
|
|
379
|
+
name?: string | null;
|
|
380
|
+
quota_bytes?: number | null;
|
|
381
|
+
}
|
|
382
|
+
interface VolumeResponse extends JsonMap {
|
|
383
|
+
id: string;
|
|
384
|
+
name: string;
|
|
385
|
+
quota_bytes: number;
|
|
386
|
+
used_bytes: number;
|
|
387
|
+
status: string;
|
|
388
|
+
created_at?: string | null;
|
|
389
|
+
updated_at?: string | null;
|
|
390
|
+
}
|
|
391
|
+
interface VolumeCheckpointCreateRequest extends JsonMap {
|
|
392
|
+
name?: string | null;
|
|
393
|
+
}
|
|
394
|
+
interface VolumeCheckpointResponse extends JsonMap {
|
|
395
|
+
id: string;
|
|
396
|
+
volume_id: string;
|
|
397
|
+
name?: string | null;
|
|
398
|
+
status: string;
|
|
399
|
+
created_at?: string | null;
|
|
400
|
+
}
|
|
401
|
+
interface VolumeFileEntry extends JsonMap {
|
|
402
|
+
path: string;
|
|
403
|
+
filename: string;
|
|
404
|
+
size: number;
|
|
405
|
+
}
|
|
406
|
+
interface VolumeFileDownloadResponse extends JsonMap {
|
|
407
|
+
path: string;
|
|
408
|
+
filename: string;
|
|
409
|
+
size: number;
|
|
410
|
+
content: Buffer;
|
|
411
|
+
}
|
|
412
|
+
interface VolumeFileUploadRequest extends JsonMap {
|
|
413
|
+
path: string;
|
|
414
|
+
overwrite?: boolean;
|
|
415
|
+
filePath?: string;
|
|
416
|
+
fileContent?: Buffer | string;
|
|
417
|
+
filename?: string;
|
|
418
|
+
}
|
|
419
|
+
interface VolumeFileListQuery {
|
|
420
|
+
prefix?: string;
|
|
421
|
+
recursive?: boolean;
|
|
422
|
+
limit?: number;
|
|
423
|
+
}
|
|
424
|
+
interface VMVolumeMountRequest extends JsonMap {
|
|
425
|
+
volume_id: string;
|
|
426
|
+
mount_path: string;
|
|
427
|
+
mode?: string;
|
|
428
|
+
checkpoint_id?: string | null;
|
|
429
|
+
}
|
|
430
|
+
interface VMMountedVolumeResponse extends JsonMap {
|
|
431
|
+
volume_id: string;
|
|
432
|
+
mount_path: string;
|
|
433
|
+
mode: string;
|
|
434
|
+
checkpoint_id?: string | null;
|
|
435
|
+
status: string;
|
|
436
|
+
}
|
|
373
437
|
interface ShareCreateRequest extends JsonMap {
|
|
374
438
|
session_id?: string | null;
|
|
375
439
|
vm_id?: string | null;
|
|
@@ -397,7 +461,10 @@ interface APIKeyCreateRequest extends JsonMap {
|
|
|
397
461
|
interface APIKey extends JsonMap {
|
|
398
462
|
id?: number;
|
|
399
463
|
description?: string | null;
|
|
464
|
+
/** @deprecated Use key_prefix instead */
|
|
400
465
|
prefix?: string;
|
|
466
|
+
key_prefix?: string;
|
|
467
|
+
full_key?: string;
|
|
401
468
|
created_at?: string;
|
|
402
469
|
expires_at?: string | null;
|
|
403
470
|
}
|
|
@@ -451,6 +518,9 @@ declare class VMsManager {
|
|
|
451
518
|
delete(vmId: string): Promise<JsonMap>;
|
|
452
519
|
clone(vmId: string, payload?: VMCloneRequest, wait?: boolean): Promise<JsonMap>;
|
|
453
520
|
snapshot(vmId: string, payload?: VMSnapshotRequest, wait?: boolean): Promise<JsonMap>;
|
|
521
|
+
mountVolume(vmId: string, payload: VMVolumeMountRequest, wait?: boolean): Promise<VMMountedVolumeResponse>;
|
|
522
|
+
listVolumes(vmId: string): Promise<VMMountedVolumeResponse[]>;
|
|
523
|
+
unmountVolume(vmId: string, volumeId: string, mountPath: string, wait?: boolean): Promise<JsonMap>;
|
|
454
524
|
}
|
|
455
525
|
|
|
456
526
|
declare class SnapshotsManager {
|
|
@@ -486,7 +556,7 @@ declare class CustomDomainsManager {
|
|
|
486
556
|
delete(domainId: number): Promise<JsonMap>;
|
|
487
557
|
}
|
|
488
558
|
|
|
489
|
-
type ProxyMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS';
|
|
559
|
+
type ProxyMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
|
490
560
|
declare class ComputerUseManager {
|
|
491
561
|
private httpClient;
|
|
492
562
|
private local;
|
|
@@ -500,6 +570,12 @@ declare class ComputerUseManager {
|
|
|
500
570
|
patch(sessionId: string, path: string, body?: any): Promise<any>;
|
|
501
571
|
delete(sessionId: string, path: string, params?: Record<string, any>): Promise<any>;
|
|
502
572
|
options(sessionId: string, path: string, params?: Record<string, any>): Promise<any>;
|
|
573
|
+
head(sessionId: string, path: string, params?: Record<string, any>): Promise<any>;
|
|
574
|
+
/**
|
|
575
|
+
* Get the VNC WebSocket URL for a computer-use session.
|
|
576
|
+
* Returns the URL to connect to; the actual connection requires a WebSocket client.
|
|
577
|
+
*/
|
|
578
|
+
vncWebsockify(sessionId: string): Promise<JsonMap>;
|
|
503
579
|
}
|
|
504
580
|
|
|
505
581
|
declare class APIKeysManager {
|
|
@@ -541,6 +617,25 @@ declare class WebhooksManager {
|
|
|
541
617
|
replayDelivery(deliveryId: string): Promise<JsonMap>;
|
|
542
618
|
}
|
|
543
619
|
|
|
620
|
+
declare class VolumesManager {
|
|
621
|
+
private httpClient;
|
|
622
|
+
private local;
|
|
623
|
+
constructor(httpClient: HTTPClient, local?: boolean);
|
|
624
|
+
private ensureCloud;
|
|
625
|
+
create(payload: VolumeCreateRequest): Promise<VolumeResponse>;
|
|
626
|
+
list(refreshUsage?: boolean): Promise<VolumeResponse[]>;
|
|
627
|
+
get(volumeId: string, refreshUsage?: boolean): Promise<VolumeResponse>;
|
|
628
|
+
update(volumeId: string, payload: VolumeUpdateRequest): Promise<VolumeResponse>;
|
|
629
|
+
delete(volumeId: string): Promise<JsonMap>;
|
|
630
|
+
createCheckpoint(volumeId: string, payload?: VolumeCheckpointCreateRequest): Promise<VolumeCheckpointResponse>;
|
|
631
|
+
listCheckpoints(volumeId: string): Promise<VolumeCheckpointResponse[]>;
|
|
632
|
+
deleteCheckpoint(volumeId: string, checkpointId: string): Promise<JsonMap>;
|
|
633
|
+
uploadFile(volumeId: string, payload: VolumeFileUploadRequest): Promise<VolumeFileEntry>;
|
|
634
|
+
downloadFile(volumeId: string, path: string): Promise<VolumeFileDownloadResponse>;
|
|
635
|
+
listFiles(volumeId: string, options?: VolumeFileListQuery): Promise<VolumeFileEntry[]>;
|
|
636
|
+
deleteFile(volumeId: string, targetPath: string): Promise<JsonMap>;
|
|
637
|
+
}
|
|
638
|
+
|
|
544
639
|
interface ExecuteOptions {
|
|
545
640
|
language?: 'python' | 'bash';
|
|
546
641
|
timeout?: number;
|
|
@@ -661,6 +756,7 @@ declare class InstaVM {
|
|
|
661
756
|
readonly apiKeys: APIKeysManager;
|
|
662
757
|
readonly audit: AuditManager;
|
|
663
758
|
readonly webhooks: WebhooksManager;
|
|
759
|
+
readonly volumes: VolumesManager;
|
|
664
760
|
readonly local: boolean;
|
|
665
761
|
private readonly timeout;
|
|
666
762
|
readonly memory_mb?: number;
|
|
@@ -715,6 +811,23 @@ declare class InstaVM {
|
|
|
715
811
|
* @returns true if session is active, false otherwise
|
|
716
812
|
*/
|
|
717
813
|
isSessionActive(sessionId?: string): Promise<boolean>;
|
|
814
|
+
/**
|
|
815
|
+
* Get the app URL for a session
|
|
816
|
+
*
|
|
817
|
+
* @param sessionId - Session ID (uses current session if not provided)
|
|
818
|
+
* @param port - Port to expose (1-65535, default: 80)
|
|
819
|
+
*/
|
|
820
|
+
getSessionAppUrl(sessionId?: string, port?: number): Promise<Record<string, any>>;
|
|
821
|
+
/**
|
|
822
|
+
* List sandbox records with optional filtering
|
|
823
|
+
*
|
|
824
|
+
* @param options.metadata - JSON-serializable metadata filters
|
|
825
|
+
* @param options.limit - Maximum number of results (1-1000, default: 100)
|
|
826
|
+
*/
|
|
827
|
+
listSandboxes(options?: {
|
|
828
|
+
metadata?: Record<string, any>;
|
|
829
|
+
limit?: number;
|
|
830
|
+
}): Promise<Record<string, any>[]>;
|
|
718
831
|
/**
|
|
719
832
|
* Get usage statistics for a session
|
|
720
833
|
*/
|
|
@@ -877,4 +990,4 @@ declare class UnsupportedOperationError extends InstaVMError {
|
|
|
877
990
|
constructor(message?: string, options?: any);
|
|
878
991
|
}
|
|
879
992
|
|
|
880
|
-
export { type APIKey, type APIKeyCreateRequest, APIKeysManager, type ApiResponse, type AsyncExecutionResult, type AuditEventQuery, AuditManager, AuthenticationError, BrowserError, BrowserInteractionError, BrowserManager, BrowserNavigationError, BrowserSession, BrowserSessionError, type BrowserSessionInfo, type BrowserSessionOptions, BrowserTimeoutError, type ClickOptions, ComputerUseManager, type ComputerUseProxyOptions, type ContentAnchor, type CustomDomainCreateRequest, CustomDomainsManager, type DownloadOptions, type DownloadResult, type EgressPolicy, type EgressPolicyOptions, ElementNotFoundError, type ExecuteOptions, ExecutionError, type ExecutionResult, type ExtractContentOptions, type ExtractOptions, type ExtractedContent, type ExtractedElement, type FileUpload, type FillOptions, type HttpClientConfig, InstaVM, InstaVMError, type InstaVMOptions, type InteractiveElement, type JsonMap, type NavigateOptions, type NavigationResult, NetworkError, QuotaExceededError, RateLimitError, type RequestConfig, type RetryConfig, type SSHKey, type ScreenshotOptions, type ScrollOptions, SessionError, type ShareCreateRequest, type ShareUpdateRequest, SharesManager, type SnapshotBuildArgs, type SnapshotCreateRequest, type SnapshotQueryOptions, SnapshotsManager, type TypeOptions, UnsupportedOperationError, type UploadOptions, type UploadResult, type UsageStats, type VMCloneRequest, type VMCreateRequest, type VMSnapshotRequest, type VMUpdateRequest, VMsManager, type WaitCondition, type WebhookDeliveryQuery, type WebhookEndpointCreateRequest, type WebhookEndpointUpdateRequest, WebhooksManager };
|
|
993
|
+
export { type APIKey, type APIKeyCreateRequest, APIKeysManager, type ApiResponse, type AsyncExecutionResult, type AuditEventQuery, AuditManager, AuthenticationError, BrowserError, BrowserInteractionError, BrowserManager, BrowserNavigationError, BrowserSession, BrowserSessionError, type BrowserSessionInfo, type BrowserSessionOptions, BrowserTimeoutError, type ClickOptions, ComputerUseManager, type ComputerUseProxyOptions, type ContentAnchor, type CustomDomainCreateRequest, CustomDomainsManager, type DownloadOptions, type DownloadResult, type EgressPolicy, type EgressPolicyOptions, ElementNotFoundError, type ExecuteOptions, ExecutionError, type ExecutionResult, type ExtractContentOptions, type ExtractOptions, type ExtractedContent, type ExtractedElement, type FileUpload, type FillOptions, type HttpClientConfig, InstaVM, InstaVMError, type InstaVMOptions, type InteractiveElement, type JsonMap, type NavigateOptions, type NavigationResult, NetworkError, QuotaExceededError, RateLimitError, type RequestConfig, type RetryConfig, type SSHKey, type ScreenshotOptions, type ScrollOptions, SessionError, type ShareCreateRequest, type ShareUpdateRequest, SharesManager, type SnapshotBuildArgs, type SnapshotCreateRequest, type SnapshotQueryOptions, SnapshotsManager, type TypeOptions, UnsupportedOperationError, type UploadOptions, type UploadResult, type UsageStats, type VMCloneRequest, type VMCreateRequest, type VMMountedVolumeResponse, type VMSnapshotRequest, type VMUpdateRequest, type VMVolumeMountRequest, VMsManager, type VolumeCheckpointCreateRequest, type VolumeCheckpointResponse, type VolumeCreateRequest, type VolumeFileDownloadResponse, type VolumeFileEntry, type VolumeFileListQuery, type VolumeFileUploadRequest, type VolumeResponse, type VolumeUpdateRequest, VolumesManager, type WaitCondition, type WebhookDeliveryQuery, type WebhookEndpointCreateRequest, type WebhookEndpointUpdateRequest, WebhooksManager };
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ interface HttpClientConfig {
|
|
|
15
15
|
apiKey: string;
|
|
16
16
|
}
|
|
17
17
|
interface RequestConfig {
|
|
18
|
-
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS';
|
|
18
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS' | 'HEAD';
|
|
19
19
|
url: string;
|
|
20
20
|
headers?: Record<string, string>;
|
|
21
21
|
data?: any;
|
|
@@ -336,6 +336,7 @@ interface VMCreateRequest extends JsonMap {
|
|
|
336
336
|
share?: JsonMap | null;
|
|
337
337
|
custom_domain?: JsonMap | null;
|
|
338
338
|
image_variant?: string | null;
|
|
339
|
+
volumes?: VMVolumeMountRequest[] | null;
|
|
339
340
|
}
|
|
340
341
|
interface VMUpdateRequest extends JsonMap {
|
|
341
342
|
memory_mb?: number | null;
|
|
@@ -370,6 +371,69 @@ interface SnapshotCreateRequest extends JsonMap {
|
|
|
370
371
|
interface SnapshotQueryOptions {
|
|
371
372
|
type?: 'user' | 'system';
|
|
372
373
|
}
|
|
374
|
+
interface VolumeCreateRequest extends JsonMap {
|
|
375
|
+
name: string;
|
|
376
|
+
quota_bytes: number;
|
|
377
|
+
}
|
|
378
|
+
interface VolumeUpdateRequest extends JsonMap {
|
|
379
|
+
name?: string | null;
|
|
380
|
+
quota_bytes?: number | null;
|
|
381
|
+
}
|
|
382
|
+
interface VolumeResponse extends JsonMap {
|
|
383
|
+
id: string;
|
|
384
|
+
name: string;
|
|
385
|
+
quota_bytes: number;
|
|
386
|
+
used_bytes: number;
|
|
387
|
+
status: string;
|
|
388
|
+
created_at?: string | null;
|
|
389
|
+
updated_at?: string | null;
|
|
390
|
+
}
|
|
391
|
+
interface VolumeCheckpointCreateRequest extends JsonMap {
|
|
392
|
+
name?: string | null;
|
|
393
|
+
}
|
|
394
|
+
interface VolumeCheckpointResponse extends JsonMap {
|
|
395
|
+
id: string;
|
|
396
|
+
volume_id: string;
|
|
397
|
+
name?: string | null;
|
|
398
|
+
status: string;
|
|
399
|
+
created_at?: string | null;
|
|
400
|
+
}
|
|
401
|
+
interface VolumeFileEntry extends JsonMap {
|
|
402
|
+
path: string;
|
|
403
|
+
filename: string;
|
|
404
|
+
size: number;
|
|
405
|
+
}
|
|
406
|
+
interface VolumeFileDownloadResponse extends JsonMap {
|
|
407
|
+
path: string;
|
|
408
|
+
filename: string;
|
|
409
|
+
size: number;
|
|
410
|
+
content: Buffer;
|
|
411
|
+
}
|
|
412
|
+
interface VolumeFileUploadRequest extends JsonMap {
|
|
413
|
+
path: string;
|
|
414
|
+
overwrite?: boolean;
|
|
415
|
+
filePath?: string;
|
|
416
|
+
fileContent?: Buffer | string;
|
|
417
|
+
filename?: string;
|
|
418
|
+
}
|
|
419
|
+
interface VolumeFileListQuery {
|
|
420
|
+
prefix?: string;
|
|
421
|
+
recursive?: boolean;
|
|
422
|
+
limit?: number;
|
|
423
|
+
}
|
|
424
|
+
interface VMVolumeMountRequest extends JsonMap {
|
|
425
|
+
volume_id: string;
|
|
426
|
+
mount_path: string;
|
|
427
|
+
mode?: string;
|
|
428
|
+
checkpoint_id?: string | null;
|
|
429
|
+
}
|
|
430
|
+
interface VMMountedVolumeResponse extends JsonMap {
|
|
431
|
+
volume_id: string;
|
|
432
|
+
mount_path: string;
|
|
433
|
+
mode: string;
|
|
434
|
+
checkpoint_id?: string | null;
|
|
435
|
+
status: string;
|
|
436
|
+
}
|
|
373
437
|
interface ShareCreateRequest extends JsonMap {
|
|
374
438
|
session_id?: string | null;
|
|
375
439
|
vm_id?: string | null;
|
|
@@ -397,7 +461,10 @@ interface APIKeyCreateRequest extends JsonMap {
|
|
|
397
461
|
interface APIKey extends JsonMap {
|
|
398
462
|
id?: number;
|
|
399
463
|
description?: string | null;
|
|
464
|
+
/** @deprecated Use key_prefix instead */
|
|
400
465
|
prefix?: string;
|
|
466
|
+
key_prefix?: string;
|
|
467
|
+
full_key?: string;
|
|
401
468
|
created_at?: string;
|
|
402
469
|
expires_at?: string | null;
|
|
403
470
|
}
|
|
@@ -451,6 +518,9 @@ declare class VMsManager {
|
|
|
451
518
|
delete(vmId: string): Promise<JsonMap>;
|
|
452
519
|
clone(vmId: string, payload?: VMCloneRequest, wait?: boolean): Promise<JsonMap>;
|
|
453
520
|
snapshot(vmId: string, payload?: VMSnapshotRequest, wait?: boolean): Promise<JsonMap>;
|
|
521
|
+
mountVolume(vmId: string, payload: VMVolumeMountRequest, wait?: boolean): Promise<VMMountedVolumeResponse>;
|
|
522
|
+
listVolumes(vmId: string): Promise<VMMountedVolumeResponse[]>;
|
|
523
|
+
unmountVolume(vmId: string, volumeId: string, mountPath: string, wait?: boolean): Promise<JsonMap>;
|
|
454
524
|
}
|
|
455
525
|
|
|
456
526
|
declare class SnapshotsManager {
|
|
@@ -486,7 +556,7 @@ declare class CustomDomainsManager {
|
|
|
486
556
|
delete(domainId: number): Promise<JsonMap>;
|
|
487
557
|
}
|
|
488
558
|
|
|
489
|
-
type ProxyMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS';
|
|
559
|
+
type ProxyMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
|
490
560
|
declare class ComputerUseManager {
|
|
491
561
|
private httpClient;
|
|
492
562
|
private local;
|
|
@@ -500,6 +570,12 @@ declare class ComputerUseManager {
|
|
|
500
570
|
patch(sessionId: string, path: string, body?: any): Promise<any>;
|
|
501
571
|
delete(sessionId: string, path: string, params?: Record<string, any>): Promise<any>;
|
|
502
572
|
options(sessionId: string, path: string, params?: Record<string, any>): Promise<any>;
|
|
573
|
+
head(sessionId: string, path: string, params?: Record<string, any>): Promise<any>;
|
|
574
|
+
/**
|
|
575
|
+
* Get the VNC WebSocket URL for a computer-use session.
|
|
576
|
+
* Returns the URL to connect to; the actual connection requires a WebSocket client.
|
|
577
|
+
*/
|
|
578
|
+
vncWebsockify(sessionId: string): Promise<JsonMap>;
|
|
503
579
|
}
|
|
504
580
|
|
|
505
581
|
declare class APIKeysManager {
|
|
@@ -541,6 +617,25 @@ declare class WebhooksManager {
|
|
|
541
617
|
replayDelivery(deliveryId: string): Promise<JsonMap>;
|
|
542
618
|
}
|
|
543
619
|
|
|
620
|
+
declare class VolumesManager {
|
|
621
|
+
private httpClient;
|
|
622
|
+
private local;
|
|
623
|
+
constructor(httpClient: HTTPClient, local?: boolean);
|
|
624
|
+
private ensureCloud;
|
|
625
|
+
create(payload: VolumeCreateRequest): Promise<VolumeResponse>;
|
|
626
|
+
list(refreshUsage?: boolean): Promise<VolumeResponse[]>;
|
|
627
|
+
get(volumeId: string, refreshUsage?: boolean): Promise<VolumeResponse>;
|
|
628
|
+
update(volumeId: string, payload: VolumeUpdateRequest): Promise<VolumeResponse>;
|
|
629
|
+
delete(volumeId: string): Promise<JsonMap>;
|
|
630
|
+
createCheckpoint(volumeId: string, payload?: VolumeCheckpointCreateRequest): Promise<VolumeCheckpointResponse>;
|
|
631
|
+
listCheckpoints(volumeId: string): Promise<VolumeCheckpointResponse[]>;
|
|
632
|
+
deleteCheckpoint(volumeId: string, checkpointId: string): Promise<JsonMap>;
|
|
633
|
+
uploadFile(volumeId: string, payload: VolumeFileUploadRequest): Promise<VolumeFileEntry>;
|
|
634
|
+
downloadFile(volumeId: string, path: string): Promise<VolumeFileDownloadResponse>;
|
|
635
|
+
listFiles(volumeId: string, options?: VolumeFileListQuery): Promise<VolumeFileEntry[]>;
|
|
636
|
+
deleteFile(volumeId: string, targetPath: string): Promise<JsonMap>;
|
|
637
|
+
}
|
|
638
|
+
|
|
544
639
|
interface ExecuteOptions {
|
|
545
640
|
language?: 'python' | 'bash';
|
|
546
641
|
timeout?: number;
|
|
@@ -661,6 +756,7 @@ declare class InstaVM {
|
|
|
661
756
|
readonly apiKeys: APIKeysManager;
|
|
662
757
|
readonly audit: AuditManager;
|
|
663
758
|
readonly webhooks: WebhooksManager;
|
|
759
|
+
readonly volumes: VolumesManager;
|
|
664
760
|
readonly local: boolean;
|
|
665
761
|
private readonly timeout;
|
|
666
762
|
readonly memory_mb?: number;
|
|
@@ -715,6 +811,23 @@ declare class InstaVM {
|
|
|
715
811
|
* @returns true if session is active, false otherwise
|
|
716
812
|
*/
|
|
717
813
|
isSessionActive(sessionId?: string): Promise<boolean>;
|
|
814
|
+
/**
|
|
815
|
+
* Get the app URL for a session
|
|
816
|
+
*
|
|
817
|
+
* @param sessionId - Session ID (uses current session if not provided)
|
|
818
|
+
* @param port - Port to expose (1-65535, default: 80)
|
|
819
|
+
*/
|
|
820
|
+
getSessionAppUrl(sessionId?: string, port?: number): Promise<Record<string, any>>;
|
|
821
|
+
/**
|
|
822
|
+
* List sandbox records with optional filtering
|
|
823
|
+
*
|
|
824
|
+
* @param options.metadata - JSON-serializable metadata filters
|
|
825
|
+
* @param options.limit - Maximum number of results (1-1000, default: 100)
|
|
826
|
+
*/
|
|
827
|
+
listSandboxes(options?: {
|
|
828
|
+
metadata?: Record<string, any>;
|
|
829
|
+
limit?: number;
|
|
830
|
+
}): Promise<Record<string, any>[]>;
|
|
718
831
|
/**
|
|
719
832
|
* Get usage statistics for a session
|
|
720
833
|
*/
|
|
@@ -877,4 +990,4 @@ declare class UnsupportedOperationError extends InstaVMError {
|
|
|
877
990
|
constructor(message?: string, options?: any);
|
|
878
991
|
}
|
|
879
992
|
|
|
880
|
-
export { type APIKey, type APIKeyCreateRequest, APIKeysManager, type ApiResponse, type AsyncExecutionResult, type AuditEventQuery, AuditManager, AuthenticationError, BrowserError, BrowserInteractionError, BrowserManager, BrowserNavigationError, BrowserSession, BrowserSessionError, type BrowserSessionInfo, type BrowserSessionOptions, BrowserTimeoutError, type ClickOptions, ComputerUseManager, type ComputerUseProxyOptions, type ContentAnchor, type CustomDomainCreateRequest, CustomDomainsManager, type DownloadOptions, type DownloadResult, type EgressPolicy, type EgressPolicyOptions, ElementNotFoundError, type ExecuteOptions, ExecutionError, type ExecutionResult, type ExtractContentOptions, type ExtractOptions, type ExtractedContent, type ExtractedElement, type FileUpload, type FillOptions, type HttpClientConfig, InstaVM, InstaVMError, type InstaVMOptions, type InteractiveElement, type JsonMap, type NavigateOptions, type NavigationResult, NetworkError, QuotaExceededError, RateLimitError, type RequestConfig, type RetryConfig, type SSHKey, type ScreenshotOptions, type ScrollOptions, SessionError, type ShareCreateRequest, type ShareUpdateRequest, SharesManager, type SnapshotBuildArgs, type SnapshotCreateRequest, type SnapshotQueryOptions, SnapshotsManager, type TypeOptions, UnsupportedOperationError, type UploadOptions, type UploadResult, type UsageStats, type VMCloneRequest, type VMCreateRequest, type VMSnapshotRequest, type VMUpdateRequest, VMsManager, type WaitCondition, type WebhookDeliveryQuery, type WebhookEndpointCreateRequest, type WebhookEndpointUpdateRequest, WebhooksManager };
|
|
993
|
+
export { type APIKey, type APIKeyCreateRequest, APIKeysManager, type ApiResponse, type AsyncExecutionResult, type AuditEventQuery, AuditManager, AuthenticationError, BrowserError, BrowserInteractionError, BrowserManager, BrowserNavigationError, BrowserSession, BrowserSessionError, type BrowserSessionInfo, type BrowserSessionOptions, BrowserTimeoutError, type ClickOptions, ComputerUseManager, type ComputerUseProxyOptions, type ContentAnchor, type CustomDomainCreateRequest, CustomDomainsManager, type DownloadOptions, type DownloadResult, type EgressPolicy, type EgressPolicyOptions, ElementNotFoundError, type ExecuteOptions, ExecutionError, type ExecutionResult, type ExtractContentOptions, type ExtractOptions, type ExtractedContent, type ExtractedElement, type FileUpload, type FillOptions, type HttpClientConfig, InstaVM, InstaVMError, type InstaVMOptions, type InteractiveElement, type JsonMap, type NavigateOptions, type NavigationResult, NetworkError, QuotaExceededError, RateLimitError, type RequestConfig, type RetryConfig, type SSHKey, type ScreenshotOptions, type ScrollOptions, SessionError, type ShareCreateRequest, type ShareUpdateRequest, SharesManager, type SnapshotBuildArgs, type SnapshotCreateRequest, type SnapshotQueryOptions, SnapshotsManager, type TypeOptions, UnsupportedOperationError, type UploadOptions, type UploadResult, type UsageStats, type VMCloneRequest, type VMCreateRequest, type VMMountedVolumeResponse, type VMSnapshotRequest, type VMUpdateRequest, type VMVolumeMountRequest, VMsManager, type VolumeCheckpointCreateRequest, type VolumeCheckpointResponse, type VolumeCreateRequest, type VolumeFileDownloadResponse, type VolumeFileEntry, type VolumeFileListQuery, type VolumeFileUploadRequest, type VolumeResponse, type VolumeUpdateRequest, VolumesManager, type WaitCondition, type WebhookDeliveryQuery, type WebhookEndpointCreateRequest, type WebhookEndpointUpdateRequest, WebhooksManager };
|