glitch-javascript-sdk 0.0.8 → 0.1.0
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.
- package/dist/cjs/index.js +1 -1
- package/dist/esm/config/index.d.ts +2 -0
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/config/Config.ts +5 -5
- package/src/config/index.ts +3 -0
- package/src/index.ts +3 -3
package/dist/cjs/index.js
CHANGED
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Config from "./config
|
|
1
|
+
import { Config } from "./config";
|
|
2
2
|
import { Auth } from "./api";
|
|
3
3
|
import { Competitions } from "./api";
|
|
4
4
|
import { Users } from "./api";
|
|
@@ -10,7 +10,7 @@ declare class Glitch {
|
|
|
10
10
|
Config: Config;
|
|
11
11
|
};
|
|
12
12
|
static api: {
|
|
13
|
-
Auth: Auth;
|
|
13
|
+
Auth: typeof Auth;
|
|
14
14
|
Competitions: Competitions;
|
|
15
15
|
Users: Users;
|
|
16
16
|
Events: Events;
|
|
@@ -18,4 +18,4 @@ declare class Glitch {
|
|
|
18
18
|
Waitlists: Waitlists;
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
export
|
|
21
|
+
export default Glitch;
|
package/dist/esm/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1134,7 +1134,7 @@ declare class Glitch {
|
|
|
1134
1134
|
Config: Config;
|
|
1135
1135
|
};
|
|
1136
1136
|
static api: {
|
|
1137
|
-
Auth: Auth;
|
|
1137
|
+
Auth: typeof Auth;
|
|
1138
1138
|
Competitions: Competitions;
|
|
1139
1139
|
Users: Users;
|
|
1140
1140
|
Events: Events;
|
|
@@ -1143,4 +1143,4 @@ declare class Glitch {
|
|
|
1143
1143
|
};
|
|
1144
1144
|
}
|
|
1145
1145
|
|
|
1146
|
-
export { Glitch };
|
|
1146
|
+
export { Glitch as default };
|
package/package.json
CHANGED
package/src/config/Config.ts
CHANGED
|
@@ -19,7 +19,7 @@ class Config {
|
|
|
19
19
|
* @param baseUrl The url base endpoint of the api
|
|
20
20
|
* @param authToken The JSON Web Token
|
|
21
21
|
*/
|
|
22
|
-
static setConfig(baseUrl: string, authToken: string, lock? : boolean) {
|
|
22
|
+
public static setConfig(baseUrl: string, authToken: string, lock? : boolean) {
|
|
23
23
|
|
|
24
24
|
this.setBaseUrl(baseUrl, lock);
|
|
25
25
|
|
|
@@ -35,7 +35,7 @@ class Config {
|
|
|
35
35
|
* @param baseUrl The url that connects to the APIs base
|
|
36
36
|
* @param lock If set to true, will lock the baseUrl so it cannot be changed
|
|
37
37
|
*/
|
|
38
|
-
static setBaseUrl(baseUrl: string, lock? : boolean) {
|
|
38
|
+
public static setBaseUrl(baseUrl: string, lock? : boolean) {
|
|
39
39
|
|
|
40
40
|
if(!this._baseUrlLocked) {
|
|
41
41
|
Config._baseUrl = baseUrl;
|
|
@@ -53,7 +53,7 @@ class Config {
|
|
|
53
53
|
*
|
|
54
54
|
* @param authToken The JWT
|
|
55
55
|
*/
|
|
56
|
-
static setAuthToken(authToken: string) {
|
|
56
|
+
public static setAuthToken(authToken: string) {
|
|
57
57
|
Config._authToken = authToken;
|
|
58
58
|
|
|
59
59
|
Requests.setAuthToken(authToken);
|
|
@@ -62,14 +62,14 @@ class Config {
|
|
|
62
62
|
/**
|
|
63
63
|
* Gets base url
|
|
64
64
|
*/
|
|
65
|
-
static get baseUrl(): string {
|
|
65
|
+
public static get baseUrl(): string {
|
|
66
66
|
return Config._baseUrl;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* Gets auth token
|
|
71
71
|
*/
|
|
72
|
-
static get authToken(): string {
|
|
72
|
+
public static get authToken(): string {
|
|
73
73
|
return Config._authToken;
|
|
74
74
|
}
|
|
75
75
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
//Configuration
|
|
3
|
-
import Config from "./config
|
|
3
|
+
import { Config } from "./config";
|
|
4
4
|
|
|
5
5
|
//API
|
|
6
6
|
import { Auth } from "./api";
|
|
@@ -17,7 +17,7 @@ class Glitch {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
public static api: {
|
|
20
|
-
Auth: Auth,
|
|
20
|
+
Auth: typeof Auth,
|
|
21
21
|
Competitions: Competitions,
|
|
22
22
|
Users: Users,
|
|
23
23
|
Events: Events,
|
|
@@ -28,4 +28,4 @@ class Glitch {
|
|
|
28
28
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export
|
|
31
|
+
export default Glitch;
|