summaryrefslogtreecommitdiffstats
path: root/index.ts
blob: 23e25f12aff4c0e9ac3fa10ae33747fef5ce0a60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
export namespace RunnerApi {
  export namespace SubmitRequest {
    export const path = "/submit"
    export interface Body {
      source: string
    }
  }

  export namespace SubmitResponse {
    export interface Body {
      result: string
      executionTime: number // time running the interpreter
      apiTime: number // time doing file IO + executionTime
    }
  }
}

export namespace ExampleApi {
  export interface Example {
    id: string
    title: string
    content: string
  }

  export namespace ListRequest {
    export const path = "/"
  }

  export namespace ListResponse {
    export interface Body {
      examples: Example[]
    }
  }
}