glitch-javascript-sdk 2.0.1 → 2.0.2
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 +96 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Scheduler.d.ts +75 -0
- package/dist/esm/index.js +96 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +75 -0
- package/package.json +1 -1
- package/src/api/Scheduler.ts +96 -0
- package/src/routes/SchedulerRoute.ts +7 -0
|
@@ -421,5 +421,80 @@ declare class Scheduler {
|
|
|
421
421
|
* @returns A response object with data (funding instruments)
|
|
422
422
|
*/
|
|
423
423
|
static listCampaignFundingInstruments<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
424
|
+
/**
|
|
425
|
+
* List all destinations for a title update.
|
|
426
|
+
*
|
|
427
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/listTitleUpdateDestinations
|
|
428
|
+
*
|
|
429
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
430
|
+
* @param update_id The ID of the title update.
|
|
431
|
+
* @returns promise
|
|
432
|
+
*/
|
|
433
|
+
static listDestinations<T>(scheduler_id: string, update_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
434
|
+
/**
|
|
435
|
+
* Create a new destination for a title update.
|
|
436
|
+
*
|
|
437
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/createTitleUpdateDestination
|
|
438
|
+
*
|
|
439
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
440
|
+
* @param update_id The ID of the title update.
|
|
441
|
+
* @param data The data for the new destination.
|
|
442
|
+
* @returns promise
|
|
443
|
+
*/
|
|
444
|
+
static createDestination<T>(scheduler_id: string, update_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
445
|
+
/**
|
|
446
|
+
* Get a specific title update destination.
|
|
447
|
+
*
|
|
448
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getTitleUpdateDestination
|
|
449
|
+
*
|
|
450
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
451
|
+
* @param update_id The ID of the title update.
|
|
452
|
+
* @param destination_id The ID of the destination.
|
|
453
|
+
* @returns promise
|
|
454
|
+
*/
|
|
455
|
+
static getDestination<T>(scheduler_id: string, update_id: string, destination_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
456
|
+
/**
|
|
457
|
+
* Update a title update destination.
|
|
458
|
+
*
|
|
459
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/updateTitleUpdateDestination
|
|
460
|
+
*
|
|
461
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
462
|
+
* @param update_id The ID of the title update.
|
|
463
|
+
* @param destination_id The ID of the destination.
|
|
464
|
+
* @param data The data to update.
|
|
465
|
+
* @returns promise
|
|
466
|
+
*/
|
|
467
|
+
static updateDestination<T>(scheduler_id: string, update_id: string, destination_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
468
|
+
/**
|
|
469
|
+
* Delete a title update destination.
|
|
470
|
+
*
|
|
471
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/deleteTitleUpdateDestination
|
|
472
|
+
*
|
|
473
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
474
|
+
* @param update_id The ID of the title update.
|
|
475
|
+
* @param destination_id The ID of the destination.
|
|
476
|
+
* @returns promise
|
|
477
|
+
*/
|
|
478
|
+
static deleteDestination<T>(scheduler_id: string, update_id: string, destination_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
479
|
+
/**
|
|
480
|
+
* Get AI-powered subreddit recommendations for a scheduler.
|
|
481
|
+
*
|
|
482
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getSchedulerRedditRecommendations
|
|
483
|
+
*
|
|
484
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
485
|
+
* @param data The context for the post (title, content, media type).
|
|
486
|
+
* @returns promise
|
|
487
|
+
*/
|
|
488
|
+
static getRedditRecommendations<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
489
|
+
/**
|
|
490
|
+
* Generate tailored content for a specific subreddit.
|
|
491
|
+
*
|
|
492
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/generateRedditContentForSubreddit
|
|
493
|
+
*
|
|
494
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
495
|
+
* @param data The target subreddit and post context.
|
|
496
|
+
* @returns promise
|
|
497
|
+
*/
|
|
498
|
+
static generateRedditContent<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
424
499
|
}
|
|
425
500
|
export default Scheduler;
|
package/dist/esm/index.js
CHANGED
|
@@ -13259,6 +13259,13 @@ var SchedulerRoute = /** @class */ (function () {
|
|
|
13259
13259
|
url: '/schedulers/{scheduler_id}/generateContent',
|
|
13260
13260
|
method: HTTP_METHODS.POST
|
|
13261
13261
|
},
|
|
13262
|
+
getRedditRecommendations: { url: '/schedulers/{scheduler_id}/reddit/recommendations', method: HTTP_METHODS.POST },
|
|
13263
|
+
generateRedditContent: { url: '/schedulers/{scheduler_id}/reddit/generateContent', method: HTTP_METHODS.POST },
|
|
13264
|
+
listDestinations: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations', method: HTTP_METHODS.GET },
|
|
13265
|
+
createDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations', method: HTTP_METHODS.POST },
|
|
13266
|
+
getDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations/{destination_id}', method: HTTP_METHODS.GET },
|
|
13267
|
+
updateDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations/{destination_id}', method: HTTP_METHODS.PUT },
|
|
13268
|
+
deleteDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations/{destination_id}', method: HTTP_METHODS.DELETE },
|
|
13262
13269
|
};
|
|
13263
13270
|
return SchedulerRoute;
|
|
13264
13271
|
}());
|
|
@@ -13803,6 +13810,95 @@ var Scheduler = /** @class */ (function () {
|
|
|
13803
13810
|
Scheduler.listCampaignFundingInstruments = function (scheduler_id, params) {
|
|
13804
13811
|
return Requests.processRoute(SchedulerRoute.routes.getCampaignFundingInstruments, undefined, { scheduler_id: scheduler_id }, params);
|
|
13805
13812
|
};
|
|
13813
|
+
/**
|
|
13814
|
+
* List all destinations for a title update.
|
|
13815
|
+
*
|
|
13816
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/listTitleUpdateDestinations
|
|
13817
|
+
*
|
|
13818
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
13819
|
+
* @param update_id The ID of the title update.
|
|
13820
|
+
* @returns promise
|
|
13821
|
+
*/
|
|
13822
|
+
Scheduler.listDestinations = function (scheduler_id, update_id, params) {
|
|
13823
|
+
return Requests.processRoute(SchedulerRoute.routes.listDestinations, {}, { scheduler_id: scheduler_id, update_id: update_id }, params);
|
|
13824
|
+
};
|
|
13825
|
+
/**
|
|
13826
|
+
* Create a new destination for a title update.
|
|
13827
|
+
*
|
|
13828
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/createTitleUpdateDestination
|
|
13829
|
+
*
|
|
13830
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
13831
|
+
* @param update_id The ID of the title update.
|
|
13832
|
+
* @param data The data for the new destination.
|
|
13833
|
+
* @returns promise
|
|
13834
|
+
*/
|
|
13835
|
+
Scheduler.createDestination = function (scheduler_id, update_id, data, params) {
|
|
13836
|
+
return Requests.processRoute(SchedulerRoute.routes.createDestination, data, { scheduler_id: scheduler_id, update_id: update_id }, params);
|
|
13837
|
+
};
|
|
13838
|
+
/**
|
|
13839
|
+
* Get a specific title update destination.
|
|
13840
|
+
*
|
|
13841
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getTitleUpdateDestination
|
|
13842
|
+
*
|
|
13843
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
13844
|
+
* @param update_id The ID of the title update.
|
|
13845
|
+
* @param destination_id The ID of the destination.
|
|
13846
|
+
* @returns promise
|
|
13847
|
+
*/
|
|
13848
|
+
Scheduler.getDestination = function (scheduler_id, update_id, destination_id, params) {
|
|
13849
|
+
return Requests.processRoute(SchedulerRoute.routes.getDestination, {}, { scheduler_id: scheduler_id, update_id: update_id, destination_id: destination_id }, params);
|
|
13850
|
+
};
|
|
13851
|
+
/**
|
|
13852
|
+
* Update a title update destination.
|
|
13853
|
+
*
|
|
13854
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/updateTitleUpdateDestination
|
|
13855
|
+
*
|
|
13856
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
13857
|
+
* @param update_id The ID of the title update.
|
|
13858
|
+
* @param destination_id The ID of the destination.
|
|
13859
|
+
* @param data The data to update.
|
|
13860
|
+
* @returns promise
|
|
13861
|
+
*/
|
|
13862
|
+
Scheduler.updateDestination = function (scheduler_id, update_id, destination_id, data, params) {
|
|
13863
|
+
return Requests.processRoute(SchedulerRoute.routes.updateDestination, data, { scheduler_id: scheduler_id, update_id: update_id, destination_id: destination_id }, params);
|
|
13864
|
+
};
|
|
13865
|
+
/**
|
|
13866
|
+
* Delete a title update destination.
|
|
13867
|
+
*
|
|
13868
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/deleteTitleUpdateDestination
|
|
13869
|
+
*
|
|
13870
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
13871
|
+
* @param update_id The ID of the title update.
|
|
13872
|
+
* @param destination_id The ID of the destination.
|
|
13873
|
+
* @returns promise
|
|
13874
|
+
*/
|
|
13875
|
+
Scheduler.deleteDestination = function (scheduler_id, update_id, destination_id, params) {
|
|
13876
|
+
return Requests.processRoute(SchedulerRoute.routes.deleteDestination, {}, { scheduler_id: scheduler_id, update_id: update_id, destination_id: destination_id }, params);
|
|
13877
|
+
};
|
|
13878
|
+
/**
|
|
13879
|
+
* Get AI-powered subreddit recommendations for a scheduler.
|
|
13880
|
+
*
|
|
13881
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getSchedulerRedditRecommendations
|
|
13882
|
+
*
|
|
13883
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
13884
|
+
* @param data The context for the post (title, content, media type).
|
|
13885
|
+
* @returns promise
|
|
13886
|
+
*/
|
|
13887
|
+
Scheduler.getRedditRecommendations = function (scheduler_id, data, params) {
|
|
13888
|
+
return Requests.processRoute(SchedulerRoute.routes.getRedditRecommendations, data, { scheduler_id: scheduler_id }, params);
|
|
13889
|
+
};
|
|
13890
|
+
/**
|
|
13891
|
+
* Generate tailored content for a specific subreddit.
|
|
13892
|
+
*
|
|
13893
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/generateRedditContentForSubreddit
|
|
13894
|
+
*
|
|
13895
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
13896
|
+
* @param data The target subreddit and post context.
|
|
13897
|
+
* @returns promise
|
|
13898
|
+
*/
|
|
13899
|
+
Scheduler.generateRedditContent = function (scheduler_id, data, params) {
|
|
13900
|
+
return Requests.processRoute(SchedulerRoute.routes.generateRedditContent, data, { scheduler_id: scheduler_id }, params);
|
|
13901
|
+
};
|
|
13806
13902
|
return Scheduler;
|
|
13807
13903
|
}());
|
|
13808
13904
|
|