glitch-javascript-sdk 1.9.2 → 1.9.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
@@ -20102,6 +20102,14 @@ var AdsRoute = /** @class */ (function () {
20102
20102
  url: "/ads/twitter/targeting/suggestions",
20103
20103
  method: HTTP_METHODS.GET,
20104
20104
  },
20105
+ syncCampaignTree: {
20106
+ url: "/ads/campaigns/{campaign_id}/sync_tree",
20107
+ method: HTTP_METHODS.POST,
20108
+ },
20109
+ syncSchedulerCampaigns: {
20110
+ url: "/ads/campaigns/scheduler/{scheduler_id}/syncAll",
20111
+ method: HTTP_METHODS.POST,
20112
+ },
20105
20113
  };
20106
20114
  return AdsRoute;
20107
20115
  }());
@@ -20648,6 +20656,26 @@ var Ads = /** @class */ (function () {
20648
20656
  Ads.twitterTargetingSuggestions = function (params) {
20649
20657
  return Requests.processRoute(AdsRoute.routes.twitterTargetingSuggestions, undefined, undefined, params);
20650
20658
  };
20659
+ /**
20660
+ * Deep-sync a campaign tree (campaign → groups → ads) with its remote platform.
20661
+ *
20662
+ * @param campaign_id UUID of the campaign to sync
20663
+ * @param params Optional query params
20664
+ * @returns Fully-hydrated AdCampaign resource
20665
+ */
20666
+ Ads.syncCampaignTree = function (campaign_id, params) {
20667
+ return Requests.processRoute(AdsRoute.routes.syncCampaignTree, undefined, { campaign_id: campaign_id }, params);
20668
+ };
20669
+ /**
20670
+ * Deep-sync all the campaigns for a scheduler.
20671
+ *
20672
+ * @param scheduler_id UUID of the campaign to sync
20673
+ * @param params Optional query params
20674
+ * @returns Fully-hydrated AdCampaign resource
20675
+ */
20676
+ Ads.syncSchedulerCampaigns = function (scheduler_id, params) {
20677
+ return Requests.processRoute(AdsRoute.routes.syncSchedulerCampaigns, undefined, { scheduler_id: scheduler_id }, params);
20678
+ };
20651
20679
  return Ads;
20652
20680
  }());
20653
20681
 
@@ -26004,6 +26032,8 @@ var SchedulerRoute = /** @class */ (function () {
26004
26032
  clearSteamAuth: { url: '/schedulers/{scheduler_id}/clearSteamAuth', method: HTTP_METHODS.DELETE },
26005
26033
  clearDiscordAuth: { url: '/schedulers/{scheduler_id}/clearDiscordAuth', method: HTTP_METHODS.DELETE },
26006
26034
  clearBlueskyAuth: { url: '/schedulers/{scheduler_id}/clearBlueskyAuth', method: HTTP_METHODS.DELETE },
26035
+ clearTiktokAdsAuth: { url: '/schedulers/{scheduler_id}/clearTiktokAdsAuth', method: HTTP_METHODS.DELETE },
26036
+ clearGoogleAdsAuth: { url: '/schedulers/{scheduler_id}/clearGoogleAdsAuth', method: HTTP_METHODS.DELETE },
26007
26037
  //Social Utility Routes
26008
26038
  getFacebookGroups: { url: '/schedulers/{scheduler_id}/facebook/groups', method: HTTP_METHODS.GET },
26009
26039
  getInstagramAccounts: { url: '/schedulers/{scheduler_id}/instagram/accounts', method: HTTP_METHODS.GET },
@@ -26062,6 +26092,10 @@ var SchedulerRoute = /** @class */ (function () {
26062
26092
  url: "/schedulers/{scheduler_id}/funding_instruments",
26063
26093
  method: HTTP_METHODS.GET,
26064
26094
  },
26095
+ generateContent: {
26096
+ url: '/schedulers/{scheduler_id}/generateContent',
26097
+ method: HTTP_METHODS.POST
26098
+ },
26065
26099
  };
26066
26100
  return SchedulerRoute;
26067
26101
  }());
@@ -26153,6 +26187,24 @@ var Scheduler = /** @class */ (function () {
26153
26187
  Scheduler.getSchedulePosts = function (scheduler_id, params) {
26154
26188
  return Requests.processRoute(SchedulerRoute.routes.getSchedulePosts, {}, { scheduler_id: scheduler_id }, params);
26155
26189
  };
26190
+ /**
26191
+ * Rewrite / generate content for a promotion schedule.
26192
+ *
26193
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/generateTitleContent
26194
+ *
26195
+ * @param scheduler_id UUID of the promotion schedule.
26196
+ * @param data Body payload. At minimum you must supply
26197
+ * `{ platform: 'twitter' }` plus either `content`
26198
+ * **or** a `media` array containing at least one
26199
+ * `{ id: '<media-uuid>' }`.
26200
+ * @returns Axios promise with `{ content, title? }`
26201
+ */
26202
+ Scheduler.generateTitleContent = function (scheduler_id, data, params) {
26203
+ return Requests.processRoute(SchedulerRoute.routes.generateContent, data, // request body
26204
+ { scheduler_id: scheduler_id }, // path params
26205
+ params // query params
26206
+ );
26207
+ };
26156
26208
  /**
26157
26209
  * List title updates for a promotion schedule.
26158
26210
  *
@@ -26425,6 +26477,30 @@ var Scheduler = /** @class */ (function () {
26425
26477
  Scheduler.getDiscordChannels = function (scheduler_id, params) {
26426
26478
  return Requests.processRoute(SchedulerRoute.routes.getDiscordChannels, {}, { scheduler_id: scheduler_id }, params);
26427
26479
  };
26480
+ /**
26481
+ * Clear Google Ads OAuth credentials from a promotion schedule.
26482
+ *
26483
+ * @param scheduler_id The ID of the promotion schedule.
26484
+ * @returns promise
26485
+ */
26486
+ Scheduler.clearGoogleAdsAuth = function (scheduler_id, params) {
26487
+ return Requests.processRoute(SchedulerRoute.routes.clearGoogleAdsAuth, {}, // no body
26488
+ { scheduler_id: scheduler_id }, // path params
26489
+ params // optional query params
26490
+ );
26491
+ };
26492
+ /**
26493
+ * Clear Tiktok Ads OAuth credentials from a promotion schedule.
26494
+ *
26495
+ * @param scheduler_id The ID of the promotion schedule.
26496
+ * @returns promise
26497
+ */
26498
+ Scheduler.clearTiktokAdsAuth = function (scheduler_id, params) {
26499
+ return Requests.processRoute(SchedulerRoute.routes.clearTiktokAdsAuth, {}, // no body
26500
+ { scheduler_id: scheduler_id }, // path params
26501
+ params // optional query params
26502
+ );
26503
+ };
26428
26504
  /**
26429
26505
  * Get aggregated reports for a promotion schedule.
26430
26506
  *