From 441a72c04cfc61dfead5cad37202a1da87a44499 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Mon, 7 Feb 2022 14:11:24 +0200 Subject: Add Example API types --- index.ts | 34 +++++++++++++++++++++++++++------- 1 file 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[] + } } } -- cgit v1.3