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/cjs/index.js
CHANGED
|
@@ -17120,6 +17120,11 @@ var UserRoutes = /** @class */ (function () {
|
|
|
17120
17120
|
clearStripeAuth: { url: '/users/clearStripeAuth', method: HTTP_METHODS.DELETE },
|
|
17121
17121
|
clearTikTokAuth: { url: '/users/clearTikTokAuth', method: HTTP_METHODS.DELETE },
|
|
17122
17122
|
clearYoutubeAuth: { url: '/users/clearYoutubeAuth', method: HTTP_METHODS.DELETE },
|
|
17123
|
+
getTipsReceivedForMonth: { url: '/users/getTipsReceivedForMonth', method: HTTP_METHODS.GET },
|
|
17124
|
+
getTipsGivenForMonth: { url: '/users/getTipsGivenForMonth', method: HTTP_METHODS.GET },
|
|
17125
|
+
aggregateMonthlyReceivedTips: { url: '/users/aggregateMonthlyReceivedTips', method: HTTP_METHODS.GET },
|
|
17126
|
+
aggregateMonthlyGivenTips: { url: '/users/aggregateMonthlyGivenTips', method: HTTP_METHODS.GET },
|
|
17127
|
+
getYoutubeChannels: { url: '/users/getYoutubeChannels', method: HTTP_METHODS.GET },
|
|
17123
17128
|
};
|
|
17124
17129
|
return UserRoutes;
|
|
17125
17130
|
}());
|
|
@@ -17319,6 +17324,56 @@ var Users = /** @class */ (function () {
|
|
|
17319
17324
|
Users.clearYoutubeAuth = function () {
|
|
17320
17325
|
return Requests.processRoute(UserRoutes.routes.clearYoutubeAuth, {});
|
|
17321
17326
|
};
|
|
17327
|
+
/**
|
|
17328
|
+
* Returns a list of tips received by the authenticated user for a given month and year
|
|
17329
|
+
*
|
|
17330
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
17331
|
+
*
|
|
17332
|
+
* @returns promise
|
|
17333
|
+
*/
|
|
17334
|
+
Users.getTipsReceivedForMonth = function (params) {
|
|
17335
|
+
return Requests.processRoute(UserRoutes.routes.getTipsReceivedForMonth, undefined, undefined, params);
|
|
17336
|
+
};
|
|
17337
|
+
/**
|
|
17338
|
+
* Returns a list of tips given by the authenticated user for a given month and year.
|
|
17339
|
+
*
|
|
17340
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
17341
|
+
*
|
|
17342
|
+
* @returns promise
|
|
17343
|
+
*/
|
|
17344
|
+
Users.getTipsGivenForMonth = function (params) {
|
|
17345
|
+
return Requests.processRoute(UserRoutes.routes.getTipsGivenForMonth, undefined, undefined, params);
|
|
17346
|
+
};
|
|
17347
|
+
/**
|
|
17348
|
+
* Returns the aggregated monthly tips received by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
17349
|
+
*
|
|
17350
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
17351
|
+
*
|
|
17352
|
+
* @returns promise
|
|
17353
|
+
*/
|
|
17354
|
+
Users.aggregateMonthlyReceivedTips = function (params) {
|
|
17355
|
+
return Requests.processRoute(UserRoutes.routes.aggregateMonthlyReceivedTips, undefined, undefined, params);
|
|
17356
|
+
};
|
|
17357
|
+
/**
|
|
17358
|
+
* Returns the aggregated monthly tips given by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
17359
|
+
*
|
|
17360
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
17361
|
+
*
|
|
17362
|
+
* @returns promise
|
|
17363
|
+
*/
|
|
17364
|
+
Users.aggregateMonthlyGivenTips = function (params) {
|
|
17365
|
+
return Requests.processRoute(UserRoutes.routes.aggregateMonthlyGivenTips, undefined, undefined, params);
|
|
17366
|
+
};
|
|
17367
|
+
/**
|
|
17368
|
+
* Returns the user associated Youtube a channels a user has.
|
|
17369
|
+
*
|
|
17370
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
17371
|
+
*
|
|
17372
|
+
* @returns promise
|
|
17373
|
+
*/
|
|
17374
|
+
Users.getYoutubeChannels = function (params) {
|
|
17375
|
+
return Requests.processRoute(UserRoutes.routes.getYoutubeChannels, undefined, undefined, params);
|
|
17376
|
+
};
|
|
17322
17377
|
return Users;
|
|
17323
17378
|
}());
|
|
17324
17379
|
|
|
@@ -17354,6 +17409,11 @@ var EventsRoutes = /** @class */ (function () {
|
|
|
17354
17409
|
addYoutubeMulticast: { url: '/events/{event_id}/addYoutubeMulticast', method: HTTP_METHODS.POST },
|
|
17355
17410
|
enableWidget: { url: '/events/{event_id}/enableWidget/{widget_id}', method: HTTP_METHODS.POST },
|
|
17356
17411
|
disableWidget: { url: '/events/{event_id}/disableWidget/{widget_id}', method: HTTP_METHODS.DELETE },
|
|
17412
|
+
getTips: { url: '/events/{event_id}/tips', method: HTTP_METHODS.GET },
|
|
17413
|
+
setAIAvatarPersonalityAttribute: { url: '/events/{event_id}/setAIAvatarPersonalityAttribute', method: HTTP_METHODS.POST },
|
|
17414
|
+
setAIAvatarName: { url: '/events/{event_id}/setAIAvatarName', method: HTTP_METHODS.POST },
|
|
17415
|
+
setAIAvatarRespondToChat: { url: '/events/{event_id}/setAIAvatarRespondToChat', method: HTTP_METHODS.POST },
|
|
17416
|
+
setAIAvatarRespondToMe: { url: '/events/{event_id}/setAIAvatarRespondToMe', method: HTTP_METHODS.POST },
|
|
17357
17417
|
};
|
|
17358
17418
|
return EventsRoutes;
|
|
17359
17419
|
}());
|
|
@@ -17761,6 +17821,66 @@ var Events = /** @class */ (function () {
|
|
|
17761
17821
|
Events.disableWidget = function (event_id, widget_id, data, params) {
|
|
17762
17822
|
return Requests.processRoute(EventsRoutes.routes.disableWidget, data, { event_id: event_id, widget_id: widget_id }, params);
|
|
17763
17823
|
};
|
|
17824
|
+
/**
|
|
17825
|
+
* Get all the tips associated with the current event.
|
|
17826
|
+
*
|
|
17827
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
17828
|
+
*
|
|
17829
|
+
* @param event_id The id of the event to update.
|
|
17830
|
+
*
|
|
17831
|
+
* @returns promise
|
|
17832
|
+
*/
|
|
17833
|
+
Events.getTips = function (event_id, params) {
|
|
17834
|
+
return Requests.processRoute(EventsRoutes.routes.getTips, {}, { event_id: event_id }, params);
|
|
17835
|
+
};
|
|
17836
|
+
/**
|
|
17837
|
+
* Sets the personality attribute of the AI to adjust how it will respond.
|
|
17838
|
+
*
|
|
17839
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
17840
|
+
*
|
|
17841
|
+
* @param event_id The id of the event.
|
|
17842
|
+
*
|
|
17843
|
+
* @returns promise
|
|
17844
|
+
*/
|
|
17845
|
+
Events.setAIAvatarPersonalityAttribute = function (event_id, data, params) {
|
|
17846
|
+
return Requests.processRoute(EventsRoutes.routes.setAIAvatarPersonalityAttribute, data, { event_id: event_id }, params);
|
|
17847
|
+
};
|
|
17848
|
+
/**
|
|
17849
|
+
* Sets the AI Avatars name, which it can respond too.
|
|
17850
|
+
*
|
|
17851
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
17852
|
+
*
|
|
17853
|
+
* @param event_id The id of the event.
|
|
17854
|
+
*
|
|
17855
|
+
* @returns promise
|
|
17856
|
+
*/
|
|
17857
|
+
Events.setAIAvatarName = function (event_id, data, params) {
|
|
17858
|
+
return Requests.processRoute(EventsRoutes.routes.setAIAvatarName, data, { event_id: event_id }, params);
|
|
17859
|
+
};
|
|
17860
|
+
/**
|
|
17861
|
+
* Sets the AI Avatar to that it willr respond to users in the chat.
|
|
17862
|
+
*
|
|
17863
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
17864
|
+
*
|
|
17865
|
+
* @param event_id The id of the event.
|
|
17866
|
+
*
|
|
17867
|
+
* @returns promise
|
|
17868
|
+
*/
|
|
17869
|
+
Events.setAIAvatarRespondToChat = function (event_id, data, params) {
|
|
17870
|
+
return Requests.processRoute(EventsRoutes.routes.setAIAvatarRespondToChat, data, { event_id: event_id }, params);
|
|
17871
|
+
};
|
|
17872
|
+
/**
|
|
17873
|
+
* Sets the AI Avatar so that it will respond to you.
|
|
17874
|
+
*
|
|
17875
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
17876
|
+
*
|
|
17877
|
+
* @param event_id The id of the event.
|
|
17878
|
+
*
|
|
17879
|
+
* @returns promise
|
|
17880
|
+
*/
|
|
17881
|
+
Events.setAIAvatarRespondToMe = function (event_id, data, params) {
|
|
17882
|
+
return Requests.processRoute(EventsRoutes.routes.setAIAvatarRespondToMe, data, { event_id: event_id }, params);
|
|
17883
|
+
};
|
|
17764
17884
|
return Events;
|
|
17765
17885
|
}());
|
|
17766
17886
|
|