glitch-javascript-sdk 0.5.2 → 0.5.4
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 +95 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Events.d.ts +23 -0
- package/dist/esm/api/Users.d.ts +48 -0
- package/dist/esm/index.js +95 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +71 -0
- package/package.json +1 -1
- package/src/api/Events.ts +32 -0
- package/src/api/Users.ts +72 -0
- package/src/routes/EventsRoute.ts +2 -2
- package/src/routes/UserRoutes.ts +6 -0
package/dist/index.d.ts
CHANGED
|
@@ -981,6 +981,54 @@ declare class Users {
|
|
|
981
981
|
* @returns promise
|
|
982
982
|
*/
|
|
983
983
|
static createDonationPage<T>(): AxiosPromise<Response<T>>;
|
|
984
|
+
/**
|
|
985
|
+
* Clear Twitches authentication information from the current user.
|
|
986
|
+
*
|
|
987
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
988
|
+
*
|
|
989
|
+
* @returns promise
|
|
990
|
+
*/
|
|
991
|
+
static clearTwitchAuth<T>(): AxiosPromise<Response<T>>;
|
|
992
|
+
/**
|
|
993
|
+
* Clear Facebook authentication information from the current user.
|
|
994
|
+
*
|
|
995
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
996
|
+
*
|
|
997
|
+
* @returns promise
|
|
998
|
+
*/
|
|
999
|
+
static clearFacebookAuth<T>(): AxiosPromise<Response<T>>;
|
|
1000
|
+
/**
|
|
1001
|
+
* Clear Google authentication information from the current user.
|
|
1002
|
+
*
|
|
1003
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
1004
|
+
*
|
|
1005
|
+
* @returns promise
|
|
1006
|
+
*/
|
|
1007
|
+
static clearGoogleAuth<T>(): AxiosPromise<Response<T>>;
|
|
1008
|
+
/**
|
|
1009
|
+
* Clear Stripe authentication information from the current user.
|
|
1010
|
+
*
|
|
1011
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
1012
|
+
*
|
|
1013
|
+
* @returns promise
|
|
1014
|
+
*/
|
|
1015
|
+
static clearStripeAuth<T>(): AxiosPromise<Response<T>>;
|
|
1016
|
+
/**
|
|
1017
|
+
* Clear TikTok authentication information from the current user.
|
|
1018
|
+
*
|
|
1019
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
1020
|
+
*
|
|
1021
|
+
* @returns promise
|
|
1022
|
+
*/
|
|
1023
|
+
static clearTikTokAuth<T>(): AxiosPromise<Response<T>>;
|
|
1024
|
+
/**
|
|
1025
|
+
* Clear YouTube authentication information from the current user.
|
|
1026
|
+
*
|
|
1027
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
1028
|
+
*
|
|
1029
|
+
* @returns promise
|
|
1030
|
+
*/
|
|
1031
|
+
static clearYoutubeAuth<T>(): AxiosPromise<Response<T>>;
|
|
984
1032
|
}
|
|
985
1033
|
|
|
986
1034
|
declare class Events {
|
|
@@ -1282,6 +1330,29 @@ declare class Events {
|
|
|
1282
1330
|
* @returns promise
|
|
1283
1331
|
*/
|
|
1284
1332
|
static updateRecording<T>(event_id: string, recording_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1333
|
+
/**
|
|
1334
|
+
* Enable a widget for the current event.
|
|
1335
|
+
*
|
|
1336
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
1337
|
+
*
|
|
1338
|
+
* @param event_id The id of the event to update.
|
|
1339
|
+
* @param widget_id The id of the widget to enable.
|
|
1340
|
+
* @param data The data, which should contain the roles.
|
|
1341
|
+
*
|
|
1342
|
+
* @returns promise
|
|
1343
|
+
*/
|
|
1344
|
+
static enableWidget<T>(event_id: string, widget_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1345
|
+
/**
|
|
1346
|
+
* Disable a widget for the current event.
|
|
1347
|
+
*
|
|
1348
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
1349
|
+
*
|
|
1350
|
+
* @param event_id The id of the event to update.
|
|
1351
|
+
* @param widget_id The id of the widget to disable.
|
|
1352
|
+
*
|
|
1353
|
+
* @returns promise
|
|
1354
|
+
*/
|
|
1355
|
+
static disableWidget<T>(event_id: string, widget_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1285
1356
|
}
|
|
1286
1357
|
|
|
1287
1358
|
declare class Teams {
|
package/package.json
CHANGED
package/src/api/Events.ts
CHANGED
|
@@ -436,6 +436,38 @@ class Events {
|
|
|
436
436
|
}
|
|
437
437
|
|
|
438
438
|
|
|
439
|
+
/**
|
|
440
|
+
* Enable a widget for the current event.
|
|
441
|
+
*
|
|
442
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
443
|
+
*
|
|
444
|
+
* @param event_id The id of the event to update.
|
|
445
|
+
* @param widget_id The id of the widget to enable.
|
|
446
|
+
* @param data The data, which should contain the roles.
|
|
447
|
+
*
|
|
448
|
+
* @returns promise
|
|
449
|
+
*/
|
|
450
|
+
public static enableWidget<T>(event_id: string, widget_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
451
|
+
|
|
452
|
+
return Requests.processRoute(EventsRoutes.routes.enableWidget, data, { event_id: event_id, widget_id : widget_id }, params);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Disable a widget for the current event.
|
|
457
|
+
*
|
|
458
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
459
|
+
*
|
|
460
|
+
* @param event_id The id of the event to update.
|
|
461
|
+
* @param widget_id The id of the widget to disable.
|
|
462
|
+
*
|
|
463
|
+
* @returns promise
|
|
464
|
+
*/
|
|
465
|
+
public static disableWidget<T>(event_id: string, widget_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
466
|
+
|
|
467
|
+
return Requests.processRoute(EventsRoutes.routes.disableWidget, data, { event_id: event_id, widget_id : widget_id }, params);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
|
|
439
471
|
}
|
|
440
472
|
|
|
441
473
|
export default Events;
|
package/src/api/Users.ts
CHANGED
|
@@ -159,6 +159,78 @@ class Users {
|
|
|
159
159
|
return Requests.processRoute(UserRoutes.routes.createDonationPage, {});
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Clear Twitches authentication information from the current user.
|
|
164
|
+
*
|
|
165
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
166
|
+
*
|
|
167
|
+
* @returns promise
|
|
168
|
+
*/
|
|
169
|
+
public static clearTwitchAuth<T>(): AxiosPromise<Response<T>> {
|
|
170
|
+
|
|
171
|
+
return Requests.processRoute(UserRoutes.routes.clearTwitchAuth, {});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Clear Facebook authentication information from the current user.
|
|
176
|
+
*
|
|
177
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
178
|
+
*
|
|
179
|
+
* @returns promise
|
|
180
|
+
*/
|
|
181
|
+
public static clearFacebookAuth<T>(): AxiosPromise<Response<T>> {
|
|
182
|
+
|
|
183
|
+
return Requests.processRoute(UserRoutes.routes.clearFacebookAuth, {});
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Clear Google authentication information from the current user.
|
|
188
|
+
*
|
|
189
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
190
|
+
*
|
|
191
|
+
* @returns promise
|
|
192
|
+
*/
|
|
193
|
+
public static clearGoogleAuth<T>(): AxiosPromise<Response<T>> {
|
|
194
|
+
|
|
195
|
+
return Requests.processRoute(UserRoutes.routes.clearGoogleAuth, {});
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Clear Stripe authentication information from the current user.
|
|
200
|
+
*
|
|
201
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
202
|
+
*
|
|
203
|
+
* @returns promise
|
|
204
|
+
*/
|
|
205
|
+
public static clearStripeAuth<T>(): AxiosPromise<Response<T>> {
|
|
206
|
+
|
|
207
|
+
return Requests.processRoute(UserRoutes.routes.clearStripeAuth, {});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Clear TikTok authentication information from the current user.
|
|
212
|
+
*
|
|
213
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
214
|
+
*
|
|
215
|
+
* @returns promise
|
|
216
|
+
*/
|
|
217
|
+
public static clearTikTokAuth<T>(): AxiosPromise<Response<T>> {
|
|
218
|
+
|
|
219
|
+
return Requests.processRoute(UserRoutes.routes.clearTikTokAuth, {});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Clear YouTube authentication information from the current user.
|
|
224
|
+
*
|
|
225
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
226
|
+
*
|
|
227
|
+
* @returns promise
|
|
228
|
+
*/
|
|
229
|
+
public static clearYoutubeAuth<T>(): AxiosPromise<Response<T>> {
|
|
230
|
+
|
|
231
|
+
return Requests.processRoute(UserRoutes.routes.clearYoutubeAuth, {});
|
|
232
|
+
}
|
|
233
|
+
|
|
162
234
|
|
|
163
235
|
|
|
164
236
|
|
|
@@ -30,8 +30,8 @@ class EventsRoutes {
|
|
|
30
30
|
addTwitchMulticast : {url : '/events/{event_id}/addTwitchMulticast', method : HTTP_METHODS.POST},
|
|
31
31
|
addFacebookMulticast : {url : '/events/{event_id}/addFacebookMulticast', method : HTTP_METHODS.POST},
|
|
32
32
|
addYoutubeMulticast : {url : '/events/{event_id}/addYoutubeMulticast', method : HTTP_METHODS.POST},
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
enableWidget : {url : '/events/{event_id}/enableWidget/{widget_id}', method : HTTP_METHODS.POST},
|
|
34
|
+
disableWidget : {url : '/events/{event_id}/disableWidget/{widget_id}', method : HTTP_METHODS.DELETE},
|
|
35
35
|
|
|
36
36
|
};
|
|
37
37
|
|
package/src/routes/UserRoutes.ts
CHANGED
|
@@ -13,6 +13,12 @@ class UserRoutes {
|
|
|
13
13
|
uploadAvatar : { url: '/users/uploadAvatarImage', method: HTTP_METHODS.POST },
|
|
14
14
|
uploadBanner : { url: '/users/uploadBannerImage', method: HTTP_METHODS.POST },
|
|
15
15
|
createDonationPage : { url: '/users/createDonationPage', method: HTTP_METHODS.POST },
|
|
16
|
+
clearTwitchAuth : { url: '/users/clearTwitchAuth', method: HTTP_METHODS.DELETE },
|
|
17
|
+
clearFacebookAuth : { url: '/users/clearFacebookAuth', method: HTTP_METHODS.DELETE },
|
|
18
|
+
clearGoogleAuth : { url: '/users/clearGoogleAuth', method: HTTP_METHODS.DELETE },
|
|
19
|
+
clearStripeAuth : { url: '/users/clearStripeAuth', method: HTTP_METHODS.DELETE },
|
|
20
|
+
clearTikTokAuth : { url: '/users/clearTikTokAuth', method: HTTP_METHODS.DELETE },
|
|
21
|
+
clearYoutubeAuth : { url: '/users/clearYoutubeAuth', method: HTTP_METHODS.DELETE },
|
|
16
22
|
};
|
|
17
23
|
|
|
18
24
|
}
|