glitch-javascript-sdk 0.3.3 → 0.3.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 CHANGED
@@ -17118,6 +17118,15 @@ var EventsRoutes = /** @class */ (function () {
17118
17118
  return EventsRoutes;
17119
17119
  }());
17120
17120
 
17121
+ var RecordingsRoute = /** @class */ (function () {
17122
+ function RecordingsRoute() {
17123
+ }
17124
+ RecordingsRoute.routes = {
17125
+ update: { url: '/events/{event_id}/recording/{recording_id}', method: HTTP_METHODS.PUT },
17126
+ };
17127
+ return RecordingsRoute;
17128
+ }());
17129
+
17121
17130
  var Events = /** @class */ (function () {
17122
17131
  function Events() {
17123
17132
  }
@@ -17432,6 +17441,20 @@ var Events = /** @class */ (function () {
17432
17441
  Events.acceptInvite = function (event_id, token, params) {
17433
17442
  return Requests.processRoute(EventsRoutes.routes.acceptInvite, { token: token }, { event_id: event_id }, params);
17434
17443
  };
17444
+ /**
17445
+ * Update a recording related to an event.
17446
+ *
17447
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
17448
+ *
17449
+ * @param event_id The id of the event to update.
17450
+ * @param recording_id The id of the recording to update.
17451
+ * @param data The data to update.
17452
+ *
17453
+ * @returns promise
17454
+ */
17455
+ Events.updateRecording = function (event_id, recording_id, data, params) {
17456
+ return Requests.processRoute(RecordingsRoute.routes.update, data, { event_id: event_id, recording_id: recording_id }, params);
17457
+ };
17435
17458
  return Events;
17436
17459
  }());
17437
17460
 
@@ -17791,6 +17814,32 @@ var Posts = /** @class */ (function () {
17791
17814
  Posts.create = function (data, params) {
17792
17815
  return Requests.processRoute(PostsRoute.routes.create, data, undefined, params);
17793
17816
  };
17817
+ /**
17818
+ * Create a new post with a file. The file should either be an image or video.
17819
+ *
17820
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/newPostResourceStorage
17821
+ *
17822
+ * @param file The file object to upload.
17823
+ * @param data Any additional data to pass along to the upload.
17824
+ *
17825
+ * @returns promise
17826
+ */
17827
+ Posts.createWithFile = function (file, data) {
17828
+ return Requests.uploadFile(PostsRoute.routes.create.url, 'file', file, data);
17829
+ };
17830
+ /**
17831
+ * Create a new post with a blob. The blob should either be an image or video.
17832
+ *
17833
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/newPostResourceStorage
17834
+ *
17835
+ * @param file The blob to upload.
17836
+ * @param data Any additional data to pass along to the upload.
17837
+ *
17838
+ * @returns promise
17839
+ */
17840
+ Posts.createWithBlob = function (blob, data) {
17841
+ return Requests.uploadBlob(PostsRoute.routes.create.url, 'file', blob, data);
17842
+ };
17794
17843
  /**
17795
17844
  * Update a post.
17796
17845
  *