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
package/dist/cjs/index.js
CHANGED
|
@@ -26443,6 +26443,13 @@ var SchedulerRoute = /** @class */ (function () {
|
|
|
26443
26443
|
url: '/schedulers/{scheduler_id}/generateContent',
|
|
26444
26444
|
method: HTTP_METHODS.POST
|
|
26445
26445
|
},
|
|
26446
|
+
getRedditRecommendations: { url: '/schedulers/{scheduler_id}/reddit/recommendations', method: HTTP_METHODS.POST },
|
|
26447
|
+
generateRedditContent: { url: '/schedulers/{scheduler_id}/reddit/generateContent', method: HTTP_METHODS.POST },
|
|
26448
|
+
listDestinations: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations', method: HTTP_METHODS.GET },
|
|
26449
|
+
createDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations', method: HTTP_METHODS.POST },
|
|
26450
|
+
getDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations/{destination_id}', method: HTTP_METHODS.GET },
|
|
26451
|
+
updateDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations/{destination_id}', method: HTTP_METHODS.PUT },
|
|
26452
|
+
deleteDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations/{destination_id}', method: HTTP_METHODS.DELETE },
|
|
26446
26453
|
};
|
|
26447
26454
|
return SchedulerRoute;
|
|
26448
26455
|
}());
|
|
@@ -26987,6 +26994,95 @@ var Scheduler = /** @class */ (function () {
|
|
|
26987
26994
|
Scheduler.listCampaignFundingInstruments = function (scheduler_id, params) {
|
|
26988
26995
|
return Requests.processRoute(SchedulerRoute.routes.getCampaignFundingInstruments, undefined, { scheduler_id: scheduler_id }, params);
|
|
26989
26996
|
};
|
|
26997
|
+
/**
|
|
26998
|
+
* List all destinations for a title update.
|
|
26999
|
+
*
|
|
27000
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/listTitleUpdateDestinations
|
|
27001
|
+
*
|
|
27002
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
27003
|
+
* @param update_id The ID of the title update.
|
|
27004
|
+
* @returns promise
|
|
27005
|
+
*/
|
|
27006
|
+
Scheduler.listDestinations = function (scheduler_id, update_id, params) {
|
|
27007
|
+
return Requests.processRoute(SchedulerRoute.routes.listDestinations, {}, { scheduler_id: scheduler_id, update_id: update_id }, params);
|
|
27008
|
+
};
|
|
27009
|
+
/**
|
|
27010
|
+
* Create a new destination for a title update.
|
|
27011
|
+
*
|
|
27012
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/createTitleUpdateDestination
|
|
27013
|
+
*
|
|
27014
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
27015
|
+
* @param update_id The ID of the title update.
|
|
27016
|
+
* @param data The data for the new destination.
|
|
27017
|
+
* @returns promise
|
|
27018
|
+
*/
|
|
27019
|
+
Scheduler.createDestination = function (scheduler_id, update_id, data, params) {
|
|
27020
|
+
return Requests.processRoute(SchedulerRoute.routes.createDestination, data, { scheduler_id: scheduler_id, update_id: update_id }, params);
|
|
27021
|
+
};
|
|
27022
|
+
/**
|
|
27023
|
+
* Get a specific title update destination.
|
|
27024
|
+
*
|
|
27025
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getTitleUpdateDestination
|
|
27026
|
+
*
|
|
27027
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
27028
|
+
* @param update_id The ID of the title update.
|
|
27029
|
+
* @param destination_id The ID of the destination.
|
|
27030
|
+
* @returns promise
|
|
27031
|
+
*/
|
|
27032
|
+
Scheduler.getDestination = function (scheduler_id, update_id, destination_id, params) {
|
|
27033
|
+
return Requests.processRoute(SchedulerRoute.routes.getDestination, {}, { scheduler_id: scheduler_id, update_id: update_id, destination_id: destination_id }, params);
|
|
27034
|
+
};
|
|
27035
|
+
/**
|
|
27036
|
+
* Update a title update destination.
|
|
27037
|
+
*
|
|
27038
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/updateTitleUpdateDestination
|
|
27039
|
+
*
|
|
27040
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
27041
|
+
* @param update_id The ID of the title update.
|
|
27042
|
+
* @param destination_id The ID of the destination.
|
|
27043
|
+
* @param data The data to update.
|
|
27044
|
+
* @returns promise
|
|
27045
|
+
*/
|
|
27046
|
+
Scheduler.updateDestination = function (scheduler_id, update_id, destination_id, data, params) {
|
|
27047
|
+
return Requests.processRoute(SchedulerRoute.routes.updateDestination, data, { scheduler_id: scheduler_id, update_id: update_id, destination_id: destination_id }, params);
|
|
27048
|
+
};
|
|
27049
|
+
/**
|
|
27050
|
+
* Delete a title update destination.
|
|
27051
|
+
*
|
|
27052
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/deleteTitleUpdateDestination
|
|
27053
|
+
*
|
|
27054
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
27055
|
+
* @param update_id The ID of the title update.
|
|
27056
|
+
* @param destination_id The ID of the destination.
|
|
27057
|
+
* @returns promise
|
|
27058
|
+
*/
|
|
27059
|
+
Scheduler.deleteDestination = function (scheduler_id, update_id, destination_id, params) {
|
|
27060
|
+
return Requests.processRoute(SchedulerRoute.routes.deleteDestination, {}, { scheduler_id: scheduler_id, update_id: update_id, destination_id: destination_id }, params);
|
|
27061
|
+
};
|
|
27062
|
+
/**
|
|
27063
|
+
* Get AI-powered subreddit recommendations for a scheduler.
|
|
27064
|
+
*
|
|
27065
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/getSchedulerRedditRecommendations
|
|
27066
|
+
*
|
|
27067
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
27068
|
+
* @param data The context for the post (title, content, media type).
|
|
27069
|
+
* @returns promise
|
|
27070
|
+
*/
|
|
27071
|
+
Scheduler.getRedditRecommendations = function (scheduler_id, data, params) {
|
|
27072
|
+
return Requests.processRoute(SchedulerRoute.routes.getRedditRecommendations, data, { scheduler_id: scheduler_id }, params);
|
|
27073
|
+
};
|
|
27074
|
+
/**
|
|
27075
|
+
* Generate tailored content for a specific subreddit.
|
|
27076
|
+
*
|
|
27077
|
+
* @see https://api.glitch.fun/api/documentation#/Scheduler/generateRedditContentForSubreddit
|
|
27078
|
+
*
|
|
27079
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
27080
|
+
* @param data The target subreddit and post context.
|
|
27081
|
+
* @returns promise
|
|
27082
|
+
*/
|
|
27083
|
+
Scheduler.generateRedditContent = function (scheduler_id, data, params) {
|
|
27084
|
+
return Requests.processRoute(SchedulerRoute.routes.generateRedditContent, data, { scheduler_id: scheduler_id }, params);
|
|
27085
|
+
};
|
|
26990
27086
|
return Scheduler;
|
|
26991
27087
|
}());
|
|
26992
27088
|
|