@vercel/sandbox 2.0.0-beta.2 → 2.0.0-beta.20

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 (208) hide show
  1. package/README.md +48 -1
  2. package/dist/_virtual/rolldown_runtime.cjs +29 -0
  3. package/dist/api-client/api-client.cjs +445 -0
  4. package/dist/api-client/api-client.cjs.map +1 -0
  5. package/dist/api-client/api-client.d.cts +6235 -0
  6. package/dist/api-client/api-client.d.ts +6229 -706
  7. package/dist/api-client/api-client.js +436 -472
  8. package/dist/api-client/api-client.js.map +1 -1
  9. package/dist/api-client/api-error.cjs +32 -0
  10. package/dist/api-client/api-error.cjs.map +1 -0
  11. package/dist/api-client/api-error.d.cts +29 -0
  12. package/dist/api-client/api-error.d.ts +21 -16
  13. package/dist/api-client/api-error.js +28 -32
  14. package/dist/api-client/api-error.js.map +1 -1
  15. package/dist/api-client/base-client.cjs +126 -0
  16. package/dist/api-client/base-client.cjs.map +1 -0
  17. package/dist/api-client/base-client.d.cts +38 -0
  18. package/dist/api-client/base-client.d.ts +31 -36
  19. package/dist/api-client/base-client.js +114 -118
  20. package/dist/api-client/base-client.js.map +1 -1
  21. package/dist/api-client/file-writer.cjs +62 -0
  22. package/dist/api-client/file-writer.cjs.map +1 -0
  23. package/dist/api-client/file-writer.d.cts +66 -0
  24. package/dist/api-client/file-writer.d.ts +56 -42
  25. package/dist/api-client/file-writer.js +57 -61
  26. package/dist/api-client/file-writer.js.map +1 -1
  27. package/dist/api-client/index.cjs +2 -0
  28. package/dist/api-client/index.d.ts +2 -2
  29. package/dist/api-client/index.js +4 -21
  30. package/dist/api-client/validators.cjs +229 -0
  31. package/dist/api-client/validators.cjs.map +1 -0
  32. package/dist/api-client/validators.d.cts +26885 -0
  33. package/dist/api-client/validators.d.ts +26732 -3706
  34. package/dist/api-client/validators.js +198 -191
  35. package/dist/api-client/validators.js.map +1 -1
  36. package/dist/api-client/with-retry.cjs +89 -0
  37. package/dist/api-client/with-retry.cjs.map +1 -0
  38. package/dist/api-client/with-retry.d.cts +10 -0
  39. package/dist/api-client/with-retry.d.ts +9 -13
  40. package/dist/api-client/with-retry.js +81 -102
  41. package/dist/api-client/with-retry.js.map +1 -1
  42. package/dist/auth/api.cjs +29 -0
  43. package/dist/auth/api.cjs.map +1 -0
  44. package/dist/auth/api.js +26 -25
  45. package/dist/auth/api.js.map +1 -1
  46. package/dist/auth/error.cjs +13 -0
  47. package/dist/auth/error.cjs.map +1 -0
  48. package/dist/auth/error.js +11 -11
  49. package/dist/auth/error.js.map +1 -1
  50. package/dist/auth/file.cjs +64 -0
  51. package/dist/auth/file.cjs.map +1 -0
  52. package/dist/auth/file.d.cts +26 -0
  53. package/dist/auth/file.d.ts +19 -15
  54. package/dist/auth/file.js +49 -64
  55. package/dist/auth/file.js.map +1 -1
  56. package/dist/auth/index.cjs +11 -0
  57. package/dist/auth/index.d.cts +5 -0
  58. package/dist/auth/index.d.ts +5 -6
  59. package/dist/auth/index.js +6 -27
  60. package/dist/auth/linked-project.cjs +38 -0
  61. package/dist/auth/linked-project.cjs.map +1 -0
  62. package/dist/auth/linked-project.js +30 -64
  63. package/dist/auth/linked-project.js.map +1 -1
  64. package/dist/auth/oauth.cjs +205 -0
  65. package/dist/auth/oauth.cjs.map +1 -0
  66. package/dist/auth/oauth.d.cts +135 -0
  67. package/dist/auth/oauth.d.ts +113 -109
  68. package/dist/auth/oauth.js +185 -252
  69. package/dist/auth/oauth.js.map +1 -1
  70. package/dist/auth/poll-for-token.cjs +82 -0
  71. package/dist/auth/poll-for-token.cjs.map +1 -0
  72. package/dist/auth/poll-for-token.d.cts +28 -0
  73. package/dist/auth/poll-for-token.d.ts +23 -15
  74. package/dist/auth/poll-for-token.js +79 -64
  75. package/dist/auth/poll-for-token.js.map +1 -1
  76. package/dist/auth/project.cjs +178 -0
  77. package/dist/auth/project.cjs.map +1 -0
  78. package/dist/auth/project.d.cts +40 -0
  79. package/dist/auth/project.d.ts +19 -19
  80. package/dist/auth/project.js +169 -72
  81. package/dist/auth/project.js.map +1 -1
  82. package/dist/auth/zod.cjs +22 -0
  83. package/dist/auth/zod.cjs.map +1 -0
  84. package/dist/auth/zod.js +18 -17
  85. package/dist/auth/zod.js.map +1 -1
  86. package/dist/command.cjs +328 -0
  87. package/dist/command.cjs.map +1 -0
  88. package/dist/command.d.cts +289 -0
  89. package/dist/command.d.ts +265 -171
  90. package/dist/command.js +323 -226
  91. package/dist/command.js.map +1 -1
  92. package/dist/constants.d.cts +5 -0
  93. package/dist/constants.d.ts +5 -1
  94. package/dist/filesystem.cjs +499 -0
  95. package/dist/filesystem.cjs.map +1 -0
  96. package/dist/filesystem.d.cts +258 -0
  97. package/dist/filesystem.d.ts +258 -0
  98. package/dist/filesystem.js +497 -0
  99. package/dist/filesystem.js.map +1 -0
  100. package/dist/index.cjs +15 -0
  101. package/dist/index.d.cts +8 -0
  102. package/dist/index.d.ts +8 -6
  103. package/dist/index.js +8 -17
  104. package/dist/network-policy.d.cts +156 -0
  105. package/dist/network-policy.d.ts +88 -28
  106. package/dist/sandbox.cjs +816 -0
  107. package/dist/sandbox.cjs.map +1 -0
  108. package/dist/sandbox.d.cts +2847 -0
  109. package/dist/sandbox.d.ts +2834 -628
  110. package/dist/sandbox.js +808 -557
  111. package/dist/sandbox.js.map +1 -1
  112. package/dist/session.cjs +527 -0
  113. package/dist/session.cjs.map +1 -0
  114. package/dist/session.d.cts +410 -0
  115. package/dist/session.d.ts +403 -368
  116. package/dist/session.js +524 -489
  117. package/dist/session.js.map +1 -1
  118. package/dist/snapshot.cjs +204 -0
  119. package/dist/snapshot.cjs.map +1 -0
  120. package/dist/snapshot.d.cts +161 -0
  121. package/dist/snapshot.d.ts +152 -92
  122. package/dist/snapshot.js +201 -114
  123. package/dist/snapshot.js.map +1 -1
  124. package/dist/utils/array.cjs +17 -0
  125. package/dist/utils/array.cjs.map +1 -0
  126. package/dist/utils/array.js +12 -15
  127. package/dist/utils/array.js.map +1 -1
  128. package/dist/utils/consume-readable.cjs +18 -0
  129. package/dist/utils/consume-readable.cjs.map +1 -0
  130. package/dist/utils/consume-readable.js +13 -12
  131. package/dist/utils/consume-readable.js.map +1 -1
  132. package/dist/utils/decode-base64-url.cjs +15 -0
  133. package/dist/utils/decode-base64-url.cjs.map +1 -0
  134. package/dist/utils/decode-base64-url.js +10 -9
  135. package/dist/utils/decode-base64-url.js.map +1 -1
  136. package/dist/utils/dev-credentials.cjs +142 -0
  137. package/dist/utils/dev-credentials.cjs.map +1 -0
  138. package/dist/utils/dev-credentials.js +126 -184
  139. package/dist/utils/dev-credentials.js.map +1 -1
  140. package/dist/utils/get-credentials.cjs +123 -0
  141. package/dist/utils/get-credentials.cjs.map +1 -0
  142. package/dist/utils/get-credentials.d.cts +21 -0
  143. package/dist/utils/get-credentials.d.ts +19 -61
  144. package/dist/utils/get-credentials.js +106 -140
  145. package/dist/utils/get-credentials.js.map +1 -1
  146. package/dist/utils/log.cjs +25 -0
  147. package/dist/utils/log.cjs.map +1 -0
  148. package/dist/utils/log.js +15 -17
  149. package/dist/utils/log.js.map +1 -1
  150. package/dist/utils/network-policy.cjs +49 -0
  151. package/dist/utils/network-policy.cjs.map +1 -0
  152. package/dist/utils/network-policy.js +42 -77
  153. package/dist/utils/network-policy.js.map +1 -1
  154. package/dist/utils/normalizePath.cjs +27 -0
  155. package/dist/utils/normalizePath.cjs.map +1 -0
  156. package/dist/utils/normalizePath.js +21 -28
  157. package/dist/utils/normalizePath.js.map +1 -1
  158. package/dist/utils/paginator.cjs +41 -0
  159. package/dist/utils/paginator.cjs.map +1 -0
  160. package/dist/utils/paginator.d.cts +16 -0
  161. package/dist/utils/paginator.d.ts +16 -0
  162. package/dist/utils/paginator.js +40 -0
  163. package/dist/utils/paginator.js.map +1 -0
  164. package/dist/utils/resolveSignal.cjs +20 -0
  165. package/dist/utils/resolveSignal.cjs.map +1 -0
  166. package/dist/utils/resolveSignal.d.cts +15 -0
  167. package/dist/utils/resolveSignal.d.ts +12 -10
  168. package/dist/utils/resolveSignal.js +14 -17
  169. package/dist/utils/resolveSignal.js.map +1 -1
  170. package/dist/utils/sandbox-snapshot.cjs +14 -0
  171. package/dist/utils/sandbox-snapshot.cjs.map +1 -0
  172. package/dist/utils/sandbox-snapshot.d.cts +10 -0
  173. package/dist/utils/sandbox-snapshot.d.ts +11 -0
  174. package/dist/utils/sandbox-snapshot.js +14 -0
  175. package/dist/utils/sandbox-snapshot.js.map +1 -0
  176. package/dist/utils/types.cjs +13 -0
  177. package/dist/utils/types.cjs.map +1 -0
  178. package/dist/utils/types.d.cts +11 -0
  179. package/dist/utils/types.d.ts +5 -7
  180. package/dist/utils/types.js +8 -8
  181. package/dist/utils/types.js.map +1 -1
  182. package/dist/version.cjs +7 -0
  183. package/dist/version.cjs.map +1 -0
  184. package/dist/version.js +5 -5
  185. package/dist/version.js.map +1 -1
  186. package/package.json +23 -3
  187. package/dist/api-client/index.js.map +0 -1
  188. package/dist/auth/api.d.ts +0 -6
  189. package/dist/auth/error.d.ts +0 -11
  190. package/dist/auth/index.js.map +0 -1
  191. package/dist/auth/linked-project.d.ts +0 -10
  192. package/dist/auth/zod.d.ts +0 -5
  193. package/dist/constants.js +0 -3
  194. package/dist/constants.js.map +0 -1
  195. package/dist/index.js.map +0 -1
  196. package/dist/network-policy.js +0 -3
  197. package/dist/network-policy.js.map +0 -1
  198. package/dist/utils/array.d.ts +0 -9
  199. package/dist/utils/consume-readable.d.ts +0 -5
  200. package/dist/utils/convert-sandbox.d.ts +0 -6
  201. package/dist/utils/convert-sandbox.js +0 -14
  202. package/dist/utils/convert-sandbox.js.map +0 -1
  203. package/dist/utils/decode-base64-url.d.ts +0 -7
  204. package/dist/utils/dev-credentials.d.ts +0 -37
  205. package/dist/utils/log.d.ts +0 -2
  206. package/dist/utils/network-policy.d.ts +0 -7
  207. package/dist/utils/normalizePath.d.ts +0 -17
  208. package/dist/version.d.ts +0 -1
