Skip to content

Commit 59755b8

Browse files
authored
Merge pull request #7 from codesandbox/fix/build
update version 0.0.9
2 parents 0b04fda + e95e428 commit 59755b8

File tree

10 files changed

+4124
-218
lines changed

10 files changed

+4124
-218
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,4 @@ typings/
9999
!.vscode/launch.json
100100
!.vscode/extensions.json
101101

102-
# Lock files
103-
package-lock.json
104-
yarn.lock
105-
106102
# End of https://www.gitignore.io/api/node,visualstudiocode,macos

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

openapi.json

Lines changed: 78 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,38 @@
200200
"description": "Sandbox privacy. 0 for public, 1 for unlisted, and 2 for private. Subject to the minimum privacy restrictions of the workspace. Defaults to the privacy of the original sandbox.",
201201
"type": "integer"
202202
},
203+
"start_options": {
204+
"description": "Optional VM start configuration. If provided, the sandbox VM will be started immediately after creation.",
205+
"properties": {
206+
"hibernation_timeout_seconds": {
207+
"description": "The time in seconds after which the VM will hibernate due to inactivity.\nMust be a positive integer between 1 and 86400 (24 hours).\nDefaults to 300 seconds (5 minutes) if not specified.\n",
208+
"example": 300,
209+
"maximum": 86400,
210+
"minimum": 1,
211+
"type": "integer"
212+
},
213+
"ipcountry": {
214+
"description": "This determines in which cluster, closest to the given country the VM will be started in. The format is ISO-3166-1 alpha-2. If not set, the VM will be started closest to the caller of this API. This will only be applied when a VM is run for the first time, and will only serve as a hint (e.g. if the template of this sandbox runs in EU cluster, this sandbox will also run in the EU cluster).",
215+
"example": "NL",
216+
"pattern": "^[A-Z]{2}$",
217+
"type": "string"
218+
},
219+
"tier": {
220+
"description": "Determines which specs to start the VM with. If not specified, the VM will start with the default specs for the workspace.\n\nYou can only specify a VM tier when starting a VM that is inside your workspace. Specifying a VM tier for someone else's sandbox will return an error.\n\nNot all tiers will be available depending on the workspace subscription status, and higher tiers incur higher costs. Please see codesandbox.io/pricing for details on specs and costs.\n",
221+
"enum": [
222+
"Pico",
223+
"Nano",
224+
"Micro",
225+
"Small",
226+
"Medium",
227+
"Large",
228+
"XLarge"
229+
],
230+
"example": "Micro"
231+
}
232+
},
233+
"type": "object"
234+
},
203235
"tags": {
204236
"default": [],
205237
"description": "Tags to set on the new sandbox, if any. Will not inherit tags from the source sandbox.",
@@ -213,7 +245,8 @@
213245
"type": "string"
214246
}
215247
},
216-
"title": "SandboxForkRequest"
248+
"title": "SandboxForkRequest",
249+
"type": "object"
217250
},
218251
"SandboxForkResponse": {
219252
"allOf": [
@@ -242,6 +275,37 @@
242275
"properties": {
243276
"alias": { "type": "string" },
244277
"id": { "type": "string" },
278+
"start_response": {
279+
"description": "VM start response. Only present when start_options were provided in the request.",
280+
"nullable": true,
281+
"properties": {
282+
"bootup_type": { "type": "string" },
283+
"cluster": { "type": "string" },
284+
"id": { "type": "string" },
285+
"latest_pitcher_version": { "type": "string" },
286+
"pitcher_manager_version": { "type": "string" },
287+
"pitcher_token": { "type": "string" },
288+
"pitcher_url": { "type": "string" },
289+
"pitcher_version": { "type": "string" },
290+
"reconnect_token": { "type": "string" },
291+
"user_workspace_path": { "type": "string" },
292+
"workspace_path": { "type": "string" }
293+
},
294+
"required": [
295+
"bootup_type",
296+
"cluster",
297+
"id",
298+
"latest_pitcher_version",
299+
"pitcher_manager_version",
300+
"pitcher_token",
301+
"pitcher_url",
302+
"pitcher_version",
303+
"reconnect_token",
304+
"user_workspace_path",
305+
"workspace_path"
306+
],
307+
"type": "object"
308+
},
245309
"title": { "nullable": true, "type": "string" }
246310
},
247311
"required": ["alias", "id", "title"],
@@ -605,6 +669,7 @@
605669
"ipcountry": {
606670
"description": "This determines in which cluster, closest to the given country the VM will be started in. The format is ISO-3166-1 alpha-2. If not set, the VM will be started closest to the caller of this API. This will only be applied when a VM is run for the first time, and will only serve as a hint (e.g. if the template of this sandbox runs in EU cluster, this sandbox will also run in the EU cluster).",
607671
"example": "NL",
672+
"pattern": "^[A-Z]{2}$",
608673
"type": "string"
609674
},
610675
"tier": {
@@ -618,11 +683,11 @@
618683
"Large",
619684
"XLarge"
620685
],
621-
"example": "Micro",
622-
"type": "string"
686+
"example": "Micro"
623687
}
624688
},
625-
"title": "VMStartRequest"
689+
"title": "VMStartRequest",
690+
"type": "object"
626691
},
627692
"VMStartResponse": {
628693
"allOf": [
@@ -695,12 +760,12 @@
695760
"Large",
696761
"XLarge"
697762
],
698-
"example": "Micro",
699-
"type": "string"
763+
"example": "Micro"
700764
}
701765
},
702766
"required": ["tier"],
703-
"title": "VMUpdateSpecsRequest"
767+
"title": "VMUpdateSpecsRequest",
768+
"type": "object"
704769
},
705770
"VMUpdateSpecsResponse": {
706771
"allOf": [
@@ -748,7 +813,8 @@
748813
}
749814
},
750815
"required": ["name"],
751-
"title": "WorkspaceCreateRequest"
816+
"title": "WorkspaceCreateRequest",
817+
"type": "object"
752818
},
753819
"WorkspaceCreateResponse": {
754820
"allOf": [
@@ -930,8 +996,8 @@
930996
"name": "order_by",
931997
"required": false,
932998
"schema": {
933-
"enum": ["inserted_at", "updated_at"],
934-
"type": "string"
999+
"default": "updated_at",
1000+
"enum": ["inserted_at", "updated_at"]
9351001
}
9361002
},
9371003
{
@@ -940,7 +1006,7 @@
9401006
"in": "query",
9411007
"name": "direction",
9421008
"required": false,
943-
"schema": { "enum": ["asc", "desc"], "type": "string" }
1009+
"schema": { "default": "desc", "enum": ["asc", "desc"] }
9441010
},
9451011
{
9461012
"description": "Maximum number of sandboxes to return in a single response",
@@ -1236,6 +1302,6 @@
12361302
}
12371303
},
12381304
"security": [],
1239-
"servers": [{ "url": "https://api.codesandbox.io", "variables": {} }],
1305+
"servers": [{ "url": "https://api.codesandbox.stream", "variables": {} }],
12401306
"tags": []
12411307
}

0 commit comments

Comments
 (0)