Skip to content

Commit 5fa0e6c

Browse files
chore: sync infra OpenAPI specs (#318)
This PR syncs OpenAPI specs from [e2b-dev/infra](https://github.com/e2b-dev/infra): - `spec/openapi.infra.yaml` - `spec/openapi.dashboard-api.yaml` It also regenerates dependent TypeScript API types and applies formatting/lint autofixes. --- *This PR was automatically created by the sync-infra-specs workflow.* --------- Co-authored-by: dobrac <4323173+dobrac@users.noreply.github.com> Co-authored-by: e2b-generated-code-auto-fixer[bot] <257264331+e2b-generated-code-auto-fixer[bot]@users.noreply.github.com>
1 parent 966e86a commit 5fa0e6c

2 files changed

Lines changed: 58 additions & 2 deletions

File tree

spec/openapi.infra.yaml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,36 @@ components:
282282
maskRequestHost:
283283
type: string
284284
description: Specify host mask which will be used for all sandbox requests
285+
rules:
286+
type: object
287+
description: >
288+
Per-domain transform rules applied to matching egress HTTP/HTTPS requests.
289+
Keys are domains (e.g. "api.example.com", "example.com").
290+
A domain listed here is not automatically allowed - use allowOut to permit the traffic.
291+
additionalProperties:
292+
type: array
293+
items:
294+
$ref: '#/components/schemas/SandboxNetworkRule'
295+
296+
SandboxNetworkRule:
297+
type: object
298+
description: Transform rule applied to egress requests matching a domain pattern.
299+
properties:
300+
transform:
301+
$ref: '#/components/schemas/SandboxNetworkTransform'
302+
303+
SandboxNetworkTransform:
304+
type: object
305+
description: Transformations applied to matching egress requests before forwarding.
306+
properties:
307+
headers:
308+
type: object
309+
description: >
310+
HTTP headers to inject or override in matching requests.
311+
An existing header with the same name is replaced. Values are plain strings;
312+
secret resolution happens client-side before sending to the API.
313+
additionalProperties:
314+
type: string
285315

286316
SandboxAutoResumeEnabled:
287317
type: boolean
@@ -2372,7 +2402,7 @@ paths:
23722402

23732403
/sandboxes/{sandboxID}/network:
23742404
put:
2375-
description: Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting both fields clears all egress rules.
2405+
description: Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.
23762406
security:
23772407
- ApiKeyAuth: []
23782408
- Supabase1TokenAuth: []
@@ -2395,6 +2425,13 @@ paths:
23952425
description: List of denied CIDR blocks or IP addresses for egress traffic. Domain names are not supported for deny rules.
23962426
items:
23972427
type: string
2428+
rules:
2429+
type: object
2430+
description: Per-domain transform rules. Replaces all existing rules when provided.
2431+
additionalProperties:
2432+
type: array
2433+
items:
2434+
$ref: '#/components/schemas/SandboxNetworkRule'
23982435
allow_internet_access:
23992436
type: boolean
24002437
description:

src/core/shared/contracts/infra-api.types.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ export interface paths {
742742
cookie?: never
743743
}
744744
get?: never
745-
/** @description Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting both fields clears all egress rules. */
745+
/** @description Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it. */
746746
put: {
747747
parameters: {
748748
query?: never
@@ -759,6 +759,10 @@ export interface paths {
759759
allowOut?: string[]
760760
/** @description List of denied CIDR blocks or IP addresses for egress traffic. Domain names are not supported for deny rules. */
761761
denyOut?: string[]
762+
/** @description Per-domain transform rules. Replaces all existing rules when provided. */
763+
rules?: {
764+
[key: string]: components['schemas']['SandboxNetworkRule'][]
765+
}
762766
/** @description Allow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut to 0.0.0.0/0 in the network config. */
763767
allow_internet_access?: boolean
764768
}
@@ -2256,6 +2260,21 @@ export interface components {
22562260
denyOut?: string[]
22572261
/** @description Specify host mask which will be used for all sandbox requests */
22582262
maskRequestHost?: string
2263+
/** @description Per-domain transform rules applied to matching egress HTTP/HTTPS requests. Keys are domains (e.g. "api.example.com", "example.com"). A domain listed here is not automatically allowed - use allowOut to permit the traffic. */
2264+
rules?: {
2265+
[key: string]: components['schemas']['SandboxNetworkRule'][]
2266+
}
2267+
}
2268+
/** @description Transform rule applied to egress requests matching a domain pattern. */
2269+
SandboxNetworkRule: {
2270+
transform?: components['schemas']['SandboxNetworkTransform']
2271+
}
2272+
/** @description Transformations applied to matching egress requests before forwarding. */
2273+
SandboxNetworkTransform: {
2274+
/** @description HTTP headers to inject or override in matching requests. An existing header with the same name is replaced. Values are plain strings; secret resolution happens client-side before sending to the API. */
2275+
headers?: {
2276+
[key: string]: string
2277+
}
22592278
}
22602279
/**
22612280
* @description Auto-resume enabled flag for paused sandboxes. Default false.

0 commit comments

Comments
 (0)