@@ -0,0 +1,2847 @@
1
+ import { Paginator } from "./utils/paginator.cjs";
2
+ import { SandboxMetaData, SandboxRouteData, SessionMetaData, SnapshotMetadata } from "./api-client/validators.cjs";
3
+ import { NetworkPolicy, NetworkPolicyKeyValueMatcher, NetworkPolicyMatch, NetworkPolicyMatcher } from "./network-policy.cjs";
4
+ import { WithPrivate } from "./utils/types.cjs";
5
+ import { RUNTIMES } from "./constants.cjs";
6
+ import { APIClient, WithFetchOptions } from "./api-client/api-client.cjs";
7
+ import { Credentials } from "./utils/get-credentials.cjs";
8
+ import { Command, CommandFinished } from "./command.cjs";
9
+ import { Snapshot } from "./snapshot.cjs";
10
+ import { SandboxSnapshot } from "./utils/sandbox-snapshot.cjs";
11
+ import { RunCommandParams, Session } from "./session.cjs";
12
+ import { FileSystem } from "./filesystem.cjs";
13
+ import * as zod0 from "zod";
14
+ import { WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE } from "@workflow/serde";
15
+
16
+ //#region src/sandbox.d.ts
17
+ /** @inline */
18
+ interface BaseCreateSandboxParams {
19
+ /**
20
+ * The name of the sandbox. If omitted, a random name will be generated.
21
+ */
22
+ name?: string;
23
+ /**
24
+ * The source of the sandbox.
25
+ *
26
+ * Omit this parameter start a sandbox without a source.
27
+ *
28
+ * For git sources:
29
+ * - `depth`: Creates shallow clones with limited commit history (minimum: 1)
30
+ * - `revision`: Clones and checks out a specific commit, branch, or tag
31
+ */
32
+ source?: {
33
+ type: "git";
34
+ url: string;
35
+ depth?: number;
36
+ revision?: string;
37
+ } | {
38
+ type: "git";
39
+ url: string;
40
+ username: string;
41
+ password: string;
42
+ depth?: number;
43
+ revision?: string;
44
+ } | {
45
+ type: "tarball";
46
+ url: string;
47
+ };
48
+ /**
49
+ * Array of port numbers to expose from the sandbox. Sandboxes can
50
+ * expose up to 4 ports.
51
+ */
52
+ ports?: number[];
53
+ /**
54
+ * Timeout in milliseconds before the sandbox auto-terminates.
55
+ */
56
+ timeout?: number;
57
+ /**
58
+ * Resources to allocate to the sandbox.
59
+ *
60
+ * Your sandbox will get the amount of vCPUs you specify here and
61
+ * 2048 MB of memory per vCPU.
62
+ */
63
+ resources?: {
64
+ vcpus: number;
65
+ };
66
+ /**
67
+ * The runtime of the sandbox, currently only `node24`, `node22`, `node26` and `python3.13` are supported.
68
+ * If not specified, the default runtime `node24` will be used.
69
+ */
70
+ runtime?: RUNTIMES | (string & {});
71
+ /**
72
+ * Network policy to define network restrictions for the sandbox.
73
+ * Defaults to full internet access if not specified.
74
+ */
75
+ networkPolicy?: NetworkPolicy;
76
+ /**
77
+ * Default environment variables for the sandbox.
78
+ * These are inherited by all commands unless overridden with
79
+ * the `env` option in `runCommand`.
80
+ *
81
+ * @example
82
+ * const sandbox = await Sandbox.create({
83
+ * env: { NODE_ENV: "production", API_KEY: "secret" },
84
+ * });
85
+ * // All commands will have NODE_ENV and API_KEY set
86
+ * await sandbox.runCommand("node", ["app.js"]);
87
+ */
88
+ env?: Record<string, string>;
89
+ /**
90
+ * Key-value tags to associate with the sandbox. Maximum 5 tags.
91
+ * @example { env: "staging", team: "infra" }
92
+ */
93
+ tags?: Record<string, string>;
94
+ /**
95
+ * An AbortSignal to cancel sandbox creation.
96
+ */
97
+ signal?: AbortSignal;
98
+ /**
99
+ * Enable or disable automatic restore of the filesystem between sessions.
100
+ */
101
+ persistent?: boolean;
102
+ /**
103
+ * Default snapshot expiration in milliseconds.
104
+ * When set, snapshots created for this sandbox will expire after this duration.
105
+ * Use `0` for no expiration.
106
+ */
107
+ snapshotExpiration?: number;
108
+ /**
109
+ * Called when the sandbox session is resumed (e.g., after a snapshot restore).
110
+ * Use this to re-warm caches, restore transient state, or run other setup logic.
111
+ */
112
+ onResume?: (sandbox: Sandbox) => Promise<void>;
113
+ }
114
+ type CreateSandboxParams = BaseCreateSandboxParams | (Omit<BaseCreateSandboxParams, "runtime" | "source"> & {
115
+ source: {
116
+ type: "snapshot";
117
+ snapshotId: string;
118
+ };
119
+ });
120
+ /** @inline */
121
+ interface GetSandboxParams {
122
+ /**
123
+ * The name of the sandbox.
124
+ */
125
+ name: string;
126
+ /**
127
+ * Whether to resume an existing session. Defaults to true.
128
+ */
129
+ resume?: boolean;
130
+ /**
131
+ * An AbortSignal to cancel the operation.
132
+ */
133
+ signal?: AbortSignal;
134
+ /**
135
+ * Called when the sandbox session is resumed (e.g., after a snapshot restore).
136
+ * Use this to re-warm caches, restore transient state, or run other setup logic.
137
+ */
138
+ onResume?: (sandbox: Sandbox) => Promise<void>;
139
+ }
140
+ /**
141
+ * Extends both {@link BaseCreateSandboxParams} and {@link GetSandboxParams}
142
+ * (minus `name`, which is required on get but optional here) so that any
143
+ * new parameter added to either flow is picked up automatically. The
144
+ * structural overlap on `signal` / `onResume` is intentional — both
145
+ * interfaces declare them with identical optional types.
146
+ * @inline
147
+ */
148
+ interface GetOrCreateSandboxParams extends BaseCreateSandboxParams, Omit<GetSandboxParams, "name"> {
149
+ /**
150
+ * Called once after a sandbox is freshly created (not when an existing
151
+ * sandbox is retrieved). Use this for one-time setup such as seeding
152
+ * files or warming caches. The returned promise is awaited before
153
+ * {@link Sandbox.getOrCreate} resolves.
154
+ */
155
+ onCreate?: (sandbox: Sandbox) => Promise<void>;
156
+ }
157
+ /**
158
+ * Serialized representation of a Sandbox for @workflow/serde.
159
+ * Fields `metadata` and `routes` are the original wire format from main.
160
+ * Fields `sandboxMetadata` and `projectId` are added for named-sandboxes.
161
+ */
162
+ interface SerializedSandbox {
163
+ metadata: SandboxSnapshot;
164
+ routes: SandboxRouteData[];
165
+ sandboxMetadata?: SandboxMetaData;
166
+ projectId?: string;
167
+ }
168
+ /**
169
+ * A Sandbox is a persistent, isolated Linux MicroVMs to run commands in.
170
+ * Use {@link Sandbox.create} or {@link Sandbox.get} to construct.
171
+ * @hideconstructor
172
+ */
173
+ declare class Sandbox {
174
+ private _client;
175
+ private readonly projectId;
176
+ /**
177
+ * In-flight resume promise, used to deduplicate concurrent resume calls.
178
+ */
179
+ private resumePromise;
180
+ /**
181
+ * Internal Session instance for the current VM.
182
+ */
183
+ private session;
184
+ /**
185
+ * Internal metadata about the sandbox.
186
+ */
187
+ private sandbox;
188
+ /**
189
+ * Hook that will be executed when a new session is created during resume.
190
+ */
191
+ private readonly onResume?;
192
+ /**
193
+ * A `node:fs/promises`-compatible API for interacting with the sandbox filesystem.
194
+ *
195
+ * @example
196
+ * const content = await sandbox.fs.readFile('/etc/hostname', 'utf8');
197
+ * await sandbox.fs.writeFile('/tmp/hello.txt', 'Hello, world!');
198
+ * const files = await sandbox.fs.readdir('/tmp');
199
+ * const stats = await sandbox.fs.stat('/tmp/hello.txt');
200
+ */
201
+ readonly fs: FileSystem;
202
+ /**
203
+ * Lazily resolve credentials and construct an API client.
204
+ * @internal
205
+ */
206
+ private ensureClient;
207
+ /**
208
+ * The name of this sandbox.
209
+ */
210
+ get name(): string;
211
+ /**
212
+ * Routes from ports to subdomains.
213
+ * @hidden
214
+ */
215
+ get routes(): SandboxRouteData[];
216
+ /**
217
+ * Whether the sandbox persists the state.
218
+ */
219
+ get persistent(): boolean;
220
+ /**
221
+ * The region this sandbox runs in.
222
+ */
223
+ get region(): string | undefined;
224
+ /**
225
+ * Number of virtual CPUs allocated.
226
+ */
227
+ get vcpus(): number | undefined;
228
+ /**
229
+ * Memory allocated in MB.
230
+ */
231
+ get memory(): number | undefined;
232
+ /** Runtime identifier (e.g. "node24", "python3.13"). */
233
+ get runtime(): string | undefined;
234
+ /**
235
+ * Cumulative egress bytes across all sessions.
236
+ */
237
+ get totalEgressBytes(): number | undefined;
238
+ /**
239
+ * Cumulative ingress bytes across all sessions.
240
+ */
241
+ get totalIngressBytes(): number | undefined;
242
+ /**
243
+ * Cumulative active CPU duration in milliseconds across all sessions.
244
+ */
245
+ get totalActiveCpuDurationMs(): number | undefined;
246
+ /**
247
+ * Cumulative wall-clock duration in milliseconds across all sessions.
248
+ */
249
+ get totalDurationMs(): number | undefined;
250
+ /**
251
+ * When this sandbox was last updated.
252
+ */
253
+ get updatedAt(): Date;
254
+ /**
255
+ * When the sandbox status was last updated.
256
+ */
257
+ get statusUpdatedAt(): Date | undefined;
258
+ /**
259
+ * When this sandbox was created.
260
+ */
261
+ get createdAt(): Date;
262
+ /**
263
+ * Interactive port.
264
+ */
265
+ get interactivePort(): number | undefined;
266
+ /**
267
+ * The status of the current session.
268
+ */
269
+ get status(): SessionMetaData["status"];
270
+ /**
271
+ * The default timeout of this sandbox in milliseconds.
272
+ */
273
+ get timeout(): number | undefined;
274
+ /**
275
+ * Key-value tags attached to the sandbox.
276
+ */
277
+ get tags(): Record<string, string> | undefined;
278
+ /**
279
+ * The default network policy of this sandbox.
280
+ */
281
+ get networkPolicy(): NetworkPolicy | undefined;
282
+ /**
283
+ * If the session was created from a snapshot, the ID of that snapshot.
284
+ */
285
+ get sourceSnapshotId(): string | undefined;
286
+ /**
287
+ * The current snapshot ID of this sandbox, if any.
288
+ */
289
+ get currentSnapshotId(): string | undefined;
290
+ /**
291
+ * The default snapshot expiration in milliseconds, if set.
292
+ */
293
+ get snapshotExpiration(): number | undefined;
294
+ /**
295
+ * The amount of CPU used by the session. Only reported once the VM is stopped.
296
+ */
297
+ get activeCpuUsageMs(): number | undefined;
298
+ /**
299
+ * The amount of network data used by the session. Only reported once the VM is stopped.
300
+ */
301
+ get networkTransfer(): {
302
+ ingress: number;
303
+ egress: number;
304
+ } | undefined;
305
+ /**
306
+ * Allow to get a list of sandboxes for a team narrowed to the given params.
307
+ * It returns both the sandboxes and the pagination metadata to allow getting
308
+ * the next page of results.
309
+ *
310
+ * The returned object is async-iterable to auto-paginate through all pages:
311
+ *
312
+ * ```ts
313
+ * const result = await Sandbox.list({ namePrefix: "ci-" });
314
+ * for await (const sandbox of result) { ... }
315
+ * // or: await result.toArray();
316
+ * // or: for await (const page of result.pages()) { ... }
317
+ * ```
318
+ */
319
+ static list(params?: Partial<Parameters<APIClient["listSandboxes"]>[0]> & Partial<Credentials> & WithFetchOptions): Promise<Paginator<{
320
+ sandboxes: {
321
+ status: "aborted" | "pending" | "running" | "stopping" | "stopped" | "failed" | "snapshotting";
322
+ name: string;
323
+ persistent: boolean;
324
+ createdAt: number;
325
+ updatedAt: number;
326
+ currentSessionId: string;
327
+ tags?: Record<string, string> | undefined;
328
+ region?: string | undefined;
329
+ vcpus?: number | undefined;
330
+ memory?: number | undefined;
331
+ runtime?: string | undefined;
332
+ timeout?: number | undefined;
333
+ networkPolicy?: zod0.objectInputType<{
334
+ mode: zod0.ZodLiteral<"allow-all">;
335
+ }, zod0.ZodTypeAny, "passthrough"> | zod0.objectInputType<{
336
+ mode: zod0.ZodLiteral<"deny-all">;
337
+ }, zod0.ZodTypeAny, "passthrough"> | zod0.objectInputType<{
338
+ mode: zod0.ZodLiteral<"custom">;
339
+ allowedDomains: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
340
+ allowedCIDRs: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
341
+ deniedCIDRs: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
342
+ injectionRules: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
343
+ domain: zod0.ZodString;
344
+ headers: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodString>>;
345
+ headerNames: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
346
+ match: zod0.ZodOptional<zod0.ZodObject<{
347
+ path: zod0.ZodOptional<zod0.ZodObject<{
348
+ exact: zod0.ZodOptional<zod0.ZodString>;
349
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
350
+ regex: zod0.ZodOptional<zod0.ZodString>;
351
+ }, "strip", zod0.ZodTypeAny, {
352
+ exact?: string | undefined;
353
+ startsWith?: string | undefined;
354
+ regex?: string | undefined;
355
+ }, {
356
+ exact?: string | undefined;
357
+ startsWith?: string | undefined;
358
+ regex?: string | undefined;
359
+ }>>;
360
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
361
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
362
+ key: zod0.ZodOptional<zod0.ZodObject<{
363
+ exact: zod0.ZodOptional<zod0.ZodString>;
364
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
365
+ regex: zod0.ZodOptional<zod0.ZodString>;
366
+ }, "strip", zod0.ZodTypeAny, {
367
+ exact?: string | undefined;
368
+ startsWith?: string | undefined;
369
+ regex?: string | undefined;
370
+ }, {
371
+ exact?: string | undefined;
372
+ startsWith?: string | undefined;
373
+ regex?: string | undefined;
374
+ }>>;
375
+ value: zod0.ZodOptional<zod0.ZodObject<{
376
+ exact: zod0.ZodOptional<zod0.ZodString>;
377
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
378
+ regex: zod0.ZodOptional<zod0.ZodString>;
379
+ }, "strip", zod0.ZodTypeAny, {
380
+ exact?: string | undefined;
381
+ startsWith?: string | undefined;
382
+ regex?: string | undefined;
383
+ }, {
384
+ exact?: string | undefined;
385
+ startsWith?: string | undefined;
386
+ regex?: string | undefined;
387
+ }>>;
388
+ }, "strip", zod0.ZodTypeAny, {
389
+ value?: {
390
+ exact?: string | undefined;
391
+ startsWith?: string | undefined;
392
+ regex?: string | undefined;
393
+ } | undefined;
394
+ key?: {
395
+ exact?: string | undefined;
396
+ startsWith?: string | undefined;
397
+ regex?: string | undefined;
398
+ } | undefined;
399
+ }, {
400
+ value?: {
401
+ exact?: string | undefined;
402
+ startsWith?: string | undefined;
403
+ regex?: string | undefined;
404
+ } | undefined;
405
+ key?: {
406
+ exact?: string | undefined;
407
+ startsWith?: string | undefined;
408
+ regex?: string | undefined;
409
+ } | undefined;
410
+ }>, "many">>;
411
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
412
+ key: zod0.ZodOptional<zod0.ZodObject<{
413
+ exact: zod0.ZodOptional<zod0.ZodString>;
414
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
415
+ regex: zod0.ZodOptional<zod0.ZodString>;
416
+ }, "strip", zod0.ZodTypeAny, {
417
+ exact?: string | undefined;
418
+ startsWith?: string | undefined;
419
+ regex?: string | undefined;
420
+ }, {
421
+ exact?: string | undefined;
422
+ startsWith?: string | undefined;
423
+ regex?: string | undefined;
424
+ }>>;
425
+ value: zod0.ZodOptional<zod0.ZodObject<{
426
+ exact: zod0.ZodOptional<zod0.ZodString>;
427
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
428
+ regex: zod0.ZodOptional<zod0.ZodString>;
429
+ }, "strip", zod0.ZodTypeAny, {
430
+ exact?: string | undefined;
431
+ startsWith?: string | undefined;
432
+ regex?: string | undefined;
433
+ }, {
434
+ exact?: string | undefined;
435
+ startsWith?: string | undefined;
436
+ regex?: string | undefined;
437
+ }>>;
438
+ }, "strip", zod0.ZodTypeAny, {
439
+ value?: {
440
+ exact?: string | undefined;
441
+ startsWith?: string | undefined;
442
+ regex?: string | undefined;
443
+ } | undefined;
444
+ key?: {
445
+ exact?: string | undefined;
446
+ startsWith?: string | undefined;
447
+ regex?: string | undefined;
448
+ } | undefined;
449
+ }, {
450
+ value?: {
451
+ exact?: string | undefined;
452
+ startsWith?: string | undefined;
453
+ regex?: string | undefined;
454
+ } | undefined;
455
+ key?: {
456
+ exact?: string | undefined;
457
+ startsWith?: string | undefined;
458
+ regex?: string | undefined;
459
+ } | undefined;
460
+ }>, "many">>;
461
+ }, "strip", zod0.ZodTypeAny, {
462
+ path?: {
463
+ exact?: string | undefined;
464
+ startsWith?: string | undefined;
465
+ regex?: string | undefined;
466
+ } | undefined;
467
+ headers?: {
468
+ value?: {
469
+ exact?: string | undefined;
470
+ startsWith?: string | undefined;
471
+ regex?: string | undefined;
472
+ } | undefined;
473
+ key?: {
474
+ exact?: string | undefined;
475
+ startsWith?: string | undefined;
476
+ regex?: string | undefined;
477
+ } | undefined;
478
+ }[] | undefined;
479
+ method?: string[] | undefined;
480
+ queryString?: {
481
+ value?: {
482
+ exact?: string | undefined;
483
+ startsWith?: string | undefined;
484
+ regex?: string | undefined;
485
+ } | undefined;
486
+ key?: {
487
+ exact?: string | undefined;
488
+ startsWith?: string | undefined;
489
+ regex?: string | undefined;
490
+ } | undefined;
491
+ }[] | undefined;
492
+ }, {
493
+ path?: {
494
+ exact?: string | undefined;
495
+ startsWith?: string | undefined;
496
+ regex?: string | undefined;
497
+ } | undefined;
498
+ headers?: {
499
+ value?: {
500
+ exact?: string | undefined;
501
+ startsWith?: string | undefined;
502
+ regex?: string | undefined;
503
+ } | undefined;
504
+ key?: {
505
+ exact?: string | undefined;
506
+ startsWith?: string | undefined;
507
+ regex?: string | undefined;
508
+ } | undefined;
509
+ }[] | undefined;
510
+ method?: string[] | undefined;
511
+ queryString?: {
512
+ value?: {
513
+ exact?: string | undefined;
514
+ startsWith?: string | undefined;
515
+ regex?: string | undefined;
516
+ } | undefined;
517
+ key?: {
518
+ exact?: string | undefined;
519
+ startsWith?: string | undefined;
520
+ regex?: string | undefined;
521
+ } | undefined;
522
+ }[] | undefined;
523
+ }>>;
524
+ }, "strip", zod0.ZodTypeAny, {
525
+ domain: string;
526
+ match?: {
527
+ path?: {
528
+ exact?: string | undefined;
529
+ startsWith?: string | undefined;
530
+ regex?: string | undefined;
531
+ } | undefined;
532
+ headers?: {
533
+ value?: {
534
+ exact?: string | undefined;
535
+ startsWith?: string | undefined;
536
+ regex?: string | undefined;
537
+ } | undefined;
538
+ key?: {
539
+ exact?: string | undefined;
540
+ startsWith?: string | undefined;
541
+ regex?: string | undefined;
542
+ } | undefined;
543
+ }[] | undefined;
544
+ method?: string[] | undefined;
545
+ queryString?: {
546
+ value?: {
547
+ exact?: string | undefined;
548
+ startsWith?: string | undefined;
549
+ regex?: string | undefined;
550
+ } | undefined;
551
+ key?: {
552
+ exact?: string | undefined;
553
+ startsWith?: string | undefined;
554
+ regex?: string | undefined;
555
+ } | undefined;
556
+ }[] | undefined;
557
+ } | undefined;
558
+ headers?: Record<string, string> | undefined;
559
+ headerNames?: string[] | undefined;
560
+ }, {
561
+ domain: string;
562
+ match?: {
563
+ path?: {
564
+ exact?: string | undefined;
565
+ startsWith?: string | undefined;
566
+ regex?: string | undefined;
567
+ } | undefined;
568
+ headers?: {
569
+ value?: {
570
+ exact?: string | undefined;
571
+ startsWith?: string | undefined;
572
+ regex?: string | undefined;
573
+ } | undefined;
574
+ key?: {
575
+ exact?: string | undefined;
576
+ startsWith?: string | undefined;
577
+ regex?: string | undefined;
578
+ } | undefined;
579
+ }[] | undefined;
580
+ method?: string[] | undefined;
581
+ queryString?: {
582
+ value?: {
583
+ exact?: string | undefined;
584
+ startsWith?: string | undefined;
585
+ regex?: string | undefined;
586
+ } | undefined;
587
+ key?: {
588
+ exact?: string | undefined;
589
+ startsWith?: string | undefined;
590
+ regex?: string | undefined;
591
+ } | undefined;
592
+ }[] | undefined;
593
+ } | undefined;
594
+ headers?: Record<string, string> | undefined;
595
+ headerNames?: string[] | undefined;
596
+ }>, "many">>;
597
+ forwardRules: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
598
+ domain: zod0.ZodString;
599
+ forwardURL: zod0.ZodString;
600
+ match: zod0.ZodOptional<zod0.ZodObject<{
601
+ path: zod0.ZodOptional<zod0.ZodObject<{
602
+ exact: zod0.ZodOptional<zod0.ZodString>;
603
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
604
+ regex: zod0.ZodOptional<zod0.ZodString>;
605
+ }, "strip", zod0.ZodTypeAny, {
606
+ exact?: string | undefined;
607
+ startsWith?: string | undefined;
608
+ regex?: string | undefined;
609
+ }, {
610
+ exact?: string | undefined;
611
+ startsWith?: string | undefined;
612
+ regex?: string | undefined;
613
+ }>>;
614
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
615
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
616
+ key: zod0.ZodOptional<zod0.ZodObject<{
617
+ exact: zod0.ZodOptional<zod0.ZodString>;
618
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
619
+ regex: zod0.ZodOptional<zod0.ZodString>;
620
+ }, "strip", zod0.ZodTypeAny, {
621
+ exact?: string | undefined;
622
+ startsWith?: string | undefined;
623
+ regex?: string | undefined;
624
+ }, {
625
+ exact?: string | undefined;
626
+ startsWith?: string | undefined;
627
+ regex?: string | undefined;
628
+ }>>;
629
+ value: zod0.ZodOptional<zod0.ZodObject<{
630
+ exact: zod0.ZodOptional<zod0.ZodString>;
631
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
632
+ regex: zod0.ZodOptional<zod0.ZodString>;
633
+ }, "strip", zod0.ZodTypeAny, {
634
+ exact?: string | undefined;
635
+ startsWith?: string | undefined;
636
+ regex?: string | undefined;
637
+ }, {
638
+ exact?: string | undefined;
639
+ startsWith?: string | undefined;
640
+ regex?: string | undefined;
641
+ }>>;
642
+ }, "strip", zod0.ZodTypeAny, {
643
+ value?: {
644
+ exact?: string | undefined;
645
+ startsWith?: string | undefined;
646
+ regex?: string | undefined;
647
+ } | undefined;
648
+ key?: {
649
+ exact?: string | undefined;
650
+ startsWith?: string | undefined;
651
+ regex?: string | undefined;
652
+ } | undefined;
653
+ }, {
654
+ value?: {
655
+ exact?: string | undefined;
656
+ startsWith?: string | undefined;
657
+ regex?: string | undefined;
658
+ } | undefined;
659
+ key?: {
660
+ exact?: string | undefined;
661
+ startsWith?: string | undefined;
662
+ regex?: string | undefined;
663
+ } | undefined;
664
+ }>, "many">>;
665
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
666
+ key: zod0.ZodOptional<zod0.ZodObject<{
667
+ exact: zod0.ZodOptional<zod0.ZodString>;
668
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
669
+ regex: zod0.ZodOptional<zod0.ZodString>;
670
+ }, "strip", zod0.ZodTypeAny, {
671
+ exact?: string | undefined;
672
+ startsWith?: string | undefined;
673
+ regex?: string | undefined;
674
+ }, {
675
+ exact?: string | undefined;
676
+ startsWith?: string | undefined;
677
+ regex?: string | undefined;
678
+ }>>;
679
+ value: zod0.ZodOptional<zod0.ZodObject<{
680
+ exact: zod0.ZodOptional<zod0.ZodString>;
681
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
682
+ regex: zod0.ZodOptional<zod0.ZodString>;
683
+ }, "strip", zod0.ZodTypeAny, {
684
+ exact?: string | undefined;
685
+ startsWith?: string | undefined;
686
+ regex?: string | undefined;
687
+ }, {
688
+ exact?: string | undefined;
689
+ startsWith?: string | undefined;
690
+ regex?: string | undefined;
691
+ }>>;
692
+ }, "strip", zod0.ZodTypeAny, {
693
+ value?: {
694
+ exact?: string | undefined;
695
+ startsWith?: string | undefined;
696
+ regex?: string | undefined;
697
+ } | undefined;
698
+ key?: {
699
+ exact?: string | undefined;
700
+ startsWith?: string | undefined;
701
+ regex?: string | undefined;
702
+ } | undefined;
703
+ }, {
704
+ value?: {
705
+ exact?: string | undefined;
706
+ startsWith?: string | undefined;
707
+ regex?: string | undefined;
708
+ } | undefined;
709
+ key?: {
710
+ exact?: string | undefined;
711
+ startsWith?: string | undefined;
712
+ regex?: string | undefined;
713
+ } | undefined;
714
+ }>, "many">>;
715
+ }, "strip", zod0.ZodTypeAny, {
716
+ path?: {
717
+ exact?: string | undefined;
718
+ startsWith?: string | undefined;
719
+ regex?: string | undefined;
720
+ } | undefined;
721
+ headers?: {
722
+ value?: {
723
+ exact?: string | undefined;
724
+ startsWith?: string | undefined;
725
+ regex?: string | undefined;
726
+ } | undefined;
727
+ key?: {
728
+ exact?: string | undefined;
729
+ startsWith?: string | undefined;
730
+ regex?: string | undefined;
731
+ } | undefined;
732
+ }[] | undefined;
733
+ method?: string[] | undefined;
734
+ queryString?: {
735
+ value?: {
736
+ exact?: string | undefined;
737
+ startsWith?: string | undefined;
738
+ regex?: string | undefined;
739
+ } | undefined;
740
+ key?: {
741
+ exact?: string | undefined;
742
+ startsWith?: string | undefined;
743
+ regex?: string | undefined;
744
+ } | undefined;
745
+ }[] | undefined;
746
+ }, {
747
+ path?: {
748
+ exact?: string | undefined;
749
+ startsWith?: string | undefined;
750
+ regex?: string | undefined;
751
+ } | undefined;
752
+ headers?: {
753
+ value?: {
754
+ exact?: string | undefined;
755
+ startsWith?: string | undefined;
756
+ regex?: string | undefined;
757
+ } | undefined;
758
+ key?: {
759
+ exact?: string | undefined;
760
+ startsWith?: string | undefined;
761
+ regex?: string | undefined;
762
+ } | undefined;
763
+ }[] | undefined;
764
+ method?: string[] | undefined;
765
+ queryString?: {
766
+ value?: {
767
+ exact?: string | undefined;
768
+ startsWith?: string | undefined;
769
+ regex?: string | undefined;
770
+ } | undefined;
771
+ key?: {
772
+ exact?: string | undefined;
773
+ startsWith?: string | undefined;
774
+ regex?: string | undefined;
775
+ } | undefined;
776
+ }[] | undefined;
777
+ }>>;
778
+ }, "strip", zod0.ZodTypeAny, {
779
+ domain: string;
780
+ forwardURL: string;
781
+ match?: {
782
+ path?: {
783
+ exact?: string | undefined;
784
+ startsWith?: string | undefined;
785
+ regex?: string | undefined;
786
+ } | undefined;
787
+ headers?: {
788
+ value?: {
789
+ exact?: string | undefined;
790
+ startsWith?: string | undefined;
791
+ regex?: string | undefined;
792
+ } | undefined;
793
+ key?: {
794
+ exact?: string | undefined;
795
+ startsWith?: string | undefined;
796
+ regex?: string | undefined;
797
+ } | undefined;
798
+ }[] | undefined;
799
+ method?: string[] | undefined;
800
+ queryString?: {
801
+ value?: {
802
+ exact?: string | undefined;
803
+ startsWith?: string | undefined;
804
+ regex?: string | undefined;
805
+ } | undefined;
806
+ key?: {
807
+ exact?: string | undefined;
808
+ startsWith?: string | undefined;
809
+ regex?: string | undefined;
810
+ } | undefined;
811
+ }[] | undefined;
812
+ } | undefined;
813
+ }, {
814
+ domain: string;
815
+ forwardURL: string;
816
+ match?: {
817
+ path?: {
818
+ exact?: string | undefined;
819
+ startsWith?: string | undefined;
820
+ regex?: string | undefined;
821
+ } | undefined;
822
+ headers?: {
823
+ value?: {
824
+ exact?: string | undefined;
825
+ startsWith?: string | undefined;
826
+ regex?: string | undefined;
827
+ } | undefined;
828
+ key?: {
829
+ exact?: string | undefined;
830
+ startsWith?: string | undefined;
831
+ regex?: string | undefined;
832
+ } | undefined;
833
+ }[] | undefined;
834
+ method?: string[] | undefined;
835
+ queryString?: {
836
+ value?: {
837
+ exact?: string | undefined;
838
+ startsWith?: string | undefined;
839
+ regex?: string | undefined;
840
+ } | undefined;
841
+ key?: {
842
+ exact?: string | undefined;
843
+ startsWith?: string | undefined;
844
+ regex?: string | undefined;
845
+ } | undefined;
846
+ }[] | undefined;
847
+ } | undefined;
848
+ }>, "many">>;
849
+ }, zod0.ZodTypeAny, "passthrough"> | undefined;
850
+ totalEgressBytes?: number | undefined;
851
+ totalIngressBytes?: number | undefined;
852
+ totalActiveCpuDurationMs?: number | undefined;
853
+ totalDurationMs?: number | undefined;
854
+ currentSnapshotId?: string | undefined;
855
+ cwd?: string | undefined;
856
+ statusUpdatedAt?: number | undefined;
857
+ snapshotExpiration?: number | undefined;
858
+ }[];
859
+ pagination: {
860
+ count: number;
861
+ next: string | null;
862
+ };
863
+ }, "sandboxes">>;
864
+ /**
865
+ * Serialize a Sandbox instance to plain data for @workflow/serde.
866
+ *
867
+ * @param instance - The Sandbox instance to serialize
868
+ * @returns A plain object containing sandbox metadata and routes
869
+ */
870
+ static [WORKFLOW_SERIALIZE](instance: Sandbox): SerializedSandbox;
871
+ /**
872
+ * Deserialize a Sandbox from serialized snapshot data.
873
+ *
874
+ * The deserialized instance uses the serialized metadata synchronously and
875
+ * lazily creates an API client only when methods perform API requests.
876
+ *
877
+ * @param data - The serialized sandbox data
878
+ * @returns The reconstructed Sandbox instance
879
+ */
880
+ static [WORKFLOW_DESERIALIZE](data: SerializedSandbox): Sandbox;
881
+ /**
882
+ * Create a new sandbox.
883
+ *
884
+ * @param params - Creation parameters and optional credentials.
885
+ * @returns A promise resolving to the created {@link Sandbox}.
886
+ * @example
887
+ * <caption>Create a sandbox with default options</caption>
888
+ * const sandbox = await Sandbox.create();
889
+ *
890
+ * @example
891
+ * <caption>Create a sandbox and drop it in the end of the block</caption>
892
+ * async function fn() {
893
+ * await using const sandbox = await Sandbox.create();
894
+ * // Sandbox automatically stopped at the end of the lexical scope
895
+ * }
896
+ */
897
+ static create(params?: WithPrivate<CreateSandboxParams | (CreateSandboxParams & Credentials)> & WithFetchOptions): Promise<Sandbox & AsyncDisposable>;
898
+ /**
899
+ * Retrieve an existing sandbox and resume its session.
900
+ *
901
+ * @param params - Get parameters and optional credentials.
902
+ * @returns A promise resolving to the {@link Sandbox}.
903
+ */
904
+ static get(params: WithPrivate<GetSandboxParams | (GetSandboxParams & Credentials)> & WithFetchOptions): Promise<Sandbox>;
905
+ /**
906
+ * Retrieve an existing named sandbox, or create a new one if none exists.
907
+ *
908
+ * If `name` is omitted, this always creates a new sandbox and fires
909
+ * `onCreate`. If `name` is provided, it first tries {@link Sandbox.get};
910
+ * on `not_found` it creates a new sandbox with that name; on
911
+ * `snapshot_not_found` it deletes the stale named sandbox and creates
912
+ * a fresh one with the same name.
913
+ *
914
+ * @param params - Get/create parameters plus an optional `onCreate` hook.
915
+ * @returns A promise resolving to the {@link Sandbox}.
916
+ *
917
+ * @example
918
+ * <caption>Idempotent named sandbox with one-time setup</caption>
919
+ * const sandbox = await Sandbox.getOrCreate({
920
+ * name: "my-workspace",
921
+ * onCreate: async (sbx) => {
922
+ * await sbx.writeFiles([
923
+ * { path: "README.md", content: Buffer.from("# Hello") },
924
+ * ]);
925
+ * },
926
+ * });
927
+ *
928
+ * @example
929
+ * <caption>Unnamed — always creates</caption>
930
+ * const sandbox = await Sandbox.getOrCreate({
931
+ * onCreate: async (sbx) => {
932
+ * await sbx.runCommand("npm", ["install"]);
933
+ * },
934
+ * });
935
+ */
936
+ static getOrCreate(params?: WithPrivate<GetOrCreateSandboxParams | (GetOrCreateSandboxParams & Credentials)> & WithFetchOptions): Promise<Sandbox>;
937
+ /**
938
+ * Create a new Sandbox instance.
939
+ *
940
+ * @param params.client - Optional API client. If not provided, will be lazily created using global credentials.
941
+ * @param params.routes - Port-to-subdomain mappings for exposed ports
942
+ * @param params.sandbox - Sandbox snapshot metadata
943
+ */
944
+ constructor({
945
+ client,
946
+ routes,
947
+ session,
948
+ sandbox,
949
+ projectId,
950
+ onResume
951
+ }: {
952
+ client?: APIClient;
953
+ routes: SandboxRouteData[];
954
+ session?: SessionMetaData;
955
+ sandbox: SandboxMetaData;
956
+ projectId?: string;
957
+ onResume?: (sandbox: Sandbox) => Promise<void>;
958
+ });
959
+ /**
960
+ * Get the current session (the running VM) for this sandbox.
961
+ *
962
+ * @returns The {@link Session} instance.
963
+ */
964
+ currentSession(): Session;
965
+ /**
966
+ * Resume this sandbox by creating a new session via `getSandbox`.
967
+ */
968
+ private resume;
969
+ private doResume;
970
+ /**
971
+ * Poll until the current session reaches a terminal state, then resume.
972
+ */
973
+ private waitForStopAndResume;
974
+ /**
975
+ * Execute `fn`, and if the session is stopped/stopping/snapshotting, resume and retry.
976
+ */
977
+ private withResume;
978
+ /**
979
+ * Start executing a command in this sandbox.
980
+ *
981
+ * @param command - The command to execute.
982
+ * @param args - Arguments to pass to the command.
983
+ * @param opts - Optional parameters.
984
+ * @param opts.signal - An AbortSignal to cancel the command execution.
985
+ * @returns A {@link CommandFinished} result once execution is done.
986
+ */
987
+ runCommand(command: string, args?: string[], opts?: {
988
+ signal?: AbortSignal;
989
+ }): Promise<CommandFinished>;
990
+ /**
991
+ * Start executing a command in detached mode.
992
+ *
993
+ * @param params - The command parameters.
994
+ * @returns A {@link Command} instance for the running command.
995
+ */
996
+ runCommand(params: RunCommandParams & {
997
+ detached: true;
998
+ }): Promise<Command>;
999
+ /**
1000
+ * Start executing a command in this sandbox.
1001
+ *
1002
+ * @param params - The command parameters.
1003
+ * @returns A {@link CommandFinished} result once execution is done.
1004
+ */
1005
+ runCommand(params: RunCommandParams): Promise<CommandFinished>;
1006
+ /**
1007
+ * Internal helper to start a command in the sandbox.
1008
+ *
1009
+ * @param params - Command execution parameters.
1010
+ * @returns A {@link Command} or {@link CommandFinished}, depending on `detached`.
1011
+ * @internal
1012
+ */
1013
+ getCommand(cmdId: string, opts?: {
1014
+ signal?: AbortSignal;
1015
+ }): Promise<Command>;
1016
+ /**
1017
+ * Create a directory in the filesystem of this sandbox.
1018
+ *
1019
+ * @param path - Path of the directory to create
1020
+ * @param opts - Optional parameters.
1021
+ * @param opts.signal - An AbortSignal to cancel the operation.
1022
+ */
1023
+ mkDir(path: string, opts?: {
1024
+ signal?: AbortSignal;
1025
+ }): Promise<void>;
1026
+ /**
1027
+ * Read a file from the filesystem of this sandbox as a stream.
1028
+ *
1029
+ * @param file - File to read, with path and optional cwd
1030
+ * @param opts - Optional parameters.
1031
+ * @param opts.signal - An AbortSignal to cancel the operation.
1032
+ * @returns A promise that resolves to a ReadableStream containing the file contents, or null if file not found
1033
+ */
1034
+ readFile(file: {
1035
+ path: string;
1036
+ cwd?: string;
1037
+ }, opts?: {
1038
+ signal?: AbortSignal;
1039
+ }): Promise<NodeJS.ReadableStream | null>;
1040
+ /**
1041
+ * Read a file from the filesystem of this sandbox as a Buffer.
1042
+ *
1043
+ * @param file - File to read, with path and optional cwd
1044
+ * @param opts - Optional parameters.
1045
+ * @param opts.signal - An AbortSignal to cancel the operation.
1046
+ * @returns A promise that resolves to the file contents as a Buffer, or null if file not found
1047
+ */
1048
+ readFileToBuffer(file: {
1049
+ path: string;
1050
+ cwd?: string;
1051
+ }, opts?: {
1052
+ signal?: AbortSignal;
1053
+ }): Promise<Buffer | null>;
1054
+ /**
1055
+ * Download a file from the sandbox to the local filesystem.
1056
+ *
1057
+ * @param src - Source file on the sandbox, with path and optional cwd
1058
+ * @param dst - Destination file on the local machine, with path and optional cwd
1059
+ * @param opts - Optional parameters.
1060
+ * @param opts.mkdirRecursive - If true, create parent directories for the destination if they don't exist.
1061
+ * @param opts.signal - An AbortSignal to cancel the operation.
1062
+ * @returns The absolute path to the written file, or null if the source file was not found
1063
+ */
1064
+ downloadFile(src: {
1065
+ path: string;
1066
+ cwd?: string;
1067
+ }, dst: {
1068
+ path: string;
1069
+ cwd?: string;
1070
+ }, opts?: {
1071
+ mkdirRecursive?: boolean;
1072
+ signal?: AbortSignal;
1073
+ }): Promise<string | null>;
1074
+ /**
1075
+ * Write files to the filesystem of this sandbox.
1076
+ * Defaults to writing to /vercel/sandbox unless an absolute path is specified.
1077
+ * Writes files using the `vercel-sandbox` user.
1078
+ *
1079
+ * @param files - Array of files with path, content, and optional mode (permissions)
1080
+ * @param opts - Optional parameters.
1081
+ * @param opts.signal - An AbortSignal to cancel the operation.
1082
+ * @returns A promise that resolves when the files are written
1083
+ *
1084
+ * @example
1085
+ * // Write an executable script
1086
+ * await sandbox.writeFiles([
1087
+ * { path: "/usr/local/bin/myscript", content: "#!/bin/bash\necho hello", mode: 0o755 }
1088
+ * ]);
1089
+ */
1090
+ writeFiles(files: {
1091
+ path: string;
1092
+ content: string | Uint8Array;
1093
+ mode?: number;
1094
+ }[], opts?: {
1095
+ signal?: AbortSignal;
1096
+ }): Promise<void>;
1097
+ /**
1098
+ * Get the public domain of a port of this sandbox.
1099
+ *
1100
+ * @param p - Port number to resolve
1101
+ * @returns A full domain (e.g. `https://subdomain.vercel.run`)
1102
+ * @throws If the port has no associated route
1103
+ */
1104
+ domain(p: number): string;
1105
+ /**
1106
+ * Stop the sandbox.
1107
+ *
1108
+ * @param opts - Optional parameters.
1109
+ * @param opts.signal - An AbortSignal to cancel the operation.
1110
+ * @returns The final session state after stopping, with optional snapshot metadata.
1111
+ */
1112
+ stop(opts?: {
1113
+ signal?: AbortSignal;
1114
+ }): Promise<SandboxSnapshot & {
1115
+ snapshot?: SnapshotMetadata;
1116
+ }>;
1117
+ /**
1118
+ * Update the network policy for this sandbox.
1119
+ *
1120
+ * @deprecated Use {@link Sandbox.update} instead.
1121
+ *
1122
+ * @param networkPolicy - The new network policy to apply.
1123
+ * @param opts - Optional parameters.
1124
+ * @param opts.signal - An AbortSignal to cancel the operation.
1125
+ * @returns A promise that resolves when the network policy is updated.
1126
+ *
1127
+ * @example
1128
+ * // Restrict to specific domains
1129
+ * await sandbox.updateNetworkPolicy({
1130
+ * allow: ["*.npmjs.org", "github.com"],
1131
+ * });
1132
+ *
1133
+ * @example
1134
+ * // Inject credentials with per-domain transformers
1135
+ * await sandbox.updateNetworkPolicy({
1136
+ * allow: {
1137
+ * "ai-gateway.vercel.sh": [{
1138
+ * transform: [{
1139
+ * headers: { authorization: "Bearer ..." }
1140
+ * }]
1141
+ * }],
1142
+ * "*": []
1143
+ * }
1144
+ * });
1145
+ *
1146
+ * @example
1147
+ * // Deny all network access
1148
+ * await sandbox.updateNetworkPolicy("deny-all");
1149
+ */
1150
+ updateNetworkPolicy(networkPolicy: NetworkPolicy, opts?: {
1151
+ signal?: AbortSignal;
1152
+ }): Promise<NetworkPolicy>;
1153
+ /**
1154
+ * Extend the timeout of the sandbox by the specified duration.
1155
+ *
1156
+ * This allows you to extend the lifetime of a sandbox up until the maximum
1157
+ * execution timeout for your plan.
1158
+ *
1159
+ * @param duration - The duration in milliseconds to extend the timeout by
1160
+ * @param opts - Optional parameters.
1161
+ * @param opts.signal - An AbortSignal to cancel the operation.
1162
+ * @returns A promise that resolves when the timeout is extended
1163
+ *
1164
+ * @example
1165
+ * const sandbox = await Sandbox.create({ timeout: ms('10m') });
1166
+ * // Extends timeout by 5 minutes, to a total of 15 minutes.
1167
+ * await sandbox.extendTimeout(ms('5m'));
1168
+ */
1169
+ extendTimeout(duration: number, opts?: {
1170
+ signal?: AbortSignal;
1171
+ }): Promise<void>;
1172
+ /**
1173
+ * Create a snapshot from this currently running sandbox. New sandboxes can
1174
+ * then be created from this snapshot using {@link Sandbox.createFromSnapshot}.
1175
+ *
1176
+ * Note: this sandbox will be stopped as part of the snapshot creation process.
1177
+ *
1178
+ * @param opts - Optional parameters.
1179
+ * @param opts.expiration - Optional expiration time in milliseconds. Use 0 for no expiration at all.
1180
+ * @param opts.signal - An AbortSignal to cancel the operation.
1181
+ * @returns A promise that resolves to the Snapshot instance
1182
+ */
1183
+ snapshot(opts?: {
1184
+ expiration?: number;
1185
+ signal?: AbortSignal;
1186
+ }): Promise<Snapshot>;
1187
+ /**
1188
+ * Update the sandbox configuration.
1189
+ *
1190
+ * When `ports` is provided, it is treated as the full desired port list:
1191
+ * any currently exposed port omitted from the array will be deregistered.
1192
+ *
1193
+ * @param params - Fields to update.
1194
+ * @param opts - Optional abort signal.
1195
+ */
1196
+ update(params: {
1197
+ persistent?: boolean;
1198
+ resources?: {
1199
+ vcpus?: number;
1200
+ };
1201
+ timeout?: number;
1202
+ networkPolicy?: NetworkPolicy;
1203
+ tags?: Record<string, string>;
1204
+ ports?: number[];
1205
+ snapshotExpiration?: number;
1206
+ currentSnapshotId?: string;
1207
+ }, opts?: {
1208
+ signal?: AbortSignal;
1209
+ }): Promise<void>;
1210
+ /**
1211
+ * Delete this sandbox.
1212
+ *
1213
+ * After deletion the instance becomes inert — all further API calls will
1214
+ * throw immediately.
1215
+ */
1216
+ delete(opts?: {
1217
+ signal?: AbortSignal;
1218
+ }): Promise<void>;
1219
+ /**
1220
+ * List sessions (VMs) that have been created for this sandbox.
1221
+ *
1222
+ * @param params - Optional pagination parameters.
1223
+ * @returns The list of sessions and pagination metadata.
1224
+ */
1225
+ listSessions(params?: {
1226
+ limit?: number;
1227
+ cursor?: string;
1228
+ sortOrder?: "asc" | "desc";
1229
+ signal?: AbortSignal;
1230
+ }): Promise<Paginator<{
1231
+ pagination: {
1232
+ count: number;
1233
+ next: string | null;
1234
+ };
1235
+ sessions: zod0.objectInputType<{
1236
+ id: zod0.ZodString;
1237
+ memory: zod0.ZodNumber;
1238
+ vcpus: zod0.ZodNumber;
1239
+ region: zod0.ZodString;
1240
+ runtime: zod0.ZodString;
1241
+ timeout: zod0.ZodNumber;
1242
+ status: zod0.ZodEnum<["pending", "running", "stopping", "stopped", "failed", "aborted", "snapshotting"]>;
1243
+ requestedAt: zod0.ZodNumber;
1244
+ startedAt: zod0.ZodOptional<zod0.ZodNumber>;
1245
+ requestedStopAt: zod0.ZodOptional<zod0.ZodNumber>;
1246
+ stoppedAt: zod0.ZodOptional<zod0.ZodNumber>;
1247
+ abortedAt: zod0.ZodOptional<zod0.ZodNumber>;
1248
+ duration: zod0.ZodOptional<zod0.ZodNumber>;
1249
+ sourceSnapshotId: zod0.ZodOptional<zod0.ZodString>;
1250
+ snapshottedAt: zod0.ZodOptional<zod0.ZodNumber>;
1251
+ createdAt: zod0.ZodNumber;
1252
+ cwd: zod0.ZodString;
1253
+ updatedAt: zod0.ZodNumber;
1254
+ interactivePort: zod0.ZodOptional<zod0.ZodNumber>;
1255
+ networkPolicy: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodUnion<[zod0.ZodObject<{
1256
+ mode: zod0.ZodLiteral<"allow-all">;
1257
+ }, "passthrough", zod0.ZodTypeAny, zod0.objectOutputType<{
1258
+ mode: zod0.ZodLiteral<"allow-all">;
1259
+ }, zod0.ZodTypeAny, "passthrough">, zod0.objectInputType<{
1260
+ mode: zod0.ZodLiteral<"allow-all">;
1261
+ }, zod0.ZodTypeAny, "passthrough">>, zod0.ZodObject<{
1262
+ mode: zod0.ZodLiteral<"deny-all">;
1263
+ }, "passthrough", zod0.ZodTypeAny, zod0.objectOutputType<{
1264
+ mode: zod0.ZodLiteral<"deny-all">;
1265
+ }, zod0.ZodTypeAny, "passthrough">, zod0.objectInputType<{
1266
+ mode: zod0.ZodLiteral<"deny-all">;
1267
+ }, zod0.ZodTypeAny, "passthrough">>]>, zod0.ZodObject<{
1268
+ mode: zod0.ZodLiteral<"custom">;
1269
+ allowedDomains: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1270
+ allowedCIDRs: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1271
+ deniedCIDRs: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1272
+ injectionRules: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1273
+ domain: zod0.ZodString;
1274
+ headers: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodString>>;
1275
+ headerNames: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1276
+ match: zod0.ZodOptional<zod0.ZodObject<{
1277
+ path: zod0.ZodOptional<zod0.ZodObject<{
1278
+ exact: zod0.ZodOptional<zod0.ZodString>;
1279
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1280
+ regex: zod0.ZodOptional<zod0.ZodString>;
1281
+ }, "strip", zod0.ZodTypeAny, {
1282
+ exact?: string | undefined;
1283
+ startsWith?: string | undefined;
1284
+ regex?: string | undefined;
1285
+ }, {
1286
+ exact?: string | undefined;
1287
+ startsWith?: string | undefined;
1288
+ regex?: string | undefined;
1289
+ }>>;
1290
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1291
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1292
+ key: zod0.ZodOptional<zod0.ZodObject<{
1293
+ exact: zod0.ZodOptional<zod0.ZodString>;
1294
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1295
+ regex: zod0.ZodOptional<zod0.ZodString>;
1296
+ }, "strip", zod0.ZodTypeAny, {
1297
+ exact?: string | undefined;
1298
+ startsWith?: string | undefined;
1299
+ regex?: string | undefined;
1300
+ }, {
1301
+ exact?: string | undefined;
1302
+ startsWith?: string | undefined;
1303
+ regex?: string | undefined;
1304
+ }>>;
1305
+ value: zod0.ZodOptional<zod0.ZodObject<{
1306
+ exact: zod0.ZodOptional<zod0.ZodString>;
1307
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1308
+ regex: zod0.ZodOptional<zod0.ZodString>;
1309
+ }, "strip", zod0.ZodTypeAny, {
1310
+ exact?: string | undefined;
1311
+ startsWith?: string | undefined;
1312
+ regex?: string | undefined;
1313
+ }, {
1314
+ exact?: string | undefined;
1315
+ startsWith?: string | undefined;
1316
+ regex?: string | undefined;
1317
+ }>>;
1318
+ }, "strip", zod0.ZodTypeAny, {
1319
+ value?: {
1320
+ exact?: string | undefined;
1321
+ startsWith?: string | undefined;
1322
+ regex?: string | undefined;
1323
+ } | undefined;
1324
+ key?: {
1325
+ exact?: string | undefined;
1326
+ startsWith?: string | undefined;
1327
+ regex?: string | undefined;
1328
+ } | undefined;
1329
+ }, {
1330
+ value?: {
1331
+ exact?: string | undefined;
1332
+ startsWith?: string | undefined;
1333
+ regex?: string | undefined;
1334
+ } | undefined;
1335
+ key?: {
1336
+ exact?: string | undefined;
1337
+ startsWith?: string | undefined;
1338
+ regex?: string | undefined;
1339
+ } | undefined;
1340
+ }>, "many">>;
1341
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1342
+ key: zod0.ZodOptional<zod0.ZodObject<{
1343
+ exact: zod0.ZodOptional<zod0.ZodString>;
1344
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1345
+ regex: zod0.ZodOptional<zod0.ZodString>;
1346
+ }, "strip", zod0.ZodTypeAny, {
1347
+ exact?: string | undefined;
1348
+ startsWith?: string | undefined;
1349
+ regex?: string | undefined;
1350
+ }, {
1351
+ exact?: string | undefined;
1352
+ startsWith?: string | undefined;
1353
+ regex?: string | undefined;
1354
+ }>>;
1355
+ value: zod0.ZodOptional<zod0.ZodObject<{
1356
+ exact: zod0.ZodOptional<zod0.ZodString>;
1357
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1358
+ regex: zod0.ZodOptional<zod0.ZodString>;
1359
+ }, "strip", zod0.ZodTypeAny, {
1360
+ exact?: string | undefined;
1361
+ startsWith?: string | undefined;
1362
+ regex?: string | undefined;
1363
+ }, {
1364
+ exact?: string | undefined;
1365
+ startsWith?: string | undefined;
1366
+ regex?: string | undefined;
1367
+ }>>;
1368
+ }, "strip", zod0.ZodTypeAny, {
1369
+ value?: {
1370
+ exact?: string | undefined;
1371
+ startsWith?: string | undefined;
1372
+ regex?: string | undefined;
1373
+ } | undefined;
1374
+ key?: {
1375
+ exact?: string | undefined;
1376
+ startsWith?: string | undefined;
1377
+ regex?: string | undefined;
1378
+ } | undefined;
1379
+ }, {
1380
+ value?: {
1381
+ exact?: string | undefined;
1382
+ startsWith?: string | undefined;
1383
+ regex?: string | undefined;
1384
+ } | undefined;
1385
+ key?: {
1386
+ exact?: string | undefined;
1387
+ startsWith?: string | undefined;
1388
+ regex?: string | undefined;
1389
+ } | undefined;
1390
+ }>, "many">>;
1391
+ }, "strip", zod0.ZodTypeAny, {
1392
+ path?: {
1393
+ exact?: string | undefined;
1394
+ startsWith?: string | undefined;
1395
+ regex?: string | undefined;
1396
+ } | undefined;
1397
+ headers?: {
1398
+ value?: {
1399
+ exact?: string | undefined;
1400
+ startsWith?: string | undefined;
1401
+ regex?: string | undefined;
1402
+ } | undefined;
1403
+ key?: {
1404
+ exact?: string | undefined;
1405
+ startsWith?: string | undefined;
1406
+ regex?: string | undefined;
1407
+ } | undefined;
1408
+ }[] | undefined;
1409
+ method?: string[] | undefined;
1410
+ queryString?: {
1411
+ value?: {
1412
+ exact?: string | undefined;
1413
+ startsWith?: string | undefined;
1414
+ regex?: string | undefined;
1415
+ } | undefined;
1416
+ key?: {
1417
+ exact?: string | undefined;
1418
+ startsWith?: string | undefined;
1419
+ regex?: string | undefined;
1420
+ } | undefined;
1421
+ }[] | undefined;
1422
+ }, {
1423
+ path?: {
1424
+ exact?: string | undefined;
1425
+ startsWith?: string | undefined;
1426
+ regex?: string | undefined;
1427
+ } | undefined;
1428
+ headers?: {
1429
+ value?: {
1430
+ exact?: string | undefined;
1431
+ startsWith?: string | undefined;
1432
+ regex?: string | undefined;
1433
+ } | undefined;
1434
+ key?: {
1435
+ exact?: string | undefined;
1436
+ startsWith?: string | undefined;
1437
+ regex?: string | undefined;
1438
+ } | undefined;
1439
+ }[] | undefined;
1440
+ method?: string[] | undefined;
1441
+ queryString?: {
1442
+ value?: {
1443
+ exact?: string | undefined;
1444
+ startsWith?: string | undefined;
1445
+ regex?: string | undefined;
1446
+ } | undefined;
1447
+ key?: {
1448
+ exact?: string | undefined;
1449
+ startsWith?: string | undefined;
1450
+ regex?: string | undefined;
1451
+ } | undefined;
1452
+ }[] | undefined;
1453
+ }>>;
1454
+ }, "strip", zod0.ZodTypeAny, {
1455
+ domain: string;
1456
+ match?: {
1457
+ path?: {
1458
+ exact?: string | undefined;
1459
+ startsWith?: string | undefined;
1460
+ regex?: string | undefined;
1461
+ } | undefined;
1462
+ headers?: {
1463
+ value?: {
1464
+ exact?: string | undefined;
1465
+ startsWith?: string | undefined;
1466
+ regex?: string | undefined;
1467
+ } | undefined;
1468
+ key?: {
1469
+ exact?: string | undefined;
1470
+ startsWith?: string | undefined;
1471
+ regex?: string | undefined;
1472
+ } | undefined;
1473
+ }[] | undefined;
1474
+ method?: string[] | undefined;
1475
+ queryString?: {
1476
+ value?: {
1477
+ exact?: string | undefined;
1478
+ startsWith?: string | undefined;
1479
+ regex?: string | undefined;
1480
+ } | undefined;
1481
+ key?: {
1482
+ exact?: string | undefined;
1483
+ startsWith?: string | undefined;
1484
+ regex?: string | undefined;
1485
+ } | undefined;
1486
+ }[] | undefined;
1487
+ } | undefined;
1488
+ headers?: Record<string, string> | undefined;
1489
+ headerNames?: string[] | undefined;
1490
+ }, {
1491
+ domain: string;
1492
+ match?: {
1493
+ path?: {
1494
+ exact?: string | undefined;
1495
+ startsWith?: string | undefined;
1496
+ regex?: string | undefined;
1497
+ } | undefined;
1498
+ headers?: {
1499
+ value?: {
1500
+ exact?: string | undefined;
1501
+ startsWith?: string | undefined;
1502
+ regex?: string | undefined;
1503
+ } | undefined;
1504
+ key?: {
1505
+ exact?: string | undefined;
1506
+ startsWith?: string | undefined;
1507
+ regex?: string | undefined;
1508
+ } | undefined;
1509
+ }[] | undefined;
1510
+ method?: string[] | undefined;
1511
+ queryString?: {
1512
+ value?: {
1513
+ exact?: string | undefined;
1514
+ startsWith?: string | undefined;
1515
+ regex?: string | undefined;
1516
+ } | undefined;
1517
+ key?: {
1518
+ exact?: string | undefined;
1519
+ startsWith?: string | undefined;
1520
+ regex?: string | undefined;
1521
+ } | undefined;
1522
+ }[] | undefined;
1523
+ } | undefined;
1524
+ headers?: Record<string, string> | undefined;
1525
+ headerNames?: string[] | undefined;
1526
+ }>, "many">>;
1527
+ forwardRules: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1528
+ domain: zod0.ZodString;
1529
+ forwardURL: zod0.ZodString;
1530
+ match: zod0.ZodOptional<zod0.ZodObject<{
1531
+ path: zod0.ZodOptional<zod0.ZodObject<{
1532
+ exact: zod0.ZodOptional<zod0.ZodString>;
1533
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1534
+ regex: zod0.ZodOptional<zod0.ZodString>;
1535
+ }, "strip", zod0.ZodTypeAny, {
1536
+ exact?: string | undefined;
1537
+ startsWith?: string | undefined;
1538
+ regex?: string | undefined;
1539
+ }, {
1540
+ exact?: string | undefined;
1541
+ startsWith?: string | undefined;
1542
+ regex?: string | undefined;
1543
+ }>>;
1544
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1545
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1546
+ key: zod0.ZodOptional<zod0.ZodObject<{
1547
+ exact: zod0.ZodOptional<zod0.ZodString>;
1548
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1549
+ regex: zod0.ZodOptional<zod0.ZodString>;
1550
+ }, "strip", zod0.ZodTypeAny, {
1551
+ exact?: string | undefined;
1552
+ startsWith?: string | undefined;
1553
+ regex?: string | undefined;
1554
+ }, {
1555
+ exact?: string | undefined;
1556
+ startsWith?: string | undefined;
1557
+ regex?: string | undefined;
1558
+ }>>;
1559
+ value: zod0.ZodOptional<zod0.ZodObject<{
1560
+ exact: zod0.ZodOptional<zod0.ZodString>;
1561
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1562
+ regex: zod0.ZodOptional<zod0.ZodString>;
1563
+ }, "strip", zod0.ZodTypeAny, {
1564
+ exact?: string | undefined;
1565
+ startsWith?: string | undefined;
1566
+ regex?: string | undefined;
1567
+ }, {
1568
+ exact?: string | undefined;
1569
+ startsWith?: string | undefined;
1570
+ regex?: string | undefined;
1571
+ }>>;
1572
+ }, "strip", zod0.ZodTypeAny, {
1573
+ value?: {
1574
+ exact?: string | undefined;
1575
+ startsWith?: string | undefined;
1576
+ regex?: string | undefined;
1577
+ } | undefined;
1578
+ key?: {
1579
+ exact?: string | undefined;
1580
+ startsWith?: string | undefined;
1581
+ regex?: string | undefined;
1582
+ } | undefined;
1583
+ }, {
1584
+ value?: {
1585
+ exact?: string | undefined;
1586
+ startsWith?: string | undefined;
1587
+ regex?: string | undefined;
1588
+ } | undefined;
1589
+ key?: {
1590
+ exact?: string | undefined;
1591
+ startsWith?: string | undefined;
1592
+ regex?: string | undefined;
1593
+ } | undefined;
1594
+ }>, "many">>;
1595
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1596
+ key: zod0.ZodOptional<zod0.ZodObject<{
1597
+ exact: zod0.ZodOptional<zod0.ZodString>;
1598
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1599
+ regex: zod0.ZodOptional<zod0.ZodString>;
1600
+ }, "strip", zod0.ZodTypeAny, {
1601
+ exact?: string | undefined;
1602
+ startsWith?: string | undefined;
1603
+ regex?: string | undefined;
1604
+ }, {
1605
+ exact?: string | undefined;
1606
+ startsWith?: string | undefined;
1607
+ regex?: string | undefined;
1608
+ }>>;
1609
+ value: zod0.ZodOptional<zod0.ZodObject<{
1610
+ exact: zod0.ZodOptional<zod0.ZodString>;
1611
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1612
+ regex: zod0.ZodOptional<zod0.ZodString>;
1613
+ }, "strip", zod0.ZodTypeAny, {
1614
+ exact?: string | undefined;
1615
+ startsWith?: string | undefined;
1616
+ regex?: string | undefined;
1617
+ }, {
1618
+ exact?: string | undefined;
1619
+ startsWith?: string | undefined;
1620
+ regex?: string | undefined;
1621
+ }>>;
1622
+ }, "strip", zod0.ZodTypeAny, {
1623
+ value?: {
1624
+ exact?: string | undefined;
1625
+ startsWith?: string | undefined;
1626
+ regex?: string | undefined;
1627
+ } | undefined;
1628
+ key?: {
1629
+ exact?: string | undefined;
1630
+ startsWith?: string | undefined;
1631
+ regex?: string | undefined;
1632
+ } | undefined;
1633
+ }, {
1634
+ value?: {
1635
+ exact?: string | undefined;
1636
+ startsWith?: string | undefined;
1637
+ regex?: string | undefined;
1638
+ } | undefined;
1639
+ key?: {
1640
+ exact?: string | undefined;
1641
+ startsWith?: string | undefined;
1642
+ regex?: string | undefined;
1643
+ } | undefined;
1644
+ }>, "many">>;
1645
+ }, "strip", zod0.ZodTypeAny, {
1646
+ path?: {
1647
+ exact?: string | undefined;
1648
+ startsWith?: string | undefined;
1649
+ regex?: string | undefined;
1650
+ } | undefined;
1651
+ headers?: {
1652
+ value?: {
1653
+ exact?: string | undefined;
1654
+ startsWith?: string | undefined;
1655
+ regex?: string | undefined;
1656
+ } | undefined;
1657
+ key?: {
1658
+ exact?: string | undefined;
1659
+ startsWith?: string | undefined;
1660
+ regex?: string | undefined;
1661
+ } | undefined;
1662
+ }[] | undefined;
1663
+ method?: string[] | undefined;
1664
+ queryString?: {
1665
+ value?: {
1666
+ exact?: string | undefined;
1667
+ startsWith?: string | undefined;
1668
+ regex?: string | undefined;
1669
+ } | undefined;
1670
+ key?: {
1671
+ exact?: string | undefined;
1672
+ startsWith?: string | undefined;
1673
+ regex?: string | undefined;
1674
+ } | undefined;
1675
+ }[] | undefined;
1676
+ }, {
1677
+ path?: {
1678
+ exact?: string | undefined;
1679
+ startsWith?: string | undefined;
1680
+ regex?: string | undefined;
1681
+ } | undefined;
1682
+ headers?: {
1683
+ value?: {
1684
+ exact?: string | undefined;
1685
+ startsWith?: string | undefined;
1686
+ regex?: string | undefined;
1687
+ } | undefined;
1688
+ key?: {
1689
+ exact?: string | undefined;
1690
+ startsWith?: string | undefined;
1691
+ regex?: string | undefined;
1692
+ } | undefined;
1693
+ }[] | undefined;
1694
+ method?: string[] | undefined;
1695
+ queryString?: {
1696
+ value?: {
1697
+ exact?: string | undefined;
1698
+ startsWith?: string | undefined;
1699
+ regex?: string | undefined;
1700
+ } | undefined;
1701
+ key?: {
1702
+ exact?: string | undefined;
1703
+ startsWith?: string | undefined;
1704
+ regex?: string | undefined;
1705
+ } | undefined;
1706
+ }[] | undefined;
1707
+ }>>;
1708
+ }, "strip", zod0.ZodTypeAny, {
1709
+ domain: string;
1710
+ forwardURL: string;
1711
+ match?: {
1712
+ path?: {
1713
+ exact?: string | undefined;
1714
+ startsWith?: string | undefined;
1715
+ regex?: string | undefined;
1716
+ } | undefined;
1717
+ headers?: {
1718
+ value?: {
1719
+ exact?: string | undefined;
1720
+ startsWith?: string | undefined;
1721
+ regex?: string | undefined;
1722
+ } | undefined;
1723
+ key?: {
1724
+ exact?: string | undefined;
1725
+ startsWith?: string | undefined;
1726
+ regex?: string | undefined;
1727
+ } | undefined;
1728
+ }[] | undefined;
1729
+ method?: string[] | undefined;
1730
+ queryString?: {
1731
+ value?: {
1732
+ exact?: string | undefined;
1733
+ startsWith?: string | undefined;
1734
+ regex?: string | undefined;
1735
+ } | undefined;
1736
+ key?: {
1737
+ exact?: string | undefined;
1738
+ startsWith?: string | undefined;
1739
+ regex?: string | undefined;
1740
+ } | undefined;
1741
+ }[] | undefined;
1742
+ } | undefined;
1743
+ }, {
1744
+ domain: string;
1745
+ forwardURL: string;
1746
+ match?: {
1747
+ path?: {
1748
+ exact?: string | undefined;
1749
+ startsWith?: string | undefined;
1750
+ regex?: string | undefined;
1751
+ } | undefined;
1752
+ headers?: {
1753
+ value?: {
1754
+ exact?: string | undefined;
1755
+ startsWith?: string | undefined;
1756
+ regex?: string | undefined;
1757
+ } | undefined;
1758
+ key?: {
1759
+ exact?: string | undefined;
1760
+ startsWith?: string | undefined;
1761
+ regex?: string | undefined;
1762
+ } | undefined;
1763
+ }[] | undefined;
1764
+ method?: string[] | undefined;
1765
+ queryString?: {
1766
+ value?: {
1767
+ exact?: string | undefined;
1768
+ startsWith?: string | undefined;
1769
+ regex?: string | undefined;
1770
+ } | undefined;
1771
+ key?: {
1772
+ exact?: string | undefined;
1773
+ startsWith?: string | undefined;
1774
+ regex?: string | undefined;
1775
+ } | undefined;
1776
+ }[] | undefined;
1777
+ } | undefined;
1778
+ }>, "many">>;
1779
+ }, "passthrough", zod0.ZodTypeAny, zod0.objectOutputType<{
1780
+ mode: zod0.ZodLiteral<"custom">;
1781
+ allowedDomains: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1782
+ allowedCIDRs: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1783
+ deniedCIDRs: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1784
+ injectionRules: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1785
+ domain: zod0.ZodString;
1786
+ headers: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodString>>;
1787
+ headerNames: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1788
+ match: zod0.ZodOptional<zod0.ZodObject<{
1789
+ path: zod0.ZodOptional<zod0.ZodObject<{
1790
+ exact: zod0.ZodOptional<zod0.ZodString>;
1791
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1792
+ regex: zod0.ZodOptional<zod0.ZodString>;
1793
+ }, "strip", zod0.ZodTypeAny, {
1794
+ exact?: string | undefined;
1795
+ startsWith?: string | undefined;
1796
+ regex?: string | undefined;
1797
+ }, {
1798
+ exact?: string | undefined;
1799
+ startsWith?: string | undefined;
1800
+ regex?: string | undefined;
1801
+ }>>;
1802
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
1803
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1804
+ key: zod0.ZodOptional<zod0.ZodObject<{
1805
+ exact: zod0.ZodOptional<zod0.ZodString>;
1806
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1807
+ regex: zod0.ZodOptional<zod0.ZodString>;
1808
+ }, "strip", zod0.ZodTypeAny, {
1809
+ exact?: string | undefined;
1810
+ startsWith?: string | undefined;
1811
+ regex?: string | undefined;
1812
+ }, {
1813
+ exact?: string | undefined;
1814
+ startsWith?: string | undefined;
1815
+ regex?: string | undefined;
1816
+ }>>;
1817
+ value: zod0.ZodOptional<zod0.ZodObject<{
1818
+ exact: zod0.ZodOptional<zod0.ZodString>;
1819
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1820
+ regex: zod0.ZodOptional<zod0.ZodString>;
1821
+ }, "strip", zod0.ZodTypeAny, {
1822
+ exact?: string | undefined;
1823
+ startsWith?: string | undefined;
1824
+ regex?: string | undefined;
1825
+ }, {
1826
+ exact?: string | undefined;
1827
+ startsWith?: string | undefined;
1828
+ regex?: string | undefined;
1829
+ }>>;
1830
+ }, "strip", zod0.ZodTypeAny, {
1831
+ value?: {
1832
+ exact?: string | undefined;
1833
+ startsWith?: string | undefined;
1834
+ regex?: string | undefined;
1835
+ } | undefined;
1836
+ key?: {
1837
+ exact?: string | undefined;
1838
+ startsWith?: string | undefined;
1839
+ regex?: string | undefined;
1840
+ } | undefined;
1841
+ }, {
1842
+ value?: {
1843
+ exact?: string | undefined;
1844
+ startsWith?: string | undefined;
1845
+ regex?: string | undefined;
1846
+ } | undefined;
1847
+ key?: {
1848
+ exact?: string | undefined;
1849
+ startsWith?: string | undefined;
1850
+ regex?: string | undefined;
1851
+ } | undefined;
1852
+ }>, "many">>;
1853
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
1854
+ key: zod0.ZodOptional<zod0.ZodObject<{
1855
+ exact: zod0.ZodOptional<zod0.ZodString>;
1856
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1857
+ regex: zod0.ZodOptional<zod0.ZodString>;
1858
+ }, "strip", zod0.ZodTypeAny, {
1859
+ exact?: string | undefined;
1860
+ startsWith?: string | undefined;
1861
+ regex?: string | undefined;
1862
+ }, {
1863
+ exact?: string | undefined;
1864
+ startsWith?: string | undefined;
1865
+ regex?: string | undefined;
1866
+ }>>;
1867
+ value: zod0.ZodOptional<zod0.ZodObject<{
1868
+ exact: zod0.ZodOptional<zod0.ZodString>;
1869
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
1870
+ regex: zod0.ZodOptional<zod0.ZodString>;
1871
+ }, "strip", zod0.ZodTypeAny, {
1872
+ exact?: string | undefined;
1873
+ startsWith?: string | undefined;
1874
+ regex?: string | undefined;
1875
+ }, {
1876
+ exact?: string | undefined;
1877
+ startsWith?: string | undefined;
1878
+ regex?: string | undefined;
1879
+ }>>;
1880
+ }, "strip", zod0.ZodTypeAny, {
1881
+ value?: {
1882
+ exact?: string | undefined;
1883
+ startsWith?: string | undefined;
1884
+ regex?: string | undefined;
1885
+ } | undefined;
1886
+ key?: {
1887
+ exact?: string | undefined;
1888
+ startsWith?: string | undefined;
1889
+ regex?: string | undefined;
1890
+ } | undefined;
1891
+ }, {
1892
+ value?: {
1893
+ exact?: string | undefined;
1894
+ startsWith?: string | undefined;
1895
+ regex?: string | undefined;
1896
+ } | undefined;
1897
+ key?: {
1898
+ exact?: string | undefined;
1899
+ startsWith?: string | undefined;
1900
+ regex?: string | undefined;
1901
+ } | undefined;
1902
+ }>, "many">>;
1903
+ }, "strip", zod0.ZodTypeAny, {
1904
+ path?: {
1905
+ exact?: string | undefined;
1906
+ startsWith?: string | undefined;
1907
+ regex?: string | undefined;
1908
+ } | undefined;
1909
+ headers?: {
1910
+ value?: {
1911
+ exact?: string | undefined;
1912
+ startsWith?: string | undefined;
1913
+ regex?: string | undefined;
1914
+ } | undefined;
1915
+ key?: {
1916
+ exact?: string | undefined;
1917
+ startsWith?: string | undefined;
1918
+ regex?: string | undefined;
1919
+ } | undefined;
1920
+ }[] | undefined;
1921
+ method?: string[] | undefined;
1922
+ queryString?: {
1923
+ value?: {
1924
+ exact?: string | undefined;
1925
+ startsWith?: string | undefined;
1926
+ regex?: string | undefined;
1927
+ } | undefined;
1928
+ key?: {
1929
+ exact?: string | undefined;
1930
+ startsWith?: string | undefined;
1931
+ regex?: string | undefined;
1932
+ } | undefined;
1933
+ }[] | undefined;
1934
+ }, {
1935
+ path?: {
1936
+ exact?: string | undefined;
1937
+ startsWith?: string | undefined;
1938
+ regex?: string | undefined;
1939
+ } | undefined;
1940
+ headers?: {
1941
+ value?: {
1942
+ exact?: string | undefined;
1943
+ startsWith?: string | undefined;
1944
+ regex?: string | undefined;
1945
+ } | undefined;
1946
+ key?: {
1947
+ exact?: string | undefined;
1948
+ startsWith?: string | undefined;
1949
+ regex?: string | undefined;
1950
+ } | undefined;
1951
+ }[] | undefined;
1952
+ method?: string[] | undefined;
1953
+ queryString?: {
1954
+ value?: {
1955
+ exact?: string | undefined;
1956
+ startsWith?: string | undefined;
1957
+ regex?: string | undefined;
1958
+ } | undefined;
1959
+ key?: {
1960
+ exact?: string | undefined;
1961
+ startsWith?: string | undefined;
1962
+ regex?: string | undefined;
1963
+ } | undefined;
1964
+ }[] | undefined;
1965
+ }>>;
1966
+ }, "strip", zod0.ZodTypeAny, {
1967
+ domain: string;
1968
+ match?: {
1969
+ path?: {
1970
+ exact?: string | undefined;
1971
+ startsWith?: string | undefined;
1972
+ regex?: string | undefined;
1973
+ } | undefined;
1974
+ headers?: {
1975
+ value?: {
1976
+ exact?: string | undefined;
1977
+ startsWith?: string | undefined;
1978
+ regex?: string | undefined;
1979
+ } | undefined;
1980
+ key?: {
1981
+ exact?: string | undefined;
1982
+ startsWith?: string | undefined;
1983
+ regex?: string | undefined;
1984
+ } | undefined;
1985
+ }[] | undefined;
1986
+ method?: string[] | undefined;
1987
+ queryString?: {
1988
+ value?: {
1989
+ exact?: string | undefined;
1990
+ startsWith?: string | undefined;
1991
+ regex?: string | undefined;
1992
+ } | undefined;
1993
+ key?: {
1994
+ exact?: string | undefined;
1995
+ startsWith?: string | undefined;
1996
+ regex?: string | undefined;
1997
+ } | undefined;
1998
+ }[] | undefined;
1999
+ } | undefined;
2000
+ headers?: Record<string, string> | undefined;
2001
+ headerNames?: string[] | undefined;
2002
+ }, {
2003
+ domain: string;
2004
+ match?: {
2005
+ path?: {
2006
+ exact?: string | undefined;
2007
+ startsWith?: string | undefined;
2008
+ regex?: string | undefined;
2009
+ } | undefined;
2010
+ headers?: {
2011
+ value?: {
2012
+ exact?: string | undefined;
2013
+ startsWith?: string | undefined;
2014
+ regex?: string | undefined;
2015
+ } | undefined;
2016
+ key?: {
2017
+ exact?: string | undefined;
2018
+ startsWith?: string | undefined;
2019
+ regex?: string | undefined;
2020
+ } | undefined;
2021
+ }[] | undefined;
2022
+ method?: string[] | undefined;
2023
+ queryString?: {
2024
+ value?: {
2025
+ exact?: string | undefined;
2026
+ startsWith?: string | undefined;
2027
+ regex?: string | undefined;
2028
+ } | undefined;
2029
+ key?: {
2030
+ exact?: string | undefined;
2031
+ startsWith?: string | undefined;
2032
+ regex?: string | undefined;
2033
+ } | undefined;
2034
+ }[] | undefined;
2035
+ } | undefined;
2036
+ headers?: Record<string, string> | undefined;
2037
+ headerNames?: string[] | undefined;
2038
+ }>, "many">>;
2039
+ forwardRules: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2040
+ domain: zod0.ZodString;
2041
+ forwardURL: zod0.ZodString;
2042
+ match: zod0.ZodOptional<zod0.ZodObject<{
2043
+ path: zod0.ZodOptional<zod0.ZodObject<{
2044
+ exact: zod0.ZodOptional<zod0.ZodString>;
2045
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2046
+ regex: zod0.ZodOptional<zod0.ZodString>;
2047
+ }, "strip", zod0.ZodTypeAny, {
2048
+ exact?: string | undefined;
2049
+ startsWith?: string | undefined;
2050
+ regex?: string | undefined;
2051
+ }, {
2052
+ exact?: string | undefined;
2053
+ startsWith?: string | undefined;
2054
+ regex?: string | undefined;
2055
+ }>>;
2056
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
2057
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2058
+ key: zod0.ZodOptional<zod0.ZodObject<{
2059
+ exact: zod0.ZodOptional<zod0.ZodString>;
2060
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2061
+ regex: zod0.ZodOptional<zod0.ZodString>;
2062
+ }, "strip", zod0.ZodTypeAny, {
2063
+ exact?: string | undefined;
2064
+ startsWith?: string | undefined;
2065
+ regex?: string | undefined;
2066
+ }, {
2067
+ exact?: string | undefined;
2068
+ startsWith?: string | undefined;
2069
+ regex?: string | undefined;
2070
+ }>>;
2071
+ value: zod0.ZodOptional<zod0.ZodObject<{
2072
+ exact: zod0.ZodOptional<zod0.ZodString>;
2073
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2074
+ regex: zod0.ZodOptional<zod0.ZodString>;
2075
+ }, "strip", zod0.ZodTypeAny, {
2076
+ exact?: string | undefined;
2077
+ startsWith?: string | undefined;
2078
+ regex?: string | undefined;
2079
+ }, {
2080
+ exact?: string | undefined;
2081
+ startsWith?: string | undefined;
2082
+ regex?: string | undefined;
2083
+ }>>;
2084
+ }, "strip", zod0.ZodTypeAny, {
2085
+ value?: {
2086
+ exact?: string | undefined;
2087
+ startsWith?: string | undefined;
2088
+ regex?: string | undefined;
2089
+ } | undefined;
2090
+ key?: {
2091
+ exact?: string | undefined;
2092
+ startsWith?: string | undefined;
2093
+ regex?: string | undefined;
2094
+ } | undefined;
2095
+ }, {
2096
+ value?: {
2097
+ exact?: string | undefined;
2098
+ startsWith?: string | undefined;
2099
+ regex?: string | undefined;
2100
+ } | undefined;
2101
+ key?: {
2102
+ exact?: string | undefined;
2103
+ startsWith?: string | undefined;
2104
+ regex?: string | undefined;
2105
+ } | undefined;
2106
+ }>, "many">>;
2107
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2108
+ key: zod0.ZodOptional<zod0.ZodObject<{
2109
+ exact: zod0.ZodOptional<zod0.ZodString>;
2110
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2111
+ regex: zod0.ZodOptional<zod0.ZodString>;
2112
+ }, "strip", zod0.ZodTypeAny, {
2113
+ exact?: string | undefined;
2114
+ startsWith?: string | undefined;
2115
+ regex?: string | undefined;
2116
+ }, {
2117
+ exact?: string | undefined;
2118
+ startsWith?: string | undefined;
2119
+ regex?: string | undefined;
2120
+ }>>;
2121
+ value: zod0.ZodOptional<zod0.ZodObject<{
2122
+ exact: zod0.ZodOptional<zod0.ZodString>;
2123
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2124
+ regex: zod0.ZodOptional<zod0.ZodString>;
2125
+ }, "strip", zod0.ZodTypeAny, {
2126
+ exact?: string | undefined;
2127
+ startsWith?: string | undefined;
2128
+ regex?: string | undefined;
2129
+ }, {
2130
+ exact?: string | undefined;
2131
+ startsWith?: string | undefined;
2132
+ regex?: string | undefined;
2133
+ }>>;
2134
+ }, "strip", zod0.ZodTypeAny, {
2135
+ value?: {
2136
+ exact?: string | undefined;
2137
+ startsWith?: string | undefined;
2138
+ regex?: string | undefined;
2139
+ } | undefined;
2140
+ key?: {
2141
+ exact?: string | undefined;
2142
+ startsWith?: string | undefined;
2143
+ regex?: string | undefined;
2144
+ } | undefined;
2145
+ }, {
2146
+ value?: {
2147
+ exact?: string | undefined;
2148
+ startsWith?: string | undefined;
2149
+ regex?: string | undefined;
2150
+ } | undefined;
2151
+ key?: {
2152
+ exact?: string | undefined;
2153
+ startsWith?: string | undefined;
2154
+ regex?: string | undefined;
2155
+ } | undefined;
2156
+ }>, "many">>;
2157
+ }, "strip", zod0.ZodTypeAny, {
2158
+ path?: {
2159
+ exact?: string | undefined;
2160
+ startsWith?: string | undefined;
2161
+ regex?: string | undefined;
2162
+ } | undefined;
2163
+ headers?: {
2164
+ value?: {
2165
+ exact?: string | undefined;
2166
+ startsWith?: string | undefined;
2167
+ regex?: string | undefined;
2168
+ } | undefined;
2169
+ key?: {
2170
+ exact?: string | undefined;
2171
+ startsWith?: string | undefined;
2172
+ regex?: string | undefined;
2173
+ } | undefined;
2174
+ }[] | undefined;
2175
+ method?: string[] | undefined;
2176
+ queryString?: {
2177
+ value?: {
2178
+ exact?: string | undefined;
2179
+ startsWith?: string | undefined;
2180
+ regex?: string | undefined;
2181
+ } | undefined;
2182
+ key?: {
2183
+ exact?: string | undefined;
2184
+ startsWith?: string | undefined;
2185
+ regex?: string | undefined;
2186
+ } | undefined;
2187
+ }[] | undefined;
2188
+ }, {
2189
+ path?: {
2190
+ exact?: string | undefined;
2191
+ startsWith?: string | undefined;
2192
+ regex?: string | undefined;
2193
+ } | undefined;
2194
+ headers?: {
2195
+ value?: {
2196
+ exact?: string | undefined;
2197
+ startsWith?: string | undefined;
2198
+ regex?: string | undefined;
2199
+ } | undefined;
2200
+ key?: {
2201
+ exact?: string | undefined;
2202
+ startsWith?: string | undefined;
2203
+ regex?: string | undefined;
2204
+ } | undefined;
2205
+ }[] | undefined;
2206
+ method?: string[] | undefined;
2207
+ queryString?: {
2208
+ value?: {
2209
+ exact?: string | undefined;
2210
+ startsWith?: string | undefined;
2211
+ regex?: string | undefined;
2212
+ } | undefined;
2213
+ key?: {
2214
+ exact?: string | undefined;
2215
+ startsWith?: string | undefined;
2216
+ regex?: string | undefined;
2217
+ } | undefined;
2218
+ }[] | undefined;
2219
+ }>>;
2220
+ }, "strip", zod0.ZodTypeAny, {
2221
+ domain: string;
2222
+ forwardURL: string;
2223
+ match?: {
2224
+ path?: {
2225
+ exact?: string | undefined;
2226
+ startsWith?: string | undefined;
2227
+ regex?: string | undefined;
2228
+ } | undefined;
2229
+ headers?: {
2230
+ value?: {
2231
+ exact?: string | undefined;
2232
+ startsWith?: string | undefined;
2233
+ regex?: string | undefined;
2234
+ } | undefined;
2235
+ key?: {
2236
+ exact?: string | undefined;
2237
+ startsWith?: string | undefined;
2238
+ regex?: string | undefined;
2239
+ } | undefined;
2240
+ }[] | undefined;
2241
+ method?: string[] | undefined;
2242
+ queryString?: {
2243
+ value?: {
2244
+ exact?: string | undefined;
2245
+ startsWith?: string | undefined;
2246
+ regex?: string | undefined;
2247
+ } | undefined;
2248
+ key?: {
2249
+ exact?: string | undefined;
2250
+ startsWith?: string | undefined;
2251
+ regex?: string | undefined;
2252
+ } | undefined;
2253
+ }[] | undefined;
2254
+ } | undefined;
2255
+ }, {
2256
+ domain: string;
2257
+ forwardURL: string;
2258
+ match?: {
2259
+ path?: {
2260
+ exact?: string | undefined;
2261
+ startsWith?: string | undefined;
2262
+ regex?: string | undefined;
2263
+ } | undefined;
2264
+ headers?: {
2265
+ value?: {
2266
+ exact?: string | undefined;
2267
+ startsWith?: string | undefined;
2268
+ regex?: string | undefined;
2269
+ } | undefined;
2270
+ key?: {
2271
+ exact?: string | undefined;
2272
+ startsWith?: string | undefined;
2273
+ regex?: string | undefined;
2274
+ } | undefined;
2275
+ }[] | undefined;
2276
+ method?: string[] | undefined;
2277
+ queryString?: {
2278
+ value?: {
2279
+ exact?: string | undefined;
2280
+ startsWith?: string | undefined;
2281
+ regex?: string | undefined;
2282
+ } | undefined;
2283
+ key?: {
2284
+ exact?: string | undefined;
2285
+ startsWith?: string | undefined;
2286
+ regex?: string | undefined;
2287
+ } | undefined;
2288
+ }[] | undefined;
2289
+ } | undefined;
2290
+ }>, "many">>;
2291
+ }, zod0.ZodTypeAny, "passthrough">, zod0.objectInputType<{
2292
+ mode: zod0.ZodLiteral<"custom">;
2293
+ allowedDomains: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
2294
+ allowedCIDRs: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
2295
+ deniedCIDRs: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
2296
+ injectionRules: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2297
+ domain: zod0.ZodString;
2298
+ headers: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodString>>;
2299
+ headerNames: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
2300
+ match: zod0.ZodOptional<zod0.ZodObject<{
2301
+ path: zod0.ZodOptional<zod0.ZodObject<{
2302
+ exact: zod0.ZodOptional<zod0.ZodString>;
2303
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2304
+ regex: zod0.ZodOptional<zod0.ZodString>;
2305
+ }, "strip", zod0.ZodTypeAny, {
2306
+ exact?: string | undefined;
2307
+ startsWith?: string | undefined;
2308
+ regex?: string | undefined;
2309
+ }, {
2310
+ exact?: string | undefined;
2311
+ startsWith?: string | undefined;
2312
+ regex?: string | undefined;
2313
+ }>>;
2314
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
2315
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2316
+ key: zod0.ZodOptional<zod0.ZodObject<{
2317
+ exact: zod0.ZodOptional<zod0.ZodString>;
2318
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2319
+ regex: zod0.ZodOptional<zod0.ZodString>;
2320
+ }, "strip", zod0.ZodTypeAny, {
2321
+ exact?: string | undefined;
2322
+ startsWith?: string | undefined;
2323
+ regex?: string | undefined;
2324
+ }, {
2325
+ exact?: string | undefined;
2326
+ startsWith?: string | undefined;
2327
+ regex?: string | undefined;
2328
+ }>>;
2329
+ value: zod0.ZodOptional<zod0.ZodObject<{
2330
+ exact: zod0.ZodOptional<zod0.ZodString>;
2331
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2332
+ regex: zod0.ZodOptional<zod0.ZodString>;
2333
+ }, "strip", zod0.ZodTypeAny, {
2334
+ exact?: string | undefined;
2335
+ startsWith?: string | undefined;
2336
+ regex?: string | undefined;
2337
+ }, {
2338
+ exact?: string | undefined;
2339
+ startsWith?: string | undefined;
2340
+ regex?: string | undefined;
2341
+ }>>;
2342
+ }, "strip", zod0.ZodTypeAny, {
2343
+ value?: {
2344
+ exact?: string | undefined;
2345
+ startsWith?: string | undefined;
2346
+ regex?: string | undefined;
2347
+ } | undefined;
2348
+ key?: {
2349
+ exact?: string | undefined;
2350
+ startsWith?: string | undefined;
2351
+ regex?: string | undefined;
2352
+ } | undefined;
2353
+ }, {
2354
+ value?: {
2355
+ exact?: string | undefined;
2356
+ startsWith?: string | undefined;
2357
+ regex?: string | undefined;
2358
+ } | undefined;
2359
+ key?: {
2360
+ exact?: string | undefined;
2361
+ startsWith?: string | undefined;
2362
+ regex?: string | undefined;
2363
+ } | undefined;
2364
+ }>, "many">>;
2365
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2366
+ key: zod0.ZodOptional<zod0.ZodObject<{
2367
+ exact: zod0.ZodOptional<zod0.ZodString>;
2368
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2369
+ regex: zod0.ZodOptional<zod0.ZodString>;
2370
+ }, "strip", zod0.ZodTypeAny, {
2371
+ exact?: string | undefined;
2372
+ startsWith?: string | undefined;
2373
+ regex?: string | undefined;
2374
+ }, {
2375
+ exact?: string | undefined;
2376
+ startsWith?: string | undefined;
2377
+ regex?: string | undefined;
2378
+ }>>;
2379
+ value: zod0.ZodOptional<zod0.ZodObject<{
2380
+ exact: zod0.ZodOptional<zod0.ZodString>;
2381
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2382
+ regex: zod0.ZodOptional<zod0.ZodString>;
2383
+ }, "strip", zod0.ZodTypeAny, {
2384
+ exact?: string | undefined;
2385
+ startsWith?: string | undefined;
2386
+ regex?: string | undefined;
2387
+ }, {
2388
+ exact?: string | undefined;
2389
+ startsWith?: string | undefined;
2390
+ regex?: string | undefined;
2391
+ }>>;
2392
+ }, "strip", zod0.ZodTypeAny, {
2393
+ value?: {
2394
+ exact?: string | undefined;
2395
+ startsWith?: string | undefined;
2396
+ regex?: string | undefined;
2397
+ } | undefined;
2398
+ key?: {
2399
+ exact?: string | undefined;
2400
+ startsWith?: string | undefined;
2401
+ regex?: string | undefined;
2402
+ } | undefined;
2403
+ }, {
2404
+ value?: {
2405
+ exact?: string | undefined;
2406
+ startsWith?: string | undefined;
2407
+ regex?: string | undefined;
2408
+ } | undefined;
2409
+ key?: {
2410
+ exact?: string | undefined;
2411
+ startsWith?: string | undefined;
2412
+ regex?: string | undefined;
2413
+ } | undefined;
2414
+ }>, "many">>;
2415
+ }, "strip", zod0.ZodTypeAny, {
2416
+ path?: {
2417
+ exact?: string | undefined;
2418
+ startsWith?: string | undefined;
2419
+ regex?: string | undefined;
2420
+ } | undefined;
2421
+ headers?: {
2422
+ value?: {
2423
+ exact?: string | undefined;
2424
+ startsWith?: string | undefined;
2425
+ regex?: string | undefined;
2426
+ } | undefined;
2427
+ key?: {
2428
+ exact?: string | undefined;
2429
+ startsWith?: string | undefined;
2430
+ regex?: string | undefined;
2431
+ } | undefined;
2432
+ }[] | undefined;
2433
+ method?: string[] | undefined;
2434
+ queryString?: {
2435
+ value?: {
2436
+ exact?: string | undefined;
2437
+ startsWith?: string | undefined;
2438
+ regex?: string | undefined;
2439
+ } | undefined;
2440
+ key?: {
2441
+ exact?: string | undefined;
2442
+ startsWith?: string | undefined;
2443
+ regex?: string | undefined;
2444
+ } | undefined;
2445
+ }[] | undefined;
2446
+ }, {
2447
+ path?: {
2448
+ exact?: string | undefined;
2449
+ startsWith?: string | undefined;
2450
+ regex?: string | undefined;
2451
+ } | undefined;
2452
+ headers?: {
2453
+ value?: {
2454
+ exact?: string | undefined;
2455
+ startsWith?: string | undefined;
2456
+ regex?: string | undefined;
2457
+ } | undefined;
2458
+ key?: {
2459
+ exact?: string | undefined;
2460
+ startsWith?: string | undefined;
2461
+ regex?: string | undefined;
2462
+ } | undefined;
2463
+ }[] | undefined;
2464
+ method?: string[] | undefined;
2465
+ queryString?: {
2466
+ value?: {
2467
+ exact?: string | undefined;
2468
+ startsWith?: string | undefined;
2469
+ regex?: string | undefined;
2470
+ } | undefined;
2471
+ key?: {
2472
+ exact?: string | undefined;
2473
+ startsWith?: string | undefined;
2474
+ regex?: string | undefined;
2475
+ } | undefined;
2476
+ }[] | undefined;
2477
+ }>>;
2478
+ }, "strip", zod0.ZodTypeAny, {
2479
+ domain: string;
2480
+ match?: {
2481
+ path?: {
2482
+ exact?: string | undefined;
2483
+ startsWith?: string | undefined;
2484
+ regex?: string | undefined;
2485
+ } | undefined;
2486
+ headers?: {
2487
+ value?: {
2488
+ exact?: string | undefined;
2489
+ startsWith?: string | undefined;
2490
+ regex?: string | undefined;
2491
+ } | undefined;
2492
+ key?: {
2493
+ exact?: string | undefined;
2494
+ startsWith?: string | undefined;
2495
+ regex?: string | undefined;
2496
+ } | undefined;
2497
+ }[] | undefined;
2498
+ method?: string[] | undefined;
2499
+ queryString?: {
2500
+ value?: {
2501
+ exact?: string | undefined;
2502
+ startsWith?: string | undefined;
2503
+ regex?: string | undefined;
2504
+ } | undefined;
2505
+ key?: {
2506
+ exact?: string | undefined;
2507
+ startsWith?: string | undefined;
2508
+ regex?: string | undefined;
2509
+ } | undefined;
2510
+ }[] | undefined;
2511
+ } | undefined;
2512
+ headers?: Record<string, string> | undefined;
2513
+ headerNames?: string[] | undefined;
2514
+ }, {
2515
+ domain: string;
2516
+ match?: {
2517
+ path?: {
2518
+ exact?: string | undefined;
2519
+ startsWith?: string | undefined;
2520
+ regex?: string | undefined;
2521
+ } | undefined;
2522
+ headers?: {
2523
+ value?: {
2524
+ exact?: string | undefined;
2525
+ startsWith?: string | undefined;
2526
+ regex?: string | undefined;
2527
+ } | undefined;
2528
+ key?: {
2529
+ exact?: string | undefined;
2530
+ startsWith?: string | undefined;
2531
+ regex?: string | undefined;
2532
+ } | undefined;
2533
+ }[] | undefined;
2534
+ method?: string[] | undefined;
2535
+ queryString?: {
2536
+ value?: {
2537
+ exact?: string | undefined;
2538
+ startsWith?: string | undefined;
2539
+ regex?: string | undefined;
2540
+ } | undefined;
2541
+ key?: {
2542
+ exact?: string | undefined;
2543
+ startsWith?: string | undefined;
2544
+ regex?: string | undefined;
2545
+ } | undefined;
2546
+ }[] | undefined;
2547
+ } | undefined;
2548
+ headers?: Record<string, string> | undefined;
2549
+ headerNames?: string[] | undefined;
2550
+ }>, "many">>;
2551
+ forwardRules: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2552
+ domain: zod0.ZodString;
2553
+ forwardURL: zod0.ZodString;
2554
+ match: zod0.ZodOptional<zod0.ZodObject<{
2555
+ path: zod0.ZodOptional<zod0.ZodObject<{
2556
+ exact: zod0.ZodOptional<zod0.ZodString>;
2557
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2558
+ regex: zod0.ZodOptional<zod0.ZodString>;
2559
+ }, "strip", zod0.ZodTypeAny, {
2560
+ exact?: string | undefined;
2561
+ startsWith?: string | undefined;
2562
+ regex?: string | undefined;
2563
+ }, {
2564
+ exact?: string | undefined;
2565
+ startsWith?: string | undefined;
2566
+ regex?: string | undefined;
2567
+ }>>;
2568
+ method: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString, "many">>;
2569
+ queryString: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2570
+ key: zod0.ZodOptional<zod0.ZodObject<{
2571
+ exact: zod0.ZodOptional<zod0.ZodString>;
2572
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2573
+ regex: zod0.ZodOptional<zod0.ZodString>;
2574
+ }, "strip", zod0.ZodTypeAny, {
2575
+ exact?: string | undefined;
2576
+ startsWith?: string | undefined;
2577
+ regex?: string | undefined;
2578
+ }, {
2579
+ exact?: string | undefined;
2580
+ startsWith?: string | undefined;
2581
+ regex?: string | undefined;
2582
+ }>>;
2583
+ value: zod0.ZodOptional<zod0.ZodObject<{
2584
+ exact: zod0.ZodOptional<zod0.ZodString>;
2585
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2586
+ regex: zod0.ZodOptional<zod0.ZodString>;
2587
+ }, "strip", zod0.ZodTypeAny, {
2588
+ exact?: string | undefined;
2589
+ startsWith?: string | undefined;
2590
+ regex?: string | undefined;
2591
+ }, {
2592
+ exact?: string | undefined;
2593
+ startsWith?: string | undefined;
2594
+ regex?: string | undefined;
2595
+ }>>;
2596
+ }, "strip", zod0.ZodTypeAny, {
2597
+ value?: {
2598
+ exact?: string | undefined;
2599
+ startsWith?: string | undefined;
2600
+ regex?: string | undefined;
2601
+ } | undefined;
2602
+ key?: {
2603
+ exact?: string | undefined;
2604
+ startsWith?: string | undefined;
2605
+ regex?: string | undefined;
2606
+ } | undefined;
2607
+ }, {
2608
+ value?: {
2609
+ exact?: string | undefined;
2610
+ startsWith?: string | undefined;
2611
+ regex?: string | undefined;
2612
+ } | undefined;
2613
+ key?: {
2614
+ exact?: string | undefined;
2615
+ startsWith?: string | undefined;
2616
+ regex?: string | undefined;
2617
+ } | undefined;
2618
+ }>, "many">>;
2619
+ headers: zod0.ZodOptional<zod0.ZodArray<zod0.ZodObject<{
2620
+ key: zod0.ZodOptional<zod0.ZodObject<{
2621
+ exact: zod0.ZodOptional<zod0.ZodString>;
2622
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2623
+ regex: zod0.ZodOptional<zod0.ZodString>;
2624
+ }, "strip", zod0.ZodTypeAny, {
2625
+ exact?: string | undefined;
2626
+ startsWith?: string | undefined;
2627
+ regex?: string | undefined;
2628
+ }, {
2629
+ exact?: string | undefined;
2630
+ startsWith?: string | undefined;
2631
+ regex?: string | undefined;
2632
+ }>>;
2633
+ value: zod0.ZodOptional<zod0.ZodObject<{
2634
+ exact: zod0.ZodOptional<zod0.ZodString>;
2635
+ startsWith: zod0.ZodOptional<zod0.ZodString>;
2636
+ regex: zod0.ZodOptional<zod0.ZodString>;
2637
+ }, "strip", zod0.ZodTypeAny, {
2638
+ exact?: string | undefined;
2639
+ startsWith?: string | undefined;
2640
+ regex?: string | undefined;
2641
+ }, {
2642
+ exact?: string | undefined;
2643
+ startsWith?: string | undefined;
2644
+ regex?: string | undefined;
2645
+ }>>;
2646
+ }, "strip", zod0.ZodTypeAny, {
2647
+ value?: {
2648
+ exact?: string | undefined;
2649
+ startsWith?: string | undefined;
2650
+ regex?: string | undefined;
2651
+ } | undefined;
2652
+ key?: {
2653
+ exact?: string | undefined;
2654
+ startsWith?: string | undefined;
2655
+ regex?: string | undefined;
2656
+ } | undefined;
2657
+ }, {
2658
+ value?: {
2659
+ exact?: string | undefined;
2660
+ startsWith?: string | undefined;
2661
+ regex?: string | undefined;
2662
+ } | undefined;
2663
+ key?: {
2664
+ exact?: string | undefined;
2665
+ startsWith?: string | undefined;
2666
+ regex?: string | undefined;
2667
+ } | undefined;
2668
+ }>, "many">>;
2669
+ }, "strip", zod0.ZodTypeAny, {
2670
+ path?: {
2671
+ exact?: string | undefined;
2672
+ startsWith?: string | undefined;
2673
+ regex?: string | undefined;
2674
+ } | undefined;
2675
+ headers?: {
2676
+ value?: {
2677
+ exact?: string | undefined;
2678
+ startsWith?: string | undefined;
2679
+ regex?: string | undefined;
2680
+ } | undefined;
2681
+ key?: {
2682
+ exact?: string | undefined;
2683
+ startsWith?: string | undefined;
2684
+ regex?: string | undefined;
2685
+ } | undefined;
2686
+ }[] | undefined;
2687
+ method?: string[] | undefined;
2688
+ queryString?: {
2689
+ value?: {
2690
+ exact?: string | undefined;
2691
+ startsWith?: string | undefined;
2692
+ regex?: string | undefined;
2693
+ } | undefined;
2694
+ key?: {
2695
+ exact?: string | undefined;
2696
+ startsWith?: string | undefined;
2697
+ regex?: string | undefined;
2698
+ } | undefined;
2699
+ }[] | undefined;
2700
+ }, {
2701
+ path?: {
2702
+ exact?: string | undefined;
2703
+ startsWith?: string | undefined;
2704
+ regex?: string | undefined;
2705
+ } | undefined;
2706
+ headers?: {
2707
+ value?: {
2708
+ exact?: string | undefined;
2709
+ startsWith?: string | undefined;
2710
+ regex?: string | undefined;
2711
+ } | undefined;
2712
+ key?: {
2713
+ exact?: string | undefined;
2714
+ startsWith?: string | undefined;
2715
+ regex?: string | undefined;
2716
+ } | undefined;
2717
+ }[] | undefined;
2718
+ method?: string[] | undefined;
2719
+ queryString?: {
2720
+ value?: {
2721
+ exact?: string | undefined;
2722
+ startsWith?: string | undefined;
2723
+ regex?: string | undefined;
2724
+ } | undefined;
2725
+ key?: {
2726
+ exact?: string | undefined;
2727
+ startsWith?: string | undefined;
2728
+ regex?: string | undefined;
2729
+ } | undefined;
2730
+ }[] | undefined;
2731
+ }>>;
2732
+ }, "strip", zod0.ZodTypeAny, {
2733
+ domain: string;
2734
+ forwardURL: string;
2735
+ match?: {
2736
+ path?: {
2737
+ exact?: string | undefined;
2738
+ startsWith?: string | undefined;
2739
+ regex?: string | undefined;
2740
+ } | undefined;
2741
+ headers?: {
2742
+ value?: {
2743
+ exact?: string | undefined;
2744
+ startsWith?: string | undefined;
2745
+ regex?: string | undefined;
2746
+ } | undefined;
2747
+ key?: {
2748
+ exact?: string | undefined;
2749
+ startsWith?: string | undefined;
2750
+ regex?: string | undefined;
2751
+ } | undefined;
2752
+ }[] | undefined;
2753
+ method?: string[] | undefined;
2754
+ queryString?: {
2755
+ value?: {
2756
+ exact?: string | undefined;
2757
+ startsWith?: string | undefined;
2758
+ regex?: string | undefined;
2759
+ } | undefined;
2760
+ key?: {
2761
+ exact?: string | undefined;
2762
+ startsWith?: string | undefined;
2763
+ regex?: string | undefined;
2764
+ } | undefined;
2765
+ }[] | undefined;
2766
+ } | undefined;
2767
+ }, {
2768
+ domain: string;
2769
+ forwardURL: string;
2770
+ match?: {
2771
+ path?: {
2772
+ exact?: string | undefined;
2773
+ startsWith?: string | undefined;
2774
+ regex?: string | undefined;
2775
+ } | undefined;
2776
+ headers?: {
2777
+ value?: {
2778
+ exact?: string | undefined;
2779
+ startsWith?: string | undefined;
2780
+ regex?: string | undefined;
2781
+ } | undefined;
2782
+ key?: {
2783
+ exact?: string | undefined;
2784
+ startsWith?: string | undefined;
2785
+ regex?: string | undefined;
2786
+ } | undefined;
2787
+ }[] | undefined;
2788
+ method?: string[] | undefined;
2789
+ queryString?: {
2790
+ value?: {
2791
+ exact?: string | undefined;
2792
+ startsWith?: string | undefined;
2793
+ regex?: string | undefined;
2794
+ } | undefined;
2795
+ key?: {
2796
+ exact?: string | undefined;
2797
+ startsWith?: string | undefined;
2798
+ regex?: string | undefined;
2799
+ } | undefined;
2800
+ }[] | undefined;
2801
+ } | undefined;
2802
+ }>, "many">>;
2803
+ }, zod0.ZodTypeAny, "passthrough">>]>>;
2804
+ activeCpuDurationMs: zod0.ZodOptional<zod0.ZodNumber>;
2805
+ networkTransfer: zod0.ZodOptional<zod0.ZodObject<{
2806
+ ingress: zod0.ZodNumber;
2807
+ egress: zod0.ZodNumber;
2808
+ }, "strip", zod0.ZodTypeAny, {
2809
+ ingress: number;
2810
+ egress: number;
2811
+ }, {
2812
+ ingress: number;
2813
+ egress: number;
2814
+ }>>;
2815
+ }, zod0.ZodTypeAny, "passthrough">[];
2816
+ }, "sessions">>;
2817
+ /**
2818
+ * List snapshots that belong to this sandbox.
2819
+ *
2820
+ * @param params - Optional pagination parameters.
2821
+ * @returns The list of snapshots and pagination metadata.
2822
+ */
2823
+ listSnapshots(params?: {
2824
+ limit?: number;
2825
+ cursor?: string;
2826
+ sortOrder?: "asc" | "desc";
2827
+ signal?: AbortSignal;
2828
+ }): Promise<Paginator<{
2829
+ pagination: {
2830
+ count: number;
2831
+ next: string | null;
2832
+ };
2833
+ snapshots: {
2834
+ status: "failed" | "created" | "deleted";
2835
+ region: string;
2836
+ createdAt: number;
2837
+ updatedAt: number;
2838
+ id: string;
2839
+ sourceSessionId: string;
2840
+ sizeBytes: number;
2841
+ expiresAt?: number | undefined;
2842
+ }[];
2843
+ }, "snapshots">>;
2844
+ }
2845
+ //#endregion
2846
+ export { Sandbox, SerializedSandbox };
2847
+ //# sourceMappingURL=sandbox.d.cts.map