glitch-javascript-sdk 1.4.9 → 1.5.0

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.
@@ -37,6 +37,15 @@ declare class SocialPosts {
37
37
  * @returns promise
38
38
  */
39
39
  static update<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
40
+ /**
41
+ * Deletes a post.
42
+ *
43
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/destoryPostStorage
44
+ *
45
+ * @param post_id The id of the post to delete.
46
+ * @returns promise
47
+ */
48
+ static delete<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
40
49
  /**
41
50
  * Dispute a post as being fraudulent.,s
42
51
  *
package/dist/esm/index.js CHANGED
@@ -9355,6 +9355,7 @@ var SocialPostsRoute = /** @class */ (function () {
9355
9355
  createPost: { url: '/socialposts', method: HTTP_METHODS.POST },
9356
9356
  retrievePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.GET },
9357
9357
  updatePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.PUT },
9358
+ deletePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.DELETE },
9358
9359
  dispute: { url: '/social/{post_id}/dispute', method: HTTP_METHODS.POST },
9359
9360
  history: { url: '/socialposts/{post_id}/history', method: HTTP_METHODS.GET },
9360
9361
  addMedia: { url: '/socialposts/{post_id}/addMedia', method: HTTP_METHODS.POST },
@@ -9412,6 +9413,17 @@ var SocialPosts = /** @class */ (function () {
9412
9413
  SocialPosts.update = function (post_id, data, params) {
9413
9414
  return Requests.processRoute(SocialPostsRoute.routes.updatePost, data, { post_id: post_id }, params);
9414
9415
  };
9416
+ /**
9417
+ * Deletes a post.
9418
+ *
9419
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/destoryPostStorage
9420
+ *
9421
+ * @param post_id The id of the post to delete.
9422
+ * @returns promise
9423
+ */
9424
+ SocialPosts.delete = function (post_id, params) {
9425
+ return Requests.processRoute(SocialPostsRoute.routes.deletePost, {}, { post_id: post_id }, params);
9426
+ };
9415
9427
  /**
9416
9428
  * Dispute a post as being fraudulent.,s
9417
9429
  *