Skip to content

Commit 0e722e0

Browse files
authored
Change API response typing of sandbox (codesandbox#3163)
1 parent 51f8a61 commit 0e722e0

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

packages/common/src/types/index.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,18 @@ export type SmallSandbox = {
162162
git: GitInfo | null;
163163
};
164164

165+
export type ForkedSandbox = {
166+
id: string;
167+
alias: string | null;
168+
title: string | null;
169+
customTemplate: CustomTemplate | null;
170+
insertedAt: string;
171+
updatedAt: string;
172+
template: string;
173+
privacy: 0 | 1 | 2;
174+
git: GitInfo | null;
175+
};
176+
165177
export type PaginatedSandboxes = {
166178
[page: number]: Array<SmallSandbox>;
167179
};
@@ -304,7 +316,7 @@ export type Sandbox = {
304316
/**
305317
* Sandbox the forked template is from
306318
*/
307-
forkedTemplateSandbox: SmallSandbox | null;
319+
forkedTemplateSandbox: ForkedSandbox | null;
308320
externalResources: string[];
309321
team: {
310322
id: string;
@@ -313,7 +325,7 @@ export type Sandbox = {
313325
roomId: string | null;
314326
privacy: 0 | 1 | 2;
315327
author: User | null;
316-
forkedFromSandbox: SmallSandbox | null;
328+
forkedFromSandbox: ForkedSandbox | null;
317329
git: GitInfo | null;
318330
tags: string[];
319331
isFrozen: boolean;

0 commit comments

Comments
 (0)