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.
@@ -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;
@@ -19,6 +19,28 @@ declare class Posts {
19
19
  * @returns Promise
20
20
  */
21
21
  static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
22
+ /**
23
+ * Create a new post with a file. The file should either be an image or video.
24
+ *
25
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/newPostResourceStorage
26
+ *
27
+ * @param file The file object to upload.
28
+ * @param data Any additional data to pass along to the upload.
29
+ *
30
+ * @returns promise
31
+ */
32
+ static createWithFile<T>(file: File, data?: object): AxiosPromise<Response<T>>;
33
+ /**
34
+ * Create a new post with a blob. The blob should either be an image or video.
35
+ *
36
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/newPostResourceStorage
37
+ *
38
+ * @param file The blob to upload.
39
+ * @param data Any additional data to pass along to the upload.
40
+ *
41
+ * @returns promise
42
+ */
43
+ static createWithBlob<T>(blob: Blob, data?: object): AxiosPromise<Response<T>>;
22
44
  /**
23
45
  * Update a post.
24
46
  *
package/dist/esm/index.js CHANGED
@@ -31340,6 +31340,15 @@ var EventsRoutes = /** @class */ (function () {
31340
31340
  return EventsRoutes;
31341
31341
  }());
31342
31342
 
31343
+ var RecordingsRoute = /** @class */ (function () {
31344
+ function RecordingsRoute() {
31345
+ }
31346
+ RecordingsRoute.routes = {
31347
+ update: { url: '/events/{event_id}/recording/{recording_id}', method: HTTP_METHODS.PUT },
31348
+ };
31349
+ return RecordingsRoute;
31350
+ }());
31351
+
31343
31352
  var Events = /** @class */ (function () {
31344
31353
  function Events() {
31345
31354
  }
@@ -31654,6 +31663,20 @@ var Events = /** @class */ (function () {
31654
31663
  Events.acceptInvite = function (event_id, token, params) {
31655
31664
  return Requests.processRoute(EventsRoutes.routes.acceptInvite, { token: token }, { event_id: event_id }, params);
31656
31665
  };
31666
+ /**
31667
+ * Update a recording related to an event.
31668
+ *
31669
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
31670
+ *
31671
+ * @param event_id The id of the event to update.
31672
+ * @param recording_id The id of the recording to update.
31673
+ * @param data The data to update.
31674
+ *
31675
+ * @returns promise
31676
+ */
31677
+ Events.updateRecording = function (event_id, recording_id, data, params) {
31678
+ return Requests.processRoute(RecordingsRoute.routes.update, data, { event_id: event_id, recording_id: recording_id }, params);
31679
+ };
31657
31680
  return Events;
31658
31681
  }());
31659
31682
 
@@ -32013,6 +32036,32 @@ var Posts = /** @class */ (function () {
32013
32036
  Posts.create = function (data, params) {
32014
32037
  return Requests.processRoute(PostsRoute.routes.create, data, undefined, params);
32015
32038
  };
32039
+ /**
32040
+ * Create a new post with a file. The file should either be an image or video.
32041
+ *
32042
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/newPostResourceStorage
32043
+ *
32044
+ * @param file The file object to upload.
32045
+ * @param data Any additional data to pass along to the upload.
32046
+ *
32047
+ * @returns promise
32048
+ */
32049
+ Posts.createWithFile = function (file, data) {
32050
+ return Requests.uploadFile(PostsRoute.routes.create.url, 'file', file, data);
32051
+ };
32052
+ /**
32053
+ * Create a new post with a blob. The blob should either be an image or video.
32054
+ *
32055
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/newPostResourceStorage
32056
+ *
32057
+ * @param file The blob to upload.
32058
+ * @param data Any additional data to pass along to the upload.
32059
+ *
32060
+ * @returns promise
32061
+ */
32062
+ Posts.createWithBlob = function (blob, data) {
32063
+ return Requests.uploadBlob(PostsRoute.routes.create.url, 'file', blob, data);
32064
+ };
32016
32065
  /**
32017
32066
  * Update a post.
32018
32067
  *