glitch-javascript-sdk 0.5.5 → 0.5.7
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 +240 -181
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Events.d.ts +50 -0
- package/dist/esm/api/Users.d.ts +8 -0
- package/dist/esm/index.js +77 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +58 -0
- package/package.json +1 -1
- package/src/api/Events.ts +71 -0
- package/src/api/Users.ts +12 -0
- package/src/routes/EventsRoute.ts +5 -0
- package/src/routes/UserRoutes.ts +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -1061,6 +1061,14 @@ declare class Users {
|
|
|
1061
1061
|
* @returns promise
|
|
1062
1062
|
*/
|
|
1063
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>>;
|
|
1064
1072
|
}
|
|
1065
1073
|
|
|
1066
1074
|
declare class Events {
|
|
@@ -1395,6 +1403,56 @@ declare class Events {
|
|
|
1395
1403
|
* @returns promise
|
|
1396
1404
|
*/
|
|
1397
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 Avatars accent, that will dictate the void in which it responds.
|
|
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 setAIAccent<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1436
|
+
/**
|
|
1437
|
+
* Sets the AI Avatar to that it willr respond to users in the chat.
|
|
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 setAIAvatarRespondToChat<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1446
|
+
/**
|
|
1447
|
+
* Sets the AI Avatar so that it will respond to you.
|
|
1448
|
+
*
|
|
1449
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
1450
|
+
*
|
|
1451
|
+
* @param event_id The id of the event.
|
|
1452
|
+
*
|
|
1453
|
+
* @returns promise
|
|
1454
|
+
*/
|
|
1455
|
+
static setAIAvatarRespondToMe<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1398
1456
|
}
|
|
1399
1457
|
|
|
1400
1458
|
declare class Teams {
|
package/package.json
CHANGED
package/src/api/Events.ts
CHANGED
|
@@ -481,6 +481,77 @@ class Events {
|
|
|
481
481
|
return Requests.processRoute(EventsRoutes.routes.getTips, {}, { event_id: event_id }, params);
|
|
482
482
|
}
|
|
483
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 Avatars accent, that will dictate the void in which it responds.
|
|
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 setAIAccent<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
522
|
+
|
|
523
|
+
return Requests.processRoute(EventsRoutes.routes.setAIAccent, data, { event_id: event_id }, params);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Sets the AI Avatar to that it willr respond to users in the chat.
|
|
529
|
+
*
|
|
530
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
531
|
+
*
|
|
532
|
+
* @param event_id The id of the event.
|
|
533
|
+
*
|
|
534
|
+
* @returns promise
|
|
535
|
+
*/
|
|
536
|
+
public static setAIAvatarRespondToChat<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
537
|
+
|
|
538
|
+
return Requests.processRoute(EventsRoutes.routes.setAIAvatarRespondToChat, data, { event_id: event_id }, params);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Sets the AI Avatar so that it will respond to you.
|
|
543
|
+
*
|
|
544
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
545
|
+
*
|
|
546
|
+
* @param event_id The id of the event.
|
|
547
|
+
*
|
|
548
|
+
* @returns promise
|
|
549
|
+
*/
|
|
550
|
+
public static setAIAvatarRespondToMe<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
551
|
+
|
|
552
|
+
return Requests.processRoute(EventsRoutes.routes.setAIAvatarRespondToMe, data, { event_id: event_id }, params);
|
|
553
|
+
}
|
|
554
|
+
|
|
484
555
|
|
|
485
556
|
}
|
|
486
557
|
|
package/src/api/Users.ts
CHANGED
|
@@ -279,6 +279,18 @@ class Users {
|
|
|
279
279
|
return Requests.processRoute(UserRoutes.routes.aggregateMonthlyGivenTips, undefined, undefined, params);
|
|
280
280
|
}
|
|
281
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
|
+
|
|
282
294
|
|
|
283
295
|
|
|
284
296
|
|
|
@@ -33,6 +33,11 @@ class EventsRoutes {
|
|
|
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
|
+
setAIAccent : {url : '/events/{event_id}/setAIAccent', method : HTTP_METHODS.POST},
|
|
39
|
+
setAIAvatarRespondToChat : {url : '/events/{event_id}/setAIAvatarRespondToChat', method : HTTP_METHODS.POST},
|
|
40
|
+
setAIAvatarRespondToMe : {url : '/events/{event_id}/setAIAvatarRespondToMe', method : HTTP_METHODS.POST},
|
|
36
41
|
};
|
|
37
42
|
|
|
38
43
|
}
|
package/src/routes/UserRoutes.ts
CHANGED
|
@@ -19,10 +19,12 @@ 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
|
+
clearStreamElementsAuth : { url: '/users/clearStreamElementsAuth', method: HTTP_METHODS.DELETE },
|
|
22
23
|
getTipsReceivedForMonth : { url: '/users/getTipsReceivedForMonth', method: HTTP_METHODS.GET },
|
|
23
24
|
getTipsGivenForMonth : { url: '/users/getTipsGivenForMonth', method: HTTP_METHODS.GET },
|
|
24
25
|
aggregateMonthlyReceivedTips : { url: '/users/aggregateMonthlyReceivedTips', method: HTTP_METHODS.GET },
|
|
25
26
|
aggregateMonthlyGivenTips : { url: '/users/aggregateMonthlyGivenTips', method: HTTP_METHODS.GET },
|
|
27
|
+
getYoutubeChannels : { url: '/users/getYoutubeChannels', method: HTTP_METHODS.GET },
|
|
26
28
|
};
|
|
27
29
|
|
|
28
30
|
}
|