glitch-javascript-sdk 0.3.4 → 0.3.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.
@@ -254,5 +254,17 @@ declare class Events {
254
254
  static disableDonations<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
255
255
  static sendInvite<T>(event_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
256
256
  static acceptInvite<T>(event_id: string, token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
257
+ /**
258
+ * Update a recording related to an event.
259
+ *
260
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
261
+ *
262
+ * @param event_id The id of the event to update.
263
+ * @param recording_id The id of the recording to update.
264
+ * @param data The data to update.
265
+ *
266
+ * @returns promise
267
+ */
268
+ static updateRecording<T>(event_id: string, recording_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
257
269
  }
258
270
  export default Events;
package/dist/esm/index.js CHANGED
@@ -30009,6 +30009,10 @@ var Requests = /** @class */ (function () {
30009
30009
  }
30010
30010
  var formData = new FormData();
30011
30011
  formData.append(filename, file);
30012
+ if (this.community_id) {
30013
+ // Add the community_id to the request body
30014
+ data = __assign(__assign({}, data), { communities: [this.community_id] });
30015
+ }
30012
30016
  for (var key in data) {
30013
30017
  formData.append(key, data[key]);
30014
30018
  }
@@ -30026,6 +30030,10 @@ var Requests = /** @class */ (function () {
30026
30030
  }
30027
30031
  var formData = new FormData();
30028
30032
  formData.append(filename, blob);
30033
+ if (this.community_id) {
30034
+ // Add the community_id to the request body
30035
+ data = __assign(__assign({}, data), { communities: [this.community_id] });
30036
+ }
30029
30037
  for (var key in data) {
30030
30038
  formData.append(key, data[key]);
30031
30039
  }
@@ -31340,6 +31348,15 @@ var EventsRoutes = /** @class */ (function () {
31340
31348
  return EventsRoutes;
31341
31349
  }());
31342
31350
 
31351
+ var RecordingsRoute = /** @class */ (function () {
31352
+ function RecordingsRoute() {
31353
+ }
31354
+ RecordingsRoute.routes = {
31355
+ update: { url: '/events/{event_id}/recording/{recording_id}', method: HTTP_METHODS.PUT },
31356
+ };
31357
+ return RecordingsRoute;
31358
+ }());
31359
+
31343
31360
  var Events = /** @class */ (function () {
31344
31361
  function Events() {
31345
31362
  }
@@ -31654,6 +31671,20 @@ var Events = /** @class */ (function () {
31654
31671
  Events.acceptInvite = function (event_id, token, params) {
31655
31672
  return Requests.processRoute(EventsRoutes.routes.acceptInvite, { token: token }, { event_id: event_id }, params);
31656
31673
  };
31674
+ /**
31675
+ * Update a recording related to an event.
31676
+ *
31677
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
31678
+ *
31679
+ * @param event_id The id of the event to update.
31680
+ * @param recording_id The id of the recording to update.
31681
+ * @param data The data to update.
31682
+ *
31683
+ * @returns promise
31684
+ */
31685
+ Events.updateRecording = function (event_id, recording_id, data, params) {
31686
+ return Requests.processRoute(RecordingsRoute.routes.update, data, { event_id: event_id, recording_id: recording_id }, params);
31687
+ };
31657
31688
  return Events;
31658
31689
  }());
31659
31690