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 CHANGED
@@ -6,5 +6,5 @@ var Glitch = /** @class */ (function () {
6
6
  return Glitch;
7
7
  }());
8
8
 
9
- exports.Glitch = Glitch;
9
+ module.exports = Glitch;
10
10
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ import Config from "./Config";
2
+ export { Config };
@@ -1,4 +1,4 @@
1
- import Config from "./config/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 { Glitch };
21
+ export default Glitch;
package/dist/esm/index.js CHANGED
@@ -4,5 +4,5 @@ var Glitch = /** @class */ (function () {
4
4
  return Glitch;
5
5
  }());
6
6
 
7
- export { Glitch };
7
+ export { Glitch as default };
8
8
  //# sourceMappingURL=index.js.map
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "0.0.8",
3
+ "version": "0.1.0",
4
4
  "description": "Javascrip SDK for GLitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -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
  }
@@ -0,0 +1,3 @@
1
+ import Config from "./Config";
2
+
3
+ export {Config};
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  //Configuration
3
- import Config from "./config/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 { Glitch };
31
+ export default Glitch;