glitch-javascript-sdk 1.7.3 → 1.7.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
@@ -24819,44 +24819,44 @@ var SchedulerRoute = /** @class */ (function () {
24819
24819
  getRedditSubreddits: { url: '/schedulers/{scheduler_id}/reddit/subreddits', method: HTTP_METHODS.GET },
24820
24820
  getRedditSubredditFlairs: { url: '/schedulers/{scheduler_id}/reddit/subreddits/{subreddit}/flairs', method: HTTP_METHODS.GET },
24821
24821
  getDiscordChannels: { url: '/schedulers/{scheduler_id}/discord/channels', method: HTTP_METHODS.GET },
24822
- crossPromoteSearch: {
24823
- url: '/schedulers/cross-promote/search',
24822
+ crossPromoteListRelationships: {
24823
+ url: '/schedulers/{scheduler_id}/crosspromote/relationships',
24824
+ method: HTTP_METHODS.GET
24825
+ },
24826
+ crossPromoteFind: {
24827
+ url: '/schedulers/{scheduler_id}/crosspromote/find',
24824
24828
  method: HTTP_METHODS.GET
24825
24829
  },
24826
24830
  crossPromoteInvitesList: {
24827
- url: '/schedulers/cross-promote/invitations',
24831
+ url: '/schedulers/{scheduler_id}/crosspromote/invites',
24828
24832
  method: HTTP_METHODS.GET
24829
24833
  },
24830
24834
  crossPromoteInviteSend: {
24831
- url: '/schedulers/cross-promote/invitations',
24835
+ url: '/schedulers/{scheduler_id}/crosspromote/invites',
24832
24836
  method: HTTP_METHODS.POST
24833
24837
  },
24834
- crossPromoteInviteRespond: {
24835
- url: '/schedulers/cross-promote/invitations/{invitation_id}/respond',
24838
+ crossPromoteInviteAccept: {
24839
+ url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept',
24836
24840
  method: HTTP_METHODS.POST
24837
24841
  },
24838
- crossPromoteListRelationships: {
24839
- url: '/schedulers/cross-promote/relationships',
24840
- method: HTTP_METHODS.GET
24841
- },
24842
- crossPromoteEndRelationship: {
24843
- url: '/schedulers/cross-promote/relationships/{relationship_id}/end',
24842
+ crossPromoteInviteReject: {
24843
+ url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject',
24844
24844
  method: HTTP_METHODS.POST
24845
24845
  },
24846
- crossPromoteListLogs: {
24847
- url: '/schedulers/cross-promote/relationships/{relationship_id}/logs',
24848
- method: HTTP_METHODS.GET
24846
+ crossPromoteRelationshipDelete: {
24847
+ url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}',
24848
+ method: HTTP_METHODS.DELETE
24849
24849
  },
24850
24850
  crossPromoteRelationshipGetPlatforms: {
24851
- url: '/schedulers/cross-promote/relationships/{relationship_id}/platforms',
24851
+ url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
24852
24852
  method: HTTP_METHODS.GET
24853
24853
  },
24854
24854
  crossPromoteRelationshipSetPlatforms: {
24855
- url: '/schedulers/cross-promote/relationships/{relationship_id}/platforms',
24855
+ url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
24856
24856
  method: HTTP_METHODS.PUT
24857
24857
  },
24858
24858
  crossPromoteRelationshipPosts: {
24859
- url: '/schedulers/cross-promote/relationships/{relationship_id}/posts',
24859
+ url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts',
24860
24860
  method: HTTP_METHODS.GET
24861
24861
  },
24862
24862
  };
@@ -25222,76 +25222,78 @@ var Scheduler = /** @class */ (function () {
25222
25222
  return Requests.processRoute(SchedulerRoute.routes.getSchedulerProgression, {}, { scheduler_id: scheduler_id }, params);
25223
25223
  };
25224
25224
  /**
25225
- * Search for cross-promote partners.
25226
- * Uses query parameter `my_scheduler_id`
25227
- */
25228
- Scheduler.crossPromoteSearch = function (my_scheduler_id, params) {
25229
- var newParams = __assign(__assign({}, params), { my_scheduler_id: my_scheduler_id });
25230
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteSearch, {}, {}, newParams);
25225
+ * List cross-promote relationships for a scheduler (with optional pagination).
25226
+ * GET /schedulers/{scheduler_id}/crosspromote/relationships
25227
+ */
25228
+ Scheduler.crossPromoteListRelationships = function (scheduler_id, params) {
25229
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteListRelationships, {}, { scheduler_id: scheduler_id }, params);
25231
25230
  };
25232
25231
  /**
25233
- * List cross-promote invitations for a scheduler.
25234
- * Expects a query param `scheduler_id`
25232
+ * Find potential cross-promote partners for a scheduler (with optional filters).
25233
+ * GET /schedulers/{scheduler_id}/crosspromote/find
25235
25234
  */
25236
- Scheduler.crossPromoteInvitesList = function (scheduler_id, params) {
25237
- var newParams = __assign(__assign({}, params), { scheduler_id: scheduler_id });
25238
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteInvitesList, {}, {}, newParams);
25235
+ Scheduler.crossPromoteFind = function (scheduler_id, params) {
25236
+ // e.g. { platform:'twitter', min_followers:500, sort:'desc', page:2, limit:5 }
25237
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteFind, {}, { scheduler_id: scheduler_id }, params);
25239
25238
  };
25240
25239
  /**
25241
- * Send an invite to cross-promote.
25242
- * Converts `partner_scheduler_id` and `optional_message` into the PHP expected fields.
25240
+ * List cross-promote invites for a scheduler (incoming + outgoing).
25241
+ * GET /schedulers/{scheduler_id}/crosspromote/invites
25243
25242
  */
25244
- Scheduler.crossPromoteInviteSend = function (scheduler_id, data, params) {
25245
- var payload = {
25246
- from_scheduler_id: scheduler_id,
25247
- to_scheduler_id: data.partner_scheduler_id,
25248
- message: data.optional_message || ''
25249
- };
25250
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteSend, payload, {}, params);
25243
+ Scheduler.crossPromoteInvitesList = function (scheduler_id, params) {
25244
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteInvitesList, {}, { scheduler_id: scheduler_id }, params);
25251
25245
  };
25252
25246
  /**
25253
- * Respond to an invitation (accept or deny).
25247
+ * Send an invite to cross-promote (from scheduler_id to partner_scheduler_id).
25248
+ * POST /schedulers/{scheduler_id}/crosspromote/invites
25249
+ *
25250
+ * @param data { partner_scheduler_id, optional_message }
25254
25251
  */
25255
- Scheduler.crossPromoteInviteRespond = function (invitation_id, data, params) {
25256
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteRespond, data, { invitation_id: invitation_id }, params);
25252
+ Scheduler.crossPromoteInviteSend = function (scheduler_id, data, params) {
25253
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteSend, data, { scheduler_id: scheduler_id }, params);
25257
25254
  };
25258
25255
  /**
25259
- * List cross-promote relationships for a scheduler.
25260
- * Expects a query param `scheduler_id`
25256
+ * Accept an invite to cross-promote.
25257
+ * POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept
25261
25258
  */
25262
- Scheduler.crossPromoteListRelationships = function (scheduler_id, params) {
25263
- var newParams = __assign(__assign({}, params), { scheduler_id: scheduler_id });
25264
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteListRelationships, {}, {}, newParams);
25259
+ Scheduler.crossPromoteInviteAccept = function (scheduler_id, invite_id, params) {
25260
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteAccept, {}, { scheduler_id: scheduler_id, invite_id: invite_id }, params);
25265
25261
  };
