@sylphx/sdk 0.28.0 → 0.30.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.
Files changed (101) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +30 -118
  3. package/dist/access.d.ts +659 -0
  4. package/dist/access.js +638 -0
  5. package/dist/access.js.map +1 -0
  6. package/dist/ai.d.ts +176 -0
  7. package/dist/ai.js +112 -0
  8. package/dist/ai.js.map +1 -0
  9. package/dist/artifacts.d.ts +165 -0
  10. package/dist/artifacts.js +129 -0
  11. package/dist/artifacts.js.map +1 -0
  12. package/dist/auth.d.ts +896 -0
  13. package/dist/auth.js +828 -0
  14. package/dist/auth.js.map +1 -0
  15. package/dist/billing.d.ts +758 -0
  16. package/dist/billing.js +553 -0
  17. package/dist/billing.js.map +1 -0
  18. package/dist/broker.d.ts +226 -0
  19. package/dist/broker.js +187 -0
  20. package/dist/broker.js.map +1 -0
  21. package/dist/build.d.ts +313 -0
  22. package/dist/build.js +271 -0
  23. package/dist/build.js.map +1 -0
  24. package/dist/common.d.ts +162 -0
  25. package/dist/common.js +41 -0
  26. package/dist/common.js.map +1 -0
  27. package/dist/config.d.ts +198 -0
  28. package/dist/config.js +168 -0
  29. package/dist/config.js.map +1 -0
  30. package/dist/connections.d.ts +354 -0
  31. package/dist/connections.js +313 -0
  32. package/dist/connections.js.map +1 -0
  33. package/dist/data.d.ts +858 -0
  34. package/dist/data.js +814 -0
  35. package/dist/data.js.map +1 -0
  36. package/dist/entitlement.d.ts +172 -0
  37. package/dist/entitlement.js +116 -0
  38. package/dist/entitlement.js.map +1 -0
  39. package/dist/events.d.ts +1324 -0
  40. package/dist/events.js +1227 -0
  41. package/dist/events.js.map +1 -0
  42. package/dist/hosting.d.ts +709 -0
  43. package/dist/hosting.js +611 -0
  44. package/dist/hosting.js.map +1 -0
  45. package/dist/index.d.ts +79 -33656
  46. package/dist/index.js +113 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/keys.d.ts +438 -0
  49. package/dist/keys.js +406 -0
  50. package/dist/keys.js.map +1 -0
  51. package/dist/methods.d.ts +2 -0
  52. package/dist/methods.js +3995 -0
  53. package/dist/methods.js.map +1 -0
  54. package/dist/network.d.ts +733 -0
  55. package/dist/network.js +711 -0
  56. package/dist/network.js.map +1 -0
  57. package/dist/notify.d.ts +1359 -0
  58. package/dist/notify.js +1282 -0
  59. package/dist/notify.js.map +1 -0
  60. package/dist/observability.d.ts +509 -0
  61. package/dist/observability.js +437 -0
  62. package/dist/observability.js.map +1 -0
  63. package/dist/release.d.ts +303 -0
  64. package/dist/release.js +214 -0
  65. package/dist/release.js.map +1 -0
  66. package/dist/runners.d.ts +262 -0
  67. package/dist/runners.js +238 -0
  68. package/dist/runners.js.map +1 -0
  69. package/dist/runtime.d.ts +88 -0
  70. package/dist/runtime.js +226 -0
  71. package/dist/runtime.js.map +1 -0
  72. package/dist/sandboxes.d.ts +1705 -0
  73. package/dist/sandboxes.js +1226 -0
  74. package/dist/sandboxes.js.map +1 -0
  75. package/dist/secrets.d.ts +508 -0
  76. package/dist/secrets.js +474 -0
  77. package/dist/secrets.js.map +1 -0
  78. package/dist/workflows.d.ts +678 -0
  79. package/dist/workflows.js +595 -0
  80. package/dist/workflows.js.map +1 -0
  81. package/package.json +33 -112
  82. package/dist/connect.d.ts +0 -2838
  83. package/dist/connect.mjs +0 -220
  84. package/dist/connect.mjs.map +0 -1
  85. package/dist/health/index.d.ts +0 -1394
  86. package/dist/health/index.mjs +0 -1394
  87. package/dist/health/index.mjs.map +0 -1
  88. package/dist/index.mjs +0 -38429
  89. package/dist/index.mjs.map +0 -1
  90. package/dist/nextjs/index.d.ts +0 -724
  91. package/dist/nextjs/index.mjs +0 -3332
  92. package/dist/nextjs/index.mjs.map +0 -1
  93. package/dist/react/index.d.ts +0 -13066
  94. package/dist/react/index.mjs +0 -35329
  95. package/dist/react/index.mjs.map +0 -1
  96. package/dist/server/index.d.ts +0 -2000
  97. package/dist/server/index.mjs +0 -3446
  98. package/dist/server/index.mjs.map +0 -1
  99. package/dist/web-analytics.d.ts +0 -90
  100. package/dist/web-analytics.mjs +0 -225
  101. package/dist/web-analytics.mjs.map +0 -1
