summaryrefslogtreecommitdiffstats
path: root/index.ts
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2022-02-07 14:11:24 +0200
committerJan Tuomi <jans.tuomi@gmail.com>2022-02-07 14:11:24 +0200
commit441a72c04cfc61dfead5cad37202a1da87a44499 (patch)
treefe19e0fa2ccb6d9805daf3dcdbf7ac1810f0c7db /index.ts
parenta401431df444d5e1f8c4367226969ca7930b1991 (diff)
Add Example API types
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts34
1 files changed, 27 insertions, 7 deletions
diff --git a/index.ts b/index.ts
index 3fd07e6..271a0ad 100644
--- a/index.ts
+++ b/index.ts
@@ -1,12 +1,32 @@
-export namespace RunnerApiSubmitRequest {
- export const path = "/submit"
- export interface Body {
- source: string
+export namespace RunnerApi {
+ export namespace SubmitRequest {
+ export const path = "/submit"
+ export interface Body {
+ source: string
+ }
+ }
+
+ export namespace SubmitResponse {
+ export interface Body {
+ result: string
+ }
}
}
-export namespace RunnerApiSubmitResponse {
- export interface Body {
- result: string
+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[]
+ }
}
}