25266
25262
  /**
25267
- * End a cross-promote relationship.
25263
+ * Reject an invite to cross-promote.
25264
+ * POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject
25268
25265
  */
25269
- Scheduler.crossPromoteEndRelationship = function (relationship_id, params) {
25270
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteEndRelationship, {}, { relationship_id: relationship_id }, params);
25266
+ Scheduler.crossPromoteInviteReject = function (scheduler_id, invite_id, params) {
25267
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteReject, {}, { scheduler_id: scheduler_id, invite_id: invite_id }, params);
25271
25268
  };
25272
25269
  /**
25273
- * List logs for a cross-promote relationship.
25270
+ * End a cross-promote relationship (delete).
25271
+ * DELETE /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}
25274
25272
  */
25275
- Scheduler.crossPromoteListLogs = function (relationship_id, params) {
25276
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteListLogs, {}, { relationship_id: relationship_id }, params);
25273
+ Scheduler.crossPromoteRelationshipDelete = function (scheduler_id, relationship_id, params) {
25274
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipDelete, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
25277
25275
  };
25278
25276
  /**
25279
25277
  * Get which platforms are cross-promoted in an existing relationship.
25278
+ * GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
25280
25279
  */
25281
- Scheduler.crossPromoteRelationshipGetPlatforms = function (relationship_id, params) {
25282
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipGetPlatforms, {}, { relationship_id: relationship_id }, params);
25280
+ Scheduler.crossPromoteRelationshipGetPlatforms = function (scheduler_id, relationship_id, params) {
25281
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipGetPlatforms, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
25283
25282
  };
25284
25283
  /**
25285
25284
  * Set which platforms are cross-promoted in an existing relationship.
25285
+ * PUT /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
25286
+ * data = { platforms: ['twitter','facebook',...]}
25286
25287
  */
25287
- Scheduler.crossPromoteRelationshipSetPlatforms = function (relationship_id, data, params) {
25288
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipSetPlatforms, data, { relationship_id: relationship_id }, params);
25288
+ Scheduler.crossPromoteRelationshipSetPlatforms = function (scheduler_id, relationship_id, data, params) {
25289
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipSetPlatforms, data, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
25289
25290
  };
25290
25291
  /**
25291
- * Get recently cross-promoted posts under a relationship.
25292
+ * Get recently cross-promoted logs under a relationship.
25293
+ * GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts
25292
25294
  */
25293
- Scheduler.crossPromoteRelationshipPosts = function (relationship_id, params) {
25294
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipPosts, {}, { relationship_id: relationship_id }, params);
25295
+ Scheduler.crossPromoteRelationshipPosts = function (scheduler_id, relationship_id, params) {
25296
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipPosts, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
25295
25297
  };
25296
25298
  return Scheduler;
25297
25299
  }());