@@ -0,0 +1,1226 @@
1
+ // @generated by sylphx-gen 0.1.0 from contracts@cdf6473b36ca648759a7f4b1fc21554541d52a947477e6e9d1d7a6a9a79bdaa0. Do not edit.
2
+ // `sylphx.sandboxes.v1`.
3
+ import * as runtime from './runtime.js';
4
+ import './common.js';
5
+ runtime.registerSchemas({
6
+ 'sylphx.sandboxes.v1.AcquireLeaseControlRequest': [
7
+ ['holderLabel', 'holder_label'],
8
+ ],
9
+ 'sylphx.sandboxes.v1.AcquireLeaseControlResponse': [
10
+ ['control', 'control', 'sylphx.sandboxes.v1.ControlState'],
11
+ ['stream', 'stream', 'sylphx.sandboxes.v1.StreamSession'],
12
+ ],
13
+ 'sylphx.sandboxes.v1.ActLeaseRequest': [
14
+ ['actions', 'actions', 'sylphx.sandboxes.v1.ComputerAction'],
15
+ ['screenshot', 'screenshot', 'sylphx.sandboxes.v1.ScreenshotOptions'],
16
+ ['leaseGeneration', 'lease_generation'],
17
+ ['controlEpoch', 'control_epoch'],
18
+ ],
19
+ 'sylphx.sandboxes.v1.ActLeaseResponse': [
20
+ ['results', 'results', 'sylphx.sandboxes.v1.ActionResult'],
21
+ ['screenshot', 'screenshot', 'sylphx.sandboxes.v1.Screenshot'],
22
+ ['leaseGeneration', 'lease_generation'],
23
+ ['control', 'control', 'sylphx.sandboxes.v1.ControlState'],
24
+ ],
25
+ 'sylphx.sandboxes.v1.ActionResult': [
26
+ ['cursor', 'cursor', 'sylphx.sandboxes.v1.Point'],
27
+ ['image', 'image', 'sylphx.sandboxes.v1.Screenshot'],
28
+ ],
29
+ 'sylphx.sandboxes.v1.BrowserSpec': [
30
+ ['userDataDir', 'user_data_dir'],
31
+ ['startUrl', 'start_url'],
32
+ ],
33
+ 'sylphx.sandboxes.v1.ButtonAction': [
34
+ ['position', 'position', 'sylphx.sandboxes.v1.Point'],
35
+ ],
36
+ 'sylphx.sandboxes.v1.ClickAction': [
37
+ ['position', 'position', 'sylphx.sandboxes.v1.Point'],
38
+ ],
39
+ 'sylphx.sandboxes.v1.CloseLeasePortRequest': [],
40
+ 'sylphx.sandboxes.v1.ComputerAction': [
41
+ ['takeScreenshot', 'take_screenshot', 'sylphx.sandboxes.v1.ScreenshotAction'],
42
+ ['zoom', 'zoom', 'sylphx.sandboxes.v1.ZoomAction'],
43
+ ['move', 'move', 'sylphx.sandboxes.v1.PointerMove'],
44
+ ['click', 'click', 'sylphx.sandboxes.v1.ClickAction'],
45
+ ['mouseDown', 'mouse_down', 'sylphx.sandboxes.v1.ButtonAction'],
46
+ ['mouseUp', 'mouse_up', 'sylphx.sandboxes.v1.ButtonAction'],
47
+ ['drag', 'drag', 'sylphx.sandboxes.v1.DragAction'],
48
+ ['scroll', 'scroll', 'sylphx.sandboxes.v1.ScrollAction'],
49
+ ['key', 'key', 'sylphx.sandboxes.v1.KeyAction'],
50
+ ['holdKey', 'hold_key', 'sylphx.sandboxes.v1.HoldKeyAction'],
51
+ ['type', 'type', 'sylphx.sandboxes.v1.TypeAction'],
52
+ ['cursorPosition', 'cursor_position', 'sylphx.sandboxes.v1.CursorPositionAction'],
53
+ ['wait', 'wait', 'sylphx.sandboxes.v1.WaitAction'],
54
+ ],
55
+ 'sylphx.sandboxes.v1.ControlState': [
56
+ ['holderLabel', 'holder_label'],
57
+ ['acquireTime', 'acquire_time'],
58
+ ['expireTime', 'expire_time'],
59
+ ],
60
+ 'sylphx.sandboxes.v1.CreateLeaseRequest': [
61
+ ['lease', 'lease', 'sylphx.sandboxes.v1.Lease'],
62
+ ['leaseId', 'lease_id'],
63
+ ['validateOnly', 'validate_only'],
64
+ ['skipWaitReady', 'skip_wait_ready'],
65
+ ],
66
+ 'sylphx.sandboxes.v1.CreatePoolRequest': [
67
+ ['pool', 'pool', 'sylphx.sandboxes.v1.Pool'],
68
+ ['poolId', 'pool_id'],
69
+ ['validateOnly', 'validate_only'],
70
+ ],
71
+ 'sylphx.sandboxes.v1.CreateSnapshotRequest': [
72
+ ['snapshot', 'snapshot', 'sylphx.sandboxes.v1.Snapshot'],
73
+ ['snapshotId', 'snapshot_id'],
74
+ ['validateOnly', 'validate_only'],
75
+ ],
76
+ 'sylphx.sandboxes.v1.CreateVolumeRequest': [
77
+ ['volume', 'volume', 'sylphx.sandboxes.v1.Volume'],
78
+ ['volumeId', 'volume_id'],
79
+ ['validateOnly', 'validate_only'],
80
+ ],
81
+ 'sylphx.sandboxes.v1.CursorPositionAction': [],
82
+ 'sylphx.sandboxes.v1.DeletePoolRequest': [
83
+ ['allowMissing', 'allow_missing'],
84
+ ['validateOnly', 'validate_only'],
85
+ ],
86
+ 'sylphx.sandboxes.v1.DeleteSnapshotRequest': [
87
+ ['allowMissing', 'allow_missing'],
88
+ ['validateOnly', 'validate_only'],
89
+ ],
90
+ 'sylphx.sandboxes.v1.DeleteVolumeRequest': [
91
+ ['allowMissing', 'allow_missing'],
92
+ ['validateOnly', 'validate_only'],
93
+ ],
94
+ 'sylphx.sandboxes.v1.DisplayInfo': [],
95
+ 'sylphx.sandboxes.v1.DisplaySpec': [],
96
+ 'sylphx.sandboxes.v1.DragAction': [
97
+ ['path', 'path', 'sylphx.sandboxes.v1.Point'],
98
+ ],
99
+ 'sylphx.sandboxes.v1.ExecLeaseRequest': [
100
+ ['workingDirectory', 'working_directory'],
101
+ ['env', 'env', undefined, 'map'],
102
+ ],
103
+ 'sylphx.sandboxes.v1.ExecLeaseResponse': [
104
+ ['exitCode', 'exit_code'],
105
+ ['timedOut', 'timed_out'],
106
+ ],
107
+ 'sylphx.sandboxes.v1.FileEntry': [
108
+ ['sizeBytes', 'size_bytes'],
109
+ ['modifyTime', 'modify_time'],
110
+ ],
111
+ 'sylphx.sandboxes.v1.GetLeaseControlRequest': [],
112
+ 'sylphx.sandboxes.v1.GetLeaseEventRequest': [],
113
+ 'sylphx.sandboxes.v1.GetLeaseRequest': [],
114
+ 'sylphx.sandboxes.v1.GetPoolRequest': [],
115
+ 'sylphx.sandboxes.v1.GetShapeRequest': [],
116
+ 'sylphx.sandboxes.v1.GetSnapshotRequest': [],
117
+ 'sylphx.sandboxes.v1.GetVolumeRequest': [],
118
+ 'sylphx.sandboxes.v1.HoldKeyAction': [],
119
+ 'sylphx.sandboxes.v1.IceServer': [],
120
+ 'sylphx.sandboxes.v1.InstallLeaseAppRequest': [
121
+ ['apkPath', 'apk_path'],
122
+ ['grantPermissions', 'grant_permissions'],
123
+ ],
124
+ 'sylphx.sandboxes.v1.InstallLeaseAppResponse': [
125
+ ['packageName', 'package_name'],
126
+ ],
127
+ 'sylphx.sandboxes.v1.KeyAction': [],
128
+ 'sylphx.sandboxes.v1.Lease': [
129
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
130
+ ['spec', 'spec', 'sylphx.sandboxes.v1.LeaseSpec'],
131
+ ['status', 'status', 'sylphx.sandboxes.v1.LeaseStatus'],
132
+ ],
133
+ 'sylphx.sandboxes.v1.LeaseBudget': [
134
+ ['maxCpuSeconds', 'max_cpu_seconds'],
135
+ ['maxCostMicros', 'max_cost_micros'],
136
+ ],
137
+ 'sylphx.sandboxes.v1.LeaseEndpoints': [
138
+ ['guestUri', 'guest_uri'],
139
+ ['cdpUri', 'cdp_uri'],
140
+ ['e2bSandboxId', 'e2b_sandbox_id'],
141
+ ],
142
+ 'sylphx.sandboxes.v1.LeaseEvent': [
143
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
144
+ ['occurTime', 'occur_time'],
145
+ ['leaseGeneration', 'lease_generation'],
146
+ ['endReason', 'end_reason'],
147
+ ['usage', 'usage', 'sylphx.sandboxes.v1.LeaseUsage'],
148
+ ['control', 'control', 'sylphx.sandboxes.v1.ControlState'],
149
+ ['controlDuration', 'control_duration'],
150
+ ],
151
+ 'sylphx.sandboxes.v1.LeaseNetwork': [
152
+ ['allowedDomains', 'allowed_domains'],
153
+ ['allowedCidrs', 'allowed_cidrs'],
154
+ ['blockedCidrs', 'blocked_cidrs'],
155
+ ],
156
+ 'sylphx.sandboxes.v1.LeasePort': [],
157
+ 'sylphx.sandboxes.v1.LeaseSpec': [
158
+ ['idleTimeout', 'idle_timeout'],
159
+ ['network', 'network', 'sylphx.sandboxes.v1.LeaseNetwork'],
160
+ ['ports', 'ports', 'sylphx.sandboxes.v1.LeasePort'],
161
+ ['env', 'env', undefined, 'map'],
162
+ ['volumes', 'volumes', 'sylphx.sandboxes.v1.VolumeMount'],
163
+ ['budget', 'budget', 'sylphx.sandboxes.v1.LeaseBudget'],
164
+ ['display', 'display', 'sylphx.sandboxes.v1.DisplaySpec'],
165
+ ['browser', 'browser', 'sylphx.sandboxes.v1.BrowserSpec'],
166
+ ['sourceSnapshot', 'source_snapshot'],
167
+ ['webhook', 'webhook', 'sylphx.sandboxes.v1.LeaseWebhook'],
168
+ ],
169
+ 'sylphx.sandboxes.v1.LeaseStatus': [
170
+ ['observedGeneration', 'observed_generation'],
171
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
172
+ ['leaseGeneration', 'lease_generation'],
173
+ ['shortId', 'short_id'],
174
+ ['endpoints', 'endpoints', 'sylphx.sandboxes.v1.LeaseEndpoints'],
175
+ ['endReason', 'end_reason'],
176
+ ['grantTime', 'grant_time'],
177
+ ['readyTime', 'ready_time'],
178
+ ['expireTime', 'expire_time'],
179
+ ['endTime', 'end_time'],
180
+ ['usage', 'usage', 'sylphx.sandboxes.v1.LeaseUsage'],
181
+ ['control', 'control', 'sylphx.sandboxes.v1.ControlState'],
182
+ ['display', 'display', 'sylphx.sandboxes.v1.DisplayInfo'],
183
+ ['network', 'network', 'sylphx.sandboxes.v1.LeaseNetwork'],
184
+ ],
185
+ 'sylphx.sandboxes.v1.LeaseUsage': [
186
+ ['wallSeconds', 'wall_seconds'],
187
+ ['cpuSeconds', 'cpu_seconds'],
188
+ ['costMicros', 'cost_micros'],
189
+ ['measureTime', 'measure_time'],
190
+ ['memoryGibSeconds', 'memory_gib_seconds'],
191
+ ['egressBytes', 'egress_bytes'],
192
+ ['streamSeconds', 'stream_seconds'],
193
+ ],
194
+ 'sylphx.sandboxes.v1.LeaseWebhook': [],
195
+ 'sylphx.sandboxes.v1.ListLeaseEventsRequest': [
196
+ ['pageSize', 'page_size'],
197
+ ['pageToken', 'page_token'],
198
+ ],
199
+ 'sylphx.sandboxes.v1.ListLeaseEventsResponse': [
200
+ ['leaseEvents', 'lease_events', 'sylphx.sandboxes.v1.LeaseEvent'],
201
+ ['nextPageToken', 'next_page_token'],
202
+ ],
203
+ 'sylphx.sandboxes.v1.ListLeaseFilesRequest': [],
204
+ 'sylphx.sandboxes.v1.ListLeaseFilesResponse': [
205
+ ['entries', 'entries', 'sylphx.sandboxes.v1.FileEntry'],
206
+ ],
207
+ 'sylphx.sandboxes.v1.ListLeasesRequest': [
208
+ ['pageSize', 'page_size'],
209
+ ['pageToken', 'page_token'],
210
+ ['orderBy', 'order_by'],
211
+ ],
212
+ 'sylphx.sandboxes.v1.ListLeasesResponse': [
213
+ ['leases', 'leases', 'sylphx.sandboxes.v1.Lease'],
214
+ ['nextPageToken', 'next_page_token'],
215
+ ],
216
+ 'sylphx.sandboxes.v1.ListPoolsRequest': [
217
+ ['pageSize', 'page_size'],
218
+ ['pageToken', 'page_token'],
219
+ ['orderBy', 'order_by'],
220
+ ],
221
+ 'sylphx.sandboxes.v1.ListPoolsResponse': [
222
+ ['pools', 'pools', 'sylphx.sandboxes.v1.Pool'],
223
+ ['nextPageToken', 'next_page_token'],
224
+ ],
225
+ 'sylphx.sandboxes.v1.ListSandboxShapesRequest': [
226
+ ['pageSize', 'page_size'],
227
+ ['pageToken', 'page_token'],
228
+ ['orderBy', 'order_by'],
229
+ ],
230
+ 'sylphx.sandboxes.v1.ListSandboxShapesResponse': [
231
+ ['sandboxShapes', 'sandbox_shapes', 'sylphx.sandboxes.v1.Shape'],
232
+ ['nextPageToken', 'next_page_token'],
233
+ ],
234
+ 'sylphx.sandboxes.v1.ListSnapshotsRequest': [
235
+ ['pageSize', 'page_size'],
236
+ ['pageToken', 'page_token'],
237
+ ['orderBy', 'order_by'],
238
+ ],
239
+ 'sylphx.sandboxes.v1.ListSnapshotsResponse': [
240
+ ['snapshots', 'snapshots', 'sylphx.sandboxes.v1.Snapshot'],
241
+ ['nextPageToken', 'next_page_token'],
242
+ ],
243
+ 'sylphx.sandboxes.v1.ListVolumesRequest': [
244
+ ['pageSize', 'page_size'],
245
+ ['pageToken', 'page_token'],
246
+ ['orderBy', 'order_by'],
247
+ ],
248
+ 'sylphx.sandboxes.v1.ListVolumesResponse': [
249
+ ['volumes', 'volumes', 'sylphx.sandboxes.v1.Volume'],
250
+ ['nextPageToken', 'next_page_token'],
251
+ ],
252
+ 'sylphx.sandboxes.v1.MintLeaseTokenRequest': [],
253
+ 'sylphx.sandboxes.v1.MintLeaseTokenResponse': [
254
+ ['expireTime', 'expire_time'],
255
+ ],
256
+ 'sylphx.sandboxes.v1.OpenLeasePortRequest': [
257
+ ['port', 'port', 'sylphx.sandboxes.v1.LeasePort'],
258
+ ],
259
+ 'sylphx.sandboxes.v1.OpenLeaseStreamRequest': [],
260
+ 'sylphx.sandboxes.v1.PauseLeaseRequest': [
261
+ ['validateOnly', 'validate_only'],
262
+ ],
263
+ 'sylphx.sandboxes.v1.Point': [],
264
+ 'sylphx.sandboxes.v1.PointerMove': [
265
+ ['position', 'position', 'sylphx.sandboxes.v1.Point'],
266
+ ],
267
+ 'sylphx.sandboxes.v1.Pool': [
268
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
269
+ ['spec', 'spec', 'sylphx.sandboxes.v1.PoolSpec'],
270
+ ['status', 'status', 'sylphx.sandboxes.v1.PoolStatus'],
271
+ ],
272
+ 'sylphx.sandboxes.v1.PoolSpec': [
273
+ ['warm', 'warm', 'sylphx.sandboxes.v1.PoolWarm'],
274
+ ['maxAge', 'max_age'],
275
+ ],
276
+ 'sylphx.sandboxes.v1.PoolStatus': [
277
+ ['observedGeneration', 'observed_generation'],
278
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
279
+ ['warmMachines', 'warm_machines'],
280
+ ['bootingMachines', 'booting_machines'],
281
+ ],
282
+ 'sylphx.sandboxes.v1.PoolWarm': [],
283
+ 'sylphx.sandboxes.v1.ReadLeaseFileRequest': [],
284
+ 'sylphx.sandboxes.v1.ReadLeaseFileResponse': [],
285
+ 'sylphx.sandboxes.v1.Region': [],
286
+ 'sylphx.sandboxes.v1.ReleaseLeaseControlRequest': [],
287
+ 'sylphx.sandboxes.v1.ReleaseLeaseRequest': [
288
+ ['validateOnly', 'validate_only'],
289
+ ],
290
+ 'sylphx.sandboxes.v1.RemoveLeaseFileRequest': [],
291
+ 'sylphx.sandboxes.v1.RemoveLeaseFileResponse': [],
292
+ 'sylphx.sandboxes.v1.RenewLeaseRequest': [
293
+ ['validateOnly', 'validate_only'],
294
+ ],
295
+ 'sylphx.sandboxes.v1.ResumeLeaseRequest': [
296
+ ['validateOnly', 'validate_only'],
297
+ ],
298
+ 'sylphx.sandboxes.v1.Screenshot': [
299
+ ['mediaType', 'media_type'],
300
+ ['displayWidth', 'display_width'],
301
+ ['displayHeight', 'display_height'],
302
+ ['captureTime', 'capture_time'],
303
+ ],
304
+ 'sylphx.sandboxes.v1.ScreenshotAction': [
305
+ ['options', 'options', 'sylphx.sandboxes.v1.ScreenshotOptions'],
306
+ ],
307
+ 'sylphx.sandboxes.v1.ScreenshotOptions': [
308
+ ['maxWidth', 'max_width'],
309
+ ],
310
+ 'sylphx.sandboxes.v1.ScrollAction': [
311
+ ['position', 'position', 'sylphx.sandboxes.v1.Point'],
312
+ ['deltaX', 'delta_x'],
313
+ ['deltaY', 'delta_y'],
314
+ ],
315
+ 'sylphx.sandboxes.v1.SetLeaseNetworkRequest': [
316
+ ['network', 'network', 'sylphx.sandboxes.v1.LeaseNetwork'],
317
+ ],
318
+ 'sylphx.sandboxes.v1.Shape': [
319
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
320
+ ['vcpuCount', 'vcpu_count'],
321
+ ['memoryMib', 'memory_mib'],
322
+ ['diskGib', 'disk_gib'],
323
+ ['minLeaseDuration', 'min_lease_duration'],
324
+ ['maxLeaseDuration', 'max_lease_duration'],
325
+ ['priceMicrosPerSecond', 'price_micros_per_second'],
326
+ ],
327
+ 'sylphx.sandboxes.v1.Snapshot': [
328
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
329
+ ['spec', 'spec', 'sylphx.sandboxes.v1.SnapshotSpec'],
330
+ ['status', 'status', 'sylphx.sandboxes.v1.SnapshotStatus'],
331
+ ],
332
+ 'sylphx.sandboxes.v1.SnapshotSpec': [
333
+ ['sourceLease', 'source_lease'],
334
+ ['includeMemory', 'include_memory'],
335
+ ],
336
+ 'sylphx.sandboxes.v1.SnapshotStatus': [
337
+ ['observedGeneration', 'observed_generation'],
338
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
339
+ ['sizeBytes', 'size_bytes'],
340
+ ['expireTime', 'expire_time'],
341
+ ],
342
+ 'sylphx.sandboxes.v1.StreamSession': [
343
+ ['viewerUri', 'viewer_uri'],
344
+ ['signalingUri', 'signaling_uri'],
345
+ ['iceServers', 'ice_servers', 'sylphx.sandboxes.v1.IceServer'],
346
+ ['vncUri', 'vnc_uri'],
347
+ ['expireTime', 'expire_time'],
348
+ ['leaseGeneration', 'lease_generation'],
349
+ ['controlEpoch', 'control_epoch'],
350
+ ['revokeUri', 'revoke_uri'],
351
+ ],
352
+ 'sylphx.sandboxes.v1.TypeAction': [
353
+ ['keystrokeDelay', 'keystroke_delay'],
354
+ ],
355
+ 'sylphx.sandboxes.v1.UpdatePoolRequest': [
356
+ ['pool', 'pool', 'sylphx.sandboxes.v1.Pool'],
357
+ ['updateMask', 'update_mask'],
358
+ ['allowMissing', 'allow_missing'],
359
+ ['validateOnly', 'validate_only'],
360
+ ],
361
+ 'sylphx.sandboxes.v1.UpdateVolumeRequest': [
362
+ ['volume', 'volume', 'sylphx.sandboxes.v1.Volume'],
363
+ ['updateMask', 'update_mask'],
364
+ ['validateOnly', 'validate_only'],
365
+ ],
366
+ 'sylphx.sandboxes.v1.Volume': [
367
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
368
+ ['spec', 'spec', 'sylphx.sandboxes.v1.VolumeSpec'],
369
+ ['status', 'status', 'sylphx.sandboxes.v1.VolumeStatus'],
370
+ ],
371
+ 'sylphx.sandboxes.v1.VolumeMount': [
372
+ ['mountPath', 'mount_path'],
373
+ ['readOnly', 'read_only'],
374
+ ],
375
+ 'sylphx.sandboxes.v1.VolumeSpec': [
376
+ ['sizeGib', 'size_gib'],
377
+ ],
378
+ 'sylphx.sandboxes.v1.VolumeStatus': [
379
+ ['observedGeneration', 'observed_generation'],
380
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
381
+ ['attachedLease', 'attached_lease'],
382
+ ['attachedGeneration', 'attached_generation'],
383
+ ],
384
+ 'sylphx.sandboxes.v1.WaitAction': [],
385
+ 'sylphx.sandboxes.v1.WriteLeaseFileRequest': [],
386
+ 'sylphx.sandboxes.v1.WriteLeaseFileResponse': [
387
+ ['sizeBytes', 'size_bytes'],
388
+ ],
389
+ 'sylphx.sandboxes.v1.ZoomAction': [
390
+ ['region', 'region', 'sylphx.sandboxes.v1.Region'],
391
+ ['options', 'options', 'sylphx.sandboxes.v1.ScreenshotOptions'],
392
+ ],
393
+ });
394
+ /**
395
+ * SandboxesService is Sylphx Sandboxes: isolated machines leased for a bounded
396
+ * time, granted immediately or refused with a typed reason, and destroyed
397
+ * before anyone else can touch them (docs/specs/one-platform/sandboxes-e2b.md).
398
+ * Every agent-computer surface is here: exec and files, computer actions that
399
+ * map one-to-one onto the Anthropic computer tool and OpenAI computer-use
400
+ * actions and return the post-action screenshot in the same call, CDP, live
401
+ * streams, and human takeover. The streaming guest protocol (E2B envd) is
402
+ * served at `status.endpoints.guest_uri`.
403
+ *
404
+ * Namespace of Sylphx Sandboxes on `Sylphx`.
405
+ */
406
+ export class SandboxesApi {
407
+ /** The `sandbox_shapes` collection. */
408
+ sandboxShapes;
409
+ /** The `pools` collection. */
410
+ pools;
411
+ /** The `leases` collection. */
412
+ leases;
413
+ /** The `lease_events` collection. */
414
+ leaseEvents;
415
+ /** The `volumes` collection. */
416
+ volumes;
417
+ /** The `snapshots` collection. */
418
+ snapshots;
419
+ constructor(client) {
420
+ this.sandboxShapes = new SandboxShapesCollection(client);
421
+ this.pools = new PoolsCollection(client);
422
+ this.leases = new LeasesCollection(client);
423
+ this.leaseEvents = new LeaseEventsCollection(client);
424
+ this.volumes = new VolumesCollection(client);
425
+ this.snapshots = new SnapshotsCollection(client);
426
+ }
427
+ }
428
+ /** `sandbox_shapes` of Sylphx Sandboxes: Resource type `sandboxes.sylphx.com/Shape`. */
429
+ export class SandboxShapesCollection {
430
+ client;
431
+ constructor(client) {
432
+ this.client = client;
433
+ }
434
+ /**
435
+ * Gets a shape.
436
+ *
437
+ * `GET /v1/{name=sandbox_shapes/*}` · permission `sandboxes:read` · effect `read`
438
+ *
439
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
440
+ */
441
+ async get(request) {
442
+ return this.client.call({
443
+ method: 'GET',
444
+ path: `/v1/${runtime.pathParam(request.name, 'sandbox_shapes/*', 'name')}`,
445
+ responseType: 'sylphx.sandboxes.v1.Shape',
446
+ mutation: false,
447
+ });
448
+ }
449
+ /**
450
+ * Lists shapes.
451
+ *
452
+ * `GET /v1/sandbox_shapes` · permission `sandboxes:read` · effect `read`
453
+ *
454
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
455
+ */
456
+ async list(request) {
457
+ return this.client.call({
458
+ method: 'GET',
459
+ path: `/v1/sandbox_shapes`,
460
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
461
+ responseType: 'sylphx.sandboxes.v1.ListSandboxShapesResponse',
462
+ mutation: false,
463
+ });
464
+ }
465
+ /** Every item of every page of `list`. */
466
+ async *listAll(request) {
467
+ let next = request;
468
+ for (;;) {
469
+ const page = await this.list(next);
470
+ yield* page.sandboxShapes ?? [];
471
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
472
+ return;
473
+ next = { ...request, pageToken: page.nextPageToken };
474
+ }
475
+ }
476
+ }
477
+ /** `pools` of Sylphx Sandboxes: Resource type `sandboxes.sylphx.com/Pool`. */
478
+ export class PoolsCollection {
479
+ client;
480
+ constructor(client) {
481
+ this.client = client;
482
+ }
483
+ /**
484
+ * Gets a pool.
485
+ *
486
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/pools/*}` · permission `sandboxes:read` · effect `read`
487
+ *
488
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
489
+ */
490
+ async get(request) {
491
+ return this.client.call({
492
+ method: 'GET',
493
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/pools/*', 'name')}`,
494
+ responseType: 'sylphx.sandboxes.v1.Pool',
495
+ mutation: false,
496
+ });
497
+ }
498
+ /**
499
+ * Lists pools in a environment.
500
+ *
501
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/pools` · permission `sandboxes:read` · effect `read`
502
+ *
503
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
504
+ */
505
+ async list(request) {
506
+ return this.client.call({
507
+ method: 'GET',
508
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/pools`,
509
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
510
+ responseType: 'sylphx.sandboxes.v1.ListPoolsResponse',
511
+ mutation: false,
512
+ });
513
+ }
514
+ /** Every item of every page of `list`. */
515
+ async *listAll(request) {
516
+ let next = request;
517
+ for (;;) {
518
+ const page = await this.list(next);
519
+ yield* page.pools ?? [];
520
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
521
+ return;
522
+ next = { ...request, pageToken: page.nextPageToken };
523
+ }
524
+ }
525
+ /**
526
+ * Creates a pool. The Operation is done when the controller settles it.
527
+ *
528
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/pools` · permission `sandboxes:write` · effect `write`
529
+ *
530
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`.
531
+ */
532
+ async create(request) {
533
+ const operation = await this.client.call({
534
+ method: 'POST',
535
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/pools`,
536
+ query: { pool_id: request.poolId, validate_only: request.validateOnly },
537
+ body: request.pool ?? {},
538
+ bodyType: 'sylphx.sandboxes.v1.Pool',
539
+ responseType: 'sylphx.common.v1.Operation',
540
+ mutation: true,
541
+ });
542
+ return new runtime.Operation(this.client, operation, 'sylphx.sandboxes.v1.Pool');
543
+ }
544
+ /**
545
+ * Updates a pool.
546
+ *
547
+ * `PATCH /v1/{pool.name=orgs/*\/projects/*\/envs/*\/pools/*}` · permission `sandboxes:write` · effect `write`
548
+ *
549
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
550
+ */
551
+ async update(request) {
552
+ const operation = await this.client.call({
553
+ method: 'PATCH',
554
+ path: `/v1/${runtime.pathParam(request.pool?.name, 'orgs/*/projects/*/envs/*/pools/*', 'pool.name')}`,
555
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
556
+ body: request.pool ?? {},
557
+ bodyType: 'sylphx.sandboxes.v1.Pool',
558
+ responseType: 'sylphx.common.v1.Operation',
559
+ mutation: true,
560
+ });
561
+ return new runtime.Operation(this.client, operation, 'sylphx.sandboxes.v1.Pool');
562
+ }
563
+ /**
564
+ * Deletes a pool.
565
+ *
566
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/pools/*}` · permission `sandboxes:write` · effect `destructive`
567
+ *
568
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
569
+ */
570
+ async delete(request) {
571
+ const operation = await this.client.call({
572
+ method: 'DELETE',
573
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/pools/*', 'name')}`,
574
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
575
+ responseType: 'sylphx.common.v1.Operation',
576
+ mutation: true,
577
+ });
578
+ return new runtime.Operation(this.client, operation, undefined);
579
+ }
580
+ }
581
+ /** `leases` of Sylphx Sandboxes: Resource type `sandboxes.sylphx.com/Lease`. */
582
+ export class LeasesCollection {
583
+ client;
584
+ constructor(client) {
585
+ this.client = client;
586
+ }
587
+ /**
588
+ * Gets a lease.
589
+ *
590
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}` · permission `sandboxes:read` · effect `read`
591
+ *
592
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
593
+ */
594
+ async get(request) {
595
+ return this.client.call({
596
+ method: 'GET',
597
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}`,
598
+ responseType: 'sylphx.sandboxes.v1.Lease',
599
+ mutation: false,
600
+ });
601
+ }
602
+ /**
603
+ * Lists leases in a environment. Filter on `meta.labels` (for example
604
+ * `labels.agent = "a_123"`), `status.state`, and `spec.kind`.
605
+ *
606
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/leases` · permission `sandboxes:read` · effect `read`
607
+ *
608
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
609
+ */
610
+ async list(request) {
611
+ return this.client.call({
612
+ method: 'GET',
613
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/leases`,
614
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
615
+ responseType: 'sylphx.sandboxes.v1.ListLeasesResponse',
616
+ mutation: false,
617
+ });
618
+ }
619
+ /** Every item of every page of `list`. */
620
+ async *listAll(request) {
621
+ let next = request;
622
+ for (;;) {
623
+ const page = await this.list(next);
624
+ yield* page.leases ?? [];
625
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
626
+ return;
627
+ next = { ...request, pageToken: page.nextPageToken };
628
+ }
629
+ }
630
+ /**
631
+ * Creates a lease: granted now and returned READY (or GRANTED when
632
+ * `wait_ready` is false), or refused with a typed error. There is no queue.
633
+ *
634
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/leases` · permission `sandboxes:write` · effect `write`
635
+ *
636
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `RESOURCE_NOT_FOUND`, `RESOURCE_IN_USE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `NO_CAPACITY`, `SHAPE_NOT_OFFERED`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`.
637
+ */
638
+ async create(request) {
639
+ return this.client.call({
640
+ method: 'POST',
641
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/leases`,
642
+ query: { lease_id: request.leaseId, validate_only: request.validateOnly, skip_wait_ready: request.skipWaitReady },
643
+ body: request.lease ?? {},
644
+ bodyType: 'sylphx.sandboxes.v1.Lease',
645
+ responseType: 'sylphx.sandboxes.v1.Lease',
646
+ mutation: true,
647
+ });
648
+ }
649
+ /**
650
+ * Extends `expire_time`, never past the shape's longest lease. Does not
651
+ * change the generation.
652
+ *
653
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:renew` · permission `sandboxes:write` · effect `write`
654
+ *
655
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
656
+ */
657
+ async renew(request) {
658
+ return this.client.call({
659
+ method: 'POST',
660
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:renew`,
661
+ body: runtime.omit(request, ['name']),
662
+ bodyType: 'sylphx.sandboxes.v1.RenewLeaseRequest',
663
+ responseType: 'sylphx.sandboxes.v1.Lease',
664
+ mutation: true,
665
+ });
666
+ }
667
+ /**
668
+ * Ends a lease with END_REASON_RELEASED; the machine is destroyed and never
669
+ * leased again, and attached volumes are detached.
670
+ *
671
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:release` · permission `sandboxes:write` · effect `destructive`
672
+ *
673
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
674
+ */
675
+ async release(request) {
676
+ return this.client.call({
677
+ method: 'POST',
678
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:release`,
679
+ body: runtime.omit(request, ['name']),
680
+ bodyType: 'sylphx.sandboxes.v1.ReleaseLeaseRequest',
681
+ responseType: 'sylphx.sandboxes.v1.Lease',
682
+ mutation: true,
683
+ });
684
+ }
685
+ /**
686
+ * Pauses a lease: its disk is kept and its machine destroyed; the
687
+ * generation increases. Process memory is not kept.
688
+ *
689
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:pause` · permission `sandboxes:write` · effect `write`
690
+ *
691
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `UNIMPLEMENTED`.
692
+ */
693
+ async pause(request) {
694
+ return this.client.call({
695
+ method: 'POST',
696
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:pause`,
697
+ body: runtime.omit(request, ['name']),
698
+ bodyType: 'sylphx.sandboxes.v1.PauseLeaseRequest',
699
+ responseType: 'sylphx.sandboxes.v1.Lease',
700
+ mutation: true,
701
+ });
702
+ }
703
+ /**
704
+ * Resumes a paused lease on a machine granted now, or refuses it; the
705
+ * generation increases.
706
+ *
707
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:resume` · permission `sandboxes:write` · effect `write`
708
+ *
709
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `NO_CAPACITY`, `UNIMPLEMENTED`.
710
+ */
711
+ async resume(request) {
712
+ return this.client.call({
713
+ method: 'POST',
714
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:resume`,
715
+ body: runtime.omit(request, ['name']),
716
+ bodyType: 'sylphx.sandboxes.v1.ResumeLeaseRequest',
717
+ responseType: 'sylphx.sandboxes.v1.Lease',
718
+ mutation: true,
719
+ });
720
+ }
721
+ /**
722
+ * Replaces a running lease's outbound policy. The generation does not
723
+ * change; the Cell applies it before the call returns.
724
+ *
725
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:setNetwork` · permission `sandboxes:write` · effect `write`
726
+ *
727
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
728
+ */
729
+ async setNetwork(request) {
730
+ return this.client.call({
731
+ method: 'POST',
732
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:setNetwork`,
733
+ body: runtime.omit(request, ['name']),
734
+ bodyType: 'sylphx.sandboxes.v1.SetLeaseNetworkRequest',
735
+ responseType: 'sylphx.sandboxes.v1.Lease',
736
+ mutation: true,
737
+ });
738
+ }
739
+ /**
740
+ * Mints a lease token for the data plane, bound to the current generation.
741
+ * Hand it to a process that must not hold the Access key.
742
+ *
743
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:mintToken` · permission `sandboxes:exec` · effect `write`
744
+ *
745
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
746
+ */
747
+ async mintToken(request) {
748
+ return this.client.call({
749
+ method: 'POST',
750
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:mintToken`,
751
+ body: runtime.omit(request, ['name']),
752
+ bodyType: 'sylphx.sandboxes.v1.MintLeaseTokenRequest',
753
+ responseType: 'sylphx.sandboxes.v1.MintLeaseTokenResponse',
754
+ mutation: true,
755
+ });
756
+ }
757
+ /**
758
+ * Runs one command in the lease to completion and returns its output, capped
759
+ * at 1 MiB per stream. Long-running or interactive processes use the guest
760
+ * protocol at `status.endpoints.guest_uri`.
761
+ *
762
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:exec` · permission `sandboxes:exec` · effect `write`
763
+ *
764
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `STALE_GENERATION`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
765
+ */
766
+ async exec(request) {
767
+ return this.client.call({
768
+ method: 'POST',
769
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:exec`,
770
+ body: runtime.omit(request, ['name']),
771
+ bodyType: 'sylphx.sandboxes.v1.ExecLeaseRequest',
772
+ responseType: 'sylphx.sandboxes.v1.ExecLeaseResponse',
773
+ mutation: true,
774
+ });
775
+ }
776
+ /**
777
+ * Reads one file from the lease, at most 16 MiB; larger files use the
778
+ * guest's `/files`.
779
+ *
780
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:readFile` · permission `sandboxes:exec` · effect `read`
781
+ *
782
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `NOT_FOUND`, `INVALID_STATE`.
783
+ */
784
+ async readFile(request) {
785
+ return this.client.call({
786
+ method: 'POST',
787
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:readFile`,
788
+ body: runtime.omit(request, ['name']),
789
+ bodyType: 'sylphx.sandboxes.v1.ReadLeaseFileRequest',
790
+ responseType: 'sylphx.sandboxes.v1.ReadLeaseFileResponse',
791
+ mutation: true,
792
+ });
793
+ }
794
+ /**
795
+ * Writes one file in the lease, at most 16 MiB, creating parent directories.
796
+ *
797
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:writeFile` · permission `sandboxes:exec` · effect `write`
798
+ *
799
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
800
+ */
801
+ async writeFile(request) {
802
+ return this.client.call({
803
+ method: 'POST',
804
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:writeFile`,
805
+ body: runtime.omit(request, ['name']),
806
+ bodyType: 'sylphx.sandboxes.v1.WriteLeaseFileRequest',
807
+ responseType: 'sylphx.sandboxes.v1.WriteLeaseFileResponse',
808
+ mutation: true,
809
+ });
810
+ }
811
+ /**
812
+ * Lists one directory in the lease.
813
+ *
814
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:listFiles` · permission `sandboxes:exec` · effect `read`
815
+ *
816
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `NOT_FOUND`, `INVALID_STATE`.
817
+ */
818
+ async listFiles(request) {
819
+ return this.client.call({
820
+ method: 'POST',
821
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:listFiles`,
822
+ body: runtime.omit(request, ['name']),
823
+ bodyType: 'sylphx.sandboxes.v1.ListLeaseFilesRequest',
824
+ responseType: 'sylphx.sandboxes.v1.ListLeaseFilesResponse',
825
+ mutation: true,
826
+ });
827
+ }
828
+ /**
829
+ * Removes one file or directory tree in the lease.
830
+ *
831
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:removeFile` · permission `sandboxes:exec` · effect `destructive`
832
+ *
833
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
834
+ */
835
+ async removeFile(request) {
836
+ return this.client.call({
837
+ method: 'POST',
838
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:removeFile`,
839
+ body: runtime.omit(request, ['name']),
840
+ bodyType: 'sylphx.sandboxes.v1.RemoveLeaseFileRequest',
841
+ responseType: 'sylphx.sandboxes.v1.RemoveLeaseFileResponse',
842
+ mutation: true,
843
+ });
844
+ }
845
+ /**
846
+ * Exposes a guest port.
847
+ *
848
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:openPort` · permission `sandboxes:exec` · effect `write`
849
+ *
850
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `UNIMPLEMENTED`.
851
+ */
852
+ async openPort(request) {
853
+ return this.client.call({
854
+ method: 'POST',
855
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:openPort`,
856
+ body: runtime.omit(request, ['name']),
857
+ bodyType: 'sylphx.sandboxes.v1.OpenLeasePortRequest',
858
+ responseType: 'sylphx.sandboxes.v1.Lease',
859
+ mutation: true,
860
+ });
861
+ }
862
+ /**
863
+ * Stops exposing a guest port.
864
+ *
865
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:closePort` · permission `sandboxes:exec` · effect `write`
866
+ *
867
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `UNIMPLEMENTED`.
868
+ */
869
+ async closePort(request) {
870
+ return this.client.call({
871
+ method: 'POST',
872
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:closePort`,
873
+ body: runtime.omit(request, ['name']),
874
+ bodyType: 'sylphx.sandboxes.v1.CloseLeasePortRequest',
875
+ responseType: 'sylphx.sandboxes.v1.Lease',
876
+ mutation: true,
877
+ });
878
+ }
879
+ /**
880
+ * Performs computer actions on a DESKTOP, BROWSER, or ANDROID lease, in
881
+ * order, and returns each action's result and, when `screenshot` is set,
882
+ * the screenshot taken after the last action. The actions are the Anthropic
883
+ * computer tool's and OpenAI computer use's, one-to-one
884
+ * (docs/services/sandboxes/computer-use.md). Refused CONTROL_HELD_BY_HUMAN
885
+ * while a human holds control.
886
+ *
887
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:act` · permission `sandboxes:exec` · effect `write`
888
+ *
889
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `STALE_GENERATION`, `CONTROL_HELD`, `CONTROL_HELD_BY_HUMAN`.
890
+ */
891
+ async act(request) {
892
+ return this.client.call({
893
+ method: 'POST',
894
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:act`,
895
+ body: runtime.omit(request, ['name']),
896
+ bodyType: 'sylphx.sandboxes.v1.ActLeaseRequest',
897
+ responseType: 'sylphx.sandboxes.v1.ActLeaseResponse',
898
+ mutation: true,
899
+ });
900
+ }
901
+ /**
902
+ * Opens a read-only live view of a lease's display: a short-lived viewer
903
+ * token bound to the lease and its generation, an embeddable URL, and the
904
+ * WebRTC signaling endpoint with ICE servers. Input needs control
905
+ * (AcquireLeaseControl).
906
+ *
907
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:openStream` · permission `sandboxes:exec` · effect `write`
908
+ *
909
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`.
910
+ */
911
+ async openStream(request) {
912
+ return this.client.call({
913
+ method: 'POST',
914
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:openStream`,
915
+ body: runtime.omit(request, ['name']),
916
+ bodyType: 'sylphx.sandboxes.v1.OpenLeaseStreamRequest',
917
+ responseType: 'sylphx.sandboxes.v1.StreamSession',
918
+ mutation: true,
919
+ });
920
+ }
921
+ /**
922
+ * Takes exclusive input control of a lease's display. A HUMAN acquire
923
+ * preempts an AGENT holder and returns a controller stream; an AGENT acquire
924
+ * is refused CONTROL_HELD_BY_HUMAN while a human holds control. Control
925
+ * lapses at `ttl`, which the Cell caps at 30 minutes.
926
+ *
927
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:acquireControl` · permission `sandboxes:exec` · effect `write`
928
+ *
929
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `CONTROL_HELD`, `CONTROL_HELD_BY_HUMAN`.
930
+ */
931
+ async acquireControl(request) {
932
+ return this.client.call({
933
+ method: 'POST',
934
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:acquireControl`,
935
+ body: runtime.omit(request, ['name']),
936
+ bodyType: 'sylphx.sandboxes.v1.AcquireLeaseControlRequest',
937
+ responseType: 'sylphx.sandboxes.v1.AcquireLeaseControlResponse',
938
+ mutation: true,
939
+ });
940
+ }
941
+ /**
942
+ * Releases control held under `epoch`; its controller tokens stop working.
943
+ *
944
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:releaseControl` · permission `sandboxes:exec` · effect `write`
945
+ *
946
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `STALE_GENERATION`.
947
+ */
948
+ async releaseControl(request) {
949
+ return this.client.call({
950
+ method: 'POST',
951
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:releaseControl`,
952
+ body: runtime.omit(request, ['name']),
953
+ bodyType: 'sylphx.sandboxes.v1.ReleaseLeaseControlRequest',
954
+ responseType: 'sylphx.sandboxes.v1.ControlState',
955
+ mutation: true,
956
+ });
957
+ }
958
+ /**
959
+ * Gets who holds control of a lease's display.
960
+ *
961
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:getControl` · permission `sandboxes:read` · effect `read`
962
+ *
963
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
964
+ */
965
+ async getControl(request) {
966
+ return this.client.call({
967
+ method: 'GET',
968
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:getControl`,
969
+ responseType: 'sylphx.sandboxes.v1.ControlState',
970
+ mutation: false,
971
+ });
972
+ }
973
+ /**
974
+ * Installs an Android app (APK) on an ANDROID lease.
975
+ *
976
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*}:installApp` · permission `sandboxes:exec` · effect `write`
977
+ *
978
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `NOT_FOUND`, `UNIMPLEMENTED`.
979
+ */
980
+ async installApp(request) {
981
+ return this.client.call({
982
+ method: 'POST',
983
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*', 'name')}:installApp`,
984
+ body: runtime.omit(request, ['name']),
985
+ bodyType: 'sylphx.sandboxes.v1.InstallLeaseAppRequest',
986
+ responseType: 'sylphx.sandboxes.v1.InstallLeaseAppResponse',
987
+ mutation: true,
988
+ });
989
+ }
990
+ }
991
+ /** `lease_events` of Sylphx Sandboxes: Resource type `sandboxes.sylphx.com/LeaseEvent`. */
992
+ export class LeaseEventsCollection {
993
+ client;
994
+ constructor(client) {
995
+ this.client = client;
996
+ }
997
+ /**
998
+ * Gets one lease event.
999
+ *
1000
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/leases/*\/lease_events/*}` · permission `sandboxes:read` · effect `read`
1001
+ *
1002
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1003
+ */
1004
+ async get(request) {
1005
+ return this.client.call({
1006
+ method: 'GET',
1007
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/leases/*/lease_events/*', 'name')}`,
1008
+ responseType: 'sylphx.sandboxes.v1.LeaseEvent',
1009
+ mutation: false,
1010
+ });
1011
+ }
1012
+ /**
1013
+ * Lists a lease's events in order. With `wait`, blocks up to that long
1014
+ * for an event after `page_token` (long poll).
1015
+ *
1016
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/leases/*}/lease_events` · permission `sandboxes:read` · effect `read`
1017
+ *
1018
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1019
+ */
1020
+ async list(request) {
1021
+ return this.client.call({
1022
+ method: 'GET',
1023
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/leases/*', 'parent')}/lease_events`,
1024
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, wait: request.wait },
1025
+ responseType: 'sylphx.sandboxes.v1.ListLeaseEventsResponse',
1026
+ mutation: false,
1027
+ });
1028
+ }
1029
+ /** Every item of every page of `list`. */
1030
+ async *listAll(request) {
1031
+ let next = request;
1032
+ for (;;) {
1033
+ const page = await this.list(next);
1034
+ yield* page.leaseEvents ?? [];
1035
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1036
+ return;
1037
+ next = { ...request, pageToken: page.nextPageToken };
1038
+ }
1039
+ }
1040
+ }
1041
+ /** `volumes` of Sylphx Sandboxes: Resource type `sandboxes.sylphx.com/Volume`. */
1042
+ export class VolumesCollection {
1043
+ client;
1044
+ constructor(client) {
1045
+ this.client = client;
1046
+ }
1047
+ /**
1048
+ * Gets a volume.
1049
+ *
1050
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/volumes/*}` · permission `sandboxes:read` · effect `read`
1051
+ *
1052
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1053
+ */
1054
+ async get(request) {
1055
+ return this.client.call({
1056
+ method: 'GET',
1057
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/volumes/*', 'name')}`,
1058
+ responseType: 'sylphx.sandboxes.v1.Volume',
1059
+ mutation: false,
1060
+ });
1061
+ }
1062
+ /**
1063
+ * Lists volumes in a environment.
1064
+ *
1065
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/volumes` · permission `sandboxes:read` · effect `read`
1066
+ *
1067
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1068
+ */
1069
+ async list(request) {
1070
+ return this.client.call({
1071
+ method: 'GET',
1072
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/volumes`,
1073
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
1074
+ responseType: 'sylphx.sandboxes.v1.ListVolumesResponse',
1075
+ mutation: false,
1076
+ });
1077
+ }
1078
+ /** Every item of every page of `list`. */
1079
+ async *listAll(request) {
1080
+ let next = request;
1081
+ for (;;) {
1082
+ const page = await this.list(next);
1083
+ yield* page.volumes ?? [];
1084
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1085
+ return;
1086
+ next = { ...request, pageToken: page.nextPageToken };
1087
+ }
1088
+ }
1089
+ /**
1090
+ * Creates a volume.
1091
+ *
1092
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/volumes` · permission `sandboxes:write` · effect `write`
1093
+ *
1094
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
1095
+ */
1096
+ async create(request) {
1097
+ return this.client.call({
1098
+ method: 'POST',
1099
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/volumes`,
1100
+ query: { volume_id: request.volumeId, validate_only: request.validateOnly },
1101
+ body: request.volume ?? {},
1102
+ bodyType: 'sylphx.sandboxes.v1.Volume',
1103
+ responseType: 'sylphx.sandboxes.v1.Volume',
1104
+ mutation: true,
1105
+ });
1106
+ }
1107
+ /**
1108
+ * Updates a volume: grows `spec.size_gib` and edits metadata.
1109
+ *
1110
+ * `PATCH /v1/{volume.name=orgs/*\/projects/*\/envs/*\/volumes/*}` · permission `sandboxes:write` · effect `write`
1111
+ *
1112
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1113
+ */
1114
+ async update(request) {
1115
+ return this.client.call({
1116
+ method: 'PATCH',
1117
+ path: `/v1/${runtime.pathParam(request.volume?.name, 'orgs/*/projects/*/envs/*/volumes/*', 'volume.name')}`,
1118
+ query: { update_mask: request.updateMask, validate_only: request.validateOnly },
1119
+ body: request.volume ?? {},
1120
+ bodyType: 'sylphx.sandboxes.v1.Volume',
1121
+ responseType: 'sylphx.sandboxes.v1.Volume',
1122
+ mutation: true,
1123
+ });
1124
+ }
1125
+ /**
1126
+ * Deletes a volume and destroys its data. Refused RESOURCE_IN_USE while it
1127
+ * is attached.
1128
+ *
1129
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/volumes/*}` · permission `sandboxes:write` · effect `destructive`
1130
+ *
1131
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `RESOURCE_IN_USE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1132
+ */
1133
+ async delete(request) {
1134
+ return this.client.call({
1135
+ method: 'DELETE',
1136
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/volumes/*', 'name')}`,
1137
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
1138
+ responseType: 'sylphx.sandboxes.v1.Volume',
1139
+ mutation: true,
1140
+ });
1141
+ }
1142
+ }
1143
+ /** `snapshots` of Sylphx Sandboxes: Resource type `sandboxes.sylphx.com/Snapshot`. */
1144
+ export class SnapshotsCollection {
1145
+ client;
1146
+ constructor(client) {
1147
+ this.client = client;
1148
+ }
1149
+ /**
1150
+ * Gets a snapshot.
1151
+ *
1152
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/snapshots/*}` · permission `sandboxes:read` · effect `read`
1153
+ *
1154
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1155
+ */
1156
+ async get(request) {
1157
+ return this.client.call({
1158
+ method: 'GET',
1159
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/snapshots/*', 'name')}`,
1160
+ responseType: 'sylphx.sandboxes.v1.Snapshot',
1161
+ mutation: false,
1162
+ });
1163
+ }
1164
+ /**
1165
+ * Lists snapshots in a environment.
1166
+ *
1167
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/snapshots` · permission `sandboxes:read` · effect `read`
1168
+ *
1169
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1170
+ */
1171
+ async list(request) {
1172
+ return this.client.call({
1173
+ method: 'GET',
1174
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/snapshots`,
1175
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
1176
+ responseType: 'sylphx.sandboxes.v1.ListSnapshotsResponse',
1177
+ mutation: false,
1178
+ });
1179
+ }
1180
+ /** Every item of every page of `list`. */
1181
+ async *listAll(request) {
1182
+ let next = request;
1183
+ for (;;) {
1184
+ const page = await this.list(next);
1185
+ yield* page.snapshots ?? [];
1186
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1187
+ return;
1188
+ next = { ...request, pageToken: page.nextPageToken };
1189
+ }
1190
+ }
1191
+ /**
1192
+ * Captures a running lease's disk as a snapshot.
1193
+ *
1194
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/snapshots` · permission `sandboxes:write` · effect `write`
1195
+ *
1196
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `RESOURCE_NOT_FOUND`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `UNIMPLEMENTED`.
1197
+ */
1198
+ async create(request) {
1199
+ return this.client.call({
1200
+ method: 'POST',
1201
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/snapshots`,
1202
+ query: { snapshot_id: request.snapshotId, validate_only: request.validateOnly },
1203
+ body: request.snapshot ?? {},
1204
+ bodyType: 'sylphx.sandboxes.v1.Snapshot',
1205
+ responseType: 'sylphx.sandboxes.v1.Snapshot',
1206
+ mutation: true,
1207
+ });
1208
+ }
1209
+ /**
1210
+ * Deletes a snapshot.
1211
+ *
1212
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/snapshots/*}` · permission `sandboxes:write` · effect `destructive`
1213
+ *
1214
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1215
+ */
1216
+ async delete(request) {
1217
+ return this.client.call({
1218
+ method: 'DELETE',
1219
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/snapshots/*', 'name')}`,
1220
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
1221
+ responseType: 'sylphx.sandboxes.v1.Snapshot',
1222
+ mutation: true,
1223
+ });
1224
+ }
1225
+ }
1226
+ //# sourceMappingURL=sandboxes.js.map