glitch-javascript-sdk 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ declare class Auth {
2
+ static login(login: string, password: string): Promise<import("../util/Response").default<unknown>>;
3
+ static register(data: object): Promise<import("../util/Response").default<unknown> | undefined>;
4
+ }
5
+ export default Auth;
@@ -0,0 +1,8 @@
1
+ declare class Competitions {
2
+ static list(): Promise<import("../util/Response").default<unknown> | undefined>;
3
+ static create(data: object): Promise<import("../util/Response").default<unknown> | undefined>;
4
+ static update(competition_id: string, data: object): Promise<import("../util/Response").default<unknown> | undefined>;
5
+ static view(competition_id: string): Promise<import("../util/Response").default<unknown> | undefined>;
6
+ static delete(competition_id: string): Promise<import("../util/Response").default<unknown> | undefined>;
7
+ }
8
+ export default Competitions;
@@ -0,0 +1,4 @@
1
+ import Auth from "./Auth";
2
+ import Competitions from "./Competitions";
3
+ export { Auth };
4
+ export { Competitions };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Config
3
+ *
4
+ * The configuration class will hold the configuration information used when accessing the
5
+ * API.
6
+ */
7
+ declare class Config {
8
+ baseUrl: string;
9
+ authToken: string;
10
+ constructor(baseUrl: string, authToken: string);
11
+ setBaseUrl(baseUrl: string): void;
12
+ setAuthToken(authToken: string): void;
13
+ }
14
+ export default Config;
@@ -0,0 +1,7 @@
1
+ declare const HTTP_METHODS: {
2
+ readonly GET: "GET";
3
+ readonly POST: "POST";
4
+ readonly PUT: "PUT";
5
+ readonly DELETE: "DELETE";
6
+ };
7
+ export default HTTP_METHODS;
@@ -0,0 +1,9 @@
1
+ import Config from "./config/Config";
2
+ import { Auth } from "./api";
3
+ import { Competitions } from "./api";
4
+ declare class Glitch {
5
+ static config: typeof Config;
6
+ static auth: typeof Auth;
7
+ static competitions: typeof Competitions;
8
+ }
9
+ export { Glitch };