glitch-javascript-sdk 0.5.3 → 0.5.5
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 +267 -163
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Events.d.ts +33 -0
- package/dist/esm/api/Users.d.ts +32 -0
- package/dist/esm/index.js +86 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +65 -0
- package/package.json +1 -1
- package/src/api/Events.ts +46 -0
- package/src/api/Users.ts +48 -0
- package/src/routes/EventsRoute.ts +3 -3
- package/src/routes/UserRoutes.ts +4 -0
package/dist/esm/api/Events.d.ts
CHANGED
|
@@ -299,5 +299,38 @@ declare class Events {
|
|
|
299
299
|
* @returns promise
|
|
300
300
|
*/
|
|
301
301
|
static updateRecording<T>(event_id: string, recording_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
302
|
+
/**
|
|
303
|
+
* Enable a widget for the current event.
|
|
304
|
+
*
|
|
305
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
306
|
+
*
|
|
307
|
+
* @param event_id The id of the event to update.
|
|
308
|
+
* @param widget_id The id of the widget to enable.
|
|
309
|
+
* @param data The data, which should contain the roles.
|
|
310
|
+
*
|
|
311
|
+
* @returns promise
|
|
312
|
+
*/
|
|
313
|
+
static enableWidget<T>(event_id: string, widget_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
314
|
+
/**
|
|
315
|
+
* Disable a widget for the current event.
|
|
316
|
+
*
|
|
317
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
318
|
+
*
|
|
319
|
+
* @param event_id The id of the event to update.
|
|
320
|
+
* @param widget_id The id of the widget to disable.
|
|
321
|
+
*
|
|
322
|
+
* @returns promise
|
|
323
|
+
*/
|
|
324
|
+
static disableWidget<T>(event_id: string, widget_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
325
|
+
/**
|
|
326
|
+
* Get all the tips associated with the current event.
|
|
327
|
+
*
|
|
328
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
329
|
+
*
|
|
330
|
+
* @param event_id The id of the event to update.
|
|
331
|
+
*
|
|
332
|
+
* @returns promise
|
|
333
|
+
*/
|
|
334
|
+
static getTips<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
302
335
|
}
|
|
303
336
|
export default Events;
|
package/dist/esm/api/Users.d.ts
CHANGED
|
@@ -159,5 +159,37 @@ declare class Users {
|
|
|
159
159
|
* @returns promise
|
|
160
160
|
*/
|
|
161
161
|
static clearYoutubeAuth<T>(): AxiosPromise<Response<T>>;
|
|
162
|
+
/**
|
|
163
|
+
* Returns a list of tips received by the authenticated user for a given month and year
|
|
164
|
+
*
|
|
165
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
166
|
+
*
|
|
167
|
+
* @returns promise
|
|
168
|
+
*/
|
|
169
|
+
static getTipsReceivedForMonth<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
170
|
+
/**
|
|
171
|
+
* Returns a list of tips given by the authenticated user for a given month and year.
|
|
172
|
+
*
|
|
173
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
174
|
+
*
|
|
175
|
+
* @returns promise
|
|
176
|
+
*/
|
|
177
|
+
static getTipsGivenForMonth<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
178
|
+
/**
|
|
179
|
+
* Returns the aggregated monthly tips received by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
180
|
+
*
|
|
181
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
182
|
+
*
|
|
183
|
+
* @returns promise
|
|
184
|
+
*/
|
|
185
|
+
static aggregateMonthlyReceivedTips<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
186
|
+
/**
|
|
187
|
+
* Returns the aggregated monthly tips given by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
188
|
+
*
|
|
189
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
190
|
+
*
|
|
191
|
+
* @returns promise
|
|
192
|
+
*/
|
|
193
|
+
static aggregateMonthlyGivenTips<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
162
194
|
}
|
|
163
195
|
export default Users;
|
package/dist/esm/index.js
CHANGED
|
@@ -31342,6 +31342,10 @@ var UserRoutes = /** @class */ (function () {
|
|
|
31342
31342
|
clearStripeAuth: { url: '/users/clearStripeAuth', method: HTTP_METHODS.DELETE },
|
|
31343
31343
|
clearTikTokAuth: { url: '/users/clearTikTokAuth', method: HTTP_METHODS.DELETE },
|
|
31344
31344
|
clearYoutubeAuth: { url: '/users/clearYoutubeAuth', method: HTTP_METHODS.DELETE },
|
|
31345
|
+
getTipsReceivedForMonth: { url: '/users/getTipsReceivedForMonth', method: HTTP_METHODS.GET },
|
|
31346
|
+
getTipsGivenForMonth: { url: '/users/getTipsGivenForMonth', method: HTTP_METHODS.GET },
|
|
31347
|
+
aggregateMonthlyReceivedTips: { url: '/users/aggregateMonthlyReceivedTips', method: HTTP_METHODS.GET },
|
|
31348
|
+
aggregateMonthlyGivenTips: { url: '/users/aggregateMonthlyGivenTips', method: HTTP_METHODS.GET },
|
|
31345
31349
|
};
|
|
31346
31350
|
return UserRoutes;
|
|
31347
31351
|
}());
|
|
@@ -31541,6 +31545,46 @@ var Users = /** @class */ (function () {
|
|
|
31541
31545
|
Users.clearYoutubeAuth = function () {
|
|
31542
31546
|
return Requests.processRoute(UserRoutes.routes.clearYoutubeAuth, {});
|
|
31543
31547
|
};
|
|
31548
|
+
/**
|
|
31549
|
+
* Returns a list of tips received by the authenticated user for a given month and year
|
|
31550
|
+
*
|
|
31551
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
31552
|
+
*
|
|
31553
|
+
* @returns promise
|
|
31554
|
+
*/
|
|
31555
|
+
Users.getTipsReceivedForMonth = function (params) {
|
|
31556
|
+
return Requests.processRoute(UserRoutes.routes.getTipsReceivedForMonth, undefined, undefined, params);
|
|
31557
|
+
};
|
|
31558
|
+
/**
|
|
31559
|
+
* Returns a list of tips given by the authenticated user for a given month and year.
|
|
31560
|
+
*
|
|
31561
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
31562
|
+
*
|
|
31563
|
+
* @returns promise
|
|
31564
|
+
*/
|
|
31565
|
+
Users.getTipsGivenForMonth = function (params) {
|
|
31566
|
+
return Requests.processRoute(UserRoutes.routes.getTipsGivenForMonth, undefined, undefined, params);
|
|
31567
|
+
};
|
|
31568
|
+
/**
|
|
31569
|
+
* Returns the aggregated monthly tips received by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
31570
|
+
*
|
|
31571
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
31572
|
+
*
|
|
31573
|
+
* @returns promise
|
|
31574
|
+
*/
|
|
31575
|
+
Users.aggregateMonthlyReceivedTips = function (params) {
|
|
31576
|
+
return Requests.processRoute(UserRoutes.routes.aggregateMonthlyReceivedTips, undefined, undefined, params);
|
|
31577
|
+
};
|
|
31578
|
+
/**
|
|
31579
|
+
* Returns the aggregated monthly tips given by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
31580
|
+
*
|
|
31581
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
31582
|
+
*
|
|
31583
|
+
* @returns promise
|
|
31584
|
+
*/
|
|
31585
|
+
Users.aggregateMonthlyGivenTips = function (params) {
|
|
31586
|
+
return Requests.processRoute(UserRoutes.routes.aggregateMonthlyGivenTips, undefined, undefined, params);
|
|
31587
|
+
};
|
|
31544
31588
|
return Users;
|
|
31545
31589
|
}());
|
|
31546
31590
|
|
|
@@ -31574,6 +31618,9 @@ var EventsRoutes = /** @class */ (function () {
|
|
|
31574
31618
|
addTwitchMulticast: { url: '/events/{event_id}/addTwitchMulticast', method: HTTP_METHODS.POST },
|
|
31575
31619
|
addFacebookMulticast: { url: '/events/{event_id}/addFacebookMulticast', method: HTTP_METHODS.POST },
|
|
31576
31620
|
addYoutubeMulticast: { url: '/events/{event_id}/addYoutubeMulticast', method: HTTP_METHODS.POST },
|
|
31621
|
+
enableWidget: { url: '/events/{event_id}/enableWidget/{widget_id}', method: HTTP_METHODS.POST },
|
|
31622
|
+
disableWidget: { url: '/events/{event_id}/disableWidget/{widget_id}', method: HTTP_METHODS.DELETE },
|
|
31623
|
+
getTips: { url: '/events/{event_id}/tips', method: HTTP_METHODS.GET },
|
|
31577
31624
|
};
|
|
31578
31625
|
return EventsRoutes;
|
|
31579
31626
|
}());
|
|
@@ -31954,6 +32001,45 @@ var Events = /** @class */ (function () {
|
|
|
31954
32001
|
Events.updateRecording = function (event_id, recording_id, data, params) {
|
|
31955
32002
|
return Requests.processRoute(RecordingsRoute.routes.update, data, { event_id: event_id, recording_id: recording_id }, params);
|
|
31956
32003
|
};
|
|
32004
|
+
/**
|
|
32005
|
+
* Enable a widget for the current event.
|
|
32006
|
+
*
|
|
32007
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
32008
|
+
*
|
|
32009
|
+
* @param event_id The id of the event to update.
|
|
32010
|
+
* @param widget_id The id of the widget to enable.
|
|
32011
|
+
* @param data The data, which should contain the roles.
|
|
32012
|
+
*
|
|
32013
|
+
* @returns promise
|
|
32014
|
+
*/
|
|
32015
|
+
Events.enableWidget = function (event_id, widget_id, data, params) {
|
|
32016
|
+
return Requests.processRoute(EventsRoutes.routes.enableWidget, data, { event_id: event_id, widget_id: widget_id }, params);
|
|
32017
|
+
};
|
|
32018
|
+
/**
|
|
32019
|
+
* Disable a widget for the current event.
|
|
32020
|
+
*
|
|
32021
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
32022
|
+
*
|
|
32023
|
+
* @param event_id The id of the event to update.
|
|
32024
|
+
* @param widget_id The id of the widget to disable.
|
|
32025
|
+
*
|
|
32026
|
+
* @returns promise
|
|
32027
|
+
*/
|
|
32028
|
+
Events.disableWidget = function (event_id, widget_id, data, params) {
|
|
32029
|
+
return Requests.processRoute(EventsRoutes.routes.disableWidget, data, { event_id: event_id, widget_id: widget_id }, params);
|
|
32030
|
+
};
|
|
32031
|
+
/**
|
|
32032
|
+
* Get all the tips associated with the current event.
|
|
32033
|
+
*
|
|
32034
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
32035
|
+
*
|
|
32036
|
+
* @param event_id The id of the event to update.
|
|
32037
|
+
*
|
|
32038
|
+
* @returns promise
|
|
32039
|
+
*/
|
|
32040
|
+
Events.getTips = function (event_id, params) {
|
|
32041
|
+
return Requests.processRoute(EventsRoutes.routes.getTips, {}, { event_id: event_id }, params);
|
|
32042
|
+
};
|
|
31957
32043
|
return Events;
|
|
31958
32044
|
}());
|
|
31959
32045
|
|