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
package/dist/index.d.ts
CHANGED
|
@@ -4436,57 +4436,58 @@ declare class Scheduler {
|
|
|
4436
4436
|
*/
|
|
4437
4437
|
static getSchedulerProgression<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4438
4438
|
/**
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
static
|
|
4439
|
+
* List cross-promote relationships for a scheduler (with optional pagination).
|
|
4440
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships
|
|
4441
|
+
*/
|
|
4442
|
+
static crossPromoteListRelationships<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4443
4443
|
/**
|
|
4444
|
-
*
|
|
4445
|
-
*
|
|
4444
|
+
* Find potential cross-promote partners for a scheduler (with optional filters).
|
|
4445
|
+
* GET /schedulers/{scheduler_id}/crosspromote/find
|
|
4446
4446
|
*/
|
|
4447
|
-
static
|
|
4447
|
+
static crossPromoteFind<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4448
4448
|
/**
|
|
4449
|
-
*
|
|
4450
|
-
*
|
|
4449
|
+
* List cross-promote invites for a scheduler (incoming + outgoing).
|
|
4450
|
+
* GET /schedulers/{scheduler_id}/crosspromote/invites
|
|
4451
4451
|
*/
|
|
4452
|
-
static
|
|
4453
|
-
partner_scheduler_id: string;
|
|
4454
|
-
optional_message?: string;
|
|
4455
|
-
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4452
|
+
static crossPromoteInvitesList<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4456
4453
|
/**
|
|
4457
|
-
*
|
|
4454
|
+
* Send an invite to cross-promote (from scheduler_id to partner_scheduler_id).
|
|
4455
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites
|
|
4456
|
+
*
|
|
4457
|
+
* @param data { partner_scheduler_id, optional_message }
|
|
4458
4458
|
*/
|
|
4459
|
-
static
|
|
4460
|
-
status: 'accepted' | 'denied';
|
|
4461
|
-
platforms?: string[];
|
|
4462
|
-
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4459
|
+
static crossPromoteInviteSend<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4463
4460
|
/**
|
|
4464
|
-
*
|
|
4465
|
-
*
|
|
4461
|
+
* Accept an invite to cross-promote.
|
|
4462
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept
|
|
4466
4463
|
*/
|
|
4467
|
-
static
|
|
4464
|
+
static crossPromoteInviteAccept<T>(scheduler_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4468
4465
|
/**
|
|
4469
|
-
*
|
|
4466
|
+
* Reject an invite to cross-promote.
|
|
4467
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject
|
|
4470
4468
|
*/
|
|
4471
|
-
static
|
|
4469
|
+
static crossPromoteInviteReject<T>(scheduler_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4472
4470
|
/**
|
|
4473
|
-
*
|
|
4471
|
+
* End a cross-promote relationship (delete).
|
|
4472
|
+
* DELETE /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}
|
|
4474
4473
|
*/
|
|
4475
|
-
static
|
|
4474
|
+
static crossPromoteRelationshipDelete<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4476
4475
|
/**
|
|
4477
4476
|
* Get which platforms are cross-promoted in an existing relationship.
|
|
4477
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
|
|
4478
4478
|
*/
|
|
4479
|
-
static crossPromoteRelationshipGetPlatforms<T>(relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4479
|
+
static crossPromoteRelationshipGetPlatforms<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4480
4480
|
/**
|
|
4481
4481
|
* Set which platforms are cross-promoted in an existing relationship.
|
|
4482
|
+
* PUT /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
|
|
4483
|
+
* data = { platforms: ['twitter','facebook',...]}
|
|
4482
4484
|
*/
|
|
4483
|
-
static crossPromoteRelationshipSetPlatforms<T>(relationship_id: string, data:
|
|
4484
|
-
platforms: string[];
|
|
4485
|
-
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4485
|
+
static crossPromoteRelationshipSetPlatforms<T>(scheduler_id: string, relationship_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4486
4486
|
/**
|
|
4487
|
-
* Get recently cross-promoted
|
|
4487
|
+
* Get recently cross-promoted logs under a relationship.
|
|
4488
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts
|
|
4488
4489
|
*/
|
|
4489
|
-
static crossPromoteRelationshipPosts<T>(relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4490
|
+
static crossPromoteRelationshipPosts<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4490
4491
|
}
|
|
4491
4492
|
|
|
4492
4493
|
declare class Funnel {
|
package/package.json
CHANGED
package/src/api/Scheduler.ts
CHANGED
|
@@ -394,85 +394,137 @@ class Scheduler {
|
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
/**
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
public static
|
|
401
|
-
|
|
402
|
-
|
|
397
|
+
* List cross-promote relationships for a scheduler (with optional pagination).
|
|
398
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships
|
|
399
|
+
*/
|
|
400
|
+
public static crossPromoteListRelationships<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
401
|
+
return Requests.processRoute(
|
|
402
|
+
SchedulerRoute.routes.crossPromoteListRelationships,
|
|
403
|
+
{},
|
|
404
|
+
{ scheduler_id },
|
|
405
|
+
params
|
|
406
|
+
);
|
|
403
407
|
}
|
|
404
408
|
|
|
405
409
|
/**
|
|
406
|
-
*
|
|
407
|
-
*
|
|
410
|
+
* Find potential cross-promote partners for a scheduler (with optional filters).
|
|
411
|
+
* GET /schedulers/{scheduler_id}/crosspromote/find
|
|
408
412
|
*/
|
|
409
|
-
public static
|
|
410
|
-
|
|
411
|
-
return Requests.processRoute(
|
|
413
|
+
public static crossPromoteFind<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
414
|
+
// e.g. { platform:'twitter', min_followers:500, sort:'desc', page:2, limit:5 }
|
|
415
|
+
return Requests.processRoute(
|
|
416
|
+
SchedulerRoute.routes.crossPromoteFind,
|
|
417
|
+
{},
|
|
418
|
+
{ scheduler_id },
|
|
419
|
+
params
|
|
420
|
+
);
|
|
412
421
|
}
|
|
413
422
|
|
|
414
423
|
/**
|
|
415
|
-
*
|
|
416
|
-
*
|
|
424
|
+
* List cross-promote invites for a scheduler (incoming + outgoing).
|
|
425
|
+
* GET /schedulers/{scheduler_id}/crosspromote/invites
|
|
417
426
|
*/
|
|
418
|
-
public static
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
427
|
+
public static crossPromoteInvitesList<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
428
|
+
return Requests.processRoute(
|
|
429
|
+
SchedulerRoute.routes.crossPromoteInvitesList,
|
|
430
|
+
{},
|
|
431
|
+
{ scheduler_id },
|
|
432
|
+
params
|
|
433
|
+
);
|
|
425
434
|
}
|
|
426
435
|
|
|
427
436
|
/**
|
|
428
|
-
*
|
|
437
|
+
* Send an invite to cross-promote (from scheduler_id to partner_scheduler_id).
|
|
438
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites
|
|
439
|
+
*
|
|
440
|
+
* @param data { partner_scheduler_id, optional_message }
|
|
429
441
|
*/
|
|
430
|
-
public static
|
|
431
|
-
return Requests.processRoute(
|
|
442
|
+
public static crossPromoteInviteSend<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
443
|
+
return Requests.processRoute(
|
|
444
|
+
SchedulerRoute.routes.crossPromoteInviteSend,
|
|
445
|
+
data,
|
|
446
|
+
{ scheduler_id },
|
|
447
|
+
params
|
|
448
|
+
);
|
|
432
449
|
}
|
|
433
450
|
|
|
434
451
|
/**
|
|
435
|
-
*
|
|
436
|
-
*
|
|
452
|
+
* Accept an invite to cross-promote.
|
|
453
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept
|
|
437
454
|
*/
|
|
438
|
-
public static
|
|
439
|
-
|
|
440
|
-
|
|
455
|
+
public static crossPromoteInviteAccept<T>(scheduler_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
456
|
+
return Requests.processRoute(
|
|
457
|
+
SchedulerRoute.routes.crossPromoteInviteAccept,
|
|
458
|
+
{},
|
|
459
|
+
{ scheduler_id, invite_id },
|
|
460
|
+
params
|
|
461
|
+
);
|
|
441
462
|
}
|
|
442
463
|
|
|
443
464
|
/**
|
|
444
|
-
*
|
|
465
|
+
* Reject an invite to cross-promote.
|
|
466
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject
|
|
445
467
|
*/
|
|
446
|
-
public static
|
|
447
|
-
return Requests.processRoute(
|
|
468
|
+
public static crossPromoteInviteReject<T>(scheduler_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
469
|
+
return Requests.processRoute(
|
|
470
|
+
SchedulerRoute.routes.crossPromoteInviteReject,
|
|
471
|
+
{},
|
|
472
|
+
{ scheduler_id, invite_id },
|
|
473
|
+
params
|
|
474
|
+
);
|
|
448
475
|
}
|
|
449
476
|
|
|
450
477
|
/**
|
|
451
|
-
*
|
|
478
|
+
* End a cross-promote relationship (delete).
|
|
479
|
+
* DELETE /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}
|
|
452
480
|
*/
|
|
453
|
-
public static
|
|
454
|
-
return Requests.processRoute(
|
|
481
|
+
public static crossPromoteRelationshipDelete<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
482
|
+
return Requests.processRoute(
|
|
483
|
+
SchedulerRoute.routes.crossPromoteRelationshipDelete,
|
|
484
|
+
{},
|
|
485
|
+
{ scheduler_id, relationship_id },
|
|
486
|
+
params
|
|
487
|
+
);
|
|
455
488
|
}
|
|
456
489
|
|
|
457
490
|
/**
|
|
458
491
|
* Get which platforms are cross-promoted in an existing relationship.
|
|
492
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
|
|
459
493
|
*/
|
|
460
|
-
public static crossPromoteRelationshipGetPlatforms<T>(relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
461
|
-
return Requests.processRoute(
|
|
494
|
+
public static crossPromoteRelationshipGetPlatforms<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
495
|
+
return Requests.processRoute(
|
|
496
|
+
SchedulerRoute.routes.crossPromoteRelationshipGetPlatforms,
|
|
497
|
+
{},
|
|
498
|
+
{ scheduler_id, relationship_id },
|
|
499
|
+
params
|
|
500
|
+
);
|
|
462
501
|
}
|
|
463
502
|
|
|
464
503
|
/**
|
|
465
504
|
* Set which platforms are cross-promoted in an existing relationship.
|
|
505
|
+
* PUT /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
|
|
506
|
+
* data = { platforms: ['twitter','facebook',...]}
|
|
466
507
|
*/
|
|
467
|
-
public static crossPromoteRelationshipSetPlatforms<T>(
|
|
468
|
-
return Requests.processRoute(
|
|
508
|
+
public static crossPromoteRelationshipSetPlatforms<T>(scheduler_id: string, relationship_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
509
|
+
return Requests.processRoute(
|
|
510
|
+
SchedulerRoute.routes.crossPromoteRelationshipSetPlatforms,
|
|
511
|
+
data,
|
|
512
|
+
{ scheduler_id, relationship_id },
|
|
513
|
+
params
|
|
514
|
+
);
|
|
469
515
|
}
|
|
470
516
|
|
|
471
517
|
/**
|
|
472
|
-
* Get recently cross-promoted
|
|
518
|
+
* Get recently cross-promoted logs under a relationship.
|
|
519
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts
|
|
473
520
|
*/
|
|
474
|
-
public static crossPromoteRelationshipPosts<T>(relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
475
|
-
return Requests.processRoute(
|
|
521
|
+
public static crossPromoteRelationshipPosts<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
522
|
+
return Requests.processRoute(
|
|
523
|
+
SchedulerRoute.routes.crossPromoteRelationshipPosts,
|
|
524
|
+
{},
|
|
525
|
+
{ scheduler_id, relationship_id },
|
|
526
|
+
params
|
|
527
|
+
);
|
|
476
528
|
}
|
|
477
529
|
|
|
478
530
|
}
|
|
@@ -46,47 +46,48 @@ class SchedulerRoute {
|
|
|
46
46
|
getRedditSubredditFlairs: { url: '/schedulers/{scheduler_id}/reddit/subreddits/{subreddit}/flairs', method: HTTP_METHODS.GET },
|
|
47
47
|
getDiscordChannels: { url: '/schedulers/{scheduler_id}/discord/channels', method: HTTP_METHODS.GET },
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
url: '/schedulers/
|
|
49
|
+
crossPromoteListRelationships: {
|
|
50
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships',
|
|
51
|
+
method: HTTP_METHODS.GET
|
|
52
|
+
},
|
|
53
|
+
crossPromoteFind: {
|
|
54
|
+
url: '/schedulers/{scheduler_id}/crosspromote/find',
|
|
51
55
|
method: HTTP_METHODS.GET
|
|
52
56
|
},
|
|
53
57
|
crossPromoteInvitesList: {
|
|
54
|
-
url: '/schedulers/
|
|
58
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites',
|
|
55
59
|
method: HTTP_METHODS.GET
|
|
56
60
|
},
|
|
57
61
|
crossPromoteInviteSend: {
|
|
58
|
-
url: '/schedulers/
|
|
62
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites',
|
|
59
63
|
method: HTTP_METHODS.POST
|
|
60
64
|
},
|
|
61
|
-
|
|
62
|
-
url: '/schedulers/
|
|
65
|
+
crossPromoteInviteAccept: {
|
|
66
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept',
|
|
63
67
|
method: HTTP_METHODS.POST
|
|
64
68
|
},
|
|
65
|
-
|
|
66
|
-
url: '/schedulers/
|
|
67
|
-
method: HTTP_METHODS.GET
|
|
68
|
-
},
|
|
69
|
-
crossPromoteEndRelationship: {
|
|
70
|
-
url: '/schedulers/cross-promote/relationships/{relationship_id}/end',
|
|
69
|
+
crossPromoteInviteReject: {
|
|
70
|
+
url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject',
|
|
71
71
|
method: HTTP_METHODS.POST
|
|
72
72
|
},
|
|
73
|
-
|
|
74
|
-
url: '/schedulers/
|
|
75
|
-
method: HTTP_METHODS.
|
|
73
|
+
crossPromoteRelationshipDelete: {
|
|
74
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}',
|
|
75
|
+
method: HTTP_METHODS.DELETE
|
|
76
76
|
},
|
|
77
77
|
crossPromoteRelationshipGetPlatforms: {
|
|
78
|
-
url: '/schedulers/
|
|
78
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
|
|
79
79
|
method: HTTP_METHODS.GET
|
|
80
80
|
},
|
|
81
81
|
crossPromoteRelationshipSetPlatforms: {
|
|
82
|
-
url: '/schedulers/
|
|
82
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
|
|
83
83
|
method: HTTP_METHODS.PUT
|
|
84
84
|
},
|
|
85
85
|
crossPromoteRelationshipPosts: {
|
|
86
|
-
url: '/schedulers/
|
|
86
|
+
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts',
|
|
87
87
|
method: HTTP_METHODS.GET
|
|
88
88
|
},
|
|
89
89
|
|
|
90
|
+
|
|
90
91
|
};
|
|
91
92
|
}
|
|
92
93
|
|