glitch-javascript-sdk 3.2.0 → 3.2.1
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 +8 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Agents.d.ts +5 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/package.json +1 -1
- package/src/api/Agents.ts +8 -0
- package/src/routes/AgentsRoute.ts +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -9171,6 +9171,11 @@ declare class Agents {
|
|
|
9171
9171
|
* Get results and outcome summary for title agents. Returns 402 until trial/subscription is active.
|
|
9172
9172
|
*/
|
|
9173
9173
|
static results<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
9174
|
+
/**
|
|
9175
|
+
* Get this title's agent usage against plan limits (agents used/included, monthly runs, and
|
|
9176
|
+
* AI dollars spent vs the configured monthly AI budget). Powers usage meters and limit warnings.
|
|
9177
|
+
*/
|
|
9178
|
+
static usage<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
9174
9179
|
/**
|
|
9175
9180
|
* Start a Stripe-backed agent trial/subscription after setup.
|
|
9176
9181
|
*/
|
package/package.json
CHANGED
package/src/api/Agents.ts
CHANGED
|
@@ -130,6 +130,14 @@ class Agents {
|
|
|
130
130
|
return Requests.processRoute(AgentsRoute.routes.results, {}, { title_id }, params);
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
/**
|
|
134
|
+
* Get this title's agent usage against plan limits (agents used/included, monthly runs, and
|
|
135
|
+
* AI dollars spent vs the configured monthly AI budget). Powers usage meters and limit warnings.
|
|
136
|
+
*/
|
|
137
|
+
public static usage<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
138
|
+
return Requests.processRoute(AgentsRoute.routes.usage, {}, { title_id }, params);
|
|
139
|
+
}
|
|
140
|
+
|
|
133
141
|
/**
|
|
134
142
|
* Start a Stripe-backed agent trial/subscription after setup.
|
|
135
143
|
*/
|
|
@@ -21,6 +21,7 @@ class AgentsRoute {
|
|
|
21
21
|
answerGuidance: { url: "/agents/titles/{title_id}/guidance/{guidance_id}/answer", method: HTTP_METHODS.POST },
|
|
22
22
|
listMemories: { url: "/agents/titles/{title_id}/memories", method: HTTP_METHODS.GET },
|
|
23
23
|
results: { url: "/agents/titles/{title_id}/results", method: HTTP_METHODS.GET },
|
|
24
|
+
usage: { url: "/agents/titles/{title_id}/usage", method: HTTP_METHODS.GET },
|
|
24
25
|
startTrial: { url: "/agents/titles/{title_id}/subscription/trial", method: HTTP_METHODS.POST },
|
|
25
26
|
};
|
|
26
27
|
}
|