@@ -23,6 +23,7 @@ npm install @yepcode/run
2323```
2424
2525** Requirements:**
26+
2627- Node.js >= 18.x
2728- TypeScript support included (types are bundled with the package)
2829
@@ -207,8 +208,10 @@ constructor(options?: {
207208Executes code in YepCode's runtime environment.
208209
209210** Parameters:**
211+
210212- ` code ` : Source code to execute (string)
211213- ` options ` : Execution options (optional)
214+
212215 ``` typescript
213216 interface RunOpts {
214217 language? : ' javascript' | ' python' ; // Auto-detected if not specified
@@ -235,6 +238,7 @@ Executes code in YepCode's runtime environment.
235238Retrieves an existing execution by ID.
236239
237240** Parameters:**
241+
238242- ` executionId ` : Unique identifier for the execution
239243
240244** Returns:** Promise<Execution >
@@ -244,6 +248,7 @@ Retrieves an existing execution by ID.
244248Represents a code execution instance.
245249
246250** Properties:**
251+
247252``` typescript
248253interface Execution {
249254 id: string ; // Unique identifier
@@ -274,16 +279,20 @@ interface TimelineEvent {
274279
275280** Methods:**
276281
277- ###### ` isDone(): Promise<boolean> `
282+ ##### ` isDone(): Promise<boolean> `
283+
278284Returns whether the execution has completed.
279285
280286** Returns:** Promise<boolean >
281287
282- ###### ` waitForDone(options?: { timeout?: number }): Promise<void> `
288+ ##### ` waitForDone(options?: { timeout?: number }): Promise<void> `
289+
283290Waits for the execution to complete.
284291
285292** Parameters:**
293+
286294- ` options ` : Optional timeout configuration
295+
287296 ``` typescript
288297 interface WaitOptions {
289298 timeout? : number ; // Timeout in milliseconds
@@ -292,12 +301,14 @@ Waits for the execution to complete.
292301
293302** Returns:** Promise<void >
294303
295- ###### ` kill(): Promise<void> `
304+ ##### ` kill(): Promise<void> `
305+
296306Terminates the execution.
297307
298308** Returns:** Promise<void >
299309
300- ###### ` rerun(): Promise<Execution> `
310+ ##### ` rerun(): Promise<Execution> `
311+
301312Creates a new execution with the same configuration.
302313
303314** Returns:** Promise<Execution >
@@ -317,9 +328,11 @@ constructor(options?: {
317328#### Methods
318329
319330##### ` getEnvVars(): Promise<EnvVar[]> `
331+
320332Returns all environment variables.
321333
322334** Returns:** Promise<EnvVar[ ] >
335+
323336``` typescript
324337interface EnvVar {
325338 key: string ;
@@ -329,19 +342,23 @@ interface EnvVar {
329342```
330343
331344##### ` setEnvVar(key: string, value: string, isSensitive?: boolean): Promise<void> `
345+
332346Sets an environment variable.
333347
334348** Parameters:**
349+
335350- ` key ` : Variable name
336351- ` value ` : Variable value
337352- ` isSensitive ` : Whether the variable contains sensitive data (defaults to true)
338353
339354** Returns:** Promise<void >
340355
341356##### ` delEnvVar(key: string): Promise<void> `
357+
342358Deletes an environment variable.
343359
344360** Parameters:**
361+
345362- ` key ` : Variable name to delete
346363
347364** Returns:** Promise<void >
@@ -361,9 +378,11 @@ constructor(options?: {
361378#### Methods
362379
363380##### ` getProcesses(): Promise<Process[]> `
381+
364382Returns all available processes.
365383
366384** Returns:** Promise<Process[ ] >
385+
367386``` typescript
368387interface Process {
369388 id: string ;
@@ -388,30 +407,35 @@ constructor(options?: {
388407#### Methods
389408
390409##### ` upload(filename: string, file: File | Blob | Readable): Promise<StorageObject> `
410+
391411Uploads a file to YepCode storage.
392412
393413- ` filename ` : Name to assign to the uploaded file
394414- ` file ` : The file to upload (can be a File, Blob, or Node.js Readable stream)
395415- ** Returns:** Promise<StorageObject >
396416
397417##### ` list(): Promise<StorageObject[]> `
418+
398419Lists all files in YepCode storage.
399420
400421- ** Returns:** Promise<StorageObject[ ] >
401422
402423##### ` download(filename: string): Promise<Readable> `
424+
403425Downloads a file from YepCode storage as a Node.js Readable stream.
404426
405427- ` filename ` : Name of the file to download
406428- ** Returns:** Promise<Readable >
407429
408430##### ` delete(filename: string): Promise<void> `
431+
409432Deletes a file from YepCode storage.
410433
411434- ` filename ` : Name of the file to delete
412435- ** Returns:** Promise<void >
413436
414437##### ` StorageObject `
438+
415439``` typescript
416440interface StorageObject {
417441 name: string ;
0 commit comments