glitch-javascript-sdk 1.7.1 → 1.7.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.
@@ -288,5 +288,57 @@ 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
+ * Search for cross-promote partners.
293
+ * Uses query parameter `my_scheduler_id`
294
+ */
295
+ static crossPromoteSearch<T>(my_scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
296
+ /**
297
+ * List cross-promote invitations for a scheduler.
298
+ * Expects a query param `scheduler_id`
299
+ */
300
+ static crossPromoteInvitesList<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
301
+ /**
302
+ * Send an invite to cross-promote.
303
+ * Converts `partner_scheduler_id` and `optional_message` into the PHP expected fields.
304
+ */
305
+ static crossPromoteInviteSend<T>(scheduler_id: string, data: {
306
+ partner_scheduler_id: string;
307
+ optional_message?: string;
308
+ }, params?: Record<string, any>): AxiosPromise<Response<T>>;
309
+ /**
310
+ * Respond to an invitation (accept or deny).
311
+ */
312
+ static crossPromoteInviteRespond<T>(invitation_id: string, data: {
313
+ status: 'accepted' | 'denied';
314
+ platforms?: string[];
315
+ }, params?: Record<string, any>): AxiosPromise<Response<T>>;
316
+ /**
317
+ * List cross-promote relationships for a scheduler.
318
+ * Expects a query param `scheduler_id`
319
+ */
320
+ static crossPromoteListRelationships<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
321
+ /**
322
+ * End a cross-promote relationship.
323
+ */
324
+ static crossPromoteEndRelationship<T>(relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
325
+ /**
326
+ * List logs for a cross-promote relationship.
327
+ */
328
+ static crossPromoteListLogs<T>(relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
329
+ /**
330
+ * Get which platforms are cross-promoted in an existing relationship.
331
+ */
332
+ static crossPromoteRelationshipGetPlatforms<T>(relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
333
+ /**
334
+ * Set which platforms are cross-promoted in an existing relationship.
335
+ */
336
+ static crossPromoteRelationshipSetPlatforms<T>(relationship_id: string, data: {
337
+ platforms: string[];
338
+ }, params?: Record<string, any>): AxiosPromise<Response<T>>;
339
+ /**
340
+ * Get recently cross-promoted posts under a relationship.
341
+ */
342
+ static crossPromoteRelationshipPosts<T>(relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
291
343
  }
292
344
  export default Scheduler;
package/dist/esm/index.js CHANGED
@@ -11635,6 +11635,46 @@ 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
+ crossPromoteSearch: {
11639
+ url: '/schedulers/cross-promote/search',
11640
+ method: HTTP_METHODS.GET
11641
+ },
11642
+ crossPromoteInvitesList: {
11643
+ url: '/schedulers/cross-promote/invitations',
11644
+ method: HTTP_METHODS.GET
11645
+ },
11646
+ crossPromoteInviteSend: {
11647
+ url: '/schedulers/cross-promote/invitations',
11648
+ method: HTTP_METHODS.POST
11649
+ },
11650
+ crossPromoteInviteRespond: {
11651
+ url: '/schedulers/cross-promote/invitations/{invitation_id}/respond',
11652
+ method: HTTP_METHODS.POST
11653
+ },
11654
+ crossPromoteListRelationships: {
11655
+ url: '/schedulers/cross-promote/relationships',
11656
+ method: HTTP_METHODS.GET
11657
+ },
11658
+ crossPromoteEndRelationship: {
11659
+ url: '/schedulers/cross-promote/relationships/{relationship_id}/end',
11660
+ method: HTTP_METHODS.POST
11661
+ },
11662
+ crossPromoteListLogs: {
11663
+ url: '/schedulers/cross-promote/relationships/{relationship_id}/logs',
11664
+ method: HTTP_METHODS.GET
11665
+ },
11666
+ crossPromoteRelationshipGetPlatforms: {
11667
+ url: '/schedulers/cross-promote/relationships/{relationship_id}/platforms',
11668
+ method: HTTP_METHODS.GET
11669
+ },
11670
+ crossPromoteRelationshipSetPlatforms: {
11671
+ url: '/schedulers/cross-promote/relationships/{relationship_id}/platforms',
11672
+ method: HTTP_METHODS.PUT
11673
+ },
11674
+ crossPromoteRelationshipPosts: {
11675
+ url: '/schedulers/cross-promote/relationships/{relationship_id}/posts',
11676
+ method: HTTP_METHODS.GET
11677
+ },
11638
11678
  };
11639
11679
  return SchedulerRoute;
11640
11680
  }());
@@ -11997,6 +12037,78 @@ var Scheduler = /** @class */ (function () {
11997
12037
  Scheduler.getSchedulerProgression = function (scheduler_id, params) {
11998
12038
  return Requests.processRoute(SchedulerRoute.routes.getSchedulerProgression, {}, { scheduler_id: scheduler_id }, params);
11999
12039
  };
12040
+ /**
12041
+ * Search for cross-promote partners.
12042
+ * Uses query parameter `my_scheduler_id`
12043
+ */
12044
+ Scheduler.crossPromoteSearch = function (my_scheduler_id, params) {
12045
+ var newParams = __assign(__assign({}, params), { my_scheduler_id: my_scheduler_id });
12046
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteSearch, {}, {}, newParams);
12047
+ };
12048
+ /**
12049
+ * List cross-promote invitations for a scheduler.
12050
+ * Expects a query param `scheduler_id`
12051
+ */
12052
+ Scheduler.crossPromoteInvitesList = function (scheduler_id, params) {
12053
+ var newParams = __assign(__assign({}, params), { scheduler_id: scheduler_id });
12054
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteInvitesList, {}, {}, newParams);
12055
+ };
12056
+ /**
12057
+ * Send an invite to cross-promote.
12058
+ * Converts `partner_scheduler_id` and `optional_message` into the PHP expected fields.
12059
+ */
12060
+ Scheduler.crossPromoteInviteSend = function (scheduler_id, data, params) {
12061
+ var payload = {
12062
+ from_scheduler_id: scheduler_id,
12063
+ to_scheduler_id: data.partner_scheduler_id,
12064
+ message: data.optional_message || ''
12065
+ };
12066
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteSend, payload, {}, params);
12067
+ };
12068
+ /**
12069
+ * Respond to an invitation (accept or deny).
12070
+ */
12071
+ Scheduler.crossPromoteInviteRespond = function (invitation_id, data, params) {
12072
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteRespond, data, { invitation_id: invitation_id }, params);
12073
+ };
12074
+ /**
12075
+ * List cross-promote relationships for a scheduler.
12076
+ * Expects a query param `scheduler_id`
12077
+ */
12078
+ Scheduler.crossPromoteListRelationships = function (scheduler_id, params) {
12079
+ var newParams = __assign(__assign({}, params), { scheduler_id: scheduler_id });
12080
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteListRelationships, {}, {}, newParams);
12081
+ };
12082
+ /**
12083
+ * End a cross-promote relationship.
12084
+ */
12085
+ Scheduler.crossPromoteEndRelationship = function (relationship_id, params) {
12086
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteEndRelationship, {}, { relationship_id: relationship_id }, params);
12087
+ };
12088
+ /**
12089
+ * List logs for a cross-promote relationship.
12090
+ */
12091
+ Scheduler.crossPromoteListLogs = function (relationship_id, params) {
12092
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteListLogs, {}, { relationship_id: relationship_id }, params);
12093
+ };
12094
+ /**
12095
+ * Get which platforms are cross-promoted in an existing relationship.
12096
+ */
12097
+ Scheduler.crossPromoteRelationshipGetPlatforms = function (relationship_id, params) {
12098
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipGetPlatforms, {}, { relationship_id: relationship_id }, params);
12099
+ };
12100
+ /**
12101
+ * Set which platforms are cross-promoted in an existing relationship.
12102
+ */
12103
+ Scheduler.crossPromoteRelationshipSetPlatforms = function (relationship_id, data, params) {
12104
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipSetPlatforms, data, { relationship_id: relationship_id }, params);
12105
+ };
12106
+ /**
12107
+ * Get recently cross-promoted posts under a relationship.
12108
+ */
12109
+ Scheduler.crossPromoteRelationshipPosts = function (relationship_id, params) {
12110
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipPosts, {}, { relationship_id: relationship_id }, params);
12111
+ };
12000
12112
  return Scheduler;
12001
12113
  }());
12002
12114