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 +76 -59
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Communities.d.ts +11 -0
- package/dist/esm/api/Scheduler.d.ts +32 -31
- package/dist/esm/index.js +76 -59
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +43 -31
- package/package.json +1 -1
- package/src/api/Communities.ts +35 -13
- package/src/api/Scheduler.ts +93 -41
- package/src/routes/CommunitiesRoute.ts +4 -0
- package/src/routes/SchedulerRoute.ts +19 -18
|
@@ -594,5 +594,16 @@ declare class Communities {
|
|
|
594
594
|
static exportNewsletterSubscribers<T>(community_id: string, newsletter_id: string, data: {
|
|
595
595
|
format: 'csv' | 'xlsx';
|
|
596
596
|
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
597
|
+
/**
|
|
598
|
+
* Import game installs from a game title installations to a newsletter
|
|
599
|
+
*
|
|
600
|
+
* @param community_id The ID of the community.
|
|
601
|
+
* @param newsletter_id The ID of the newsletter.
|
|
602
|
+
* @param data Export options (format: 'csv' or 'xlsx').
|
|
603
|
+
* @returns Promise
|
|
604
|
+
*/
|
|
605
|
+
static importGameInstalls<T>(community_id: string, newsletter_id: string, data: {
|
|
606
|
+
format: 'csv' | 'xlsx';
|
|
607
|
+
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
597
608
|
}
|
|
598
609
|
export default Communities;
|
|
@@ -289,56 +289,57 @@ declare class Scheduler {
|
|
|
289
289
|
*/
|
|
290
290
|
static getSchedulerProgression<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
291
291
|
/**
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
static
|
|
292
|
+
* List cross-promote relationships for a scheduler (with optional pagination).
|
|
293
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships
|
|
294
|
+
*/
|
|
295
|
+
static crossPromoteListRelationships<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
296
296
|
/**
|
|
297
|
-
*
|
|
298
|
-
*
|
|
297
|
+
* Find potential cross-promote partners for a scheduler (with optional filters).
|
|
298
|
+
* GET /schedulers/{scheduler_id}/crosspromote/find
|
|
299
299
|
*/
|
|
300
|
-
static
|
|
300
|
+
static crossPromoteFind<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
301
301
|
/**
|
|
302
|
-
*
|
|
303
|
-
*
|
|
302
|
+
* List cross-promote invites for a scheduler (incoming + outgoing).
|
|
303
|
+
* GET /schedulers/{scheduler_id}/crosspromote/invites
|
|
304
304
|
*/
|
|
305
|
-
static
|
|
306
|
-
partner_scheduler_id: string;
|
|
307
|
-
optional_message?: string;
|
|
308
|
-
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
305
|
+
static crossPromoteInvitesList<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
309
306
|
/**
|
|
310
|
-
*
|
|
307
|
+
* Send an invite to cross-promote (from scheduler_id to partner_scheduler_id).
|
|
308
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites
|
|
309
|
+
*
|
|
310
|
+
* @param data { partner_scheduler_id, optional_message }
|
|
311
311
|
*/
|
|
312
|
-
static
|
|
313
|
-
status: 'accepted' | 'denied';
|
|
314
|
-
platforms?: string[];
|
|
315
|
-
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
312
|
+
static crossPromoteInviteSend<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
316
313
|
/**
|
|
317
|
-
*
|
|
318
|
-
*
|
|
314
|
+
* Accept an invite to cross-promote.
|
|
315
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept
|
|
319
316
|
*/
|
|
320
|
-
static
|
|
317
|
+
static crossPromoteInviteAccept<T>(scheduler_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
321
318
|
/**
|
|
322
|
-
*
|
|
319
|
+
* Reject an invite to cross-promote.
|
|
320
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject
|
|
323
321
|
*/
|
|
324
|
-
static
|
|
322
|
+
static crossPromoteInviteReject<T>(scheduler_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
325
323
|
/**
|
|
326
|
-
*
|
|
324
|
+
* End a cross-promote relationship (delete).
|
|
325
|
+
* DELETE /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}
|
|
327
326
|
*/
|
|
328
|
-
static
|
|
327
|
+
static crossPromoteRelationshipDelete<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
329
328
|
/**
|
|
330
329
|
* Get which platforms are cross-promoted in an existing relationship.
|
|
330
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
|
|
331
331
|
*/
|
|
332
|
-
static crossPromoteRelationshipGetPlatforms<T>(relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
332
|
+
static crossPromoteRelationshipGetPlatforms<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
333
333
|
/**
|
|
334
334
|
* Set which platforms are cross-promoted in an existing relationship.
|
|
335
|
+
* PUT /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
|
|
336
|
+
* data = { platforms: ['twitter','facebook',...]}
|
|
335
337
|
*/
|
|
336
|
-
static crossPromoteRelationshipSetPlatforms<T>(relationship_id: string, data:
|
|
337
|
-
platforms: string[];
|
|
338
|
-
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
338
|
+
static crossPromoteRelationshipSetPlatforms<T>(scheduler_id: string, relationship_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
339
339
|
/**
|
|
340
|
-
* Get recently cross-promoted
|
|
340
|
+
* Get recently cross-promoted logs under a relationship.
|
|
341
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts
|
|
341
342
|
*/
|
|
342
|
-
static crossPromoteRelationshipPosts<T>(relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
343
|
+
static crossPromoteRelationshipPosts<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
343
344
|
}
|
|
344
345
|
export default Scheduler;
|
package/dist/esm/index.js
CHANGED
|
@@ -6638,6 +6638,10 @@ var CommunitiesRoute = /** @class */ (function () {
|
|
|
6638
6638
|
url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/export',
|
|
6639
6639
|
method: HTTP_METHODS.POST
|
|
6640
6640
|
},
|
|
6641
|
+
importGameInstalls: {
|
|
6642
|
+
url: '/communities/{community_id}/newsletters/{newsletter_id}/import_game_installs',
|
|
6643
|
+
method: HTTP_METHODS.POST
|
|
6644
|
+
},
|
|
6641
6645
|
// Campaigns
|
|
6642
6646
|
listCampaigns: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.GET },
|
|
6643
6647
|
createCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.POST },
|
|
@@ -7396,6 +7400,17 @@ var Communities = /** @class */ (function () {
|
|
|
7396
7400
|
Communities.exportNewsletterSubscribers = function (community_id, newsletter_id, data, params) {
|
|
7397
7401
|
return Requests.processRoute(CommunitiesRoute.routes.exportNewsletterSubscribers, data, { community_id: community_id, newsletter_id: newsletter_id }, params);
|
|
7398
7402
|
};
|
|
7403
|
+
/**
|
|
7404
|
+
* Import game installs from a game title installations to a newsletter
|
|
7405
|
+
*
|
|
7406
|
+
* @param community_id The ID of the community.
|
|
7407
|
+
* @param newsletter_id The ID of the newsletter.
|
|
7408
|
+
* @param data Export options (format: 'csv' or 'xlsx').
|
|
7409
|
+
* @returns Promise
|
|
7410
|
+
*/
|
|
7411
|
+
Communities.importGameInstalls = function (community_id, newsletter_id, data, params) {
|
|
7412
|
+
return Requests.processRoute(CommunitiesRoute.routes.importGameInstalls, data, { community_id: community_id, newsletter_id: newsletter_id }, params);
|
|
7413
|
+
};
|
|
7399
7414
|
return Communities;
|
|
7400
7415
|
}());
|
|
7401
7416
|
|
|
@@ -11635,44 +11650,44 @@ var SchedulerRoute = /** @class */ (function () {
|
|
|
11635
11650
|
getRedditSubreddits: { url: '/schedulers/{scheduler_id}/reddit/subreddits', method: HTTP_METHODS.GET },
|
|
11636
11651
|
getRedditSubredditFlairs: { url: '/schedulers/{scheduler_id}/reddit/subreddits/{subreddit}/flairs', method: HTTP_METHODS.GET },
|
|
11637
11652
|
getDiscordChannels: { url: '/schedulers/{scheduler_id}/discord/channels', method: HTTP_METHODS.GET },
|
|
11638
|
-
|
|
11639
|
-
url: '/schedulers/
|
|
11653
|
+
crossPromoteListRelationships: {
|
|
11654
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships',
|
|
11655
|
+
method: HTTP_METHODS.GET
|
|
11656
|
+
},
|
|
11657
|
+
crossPromoteFind: {
|
|
11658
|
+
url: '/schedulers/{scheduler_id}/crosspromote/find',
|
|
11640
11659
|
method: HTTP_METHODS.GET
|
|
11641
11660
|
},
|
|
11642
11661
|
crossPromoteInvitesList: {
|
|
11643
|
-
url: '/schedulers/
|
|
11662
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites',
|
|
11644
11663
|
method: HTTP_METHODS.GET
|
|
11645
11664
|
},
|
|
11646
11665
|
crossPromoteInviteSend: {
|
|
11647
|
-
url: '/schedulers/
|
|
11666
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites',
|
|
11648
11667
|
method: HTTP_METHODS.POST
|
|
11649
11668
|
},
|
|
11650
|
-
|
|
11651
|
-
url: '/schedulers/
|
|
11669
|
+
crossPromoteInviteAccept: {
|
|
11670
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept',
|
|
11652
11671
|
method: HTTP_METHODS.POST
|
|
11653
11672
|
},
|
|
11654
|
-
|
|
11655
|
-
url: '/schedulers/
|
|
11656
|
-
method: HTTP_METHODS.GET
|
|
11657
|
-
},
|
|
11658
|
-
crossPromoteEndRelationship: {
|
|
11659
|
-
url: '/schedulers/cross-promote/relationships/{relationship_id}/end',
|
|
11673
|
+
crossPromoteInviteReject: {
|
|
11674
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject',
|
|
11660
11675
|
method: HTTP_METHODS.POST
|
|
11661
11676
|
},
|
|
11662
|
-
|
|
11663
|
-
url: '/schedulers/
|
|
11664
|
-
method: HTTP_METHODS.
|
|
11677
|
+
crossPromoteRelationshipDelete: {
|
|
11678
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}',
|
|
11679
|
+
method: HTTP_METHODS.DELETE
|
|
11665
11680
|
},
|
|
11666
11681
|
crossPromoteRelationshipGetPlatforms: {
|
|
11667
|
-
url: '/schedulers/
|
|
11682
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
|
|
11668
11683
|
method: HTTP_METHODS.GET
|
|
11669
11684
|
},
|
|
11670
11685
|
crossPromoteRelationshipSetPlatforms: {
|
|
11671
|
-
url: '/schedulers/
|
|
11686
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
|
|
11672
11687
|
method: HTTP_METHODS.PUT
|
|
11673
11688
|
},
|
|
11674
11689
|
crossPromoteRelationshipPosts: {
|
|
11675
|
-
url: '/schedulers/
|
|
11690
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts',
|
|
11676
11691
|
method: HTTP_METHODS.GET
|
|
11677
11692
|
},
|
|
11678
11693
|
};
|
|
@@ -12038,76 +12053,78 @@ var Scheduler = /** @class */ (function () {
|
|
|
12038
12053
|
return Requests.processRoute(SchedulerRoute.routes.getSchedulerProgression, {}, { scheduler_id: scheduler_id }, params);
|
|
12039
12054
|
};
|
|
12040
12055
|
/**
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
Scheduler.
|
|
12045
|
-
|
|
12046
|
-
return Requests.processRoute(SchedulerRoute.routes.crossPromoteSearch, {}, {}, newParams);
|
|
12056
|
+
* List cross-promote relationships for a scheduler (with optional pagination).
|
|
12057
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships
|
|
12058
|
+
*/
|
|
12059
|
+
Scheduler.crossPromoteListRelationships = function (scheduler_id, params) {
|
|
12060
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteListRelationships, {}, { scheduler_id: scheduler_id }, params);
|
|
12047
12061
|
};
|
|
12048
12062
|
/**
|
|
12049
|
-
*
|
|
12050
|
-
*
|
|
12063
|
+
* Find potential cross-promote partners for a scheduler (with optional filters).
|
|
12064
|
+
* GET /schedulers/{scheduler_id}/crosspromote/find
|
|
12051
12065
|
*/
|
|
12052
|
-
Scheduler.
|
|
12053
|
-
|
|
12054
|
-
return Requests.processRoute(SchedulerRoute.routes.
|
|
12066
|
+
Scheduler.crossPromoteFind = function (scheduler_id, params) {
|
|
12067
|
+
// e.g. { platform:'twitter', min_followers:500, sort:'desc', page:2, limit:5 }
|
|
12068
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteFind, {}, { scheduler_id: scheduler_id }, params);
|
|
12055
12069
|
};
|
|
12056
12070
|
/**
|
|
12057
|
-
*
|
|
12058
|
-
*
|
|
12071
|
+
* List cross-promote invites for a scheduler (incoming + outgoing).
|
|
12072
|
+
* GET /schedulers/{scheduler_id}/crosspromote/invites
|
|
12059
12073
|
*/
|
|
12060
|
-
Scheduler.
|
|
12061
|
-
|
|
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);
|
|
12074
|
+
Scheduler.crossPromoteInvitesList = function (scheduler_id, params) {
|
|
12075
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteInvitesList, {}, { scheduler_id: scheduler_id }, params);
|
|
12067
12076
|
};
|
|
12068
12077
|
/**
|
|
12069
|
-
*
|
|
12078
|
+
* Send an invite to cross-promote (from scheduler_id to partner_scheduler_id).
|
|
12079
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites
|
|
12080
|
+
*
|
|
12081
|
+
* @param data { partner_scheduler_id, optional_message }
|
|
12070
12082
|
*/
|
|
12071
|
-
Scheduler.
|
|
12072
|
-
return Requests.processRoute(SchedulerRoute.routes.
|
|
12083
|
+
Scheduler.crossPromoteInviteSend = function (scheduler_id, data, params) {
|
|
12084
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteSend, data, { scheduler_id: scheduler_id }, params);
|
|
12073
12085
|
};
|
|
12074
12086
|
/**
|
|
12075
|
-
*
|
|
12076
|
-
*
|
|
12087
|
+
* Accept an invite to cross-promote.
|
|
12088
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept
|
|
12077
12089
|
*/
|
|
12078
|
-
Scheduler.
|
|
12079
|
-
|
|
12080
|
-
return Requests.processRoute(SchedulerRoute.routes.crossPromoteListRelationships, {}, {}, newParams);
|
|
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);
|
|
12081
12092
|
};
|
|
12082
12093
|
/**
|
|
12083
|
-
*
|
|
12094
|
+
* Reject an invite to cross-promote.
|
|
12095
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject
|
|
12084
12096
|
*/
|
|
12085
|
-
Scheduler.
|
|
12086
|
-
return Requests.processRoute(SchedulerRoute.routes.
|
|
12097
|
+
Scheduler.crossPromoteInviteReject = function (scheduler_id, invite_id, params) {
|
|
12098
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteReject, {}, { scheduler_id: scheduler_id, invite_id: invite_id }, params);
|
|
12087
12099
|
};
|
|
12088
12100
|
/**
|
|
12089
|
-
*
|
|
12101
|
+
* End a cross-promote relationship (delete).
|
|
12102
|
+
* DELETE /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}
|
|
12090
12103
|
*/
|
|
12091
|
-
Scheduler.
|
|
12092
|
-
return Requests.processRoute(SchedulerRoute.routes.
|
|
12104
|
+
Scheduler.crossPromoteRelationshipDelete = function (scheduler_id, relationship_id, params) {
|
|
12105
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipDelete, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
12093
12106
|
};
|
|
12094
12107
|
/**
|
|
12095
12108
|
* Get which platforms are cross-promoted in an existing relationship.
|
|
12109
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
|
|
12096
12110
|
*/
|
|
12097
|
-
Scheduler.crossPromoteRelationshipGetPlatforms = function (relationship_id, params) {
|
|
12098
|
-
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipGetPlatforms, {}, { relationship_id: relationship_id }, params);
|
|
12111
|
+
Scheduler.crossPromoteRelationshipGetPlatforms = function (scheduler_id, relationship_id, params) {
|
|
12112
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipGetPlatforms, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
12099
12113
|
};
|
|
12100
12114
|
/**
|
|
12101
12115
|
* Set which platforms are cross-promoted in an existing relationship.
|
|
12116
|
+
* PUT /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
|
|
12117
|
+
* data = { platforms: ['twitter','facebook',...]}
|
|
12102
12118
|
*/
|
|
12103
|
-
Scheduler.crossPromoteRelationshipSetPlatforms = function (relationship_id, data, params) {
|
|
12104
|
-
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipSetPlatforms, data, { relationship_id: relationship_id }, params);
|
|
12119
|
+
Scheduler.crossPromoteRelationshipSetPlatforms = function (scheduler_id, relationship_id, data, params) {
|
|
12120
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipSetPlatforms, data, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
12105
12121
|
};
|
|
12106
12122
|
/**
|
|
12107
|
-
* Get recently cross-promoted
|
|
12123
|
+
* Get recently cross-promoted logs under a relationship.
|
|
12124
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts
|
|
12108
12125
|
*/
|
|
12109
|
-
Scheduler.crossPromoteRelationshipPosts = function (relationship_id, params) {
|
|
12110
|
-
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipPosts, {}, { relationship_id: relationship_id }, params);
|
|
12126
|
+
Scheduler.crossPromoteRelationshipPosts = function (scheduler_id, relationship_id, params) {
|
|
12127
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipPosts, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
12111
12128
|
};
|
|
12112
12129
|
return Scheduler;
|
|
12113
12130
|
}());
|