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/index.d.ts CHANGED
@@ -7207,6 +7207,12 @@ declare class RedditSubreddits {
7207
7207
  * @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/matchRedditSubreddits
7208
7208
  */
7209
7209
  static match<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
7210
+ /**
7211
+ * Match one of the authenticated user's administered titles to Reddit communities.
7212
+ *
7213
+ * @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/titleRedditSubredditMatches
7214
+ */
7215
+ static matchTitle<T>(title_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
7210
7216
  /**
7211
7217
  * Admin-only ingestion of subreddit metadata and rules.
7212
7218
  *
@@ -9155,6 +9161,11 @@ declare class Agents {
9155
9161
  * List real-time user-visible events for an agent run.
9156
9162
  */
9157
9163
  static listRunEvents<T>(title_id: string, run_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
9164
+ /**
9165
+ * Mark a queued or running agent run as being watched live so the UI can stream the loop
9166
+ * and the backend can avoid sending delayed background summaries to active viewers.
9167
+ */
9168
+ static heartbeatRun<T>(title_id: string, run_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
9158
9169
  /**
9159
9170
  * Request cancellation for a queued or running agent run.
9160
9171
  */
@@ -9213,6 +9224,14 @@ declare class Agents {
9213
9224
  * Start a Stripe-backed agent trial/subscription after setup.
9214
9225
  */
9215
9226
  static startTrial<T>(title_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
9227
+ /**
9228
+ * List social/ad schedulers. Useful when agent setup needs to attach to an existing workflow.
9229
+ */
9230
+ static listSchedulers<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
9231
+ /**
9232
+ * Create a scheduler inline from an agent setup flow.
9233
+ */
9234
+ static createScheduler<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
9216
9235
  /**
9217
9236
  * Cross-title agency cockpit: per-title agent status, billing/credits, and portfolio totals.
9218
9237
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "3.2.3",
3
+ "version": "3.2.5",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/api/Agents.ts CHANGED
@@ -120,6 +120,14 @@ class Agents {
120
120
  return Requests.processRoute(AgentsRoute.routes.listRunEvents, {}, { title_id, run_id }, params);
121
121
  }
122
122
 
123
+ /**
124
+ * Mark a queued or running agent run as being watched live so the UI can stream the loop
125
+ * and the backend can avoid sending delayed background summaries to active viewers.
126
+ */
127
+ public static heartbeatRun<T>(title_id: string, run_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
128
+ return Requests.processRoute(AgentsRoute.routes.heartbeatRun, data || {}, { title_id, run_id }, params);
129
+ }
130
+
123
131
  /**
124
132
  * Request cancellation for a queued or running agent run.
125
133
  */
@@ -220,6 +228,20 @@ class Agents {
220
228
  return Requests.processRoute(AgentsRoute.routes.startTrial, data, { title_id }, params);
221
229
  }
222
230
 
231
+ /**
232
+ * List social/ad schedulers. Useful when agent setup needs to attach to an existing workflow.
233
+ */
234
+ public static listSchedulers<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
235
+ return Requests.processRoute(AgentsRoute.routes.listSchedulers, {}, {}, params);
236
+ }
237
+
238
+ /**
239
+ * Create a scheduler inline from an agent setup flow.
240
+ */
241
+ public static createScheduler<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
242
+ return Requests.processRoute(AgentsRoute.routes.createScheduler, data || {}, {}, params);
243
+ }
244
+
223
245
  /**
224
246
  * Cross-title agency cockpit: per-title agent status, billing/credits, and portfolio totals.
225
247
  */
@@ -31,6 +31,15 @@ class RedditSubreddits {
31
31
  return Requests.processRoute(RedditSubredditsRoute.routes.match, data, undefined, params);
32
32
  }
33
33
 
34
+ /**
35
+ * Match one of the authenticated user's administered titles to Reddit communities.
36
+ *
37
+ * @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/titleRedditSubredditMatches
38
+ */
39
+ public static matchTitle<T>(title_id: string, data: object = {}, params?: Record<string, any>): AxiosPromise<Response<T>> {
40
+ return Requests.processRoute(RedditSubredditsRoute.routes.matchTitle, data, { title_id }, params);
41
+ }
42
+
34
43
  /**
35
44
  * Admin-only ingestion of subreddit metadata and rules.
36
45
  *
@@ -16,6 +16,7 @@ class AgentsRoute {
16
16
  listRuns: { url: "/agents/titles/{title_id}/runs", method: HTTP_METHODS.GET },
17
17
  viewRun: { url: "/agents/titles/{title_id}/runs/{run_id}", method: HTTP_METHODS.GET },
18
18
  listRunEvents: { url: "/agents/titles/{title_id}/runs/{run_id}/events", method: HTTP_METHODS.GET },
19
+ heartbeatRun: { url: "/agents/titles/{title_id}/runs/{run_id}/heartbeat", method: HTTP_METHODS.POST },
19
20
  cancelRun: { url: "/agents/titles/{title_id}/runs/{run_id}/cancel", method: HTTP_METHODS.POST },
20
21
  interjectRun: { url: "/agents/titles/{title_id}/runs/{run_id}/interject", method: HTTP_METHODS.POST },
21
22
  listActions: { url: "/agents/titles/{title_id}/actions", method: HTTP_METHODS.GET },
@@ -30,6 +31,8 @@ class AgentsRoute {
30
31
  credits: { url: "/agents/titles/{title_id}/credits", method: HTTP_METHODS.GET },
31
32
  purchaseCredits: { url: "/agents/titles/{title_id}/credits/purchase", method: HTTP_METHODS.POST },
32
33
  startTrial: { url: "/agents/titles/{title_id}/subscription/trial", method: HTTP_METHODS.POST },
34
+ listSchedulers: { url: "/schedulers", method: HTTP_METHODS.GET },
35
+ createScheduler: { url: "/schedulers", method: HTTP_METHODS.POST },
33
36
  agencyOverview: { url: "/agents/agency/overview", method: HTTP_METHODS.GET },
34
37
  agencyInbox: { url: "/agents/agency/inbox", method: HTTP_METHODS.GET },
35
38
  };
@@ -6,6 +6,7 @@ class RedditSubredditsRoute {
6
6
  list: { url: '/reddit/subreddits', method: HTTP_METHODS.GET },
7
7
  show: { url: '/reddit/subreddits/{subreddit}', method: HTTP_METHODS.GET },
8
8
  match: { url: '/reddit/subreddits/match', method: HTTP_METHODS.POST },
9
+ matchTitle: { url: '/titles/{title_id}/reddit/subreddit-matches', method: HTTP_METHODS.POST },
9
10
  ingest: { url: '/admin/reddit/subreddits/ingest', method: HTTP_METHODS.POST },
10
11
  refresh: { url: '/admin/reddit/subreddits/{subreddit}/refresh', method: HTTP_METHODS.POST },
11
12
  };