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 +61 -59
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Scheduler.d.ts +32 -31
- package/dist/esm/index.js +61 -59
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +32 -31
- package/package.json +1 -1
- package/src/api/Scheduler.ts +93 -41
- package/src/routes/SchedulerRoute.ts +19 -18
|
@@ -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
|
@@ -11635,44 +11635,44 @@ 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
|
-
|
|
11639
|
-
url: '/schedulers/
|
|
11638
|
+
crossPromoteListRelationships: {
|
|
11639
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships',
|
|
11640
|
+
method: HTTP_METHODS.GET
|
|
11641
|
+
},
|
|
11642
|
+
crossPromoteFind: {
|
|
11643
|
+
url: '/schedulers/{scheduler_id}/crosspromote/find',
|
|
11640
11644
|
method: HTTP_METHODS.GET
|
|
11641
11645
|
},
|
|
11642
11646
|
crossPromoteInvitesList: {
|
|
11643
|
-
url: '/schedulers/
|
|
11647
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites',
|
|
11644
11648
|
method: HTTP_METHODS.GET
|
|
11645
11649
|
},
|
|
11646
11650
|
crossPromoteInviteSend: {
|
|
11647
|
-
url: '/schedulers/
|
|
11651
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites',
|
|
11648
11652
|
method: HTTP_METHODS.POST
|
|
11649
11653
|
},
|
|
11650
|
-
|
|
11651
|
-
url: '/schedulers/
|
|
11654
|
+
crossPromoteInviteAccept: {
|
|
11655
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept',
|
|
11652
11656
|
method: HTTP_METHODS.POST
|
|
11653
11657
|
},
|
|
11654
|
-
|
|
11655
|
-
url: '/schedulers/
|
|
11656
|
-
method: HTTP_METHODS.GET
|
|
11657
|
-
},
|
|
11658
|
-
crossPromoteEndRelationship: {
|
|
11659
|
-
url: '/schedulers/cross-promote/relationships/{relationship_id}/end',
|
|
11658
|
+
crossPromoteInviteReject: {
|
|
11659
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject',
|
|
11660
11660
|
method: HTTP_METHODS.POST
|
|
11661
11661
|
},
|
|
11662
|
-
|
|
11663
|
-
url: '/schedulers/
|
|
11664
|
-
method: HTTP_METHODS.
|
|
11662
|
+
crossPromoteRelationshipDelete: {
|
|
11663
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}',
|
|
11664
|
+
method: HTTP_METHODS.DELETE
|
|
11665
11665
|
},
|
|
11666
11666
|
crossPromoteRelationshipGetPlatforms: {
|
|
11667
|
-
url: '/schedulers/
|
|
11667
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
|
|
11668
11668
|
method: HTTP_METHODS.GET
|
|
11669
11669
|
},
|
|
11670
11670
|
crossPromoteRelationshipSetPlatforms: {
|
|
11671
|
-
url: '/schedulers/
|
|
11671
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
|
|
11672
11672
|
method: HTTP_METHODS.PUT
|
|
11673
11673
|
},
|
|
11674
11674
|
crossPromoteRelationshipPosts: {
|
|
11675
|
-
url: '/schedulers/
|
|
11675
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts',
|
|
11676
11676
|
method: HTTP_METHODS.GET
|
|
11677
11677
|
},
|
|
11678
11678
|
};
|
|
@@ -12038,76 +12038,78 @@ var Scheduler = /** @class */ (function () {
|
|
|
12038
12038
|
return Requests.processRoute(SchedulerRoute.routes.getSchedulerProgression, {}, { scheduler_id: scheduler_id }, params);
|
|
12039
12039
|
};
|
|
12040
12040
|
/**
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
Scheduler.
|
|
12045
|
-
|
|
12046
|
-
return Requests.processRoute(SchedulerRoute.routes.crossPromoteSearch, {}, {}, newParams);
|
|
12041
|
+
* List cross-promote relationships for a scheduler (with optional pagination).
|
|
12042
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships
|
|
12043
|
+
*/
|
|
12044
|
+
Scheduler.crossPromoteListRelationships = function (scheduler_id, params) {
|
|
12045
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteListRelationships, {}, { scheduler_id: scheduler_id }, params);
|
|
12047
12046
|
};
|
|
12048
12047
|
/**
|
|
12049
|
-
*
|
|
12050
|
-
*
|
|
12048
|
+
* Find potential cross-promote partners for a scheduler (with optional filters).
|
|
12049
|
+
* GET /schedulers/{scheduler_id}/crosspromote/find
|
|
12051
12050
|
*/
|
|
12052
|
-
Scheduler.
|
|
12053
|
-
|
|
12054
|
-
return Requests.processRoute(SchedulerRoute.routes.
|
|
12051
|
+
Scheduler.crossPromoteFind = function (scheduler_id, params) {
|
|
12052
|
+
// e.g. { platform:'twitter', min_followers:500, sort:'desc', page:2, limit:5 }
|
|
12053
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteFind, {}, { scheduler_id: scheduler_id }, params);
|
|
12055
12054
|
};
|
|
12056
12055
|
/**
|
|
12057
|
-
*
|
|
12058
|
-
*
|
|
12056
|
+
* List cross-promote invites for a scheduler (incoming + outgoing).
|
|
12057
|
+
* GET /schedulers/{scheduler_id}/crosspromote/invites
|
|
12059
12058
|
*/
|
|
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);
|
|
12059
|
+
Scheduler.crossPromoteInvitesList = function (scheduler_id, params) {
|
|
12060
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteInvitesList, {}, { scheduler_id: scheduler_id }, params);
|
|
12067
12061
|
};
|
|
12068
12062
|
/**
|
|
12069
|
-
*
|
|
12063
|
+
* Send an invite to cross-promote (from scheduler_id to partner_scheduler_id).
|
|
12064
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites
|
|
12065
|
+
*
|
|
12066
|
+
* @param data { partner_scheduler_id, optional_message }
|
|
12070
12067
|
*/
|
|
12071
|
-
Scheduler.
|
|
12072
|
-
return Requests.processRoute(SchedulerRoute.routes.
|
|
12068
|
+
Scheduler.crossPromoteInviteSend = function (scheduler_id, data, params) {
|
|
12069
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteSend, data, { scheduler_id: scheduler_id }, params);
|
|
12073
12070
|
};
|
|
12074
12071
|
/**
|
|
12075
|
-
*
|
|
12076
|
-
*
|
|
12072
|
+
* Accept an invite to cross-promote.
|
|
12073
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept
|
|
12077
12074
|
*/
|
|
12078
|
-
Scheduler.
|
|
12079
|
-
|
|
12080
|
-
return Requests.processRoute(SchedulerRoute.routes.crossPromoteListRelationships, {}, {}, newParams);
|
|
12075
|
+
Scheduler.crossPromoteInviteAccept = function (scheduler_id, invite_id, params) {
|
|
12076
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteAccept, {}, { scheduler_id: scheduler_id, invite_id: invite_id }, params);
|
|
12081
12077
|
};
|
|
12082
12078
|
/**
|
|
12083
|
-
*
|
|
12079
|
+
* Reject an invite to cross-promote.
|
|
12080
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject
|
|
12084
12081
|
*/
|
|
12085
|
-
Scheduler.
|
|
12086
|
-
return Requests.processRoute(SchedulerRoute.routes.
|
|
12082
|
+
Scheduler.crossPromoteInviteReject = function (scheduler_id, invite_id, params) {
|
|
12083
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteInviteReject, {}, { scheduler_id: scheduler_id, invite_id: invite_id }, params);
|
|
12087
12084
|
};
|
|
12088
12085
|
/**
|
|
12089
|
-
*
|
|
12086
|
+
* End a cross-promote relationship (delete).
|
|
12087
|
+
* DELETE /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}
|
|
12090
12088
|
*/
|
|
12091
|
-
Scheduler.
|
|
12092
|
-
return Requests.processRoute(SchedulerRoute.routes.
|
|
12089
|
+
Scheduler.crossPromoteRelationshipDelete = function (scheduler_id, relationship_id, params) {
|
|
12090
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipDelete, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
12093
12091
|
};
|
|
12094
12092
|
/**
|
|
12095
12093
|
* Get which platforms are cross-promoted in an existing relationship.
|
|
12094
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
|
|
12096
12095
|
*/
|
|
12097
|
-
Scheduler.crossPromoteRelationshipGetPlatforms = function (relationship_id, params) {
|
|
12098
|
-
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipGetPlatforms, {}, { relationship_id: relationship_id }, params);
|
|
12096
|
+
Scheduler.crossPromoteRelationshipGetPlatforms = function (scheduler_id, relationship_id, params) {
|
|
12097
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipGetPlatforms, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
12099
12098
|
};
|
|
12100
12099
|
/**
|
|
12101
12100
|
* Set which platforms are cross-promoted in an existing relationship.
|
|
12101
|
+
* PUT /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
|
|
12102
|
+
* data = { platforms: ['twitter','facebook',...]}
|
|
12102
12103
|
*/
|
|
12103
|
-
Scheduler.crossPromoteRelationshipSetPlatforms = function (relationship_id, data, params) {
|
|
12104
|
-
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipSetPlatforms, data, { relationship_id: relationship_id }, params);
|
|
12104
|
+
Scheduler.crossPromoteRelationshipSetPlatforms = function (scheduler_id, relationship_id, data, params) {
|
|
12105
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipSetPlatforms, data, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
12105
12106
|
};
|
|
12106
12107
|
/**
|
|
12107
|
-
* Get recently cross-promoted
|
|
12108
|
+
* Get recently cross-promoted logs under a relationship.
|
|
12109
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts
|
|
12108
12110
|
*/
|
|
12109
|
-
Scheduler.crossPromoteRelationshipPosts = function (relationship_id, params) {
|
|
12110
|
-
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipPosts, {}, { relationship_id: relationship_id }, params);
|
|
12111
|
+
Scheduler.crossPromoteRelationshipPosts = function (scheduler_id, relationship_id, params) {
|
|
12112
|
+
return Requests.processRoute(SchedulerRoute.routes.crossPromoteRelationshipPosts, {}, { scheduler_id: scheduler_id, relationship_id: relationship_id }, params);
|
|
12111
12113
|
};
|
|
12112
12114
|
return Scheduler;
|
|
12113
12115
|
}());
|