glitch-javascript-sdk 1.5.5 → 1.5.7

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
@@ -22727,6 +22727,9 @@ var TitlesRoute = /** @class */ (function () {
22727
22727
  removeAdministrator: { url: '/titles/{title_id}/removeAdministrator/{user_id}', method: HTTP_METHODS.DELETE },
22728
22728
  addMedia: { url: '/titles/{title_id}/addMedia', method: HTTP_METHODS.POST },
22729
22729
  removeMedia: { url: '/titles/{title_id}/removeMedia/{media_id}', method: HTTP_METHODS.DELETE },
22730
+ updateMediaOrder: { url: '/titles/{title_id}/updateMediaOrder', method: HTTP_METHODS.POST },
22731
+ importWishlist: { url: '/titles/{title_id}/wishlist/import', method: HTTP_METHODS.POST },
22732
+ getWishlist: { url: '/titles/{title_id}/wishlist', method: HTTP_METHODS.GET },
22730
22733
  };
22731
22734
  return TitlesRoute;
22732
22735
  }());
@@ -22908,6 +22911,43 @@ var Titles = /** @class */ (function () {
22908
22911
  Titles.removeMedia = function (title_id, media_id, params) {
22909
22912
  return Requests.processRoute(TitlesRoute.routes.removeMedia, {}, { title_id: title_id, media_id: media_id }, params);
22910
22913
  };
22914
+ /**
22915
+ * Update the ordering of media items (images, videos, etc.) for a title.
22916
+ *
22917
+ * @see https://api.glitch.fun/api/documentation#/Titles/updateMediaOrder
22918
+ *
22919
+ * @param title_id The ID of the title to update
22920
+ * @param media_order An array of objects, each containing:
22921
+ * - media_id: string (the UUID of the media)
22922
+ * - order: number (the new order/index)
22923
+ * @returns Promise containing the server response
22924
+ */
22925
+ Titles.updateMediaOrder = function (title_id, media_order) {
22926
+ return Requests.processRoute(TitlesRoute.routes.updateMediaOrder, { media_order: media_order }, { title_id: title_id });
22927
+ };
22928
+ /**
22929
+ * Upload a CSV/Excel file containing wishlist data for a title.
22930
+ *
22931
+ * @param title_id The UUID of the title
22932
+ * @param file The CSV or Excel file
22933
+ * @param data Any additional form data, e.g. platform
22934
+ * @returns AxiosPromise
22935
+ */
22936
+ Titles.importWishlist = function (title_id, file, data, params) {
22937
+ var url = TitlesRoute.routes.importWishlist.url.replace('{title_id}', title_id);
22938
+ return Requests.uploadFile(url, 'file', file, data, params);
22939
+ };
22940
+ /**
22941
+ * Retrieve the wishlist data for a specific title.
22942
+ *
22943
+ * @param title_id The UUID of the title
22944
+ * @param params Optional query params, e.g. { platform: 'steam', start_date: '2025-01-01', end_date: '2025-01-31'}
22945
+ * @returns AxiosPromise
22946
+ */
22947
+ Titles.getWishlist = function (title_id, params) {
22948
+ TitlesRoute.routes.getWishlist.url.replace('{title_id}', title_id);
22949
+ return Requests.processRoute(TitlesRoute.routes.getWishlist, {}, { title_id: title_id }, params);
22950
+ };
22911
22951
  return Titles;
22912
22952
  }());
22913
22953