glitch-javascript-sdk 1.7.2 → 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 +19 -44
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Scheduler.d.ts +18 -36
- package/dist/esm/index.js +19 -44
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +18 -36
- package/package.json +1 -1
- package/src/api/Scheduler.ts +20 -37
- package/src/routes/SchedulerRoute.ts +1 -16
package/dist/index.d.ts
CHANGED
|
@@ -4436,74 +4436,56 @@ 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
|
-
* @param params Optional query params
|
|
4443
|
-
*/
|
|
4439
|
+
* List cross-promote relationships for a scheduler (with optional pagination).
|
|
4440
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships
|
|
4441
|
+
*/
|
|
4444
4442
|
static crossPromoteListRelationships<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4445
4443
|
/**
|
|
4446
|
-
* Find potential cross-promote partners for a scheduler.
|
|
4447
|
-
*
|
|
4448
|
-
* @param scheduler_id The ID of the promotion schedule
|
|
4449
|
-
* @param params Optional query params
|
|
4444
|
+
* Find potential cross-promote partners for a scheduler (with optional filters).
|
|
4445
|
+
* GET /schedulers/{scheduler_id}/crosspromote/find
|
|
4450
4446
|
*/
|
|
4451
4447
|
static crossPromoteFind<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4452
4448
|
/**
|
|
4453
|
-
* List cross-promote invites for a scheduler.
|
|
4454
|
-
*
|
|
4455
|
-
* @param scheduler_id The ID of the promotion schedule
|
|
4456
|
-
* @param params Optional query params
|
|
4449
|
+
* List cross-promote invites for a scheduler (incoming + outgoing).
|
|
4450
|
+
* GET /schedulers/{scheduler_id}/crosspromote/invites
|
|
4457
4451
|
*/
|
|
4458
4452
|
static crossPromoteInvitesList<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4459
4453
|
/**
|
|
4460
|
-
* Send an invite to cross-promote.
|
|
4454
|
+
* Send an invite to cross-promote (from scheduler_id to partner_scheduler_id).
|
|
4455
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites
|
|
4461
4456
|
*
|
|
4462
|
-
* @param scheduler_id The ID of the promotion schedule
|
|
4463
4457
|
* @param data { partner_scheduler_id, optional_message }
|
|
4464
4458
|
*/
|
|
4465
4459
|
static crossPromoteInviteSend<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4466
4460
|
/**
|
|
4467
4461
|
* Accept an invite to cross-promote.
|
|
4468
|
-
*
|
|
4469
|
-
* @param scheduler_id The ID of the promotion schedule
|
|
4470
|
-
* @param invite_id The ID of the invite
|
|
4462
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept
|
|
4471
4463
|
*/
|
|
4472
4464
|
static crossPromoteInviteAccept<T>(scheduler_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4473
4465
|
/**
|
|
4474
4466
|
* Reject an invite to cross-promote.
|
|
4475
|
-
*
|
|
4476
|
-
* @param scheduler_id The ID of the promotion schedule
|
|
4477
|
-
* @param invite_id The ID of the invite
|
|
4467
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject
|
|
4478
4468
|
*/
|
|
4479
4469
|
static crossPromoteInviteReject<T>(scheduler_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4480
4470
|
/**
|
|
4481
|
-
* End a cross-promote relationship.
|
|
4482
|
-
*
|
|
4483
|
-
* @param scheduler_id The ID of the promotion schedule
|
|
4484
|
-
* @param relationship_id The ID of the relationship
|
|
4471
|
+
* End a cross-promote relationship (delete).
|
|
4472
|
+
* DELETE /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}
|
|
4485
4473
|
*/
|
|
4486
4474
|
static crossPromoteRelationshipDelete<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4487
4475
|
/**
|
|
4488
4476
|
* Get which platforms are cross-promoted in an existing relationship.
|
|
4489
|
-
*
|
|
4490
|
-
* @param scheduler_id The ID of the promotion schedule
|
|
4491
|
-
* @param relationship_id The ID of the relationship
|
|
4477
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
|
|
4492
4478
|
*/
|
|
4493
4479
|
static crossPromoteRelationshipGetPlatforms<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4494
4480
|
/**
|
|
4495
4481
|
* Set which platforms are cross-promoted in an existing relationship.
|
|
4496
|
-
*
|
|
4497
|
-
*
|
|
4498
|
-
* @param relationship_id The ID of the relationship
|
|
4499
|
-
* @param data An object like { platforms: ['twitter', 'facebook', ...] }
|
|
4482
|
+
* PUT /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
|
|
4483
|
+
* data = { platforms: ['twitter','facebook',...]}
|
|
4500
4484
|
*/
|
|
4501
4485
|
static crossPromoteRelationshipSetPlatforms<T>(scheduler_id: string, relationship_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4502
4486
|
/**
|
|
4503
|
-
* Get recently cross-promoted
|
|
4504
|
-
*
|
|
4505
|
-
* @param scheduler_id The ID of the promotion schedule
|
|
4506
|
-
* @param relationship_id The ID of the relationship
|
|
4487
|
+
* Get recently cross-promoted logs under a relationship.
|
|
4488
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts
|
|
4507
4489
|
*/
|
|
4508
4490
|
static crossPromoteRelationshipPosts<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4509
4491
|
}
|
package/package.json
CHANGED
package/src/api/Scheduler.ts
CHANGED
|
@@ -394,11 +394,9 @@ class Scheduler {
|
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
/**
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
* @param params Optional query params
|
|
401
|
-
*/
|
|
397
|
+
* List cross-promote relationships for a scheduler (with optional pagination).
|
|
398
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships
|
|
399
|
+
*/
|
|
402
400
|
public static crossPromoteListRelationships<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
403
401
|
return Requests.processRoute(
|
|
404
402
|
SchedulerRoute.routes.crossPromoteListRelationships,
|
|
@@ -409,12 +407,11 @@ class Scheduler {
|
|
|
409
407
|
}
|
|
410
408
|
|
|
411
409
|
/**
|
|
412
|
-
* Find potential cross-promote partners for a scheduler.
|
|
413
|
-
*
|
|
414
|
-
* @param scheduler_id The ID of the promotion schedule
|
|
415
|
-
* @param params Optional query params
|
|
410
|
+
* Find potential cross-promote partners for a scheduler (with optional filters).
|
|
411
|
+
* GET /schedulers/{scheduler_id}/crosspromote/find
|
|
416
412
|
*/
|
|
417
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 }
|
|
418
415
|
return Requests.processRoute(
|
|
419
416
|
SchedulerRoute.routes.crossPromoteFind,
|
|
420
417
|
{},
|
|
@@ -424,10 +421,8 @@ class Scheduler {
|
|
|
424
421
|
}
|
|
425
422
|
|
|
426
423
|
/**
|
|
427
|
-
* List cross-promote invites for a scheduler.
|
|
428
|
-
*
|
|
429
|
-
* @param scheduler_id The ID of the promotion schedule
|
|
430
|
-
* @param params Optional query params
|
|
424
|
+
* List cross-promote invites for a scheduler (incoming + outgoing).
|
|
425
|
+
* GET /schedulers/{scheduler_id}/crosspromote/invites
|
|
431
426
|
*/
|
|
432
427
|
public static crossPromoteInvitesList<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
433
428
|
return Requests.processRoute(
|
|
@@ -439,9 +434,9 @@ class Scheduler {
|
|
|
439
434
|
}
|
|
440
435
|
|
|
441
436
|
/**
|
|
442
|
-
* Send an invite to cross-promote.
|
|
443
|
-
*
|
|
444
|
-
*
|
|
437
|
+
* Send an invite to cross-promote (from scheduler_id to partner_scheduler_id).
|
|
438
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites
|
|
439
|
+
*
|
|
445
440
|
* @param data { partner_scheduler_id, optional_message }
|
|
446
441
|
*/
|
|
447
442
|
public static crossPromoteInviteSend<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
@@ -455,9 +450,7 @@ class Scheduler {
|
|
|
455
450
|
|
|
456
451
|
/**
|
|
457
452
|
* Accept an invite to cross-promote.
|
|
458
|
-
*
|
|
459
|
-
* @param scheduler_id The ID of the promotion schedule
|
|
460
|
-
* @param invite_id The ID of the invite
|
|
453
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept
|
|
461
454
|
*/
|
|
462
455
|
public static crossPromoteInviteAccept<T>(scheduler_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
463
456
|
return Requests.processRoute(
|
|
@@ -470,9 +463,7 @@ class Scheduler {
|
|
|
470
463
|
|
|
471
464
|
/**
|
|
472
465
|
* Reject an invite to cross-promote.
|
|
473
|
-
*
|
|
474
|
-
* @param scheduler_id The ID of the promotion schedule
|
|
475
|
-
* @param invite_id The ID of the invite
|
|
466
|
+
* POST /schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject
|
|
476
467
|
*/
|
|
477
468
|
public static crossPromoteInviteReject<T>(scheduler_id: string, invite_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
478
469
|
return Requests.processRoute(
|
|
@@ -484,10 +475,8 @@ class Scheduler {
|
|
|
484
475
|
}
|
|
485
476
|
|
|
486
477
|
/**
|
|
487
|
-
* End a cross-promote relationship.
|
|
488
|
-
*
|
|
489
|
-
* @param scheduler_id The ID of the promotion schedule
|
|
490
|
-
* @param relationship_id The ID of the relationship
|
|
478
|
+
* End a cross-promote relationship (delete).
|
|
479
|
+
* DELETE /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}
|
|
491
480
|
*/
|
|
492
481
|
public static crossPromoteRelationshipDelete<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
493
482
|
return Requests.processRoute(
|
|
@@ -500,9 +489,7 @@ class Scheduler {
|
|
|
500
489
|
|
|
501
490
|
/**
|
|
502
491
|
* Get which platforms are cross-promoted in an existing relationship.
|
|
503
|
-
*
|
|
504
|
-
* @param scheduler_id The ID of the promotion schedule
|
|
505
|
-
* @param relationship_id The ID of the relationship
|
|
492
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
|
|
506
493
|
*/
|
|
507
494
|
public static crossPromoteRelationshipGetPlatforms<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
508
495
|
return Requests.processRoute(
|
|
@@ -515,10 +502,8 @@ class Scheduler {
|
|
|
515
502
|
|
|
516
503
|
/**
|
|
517
504
|
* Set which platforms are cross-promoted in an existing relationship.
|
|
518
|
-
*
|
|
519
|
-
*
|
|
520
|
-
* @param relationship_id The ID of the relationship
|
|
521
|
-
* @param data An object like { platforms: ['twitter', 'facebook', ...] }
|
|
505
|
+
* PUT /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms
|
|
506
|
+
* data = { platforms: ['twitter','facebook',...]}
|
|
522
507
|
*/
|
|
523
508
|
public static crossPromoteRelationshipSetPlatforms<T>(scheduler_id: string, relationship_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
524
509
|
return Requests.processRoute(
|
|
@@ -530,10 +515,8 @@ class Scheduler {
|
|
|
530
515
|
}
|
|
531
516
|
|
|
532
517
|
/**
|
|
533
|
-
* Get recently cross-promoted
|
|
534
|
-
*
|
|
535
|
-
* @param scheduler_id The ID of the promotion schedule
|
|
536
|
-
* @param relationship_id The ID of the relationship
|
|
518
|
+
* Get recently cross-promoted logs under a relationship.
|
|
519
|
+
* GET /schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts
|
|
537
520
|
*/
|
|
538
521
|
public static crossPromoteRelationshipPosts<T>(scheduler_id: string, relationship_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
539
522
|
return Requests.processRoute(
|
|
@@ -50,44 +50,30 @@ class SchedulerRoute {
|
|
|
50
50
|
url: '/schedulers/{scheduler_id}/crosspromote/relationships',
|
|
51
51
|
method: HTTP_METHODS.GET
|
|
52
52
|
},
|
|
53
|
-
|
|
54
|
-
// 2) Find potential cross-promote partners
|
|
55
53
|
crossPromoteFind: {
|
|
56
54
|
url: '/schedulers/{scheduler_id}/crosspromote/find',
|
|
57
55
|
method: HTTP_METHODS.GET
|
|
58
56
|
},
|
|
59
|
-
|
|
60
|
-
// 3) List invites
|
|
61
57
|
crossPromoteInvitesList: {
|
|
62
58
|
url: '/schedulers/{scheduler_id}/crosspromote/invites',
|
|
63
59
|
method: HTTP_METHODS.GET
|
|
64
60
|
},
|
|
65
|
-
|
|
66
|
-
// 4) Send an invite to cross-promote
|
|
67
61
|
crossPromoteInviteSend: {
|
|
68
62
|
url: '/schedulers/{scheduler_id}/crosspromote/invites',
|
|
69
63
|
method: HTTP_METHODS.POST
|
|
70
64
|
},
|
|
71
|
-
|
|
72
|
-
// 5) Accept an invite
|
|
73
65
|
crossPromoteInviteAccept: {
|
|
74
66
|
url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/accept',
|
|
75
67
|
method: HTTP_METHODS.POST
|
|
76
68
|
},
|
|
77
|
-
|
|
78
|
-
// 6) Reject an invite
|
|
79
69
|
crossPromoteInviteReject: {
|
|
80
70
|
url: '/schedulers/{scheduler_id}/crosspromote/invites/{invite_id}/reject',
|
|
81
71
|
method: HTTP_METHODS.POST
|
|
82
72
|
},
|
|
83
|
-
|
|
84
|
-
// 7) End a cross-promote relationship
|
|
85
73
|
crossPromoteRelationshipDelete: {
|
|
86
74
|
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}',
|
|
87
75
|
method: HTTP_METHODS.DELETE
|
|
88
76
|
},
|
|
89
|
-
|
|
90
|
-
// 8) Get/Set which platforms are cross-promoted in an existing relationship
|
|
91
77
|
crossPromoteRelationshipGetPlatforms: {
|
|
92
78
|
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
|
|
93
79
|
method: HTTP_METHODS.GET
|
|
@@ -96,13 +82,12 @@ class SchedulerRoute {
|
|
|
96
82
|
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/platforms',
|
|
97
83
|
method: HTTP_METHODS.PUT
|
|
98
84
|
},
|
|
99
|
-
|
|
100
|
-
// 9) Get recently cross-promoted posts under a relationship
|
|
101
85
|
crossPromoteRelationshipPosts: {
|
|
102
86
|
url: '/schedulers/{scheduler_id}/crosspromote/relationships/{relationship_id}/posts',
|
|
103
87
|
method: HTTP_METHODS.GET
|
|
104
88
|
},
|
|
105
89
|
|
|
90
|
+
|
|
106
91
|
};
|
|
107
92
|
}
|
|
108
93
|
|