glitch-javascript-sdk 1.7.3 → 1.7.5

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
@@ -19822,6 +19822,10 @@ var CommunitiesRoute = /** @class */ (function () {
19822
19822
  url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/export',
19823
19823
  method: HTTP_METHODS.POST
19824
19824
  },
19825
+ importGameInstalls: {
19826
+ url: '/communities/{community_id}/newsletters/{newsletter_id}/import_game_installs',
19827
+ method: HTTP_METHODS.POST
19828
+ },
19825
19829
  // Campaigns
19826
19830
  listCampaigns: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.GET },
19827
19831
  createCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.POST },
@@ -20580,6 +20584,17 @@ var Communities = /** @class */ (function () {
20580
20584
  Communities.exportNewsletterSubscribers = function (community_id, newsletter_id, data, params) {
20581
20585
  return Requests.processRoute(CommunitiesRoute.routes.exportNewsletterSubscribers, data, { community_id: community_id, newsletter_id: newsletter_id }, params);
20582
20586
  };
20587
+ /**
20588
+ * Import game installs from a game title installations to a newsletter
20589
+ *
20590
+ * @param community_id The ID of the community.
20591
+ * @param newsletter_id The ID of the newsletter.
20592
+ * @param data Export options (format: 'csv' or 'xlsx').
20593
+ * @returns Promise
20594
+ */
20595
+ Communities.importGameInstalls = function (community_id, newsletter_id, data, params) {
20596
+ return Requests.processRoute(CommunitiesRoute.routes.importGameInstalls, data, { community_id: community_id, newsletter_id: newsletter_id }, params);
20597
+ };
20583
20598
  return Communities;
20584
20599
  }());
20585
20600
 
@@ -24819,44 +24834,44 @@ var SchedulerRoute = /** @class */ (function () {
24819
24834
  getRedditSubreddits: { url: '/schedulers/{scheduler_id}/reddit/subreddits', method: HTTP_METHODS.GET },
24820
24835
  getRedditSubredditFlairs: { url: '/schedulers/{scheduler_id}/reddit/subreddits/{subreddit}/flairs', method: HTTP_METHODS.GET },
24821
24836
  getDiscordChannels: { url: '/schedulers/{scheduler_id}/discord/channels', method: HTTP_METHODS.GET },
24822
- crossPromoteSearch: {
24823
- url: '/schedulers/cross-promote/search',
24837
+ crossPromoteListRelationships: {
24838
+ url: '/schedulers/{scheduler_id}/crosspromote/relationships',
24839
+ method: HTTP_METHODS.GET
24840
+ },
24841
+ crossPromoteFind: {
24842
+ url: '/schedulers/{scheduler_id}/crosspromote/find',
24824
24843
  method: HTTP_METHODS.GET
24825
24844
  },
24826
24845
  crossPromoteInvitesList: {
24827
- url: '/schedulers/cross-promote/invitations',
24846
+ url: '/schedulers/{scheduler_id}/crosspromote/invites',
24828
24847
  method: HTTP_METHODS.GET
24829
24848
  },
24830
24849
  crossPromoteInviteSend: {
24831
- url: '/schedulers/cross-promote/invitations',
24850
+ url: '/schedulers/{scheduler_id}/crosspromote/invites',
24832
24851
  method: HTTP_METHODS.POST
24833
24852
  },
24834
- crossPromoteInviteRespond: {
24835
- url: '/schedulers/cross-promote/invitations/{invitation_id}/respond',
24853
+ crossPromoteInviteAccept: {
24854
+ url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept',
24836
24855
  method: HTTP_METHODS.POST
24837
24856
  },
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',
24857
+ crossPromoteInviteReject: {
24858
+ url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject',
24844
24859
  method: HTTP_METHODS.POST
24845
24860
  },
24846
- crossPromoteListLogs: {
24847
- url: '/schedulers/cross-promote/relationships/{relationship_id}/logs',
24848
- method: HTTP_METHODS.GET
24861
+ crossPromoteRelationshipDelete: {
24862
+ url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}',
24863
+ method: HTTP_METHODS.DELETE
24849
24864
  },
24850
24865
  crossPromoteRelationshipGetPlatforms: {
24851
- url: '/schedulers/cross-promote/relationships/{relationship_id}/platforms',
24866
+ url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
24852
24867
  method: HTTP_METHODS.GET
24853
24868
  },
24854
24869
  crossPromoteRelationshipSetPlatforms: {
24855
- url: '/schedulers/cross-promote/relationships/{relationship_id}/platforms',
24870
+ url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
24856
24871
  method: HTTP_METHODS.PUT
24857
24872
  },
24858
24873
  crossPromoteRelationshipPosts: {
24859
- url: '/schedulers/cross-promote/relationships/{relationship_id}/posts',
24874
+ url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts',
24860
24875
  method: HTTP_METHODS.GET
24861
24876
  },
24862
24877
  };
@@ -25222,76 +25237,78 @@ var Scheduler = /** @class */ (function () {
25222
25237
  return Requests.processRoute(SchedulerRoute.routes.getSchedulerProgression, {}, { scheduler_id: scheduler_id }, params);
25223
25238
  };
25224
25239
  /**
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);
25240
+ * List cross-promote relationships for a scheduler (with optional pagination).
25241
+ * GET /schedulers/{scheduler_id}/crosspromote/relationships
25242
+ */
25243
+ Scheduler.crossPromoteListRelationships = function (scheduler_id, params) {
25244
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteListRelationships, {}, { scheduler_id: scheduler_id }, params);
25231
25245
  };
25232
25246
  /**
25233
- * List cross-promote invitations for a scheduler.
25234
- * Expects a query param `scheduler_id`
25247
+ * Find potential cross-promote partners for a scheduler (with optional filters).
25248
+ * GET /schedulers/{scheduler_id}/crosspromote/find
25235
25249
  */
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);
25250
+ Scheduler.crossPromoteFind = function (scheduler_id, params) {
25251
+ // e.g. { platform:'twitter', min_followers:500, sort:'desc', page:2, limit:5 }
25252
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteFind, {}, { scheduler_id: scheduler_id }, params);
25239
25253
  };
25240
25254
  /**
25241
- * Send an invite to cross-promote.
25242
- * Converts `partner_scheduler_id` and `optional_message` into the PHP expected fields.
25255
+ * List cross-promote invites for a scheduler (incoming + outgoing).
25256
+ * GET /schedulers/{scheduler_id}/crosspromote/invites
25243
25257
  */
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);
25258
+ Scheduler.crossPromoteInvitesList = function (scheduler_id, params) {
25259
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteInvitesList, {}, { scheduler_id: scheduler_id }, params);
25251
25260
  };
