glitch-javascript-sdk 2.0.1 → 2.0.3

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.
@@ -421,5 +421,80 @@ declare class Scheduler {
421
421
  * @returns A response object with data (funding instruments)
422
422
  */
423
423
  static listCampaignFundingInstruments<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
424
+ /**
425
+ * List all destinations for a title update.
426
+ *
427
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/listTitleUpdateDestinations
428
+ *
429
+ * @param scheduler_id The ID of the promotion schedule.
430
+ * @param update_id The ID of the title update.
431
+ * @returns promise
432
+ */
433
+ static listDestinations<T>(scheduler_id: string, update_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
434
+ /**
435
+ * Create a new destination for a title update.
436
+ *
437
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/createTitleUpdateDestination
438
+ *
439
+ * @param scheduler_id The ID of the promotion schedule.
440
+ * @param update_id The ID of the title update.
441
+ * @param data The data for the new destination.
442
+ * @returns promise
443
+ */
444
+ static createDestination<T>(scheduler_id: string, update_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
445
+ /**
446
+ * Get a specific title update destination.
447
+ *
448
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/getTitleUpdateDestination
449
+ *
450
+ * @param scheduler_id The ID of the promotion schedule.
451
+ * @param update_id The ID of the title update.
452
+ * @param destination_id The ID of the destination.
453
+ * @returns promise
454
+ */
455
+ static getDestination<T>(scheduler_id: string, update_id: string, destination_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
456
+ /**
457
+ * Update a title update destination.
458
+ *
459
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/updateTitleUpdateDestination
460
+ *
461
+ * @param scheduler_id The ID of the promotion schedule.
462
+ * @param update_id The ID of the title update.
463
+ * @param destination_id The ID of the destination.
464
+ * @param data The data to update.
465
+ * @returns promise
466
+ */
467
+ static updateDestination<T>(scheduler_id: string, update_id: string, destination_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
468
+ /**
469
+ * Delete a title update destination.
470
+ *
471
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/deleteTitleUpdateDestination
472
+ *
473
+ * @param scheduler_id The ID of the promotion schedule.
474
+ * @param update_id The ID of the title update.
475
+ * @param destination_id The ID of the destination.
476
+ * @returns promise
477
+ */
478
+ static deleteDestination<T>(scheduler_id: string, update_id: string, destination_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
479
+ /**
480
+ * Get AI-powered subreddit recommendations for a scheduler.
481
+ *
482
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/getSchedulerRedditRecommendations
483
+ *
484
+ * @param scheduler_id The ID of the promotion schedule.
485
+ * @param data The context for the post (title, content, media type).
486
+ * @returns promise
487
+ */
488
+ static getRedditRecommendations<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
489
+ /**
490
+ * Generate tailored content for a specific subreddit.
491
+ *
492
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/generateRedditContentForSubreddit
493
+ *
494
+ * @param scheduler_id The ID of the promotion schedule.
495
+ * @param data The target subreddit and post context.
496
+ * @returns promise
497
+ */
498
+ static generateRedditContent<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
424
499
  }
425
500
  export default Scheduler;
@@ -366,5 +366,30 @@ declare class Users {
366
366
  * @returns promise
367
367
  */
368
368
  static search<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
369
+ /**
370
+ * Resends the verification email to the authenticated user.
371
+ *
372
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/resendVerificationEmail
373
+ *
374
+ * @returns Promise
375
+ */
376
+ static resendVerificationEmail<T>(): AxiosPromise<Response<T>>;
377
+ /**
378
+ * Clear Instagram authentication information from the current user.
379
+ *
380
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/clearInstagramAuth
381
+ *
382
+ * @returns promise
383
+ */
384
+ static clearInstagramAuth<T>(): AxiosPromise<Response<T>>;
385
+ /**
386
+ * Gets the rules for a specific subreddit.
387
+ *
388
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubredditRules
389
+ *
390
+ * @param subreddit The name of the subreddit to get rules for.
391
+ * @returns Promise resolving to the list of rules
392
+ */
393
+ static getSubredditRules<T>(subreddit: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
369
394
  }
370
395
  export default Users;
package/dist/esm/index.js CHANGED
@@ -8593,13 +8593,16 @@ var UserRoutes = /** @class */ (function () {
8593
8593
  addType: { url: '/users/addType', method: HTTP_METHODS.POST },
8594
8594
  removeType: { url: '/users/removeType/{type_id}', method: HTTP_METHODS.DELETE },
8595
8595
  getCampaignInvites: { url: '/users/getCampaignInvites', method: HTTP_METHODS.GET },
8596
- getPayouts: { url: '/users/payouts', method: HTTP_METHODS.GET },
8596
+ getPayouts: { url: '/users/getCampaignPayouts', method: HTTP_METHODS.GET },
8597
8597
  verifyAccount: { url: '/users/verify', method: HTTP_METHODS.POST },
8598
8598
  getInstagramAccounts: { url: '/users/instagramAccounts', method: HTTP_METHODS.GET },
8599
8599
  getFacebookPages: { url: "/users/facebookPages", method: HTTP_METHODS.GET },
8600
8600
  getSubreddits: { url: "/users/reddit/subreddits", method: HTTP_METHODS.GET },
8601
8601
  getSubredditFlairs: { url: "/users/reddit/redditflairs/{subreddit}", method: HTTP_METHODS.GET },
8602
8602
  search: { url: '/users/search', method: HTTP_METHODS.GET },
8603
+ resendVerificationEmail: { url: '/users/resendVerificationEmail', method: HTTP_METHODS.POST },
8604
+ clearInstagramAuth: { url: '/users/clearInstagramAuth', method: HTTP_METHODS.DELETE },
8605
+ getSubredditRules: { url: "/users/reddit/redditrules/{subreddit}", method: HTTP_METHODS.GET },
8603
8606
  };
8604
8607
  return UserRoutes;
8605
8608
  }());
@@ -9052,6 +9055,37 @@ var Users = /** @class */ (function () {
9052
9055
  Users.search = function (params) {
9053
9056
  return Requests.processRoute(UserRoutes.routes.search, undefined, undefined, params);
9054
9057
  };
9058
+ /**
9059
+ * Resends the verification email to the authenticated user.
9060
+ *
9061
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/resendVerificationEmail
9062
+ *
9063
+ * @returns Promise
9064
+ */
9065
+ Users.resendVerificationEmail = function () {
9066
+ return Requests.processRoute(UserRoutes.routes.resendVerificationEmail, {});
9067
+ };
9068
+ /**
9069
+ * Clear Instagram authentication information from the current user.
9070
+ *
9071
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/clearInstagramAuth
9072
+ *
9073
+ * @returns promise
9074
+ */
9075
+ Users.clearInstagramAuth = function () {
9076
+ return Requests.processRoute(UserRoutes.routes.clearInstagramAuth, {});
9077
+ };
9078
+ /**
9079
+ * Gets the rules for a specific subreddit.
9080
+ *
9081
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubredditRules
9082
+ *
9083
+ * @param subreddit The name of the subreddit to get rules for.
9084
+ * @returns Promise resolving to the list of rules
9085
+ */
9086
+ Users.getSubredditRules = function (subreddit, params) {
9087
+ return Requests.processRoute(UserRoutes.routes.getSubredditRules, undefined, { subreddit: subreddit }, params);
9088
+ };
9055
9089
  return Users;
9056
9090
  }());
9057
9091
 
@@ -13259,6 +13293,13 @@ var SchedulerRoute = /** @class */ (function () {
13259
13293
  url: '/schedulers/{scheduler_id}/generateContent',
13260
13294
  method: HTTP_METHODS.POST
13261
13295
  },
13296
+ getRedditRecommendations: { url: '/schedulers/{scheduler_id}/reddit/recommendations', method: HTTP_METHODS.POST },
13297
+ generateRedditContent: { url: '/schedulers/{scheduler_id}/reddit/generateContent', method: HTTP_METHODS.POST },
13298
+ listDestinations: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations', method: HTTP_METHODS.GET },
13299
+ createDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations', method: HTTP_METHODS.POST },
13300
+ getDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations/{destination_id}', method: HTTP_METHODS.GET },
13301
+ updateDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations/{destination_id}', method: HTTP_METHODS.PUT },
13302
+ deleteDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations/{destination_id}', method: HTTP_METHODS.DELETE },
13262
13303
  };
13263
13304
  return SchedulerRoute;
13264
13305
  }());
@@ -13803,6 +13844,95 @@ var Scheduler = /** @class */ (function () {
13803
13844
  Scheduler.listCampaignFundingInstruments = function (scheduler_id, params) {
13804
13845
  return Requests.processRoute(SchedulerRoute.routes.getCampaignFundingInstruments, undefined, { scheduler_id: scheduler_id }, params);
13805
13846
  };
13847
+ /**
13848
+ * List all destinations for a title update.
13849
+ *
13850
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/listTitleUpdateDestinations
13851
+ *
13852
+ * @param scheduler_id The ID of the promotion schedule.
13853
+ * @param update_id The ID of the title update.
13854
+ * @returns promise
13855
+ */
13856
+ Scheduler.listDestinations = function (scheduler_id, update_id, params) {
13857
+ return Requests.processRoute(SchedulerRoute.routes.listDestinations, {}, { scheduler_id: scheduler_id, update_id: update_id }, params);
13858
+ };
13859
+ /**
13860
+ * Create a new destination for a title update.
13861
+ *
13862
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/createTitleUpdateDestination
13863
+ *
13864
+ * @param scheduler_id The ID of the promotion schedule.
13865
+ * @param update_id The ID of the title update.
13866
+ * @param data The data for the new destination.
13867
+ * @returns promise
13868
+ */
13869
+ Scheduler.createDestination = function (scheduler_id, update_id, data, params) {
13870
+ return Requests.processRoute(SchedulerRoute.routes.createDestination, data, { scheduler_id: scheduler_id, update_id: update_id }, params);
13871
+ };
13872
+ /**
13873
+ * Get a specific title update destination.
13874
+ *
13875
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/getTitleUpdateDestination
13876
+ *
13877
+ * @param scheduler_id The ID of the promotion schedule.
13878
+ * @param update_id The ID of the title update.
13879
+ * @param destination_id The ID of the destination.
13880
+ * @returns promise
13881
+ */
13882
+ Scheduler.getDestination = function (scheduler_id, update_id, destination_id, params) {
13883
+ return Requests.processRoute(SchedulerRoute.routes.getDestination, {}, { scheduler_id: scheduler_id, update_id: update_id, destination_id: destination_id }, params);
13884
+ };
13885
+ /**
13886
+ * Update a title update destination.
13887
+ *
13888
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/updateTitleUpdateDestination
13889
+ *
13890
+ * @param scheduler_id The ID of the promotion schedule.
13891
+ * @param update_id The ID of the title update.
13892
+ * @param destination_id The ID of the destination.
13893
+ * @param data The data to update.
13894
+ * @returns promise
13895
+ */
13896
+ Scheduler.updateDestination = function (scheduler_id, update_id, destination_id, data, params) {
13897
+ return Requests.processRoute(SchedulerRoute.routes.updateDestination, data, { scheduler_id: scheduler_id, update_id: update_id, destination_id: destination_id }, params);
13898
+ };
13899
+ /**
13900
+ * Delete a title update destination.
13901
+ *
13902
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/deleteTitleUpdateDestination
13903
+ *
13904
+ * @param scheduler_id The ID of the promotion schedule.
13905
+ * @param update_id The ID of the title update.
13906
+ * @param destination_id The ID of the destination.
13907
+ * @returns promise
13908
+ */
13909
+ Scheduler.deleteDestination = function (scheduler_id, update_id, destination_id, params) {
13910
+ return Requests.processRoute(SchedulerRoute.routes.deleteDestination, {}, { scheduler_id: scheduler_id, update_id: update_id, destination_id: destination_id }, params);
13911
+ };
13912
+ /**
13913
+ * Get AI-powered subreddit recommendations for a scheduler.
13914
+ *
13915
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/getSchedulerRedditRecommendations
13916
+ *
13917
+ * @param scheduler_id The ID of the promotion schedule.
13918
+ * @param data The context for the post (title, content, media type).
13919
+ * @returns promise
13920
+ */
13921
+ Scheduler.getRedditRecommendations = function (scheduler_id, data, params) {
13922
+ return Requests.processRoute(SchedulerRoute.routes.getRedditRecommendations, data, { scheduler_id: scheduler_id }, params);
13923
+ };
13924
+ /**
13925
+ * Generate tailored content for a specific subreddit.
13926
+ *
13927
+ * @see https://api.glitch.fun/api/documentation#/Scheduler/generateRedditContentForSubreddit
13928
+ *
13929
+ * @param scheduler_id The ID of the promotion schedule.
13930
+ * @param data The target subreddit and post context.
13931
+ * @returns promise
13932
+ */
13933
+ Scheduler.generateRedditContent = function (scheduler_id, data, params) {
13934
+ return Requests.processRoute(SchedulerRoute.routes.generateRedditContent, data, { scheduler_id: scheduler_id }, params);
13935
+ };
13806
13936
  return Scheduler;
13807
13937
  }());
13808
13938