glitch-javascript-sdk 0.5.4 → 0.5.6
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 +120 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Events.d.ts +50 -0
- package/dist/esm/api/Users.d.ts +40 -0
- package/dist/esm/index.js +120 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +90 -0
- package/package.json +1 -1
- package/src/api/Events.ts +70 -0
- package/src/api/Users.ts +60 -0
- package/src/routes/EventsRoute.ts +5 -1
- package/src/routes/UserRoutes.ts +5 -0
package/dist/index.d.ts
CHANGED
|
@@ -1029,6 +1029,46 @@ declare class Users {
|
|
|
1029
1029
|
* @returns promise
|
|
1030
1030
|
*/
|
|
1031
1031
|
static clearYoutubeAuth<T>(): AxiosPromise<Response<T>>;
|
|
1032
|
+
/**
|
|
1033
|
+
* Returns a list of tips received by the authenticated user for a given month and year
|
|
1034
|
+
*
|
|
1035
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
1036
|
+
*
|
|
1037
|
+
* @returns promise
|
|
1038
|
+
*/
|
|
1039
|
+
static getTipsReceivedForMonth<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1040
|
+
/**
|
|
1041
|
+
* Returns a list of tips given by the authenticated user for a given month and year.
|
|
1042
|
+
*
|
|
1043
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
1044
|
+
*
|
|
1045
|
+
* @returns promise
|
|
1046
|
+
*/
|
|
1047
|
+
static getTipsGivenForMonth<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1048
|
+
/**
|
|
1049
|
+
* Returns the aggregated monthly tips received by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
1050
|
+
*
|
|
1051
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
1052
|
+
*
|
|
1053
|
+
* @returns promise
|
|
1054
|
+
*/
|
|
1055
|
+
static aggregateMonthlyReceivedTips<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1056
|
+
/**
|
|
1057
|
+
* Returns the aggregated monthly tips given by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
1058
|
+
*
|
|
1059
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
1060
|
+
*
|
|
1061
|
+
* @returns promise
|
|
1062
|
+
*/
|
|
1063
|
+
static aggregateMonthlyGivenTips<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1064
|
+
/**
|
|
1065
|
+
* Returns the user associated Youtube a channels a user has.
|
|
1066
|
+
*
|
|
1067
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
1068
|
+
*
|
|
1069
|
+
* @returns promise
|
|
1070
|
+
*/
|
|
1071
|
+
static getYoutubeChannels<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1032
1072
|
}
|
|
1033
1073
|
|
|
1034
1074
|
declare class Events {
|
|
@@ -1353,6 +1393,56 @@ declare class Events {
|
|
|
1353
1393
|
* @returns promise
|
|
1354
1394
|
*/
|
|
1355
1395
|
static disableWidget<T>(event_id: string, widget_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1396
|
+
/**
|
|
1397
|
+
* Get all the tips associated with the current event.
|
|
1398
|
+
*
|
|
1399
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
1400
|
+
*
|
|
1401
|
+
* @param event_id The id of the event to update.
|
|
1402
|
+
*
|
|
1403
|
+
* @returns promise
|
|
1404
|
+
*/
|
|
1405
|
+
static getTips<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1406
|
+
/**
|
|
1407
|
+
* Sets the personality attribute of the AI to adjust how it will respond.
|
|
1408
|
+
*
|
|
1409
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
1410
|
+
*
|
|
1411
|
+
* @param event_id The id of the event.
|
|
1412
|
+
*
|
|
1413
|
+
* @returns promise
|
|
1414
|
+
*/
|
|
1415
|
+
static setAIAvatarPersonalityAttribute<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1416
|
+
/**
|
|
1417
|
+
* Sets the AI Avatars name, which it can respond too.
|
|
1418
|
+
*
|
|
1419
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
1420
|
+
*
|
|
1421
|
+
* @param event_id The id of the event.
|
|
1422
|
+
*
|
|
1423
|
+
* @returns promise
|
|
1424
|
+
*/
|
|
1425
|
+
static setAIAvatarName<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1426
|
+
/**
|
|
1427
|
+
* Sets the AI Avatar to that it willr respond to users in the chat.
|
|
1428
|
+
*
|
|
1429
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
1430
|
+
*
|
|
1431
|
+
* @param event_id The id of the event.
|
|
1432
|
+
*
|
|
1433
|
+
* @returns promise
|
|
1434
|
+
*/
|
|
1435
|
+
static setAIAvatarRespondToChat<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1436
|
+
/**
|
|
1437
|
+
* Sets the AI Avatar so that it will respond to you.
|
|
1438
|
+
*
|
|
1439
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
1440
|
+
*
|
|
1441
|
+
* @param event_id The id of the event.
|
|
1442
|
+
*
|
|
1443
|
+
* @returns promise
|
|
1444
|
+
*/
|
|
1445
|
+
static setAIAvatarRespondToMe<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1356
1446
|
}
|
|
1357
1447
|
|
|
1358
1448
|
declare class Teams {
|
package/package.json
CHANGED
package/src/api/Events.ts
CHANGED
|
@@ -467,6 +467,76 @@ class Events {
|
|
|
467
467
|
return Requests.processRoute(EventsRoutes.routes.disableWidget, data, { event_id: event_id, widget_id : widget_id }, params);
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
+
/**
|
|
471
|
+
* Get all the tips associated with the current event.
|
|
472
|
+
*
|
|
473
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
474
|
+
*
|
|
475
|
+
* @param event_id The id of the event to update.
|
|
476
|
+
*
|
|
477
|
+
* @returns promise
|
|
478
|
+
*/
|
|
479
|
+
public static getTips<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
480
|
+
|
|
481
|
+
return Requests.processRoute(EventsRoutes.routes.getTips, {}, { event_id: event_id }, params);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Sets the personality attribute of the AI to adjust how it will respond.
|
|
486
|
+
*
|
|
487
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
488
|
+
*
|
|
489
|
+
* @param event_id The id of the event.
|
|
490
|
+
*
|
|
491
|
+
* @returns promise
|
|
492
|
+
*/
|
|
493
|
+
public static setAIAvatarPersonalityAttribute<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
494
|
+
|
|
495
|
+
return Requests.processRoute(EventsRoutes.routes.setAIAvatarPersonalityAttribute, data, { event_id: event_id }, params);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Sets the AI Avatars name, which it can respond too.
|
|
500
|
+
*
|
|
501
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
502
|
+
*
|
|
503
|
+
* @param event_id The id of the event.
|
|
504
|
+
*
|
|
505
|
+
* @returns promise
|
|
506
|
+
*/
|
|
507
|
+
public static setAIAvatarName<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
508
|
+
|
|
509
|
+
return Requests.processRoute(EventsRoutes.routes.setAIAvatarName, data, { event_id: event_id }, params);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Sets the AI Avatar to that it willr respond to users in the chat.
|
|
514
|
+
*
|
|
515
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
516
|
+
*
|
|
517
|
+
* @param event_id The id of the event.
|
|
518
|
+
*
|
|
519
|
+
* @returns promise
|
|
520
|
+
*/
|
|
521
|
+
public static setAIAvatarRespondToChat<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
522
|
+
|
|
523
|
+
return Requests.processRoute(EventsRoutes.routes.setAIAvatarRespondToChat, data, { event_id: event_id }, params);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Sets the AI Avatar so that it will respond to you.
|
|
528
|
+
*
|
|
529
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
530
|
+
*
|
|
531
|
+
* @param event_id The id of the event.
|
|
532
|
+
*
|
|
533
|
+
* @returns promise
|
|
534
|
+
*/
|
|
535
|
+
public static setAIAvatarRespondToMe<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
536
|
+
|
|
537
|
+
return Requests.processRoute(EventsRoutes.routes.setAIAvatarRespondToMe, data, { event_id: event_id }, params);
|
|
538
|
+
}
|
|
539
|
+
|
|
470
540
|
|
|
471
541
|
}
|
|
472
542
|
|
package/src/api/Users.ts
CHANGED
|
@@ -231,6 +231,66 @@ class Users {
|
|
|
231
231
|
return Requests.processRoute(UserRoutes.routes.clearYoutubeAuth, {});
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
+
/**
|
|
235
|
+
* Returns a list of tips received by the authenticated user for a given month and year
|
|
236
|
+
*
|
|
237
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
238
|
+
*
|
|
239
|
+
* @returns promise
|
|
240
|
+
*/
|
|
241
|
+
public static getTipsReceivedForMonth<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
242
|
+
|
|
243
|
+
return Requests.processRoute(UserRoutes.routes.getTipsReceivedForMonth, undefined, undefined, params);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Returns a list of tips given by the authenticated user for a given month and year.
|
|
248
|
+
*
|
|
249
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
250
|
+
*
|
|
251
|
+
* @returns promise
|
|
252
|
+
*/
|
|
253
|
+
public static getTipsGivenForMonth<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
254
|
+
|
|
255
|
+
return Requests.processRoute(UserRoutes.routes.getTipsGivenForMonth, undefined, undefined, params);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Returns the aggregated monthly tips received by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
260
|
+
*
|
|
261
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
262
|
+
*
|
|
263
|
+
* @returns promise
|
|
264
|
+
*/
|
|
265
|
+
public static aggregateMonthlyReceivedTips<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
266
|
+
|
|
267
|
+
return Requests.processRoute(UserRoutes.routes.aggregateMonthlyReceivedTips, undefined, undefined, params);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Returns the aggregated monthly tips given by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
272
|
+
*
|
|
273
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
274
|
+
*
|
|
275
|
+
* @returns promise
|
|
276
|
+
*/
|
|
277
|
+
public static aggregateMonthlyGivenTips<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
278
|
+
|
|
279
|
+
return Requests.processRoute(UserRoutes.routes.aggregateMonthlyGivenTips, undefined, undefined, params);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Returns the user associated Youtube a channels a user has.
|
|
284
|
+
*
|
|
285
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
286
|
+
*
|
|
287
|
+
* @returns promise
|
|
288
|
+
*/
|
|
289
|
+
public static getYoutubeChannels<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
290
|
+
|
|
291
|
+
return Requests.processRoute(UserRoutes.routes.getYoutubeChannels, undefined, undefined, params);
|
|
292
|
+
}
|
|
293
|
+
|
|
234
294
|
|
|
235
295
|
|
|
236
296
|
|
|
@@ -32,7 +32,11 @@ class EventsRoutes {
|
|
|
32
32
|
addYoutubeMulticast : {url : '/events/{event_id}/addYoutubeMulticast', method : HTTP_METHODS.POST},
|
|
33
33
|
enableWidget : {url : '/events/{event_id}/enableWidget/{widget_id}', method : HTTP_METHODS.POST},
|
|
34
34
|
disableWidget : {url : '/events/{event_id}/disableWidget/{widget_id}', method : HTTP_METHODS.DELETE},
|
|
35
|
-
|
|
35
|
+
getTips : {url : '/events/{event_id}/tips', method : HTTP_METHODS.GET},
|
|
36
|
+
setAIAvatarPersonalityAttribute : {url : '/events/{event_id}/setAIAvatarPersonalityAttribute', method : HTTP_METHODS.POST},
|
|
37
|
+
setAIAvatarName : {url : '/events/{event_id}/setAIAvatarName', method : HTTP_METHODS.POST},
|
|
38
|
+
setAIAvatarRespondToChat : {url : '/events/{event_id}/setAIAvatarRespondToChat', method : HTTP_METHODS.POST},
|
|
39
|
+
setAIAvatarRespondToMe : {url : '/events/{event_id}/setAIAvatarRespondToMe', method : HTTP_METHODS.POST},
|
|
36
40
|
};
|
|
37
41
|
|
|
38
42
|
}
|
package/src/routes/UserRoutes.ts
CHANGED
|
@@ -19,6 +19,11 @@ class UserRoutes {
|
|
|
19
19
|
clearStripeAuth : { url: '/users/clearStripeAuth', method: HTTP_METHODS.DELETE },
|
|
20
20
|
clearTikTokAuth : { url: '/users/clearTikTokAuth', method: HTTP_METHODS.DELETE },
|
|
21
21
|
clearYoutubeAuth : { url: '/users/clearYoutubeAuth', method: HTTP_METHODS.DELETE },
|
|
22
|
+
getTipsReceivedForMonth : { url: '/users/getTipsReceivedForMonth', method: HTTP_METHODS.GET },
|
|
23
|
+
getTipsGivenForMonth : { url: '/users/getTipsGivenForMonth', method: HTTP_METHODS.GET },
|
|
24
|
+
aggregateMonthlyReceivedTips : { url: '/users/aggregateMonthlyReceivedTips', method: HTTP_METHODS.GET },
|
|
25
|
+
aggregateMonthlyGivenTips : { url: '/users/aggregateMonthlyGivenTips', method: HTTP_METHODS.GET },
|
|
26
|
+
getYoutubeChannels : { url: '/users/getYoutubeChannels', method: HTTP_METHODS.GET },
|
|
22
27
|
};
|
|
23
28
|
|
|
24
29
|
}
|