glitch-javascript-sdk 3.2.3 → 3.2.5
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 +32 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Agents.d.ts +13 -0
- package/dist/esm/api/RedditSubreddits.d.ts +6 -0
- package/dist/esm/index.js +32 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +19 -0
- package/package.json +1 -1
- package/src/api/Agents.ts +22 -0
- package/src/api/RedditSubreddits.ts +9 -0
- package/src/routes/AgentsRoute.ts +3 -0
- package/src/routes/RedditSubredditsRoute.ts +1 -0
package/dist/esm/api/Agents.d.ts
CHANGED
|
@@ -57,6 +57,11 @@ declare class Agents {
|
|
|
57
57
|
* List real-time user-visible events for an agent run.
|
|
58
58
|
*/
|
|
59
59
|
static listRunEvents<T>(title_id: string, run_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
60
|
+
/**
|
|
61
|
+
* Mark a queued or running agent run as being watched live so the UI can stream the loop
|
|
62
|
+
* and the backend can avoid sending delayed background summaries to active viewers.
|
|
63
|
+
*/
|
|
64
|
+
static heartbeatRun<T>(title_id: string, run_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
60
65
|
/**
|
|
61
66
|
* Request cancellation for a queued or running agent run.
|
|
62
67
|
*/
|
|
@@ -115,6 +120,14 @@ declare class Agents {
|
|
|
115
120
|
* Start a Stripe-backed agent trial/subscription after setup.
|
|
116
121
|
*/
|
|
117
122
|
static startTrial<T>(title_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
123
|
+
/**
|
|
124
|
+
* List social/ad schedulers. Useful when agent setup needs to attach to an existing workflow.
|
|
125
|
+
*/
|
|
126
|
+
static listSchedulers<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
127
|
+
/**
|
|
128
|
+
* Create a scheduler inline from an agent setup flow.
|
|
129
|
+
*/
|
|
130
|
+
static createScheduler<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
118
131
|
/**
|
|
119
132
|
* Cross-title agency cockpit: per-title agent status, billing/credits, and portfolio totals.
|
|
120
133
|
*/
|
|
@@ -19,6 +19,12 @@ declare class RedditSubreddits {
|
|
|
19
19
|
* @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/matchRedditSubreddits
|
|
20
20
|
*/
|
|
21
21
|
static match<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
22
|
+
/**
|
|
23
|
+
* Match one of the authenticated user's administered titles to Reddit communities.
|
|
24
|
+
*
|
|
25
|
+
* @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/titleRedditSubredditMatches
|
|
26
|
+
*/
|
|
27
|
+
static matchTitle<T>(title_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
22
28
|
/**
|
|
23
29
|
* Admin-only ingestion of subreddit metadata and rules.
|
|
24
30
|
*
|
package/dist/esm/index.js
CHANGED
|
@@ -16401,6 +16401,7 @@ var RedditSubredditsRoute = /** @class */ (function () {
|
|
|
16401
16401
|
list: { url: '/reddit/subreddits', method: HTTP_METHODS.GET },
|
|
16402
16402
|
show: { url: '/reddit/subreddits/{subreddit}', method: HTTP_METHODS.GET },
|
|
16403
16403
|
match: { url: '/reddit/subreddits/match', method: HTTP_METHODS.POST },
|
|
16404
|
+
matchTitle: { url: '/titles/{title_id}/reddit/subreddit-matches', method: HTTP_METHODS.POST },
|
|
16404
16405
|
ingest: { url: '/admin/reddit/subreddits/ingest', method: HTTP_METHODS.POST },
|
|
16405
16406
|
refresh: { url: '/admin/reddit/subreddits/{subreddit}/refresh', method: HTTP_METHODS.POST },
|
|
16406
16407
|
};
|
|
@@ -16434,6 +16435,15 @@ var RedditSubreddits = /** @class */ (function () {
|
|
|
16434
16435
|
RedditSubreddits.match = function (data, params) {
|
|
16435
16436
|
return Requests.processRoute(RedditSubredditsRoute.routes.match, data, undefined, params);
|
|
16436
16437
|
};
|
|
16438
|
+
/**
|
|
16439
|
+
* Match one of the authenticated user's administered titles to Reddit communities.
|
|
16440
|
+
*
|
|
16441
|
+
* @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/titleRedditSubredditMatches
|
|
16442
|
+
*/
|
|
16443
|
+
RedditSubreddits.matchTitle = function (title_id, data, params) {
|
|
16444
|
+
if (data === void 0) { data = {}; }
|
|
16445
|
+
return Requests.processRoute(RedditSubredditsRoute.routes.matchTitle, data, { title_id: title_id }, params);
|
|
16446
|
+
};
|
|
16437
16447
|
/**
|
|
16438
16448
|
* Admin-only ingestion of subreddit metadata and rules.
|
|
16439
16449
|
*
|
|
@@ -18899,6 +18909,7 @@ var AgentsRoute = /** @class */ (function () {
|
|
|
18899
18909
|
listRuns: { url: "/agents/titles/{title_id}/runs", method: HTTP_METHODS.GET },
|
|
18900
18910
|
viewRun: { url: "/agents/titles/{title_id}/runs/{run_id}", method: HTTP_METHODS.GET },
|
|
18901
18911
|
listRunEvents: { url: "/agents/titles/{title_id}/runs/{run_id}/events", method: HTTP_METHODS.GET },
|
|
18912
|
+
heartbeatRun: { url: "/agents/titles/{title_id}/runs/{run_id}/heartbeat", method: HTTP_METHODS.POST },
|
|
18902
18913
|
cancelRun: { url: "/agents/titles/{title_id}/runs/{run_id}/cancel", method: HTTP_METHODS.POST },
|
|
18903
18914
|
interjectRun: { url: "/agents/titles/{title_id}/runs/{run_id}/interject", method: HTTP_METHODS.POST },
|
|
18904
18915
|
listActions: { url: "/agents/titles/{title_id}/actions", method: HTTP_METHODS.GET },
|
|
@@ -18913,6 +18924,8 @@ var AgentsRoute = /** @class */ (function () {
|
|
|
18913
18924
|
credits: { url: "/agents/titles/{title_id}/credits", method: HTTP_METHODS.GET },
|
|
18914
18925
|
purchaseCredits: { url: "/agents/titles/{title_id}/credits/purchase", method: HTTP_METHODS.POST },
|
|
18915
18926
|
startTrial: { url: "/agents/titles/{title_id}/subscription/trial", method: HTTP_METHODS.POST },
|
|
18927
|
+
listSchedulers: { url: "/schedulers", method: HTTP_METHODS.GET },
|
|
18928
|
+
createScheduler: { url: "/schedulers", method: HTTP_METHODS.POST },
|
|
18916
18929
|
agencyOverview: { url: "/agents/agency/overview", method: HTTP_METHODS.GET },
|
|
18917
18930
|
agencyInbox: { url: "/agents/agency/inbox", method: HTTP_METHODS.GET },
|
|
18918
18931
|
};
|
|
@@ -19009,6 +19022,13 @@ var Agents = /** @class */ (function () {
|
|
|
19009
19022
|
Agents.listRunEvents = function (title_id, run_id, params) {
|
|
19010
19023
|
return Requests.processRoute(AgentsRoute.routes.listRunEvents, {}, { title_id: title_id, run_id: run_id }, params);
|
|
19011
19024
|
};
|
|
19025
|
+
/**
|
|
19026
|
+
* Mark a queued or running agent run as being watched live so the UI can stream the loop
|
|
19027
|
+
* and the backend can avoid sending delayed background summaries to active viewers.
|
|
19028
|
+
*/
|
|
19029
|
+
Agents.heartbeatRun = function (title_id, run_id, data, params) {
|
|
19030
|
+
return Requests.processRoute(AgentsRoute.routes.heartbeatRun, data || {}, { title_id: title_id, run_id: run_id }, params);
|
|
19031
|
+
};
|
|
19012
19032
|
/**
|
|
19013
19033
|
* Request cancellation for a queued or running agent run.
|
|
19014
19034
|
*/
|
|
@@ -19095,6 +19115,18 @@ var Agents = /** @class */ (function () {
|
|
|
19095
19115
|
Agents.startTrial = function (title_id, data, params) {
|
|
19096
19116
|
return Requests.processRoute(AgentsRoute.routes.startTrial, data, { title_id: title_id }, params);
|
|
19097
19117
|
};
|
|
19118
|
+
/**
|
|
19119
|
+
* List social/ad schedulers. Useful when agent setup needs to attach to an existing workflow.
|
|
19120
|
+
*/
|
|
19121
|
+
Agents.listSchedulers = function (params) {
|
|
19122
|
+
return Requests.processRoute(AgentsRoute.routes.listSchedulers, {}, {}, params);
|
|
19123
|
+
};
|
|
19124
|
+
/**
|
|
19125
|
+
* Create a scheduler inline from an agent setup flow.
|
|
19126
|
+
*/
|
|
19127
|
+
Agents.createScheduler = function (data, params) {
|
|
19128
|
+
return Requests.processRoute(AgentsRoute.routes.createScheduler, data || {}, {}, params);
|
|
19129
|
+
};
|
|
19098
19130
|
/**
|
|
19099
19131
|
* Cross-title agency cockpit: per-title agent status, billing/credits, and portfolio totals.
|
|
19100
19132
|
*/
|