25252
25261
  /**
25253
- * Respond to an invitation (accept or deny).
25262
+ * Send an invite to cross-promote (from scheduler_id to partner_scheduler_id).
25263
+ * POST /schedulers/{scheduler_id}/crosspromote/invites
25264
+ *
25265
+ * @param data { partner_scheduler_id, optional_message }
25254
25266
  */
25255
- Scheduler.crossPromoteInviteRespond = function (invitation_id, data, params) {
25256
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteRespond, data, { invitation_id: invitation_id }, params);
25267
+ Scheduler.crossPromoteInviteSend = function (scheduler_id, data, params) {
25268
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteSend, data, { scheduler_id: scheduler_id }, params);
25257
25269
  };
25258
25270
  /**
25259
- * List cross-promote relationships for a scheduler.
25260
- * Expects a query param `scheduler_id`
25271
+ * Accept an invite to cross-promote.
25272
+ * POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept
25261
25273
  */
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);
25274
+ Scheduler.crossPromoteInviteAccept = function (scheduler_id, invite_id, params) {
25275
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteAccept, {}, { scheduler_id: scheduler_id, invite_id: invite_id }, params);
25265
25276
  };
25266
25277
  /**
25267
- * End a cross-promote relationship.
25278
+ * Reject an invite to cross-promote.
25279
+ * POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject
25268
25280
  */
25269
- Scheduler.crossPromoteEndRelationship = function (relationship_id, params) {
25270
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteEndRelationship, {}, { relationship_id: relationship_id }, params);
25281
+ Scheduler.crossPromoteInviteReject = function (scheduler_id, invite_id, params) {
25282
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteReject, {}, { scheduler_id: scheduler_id, invite_id: invite_id }, params);
25271
25283
  };
25272
25284
  /**
25273
- * List logs for a cross-promote relationship.
25285
+ * End a cross-promote relationship (delete).
25286
+ * DELETE /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}
25274
25287
  */
25275
- Scheduler.crossPromoteListLogs = function (relationship_id, params) {
25276
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteListLogs, {}, { relationship_id: relationship_id }, params);
25288
+ Scheduler.crossPromoteRelationshipDelete = function (scheduler_id, relationship_id, params) {
25289
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipDelete, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
25277
25290
  };
25278
25291
  /**
25279
25292
  * Get which platforms are cross-promoted in an existing relationship.
25293
+ * GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
25280
25294
  */
25281
- Scheduler.crossPromoteRelationshipGetPlatforms = function (relationship_id, params) {
25282
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipGetPlatforms, {}, { relationship_id: relationship_id }, params);
25295
+ Scheduler.crossPromoteRelationshipGetPlatforms = function (scheduler_id, relationship_id, params) {
25296
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipGetPlatforms, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
25283
25297
  };
25284
25298
  /**
25285
25299
  * Set which platforms are cross-promoted in an existing relationship.
25300
+ * PUT /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
25301
+ * data = { platforms: ['twitter','facebook',...]}
25286
25302
  */
25287
- Scheduler.crossPromoteRelationshipSetPlatforms = function (relationship_id, data, params) {
25288
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipSetPlatforms, data, { relationship_id: relationship_id }, params);
25303
+ Scheduler.crossPromoteRelationshipSetPlatforms = function (scheduler_id, relationship_id, data, params) {
25304
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipSetPlatforms, data, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
25289
25305
  };
25290
25306
  /**
25291
- * Get recently cross-promoted posts under a relationship.
25307
+ * Get recently cross-promoted logs under a relationship.
25308
+ * GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts
25292
25309
  */
25293
- Scheduler.crossPromoteRelationshipPosts = function (relationship_id, params) {
25294
- return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipPosts, {}, { relationship_id: relationship_id }, params);
25310
+ Scheduler.crossPromoteRelationshipPosts = function (scheduler_id, relationship_id, params) {
25311
+ return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipPosts, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
25295
25312
  };
25296
25313
  return Scheduler;
25297
25314
  }());