aboutsummaryrefslogtreecommitdiff
path: root/response.ts
diff options
context:
space:
mode:
Diffstat (limited to 'response.ts')
-rw-r--r--response.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/response.ts b/response.ts
new file mode 100644
index 0000000..e4122c6
--- /dev/null
+++ b/response.ts
@@ -0,0 +1,15 @@
+//
+// WuiResponseInterface define an interface that will be returned by function
+// or method with non-void type.
+//
+// If the function/method success, the code should be set to 200 (equal to
+// HTTP OK), and the data will contains the expected data for that function.
+//
+// If the function/method call failed, the code should be set to other value
+// beside 200 with a message describe why its failed.
+//
+export interface WuiResponseInterface {
+ code: number
+ message?: string
+ data?: any
+}