Skip to content

Commit 4e785ae

Browse files
Set a common pattern for timeout attribute names
1 parent 45d7a44 commit 4e785ae

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

src/api/types.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export interface DependenciesConfigInput {
4343
autoDetect?: boolean;
4444
}
4545
export interface ExecuteProcessInput {
46-
parameters?: Record<string, any>,
46+
parameters?: Record<string, any>;
4747
tag?: string;
4848
comment?: string;
4949
settings?: ExecuteProcessSettingsInput;
@@ -423,7 +423,7 @@ export interface CreateSandboxInput {
423423
imageId: string;
424424
name?: string;
425425
metadata?: Record<string, string>;
426-
timeoutMs?: number;
426+
timeout?: number;
427427
publicHttpPorts?: number[];
428428
publicHttpPortsBasicAuth?: string;
429429
}
@@ -439,8 +439,8 @@ export interface Sandbox {
439439
timeoutAt: string;
440440
}
441441

442-
export interface UpdateSandboxTimeoutInput {
443-
timeoutMs: number;
442+
export interface UpdateSandboxInput {
443+
timeout: number;
444444
}
445445

446446
/**

src/api/yepcodeApi.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import {
4040
ServiceAccountsListResult,
4141
Sandbox,
4242
CreateSandboxInput,
43-
UpdateSandboxTimeoutInput,
43+
UpdateSandboxInput,
4444
} from "./types";
4545
import { Readable } from "stream";
4646

@@ -629,10 +629,7 @@ export class YepCodeApi {
629629
return this.request("POST", "/sandboxes", { data });
630630
}
631631

632-
async updateSandboxTimeout(
633-
id: string,
634-
data: UpdateSandboxTimeoutInput
635-
): Promise<Sandbox> {
632+
async updateSandbox(id: string, data: UpdateSandboxInput): Promise<Sandbox> {
636633
return this.request("POST", `/sandboxes/${id}`, { data });
637634
}
638635

0 commit comments

Comments
 (0)