glitch-javascript-sdk 1.4.2 → 1.4.4

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
@@ -18662,7 +18662,7 @@ var Requests = /** @class */ (function () {
18662
18662
  }
18663
18663
  // Format URL
18664
18664
  url = url.replace(/\/\//g, '/');
18665
- var uri = "".concat(Requests.baseUrl).concat(url).replace(/\/\//g, '/');
18665
+ var uri = "".concat(url).replace(/\/\//g, '/');
18666
18666
  // Make the request
18667
18667
  return axios$1({
18668
18668
  method: 'POST',
@@ -18707,7 +18707,7 @@ var Requests = /** @class */ (function () {
18707
18707
  formData.append(key, data[key]);
18708
18708
  }
18709
18709
  }
18710
- fullUploadUrl = "".concat(Requests.baseUrl).concat(uploadUrl);
18710
+ fullUploadUrl = "".concat(uploadUrl);
18711
18711
  headers = {};
18712
18712
  if (Requests.authToken) {
18713
18713
  headers['Authorization'] = "Bearer ".concat(Requests.authToken);
@@ -22516,6 +22516,7 @@ var SocialPostsRoute = /** @class */ (function () {
22516
22516
  addMedia: { url: '/socialposts/{post_id}/addMedia', method: HTTP_METHODS.POST },
22517
22517
  removeMedia: { url: '/socialposts/{post_id}/removeMedia/{media_id}', method: HTTP_METHODS.DELETE },
22518
22518
  reschedule: { url: '/socialposts/{post_id}/reschedule', method: HTTP_METHODS.POST },
22519
+ reports: { url: '/socialposts/{post_id}/reports', method: HTTP_METHODS.GET },
22519
22520
  };
22520
22521
  return SocialPostsRoute;
22521
22522
  }());
@@ -22630,6 +22631,16 @@ var SocialPosts = /** @class */ (function () {
22630
22631
  SocialPosts.reschedule = function (post_id, data, params) {
22631
22632
  return Requests.processRoute(SocialPostsRoute.routes.reschedule, data, { post_id: post_id }, params);
22632
22633
  };
22634
+ /**
22635
+ * Get the reports for a social media post
22636
+ *
22637
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/resourcePostList
22638
+ *
22639
+ * @returns promise
22640
+ */
22641
+ SocialPosts.reports = function (params) {
22642
+ return Requests.processRoute(SocialPostsRoute.routes.reports, undefined, undefined, params);
22643
+ };
22633
22644
  return SocialPosts;
22634
22645
  }());
22635
22646
 
@@ -24480,6 +24491,8 @@ var SchedulerRoute = /** @class */ (function () {
24480
24491
  updateUpdate: { url: '/schedulers/{scheduler_id}/updates/{update_id}', method: HTTP_METHODS.PUT },
24481
24492
  deleteUpdate: { url: '/schedulers/{scheduler_id}/updates/{update_id}', method: HTTP_METHODS.DELETE },
24482
24493
  testTone: { url: '/schedulers/{scheduler_id}/tone', method: HTTP_METHODS.POST },
24494
+ getSchedulerReports: { url: '/schedulers/{scheduler_id}/reports', method: HTTP_METHODS.GET },
24495
+ getSchedulerProgression: { url: '/schedulers/{scheduler_id}/progression', method: HTTP_METHODS.GET },
24483
24496
  // Clear OAuth Routes
24484
24497
  clearTwitterAuth: { url: '/schedulers/{scheduler_id}/clearTwitterAuth', method: HTTP_METHODS.DELETE },
24485
24498
  clearFacebookAuth: { url: '/schedulers/{scheduler_id}/clearFacebookAuth', method: HTTP_METHODS.DELETE },
@@ -24829,6 +24842,26 @@ var Scheduler = /** @class */ (function () {
24829
24842
  Scheduler.getDiscordChannels = function (scheduler_id, params) {
24830
24843
  return Requests.processRoute(SchedulerRoute.routes.getDiscordChannels, {}, { scheduler_id: scheduler_id }, params);
24831
24844
  };
24845
+ /**
24846
+ * Get aggregated reports for a promotion schedule.
24847
+ *
24848
+ * @param scheduler_id The ID of the promotion schedule.
24849
+ * @param params Query parameters (e.g., social_platform, start_date, end_date)
24850
+ * @returns promise
24851
+ */
24852
+ Scheduler.getSchedulerReports = function (scheduler_id, params) {
24853
+ return Requests.processRoute(SchedulerRoute.routes.getSchedulerReports, {}, { scheduler_id: scheduler_id }, params);
24854
+ };
24855
+ /**
24856
+ * Get progression data for social media posts over time.
24857
+ *
24858
+ * @param scheduler_id The ID of the promotion schedule.
24859
+ * @param params Query parameters (e.g., social_platform, start_date, end_date)
24860
+ * @returns promise
24861
+ */
24862
+ Scheduler.getSchedulerProgression = function (scheduler_id, params) {
24863
+ return Requests.processRoute(SchedulerRoute.routes.getSchedulerProgression, {}, { scheduler_id: scheduler_id }, params);
24864
+ };
24832
24865
  return Scheduler;
24833
24866
  }());
24834
24867