glitch-javascript-sdk 0.5.4 → 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/index.d.ts CHANGED
@@ -1029,6 +1029,38 @@ 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>>;
1032
1064
  }
1033
1065
 
1034
1066
  declare class Events {
@@ -1353,6 +1385,16 @@ declare class Events {
1353
1385
  * @returns promise
1354
1386
  */
1355
1387
  static disableWidget<T>(event_id: string, widget_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1388
+ /**
1389
+ * Get all the tips associated with the current event.
1390
+ *
1391
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
1392
+ *
1393
+ * @param event_id The id of the event to update.
1394
+ *
1395
+ * @returns promise
1396
+ */
1397
+ static getTips<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1356
1398
  }
1357
1399
 
1358
1400
  declare class Teams {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/api/Events.ts CHANGED
@@ -467,6 +467,20 @@ 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
+
470
484
 
471
485
  }
472
486
 
package/src/api/Users.ts CHANGED
@@ -231,6 +231,54 @@ 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
+
234
282
 
235
283
 
236
284
 
@@ -32,7 +32,7 @@ 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
36
  };
37
37
 
38
38
  }
@@ -19,6 +19,10 @@ 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 },
22
26
  };
23
27
 
24
28
  }