glitch-javascript-sdk 1.7.1 → 1.7.2

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.
@@ -288,5 +288,76 @@ declare class Scheduler {
288
288
  * @returns promise
289
289
  */
290
290
  static getSchedulerProgression<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
291
+ /**
292
+ * List active cross-promote relationships for a scheduler.
293
+ *
294
+ * @param scheduler_id The ID of the promotion schedule
295
+ * @param params Optional query params
296
+ */
297
+ static crossPromoteListRelationships<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
298
+ /**
299
+ * Find potential cross-promote partners for a scheduler.
300
+ *
301
+ * @param scheduler_id The ID of the promotion schedule
302
+ * @param params Optional query params
303
+ */
304
+ static crossPromoteFind<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
305
+ /**
306
+ * List cross-promote invites for a scheduler.
307
+ *
308
+ * @param scheduler_id The ID of the promotion schedule
309
+ * @param params Optional query params
310
+ */
311
+ static crossPromoteInvitesList<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
312
+ /**
313
+ * Send an invite to cross-promote.
314
+ *
315
+ * @param scheduler_id The ID of the promotion schedule
316
+ * @param data { partner_scheduler_id, optional_message }
317
+ */
318
+ static crossPromoteInviteSend<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
319
+ /**
320
+ * Accept an invite to cross-promote.
321
+ *
322
+ * @param scheduler_id The ID of the promotion schedule
323
+ * @param invite_id The ID of the invite
324
+ */
325
+ static crossPromoteInviteAccept<T>(scheduler_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
326
+ /**
327
+ * Reject an invite to cross-promote.
328
+ *
329
+ * @param scheduler_id The ID of the promotion schedule
330
+ * @param invite_id The ID of the invite
331
+ */
332
+ static crossPromoteInviteReject<T>(scheduler_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
333
+ /**
334
+ * End a cross-promote relationship.
335
+ *
336
+ * @param scheduler_id The ID of the promotion schedule
337
+ * @param relationship_id The ID of the relationship
338
+ */
339
+ static crossPromoteRelationshipDelete<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
340
+ /**
341
+ * Get which platforms are cross-promoted in an existing relationship.
342
+ *
343
+ * @param scheduler_id The ID of the promotion schedule
344
+ * @param relationship_id The ID of the relationship
345
+ */
346
+ static crossPromoteRelationshipGetPlatforms<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
347
+ /**
348
+ * Set which platforms are cross-promoted in an existing relationship.
349
+ *
350
+ * @param scheduler_id The ID of the promotion schedule
351
+ * @param relationship_id The ID of the relationship
352
+ * @param data An object like { platforms: ['twitter', 'facebook', ...] }
353
+ */
354
+ static crossPromoteRelationshipSetPlatforms<T>(scheduler_id: string, relationship_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
355
+ /**
356
+ * Get recently cross-promoted posts under a relationship.
357
+ *
358
+ * @param scheduler_id The ID of the promotion schedule
359
+ * @param relationship_id The ID of the relationship
360
+ */
361
+ static crossPromoteRelationshipPosts<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
291
362
  }
292
363
  export default Scheduler;
package/dist/esm/index.js CHANGED
@@ -11635,6 +11635,54 @@ var SchedulerRoute = /** @class */ (function () {
11635
11635
  getRedditSubreddits: { url: '/schedulers/{scheduler_id}/reddit/subreddits', method: HTTP_METHODS.GET },
11636
11636
  getRedditSubredditFlairs: { url: '/schedulers/{scheduler_id}/reddit/subreddits/{subreddit}/flairs', method: HTTP_METHODS.GET },
11637
11637
  getDiscordChannels: { url: '/schedulers/{scheduler_id}/discord/channels', method: HTTP_METHODS.GET },
11638
+ crossPromoteListRelationships: {
11639
+ url: '/schedulers/{scheduler_id}/crosspromote/relationships',
11640
+ method: HTTP_METHODS.GET
11641
+ },
11642
+ // 2) Find potential cross-promote partners
11643
+ crossPromoteFind: {
11644
+ url: '/schedulers/{scheduler_id}/crosspromote/find',
11645
+ method: HTTP_METHODS.GET
11646
+ },
11647
+ // 3) List invites
11648
+ crossPromoteInvitesList: {
11649
+ url: '/schedulers/{scheduler_id}/crosspromote/invites',
11650
+ method: HTTP_METHODS.GET
11651
+ },
11652
+ // 4) Send an invite to cross-promote
11653
+ crossPromoteInviteSend: {
11654
+ url: '/schedulers/{scheduler_id}/crosspromote/invites',
11655
+ method: HTTP_METHODS.POST
11656
+ },
11657
+ // 5) Accept an invite
11658
+ crossPromoteInviteAccept: {
11659
+ url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept',
11660
+ method: HTTP_METHODS.POST
11661
+ },
11662
+ // 6) Reject an invite
11663
+ crossPromoteInviteReject: {
11664
+ url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject',
11665
+ method: HTTP_METHODS.POST
11666
+ },
11667
+ // 7) End a cross-promote relationship
11668
+ crossPromoteRelationshipDelete: {
11669
+ url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}',
11670
+ method: HTTP_METHODS.DELETE
11671
+ },
11672
+ // 8) Get/Set which platforms are cross-promoted in an existing relationship
11673
+ crossPromoteRelationshipGetPlatforms: {
11674
+ url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
11675
+ method: HTTP_METHODS.GET
11676
+ },
11677
+ crossPromoteRelationshipSetPlatforms: {
11678
+ url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
11679
+ method: HTTP_METHODS.PUT
11680
+ },
11681
+ // 9) Get recently cross-promoted posts under a relationship
11682
+ crossPromoteRelationshipPosts: {
11683
+ url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts',
11684
+ method: HTTP_METHODS.GET
11685
+ },
11638
11686
  };
11639
11687
  return SchedulerRoute;
11640
11688
  }());
@@ -11997,6 +12045,97 @@ var Scheduler = /** @class */ (function () {
11997
12045
  Scheduler.getSchedulerProgression = function (scheduler_id, params) {
11998
12046
  return Requests.processRoute(SchedulerRoute.routes.getSchedulerProgression, {}, { scheduler_id: scheduler_id }, params);
11999
12047
  };
12048
+ /**
12049
+ * List active cross-promote relationships for a scheduler.
12050
+ *
12051
+ * @param scheduler_id The ID of the promotion schedule
12052
+ * @param params Optional query params
12053
+ */
12054
+ Scheduler.crossPromoteListRelationships = function (scheduler_id, params) {
12055
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteListRelationships, {}, { scheduler_id: scheduler_id }, params);
12056
+ };
12057
+ /**
12058
+ * Find potential cross-promote partners for a scheduler.
12059
+ *
12060
+ * @param scheduler_id The ID of the promotion schedule
12061
+ * @param params Optional query params
12062
+ */
12063
+ Scheduler.crossPromoteFind = function (scheduler_id, params) {
12064
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteFind, {}, { scheduler_id: scheduler_id }, params);
12065
+ };
12066
+ /**
12067
+ * List cross-promote invites for a scheduler.
12068
+ *
12069
+ * @param scheduler_id The ID of the promotion schedule
12070
+ * @param params Optional query params
12071
+ */
12072
+ Scheduler.crossPromoteInvitesList = function (scheduler_id, params) {
12073
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteInvitesList, {}, { scheduler_id: scheduler_id }, params);
12074
+ };
12075
+ /**
12076
+ * Send an invite to cross-promote.
12077
+ *
12078
+ * @param scheduler_id The ID of the promotion schedule
12079
+ * @param data { partner_scheduler_id, optional_message }
12080
+ */
12081
+ Scheduler.crossPromoteInviteSend = function (scheduler_id, data, params) {
12082
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteSend, data, { scheduler_id: scheduler_id }, params);
12083
+ };
12084
+ /**
12085
+ * Accept an invite to cross-promote.
12086
+ *
12087
+ * @param scheduler_id The ID of the promotion schedule
12088
+ * @param invite_id The ID of the invite
12089
+ */
12090
+ Scheduler.crossPromoteInviteAccept = function (scheduler_id, invite_id, params) {
12091
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteAccept, {}, { scheduler_id: scheduler_id, invite_id: invite_id }, params);
12092
+ };
12093
+ /**
12094
+ * Reject an invite to cross-promote.
12095
+ *
12096
+ * @param scheduler_id The ID of the promotion schedule
12097
+ * @param invite_id The ID of the invite
12098
+ */
12099
+ Scheduler.crossPromoteInviteReject = function (scheduler_id, invite_id, params) {
12100
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteReject, {}, { scheduler_id: scheduler_id, invite_id: invite_id }, params);
12101
+ };
12102
+ /**
12103
+ * End a cross-promote relationship.
12104
+ *
12105
+ * @param scheduler_id The ID of the promotion schedule
12106
+ * @param relationship_id The ID of the relationship
12107
+ */
12108
+ Scheduler.crossPromoteRelationshipDelete = function (scheduler_id, relationship_id, params) {
12109
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipDelete, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
12110
+ };
12111
+ /**
12112
+ * Get which platforms are cross-promoted in an existing relationship.
12113
+ *
12114
+ * @param scheduler_id The ID of the promotion schedule
12115
+ * @param relationship_id The ID of the relationship
12116
+ */
12117
+ Scheduler.crossPromoteRelationshipGetPlatforms = function (scheduler_id, relationship_id, params) {
12118
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipGetPlatforms, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
12119
+ };
12120
+ /**
12121
+ * Set which platforms are cross-promoted in an existing relationship.
12122
+ *
12123
+ * @param scheduler_id The ID of the promotion schedule
12124
+ * @param relationship_id The ID of the relationship
12125
+ * @param data An object like { platforms: ['twitter', 'facebook', ...] }
12126
+ */
12127
+ Scheduler.crossPromoteRelationshipSetPlatforms = function (scheduler_id, relationship_id, data, params) {
12128
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipSetPlatforms, data, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
12129
+ };
12130
+ /**
12131
+ * Get recently cross-promoted posts under a relationship.
12132
+ *
12133
+ * @param scheduler_id The ID of the promotion schedule
12134
+ * @param relationship_id The ID of the relationship
12135
+ */
12136
+ Scheduler.crossPromoteRelationshipPosts = function (scheduler_id, relationship_id, params) {
12137
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipPosts, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
12138
+ };
12000
12139
  return Scheduler;
12001
12140
  }());
12002
12141