glitch-javascript-sdk 3.2.0 → 3.2.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 +37 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Agents.d.ts +22 -0
- package/dist/esm/index.js +37 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +22 -0
- package/package.json +1 -1
- package/src/api/Agents.ts +37 -0
- package/src/routes/AgentsRoute.ts +5 -0
package/dist/cjs/index.js
CHANGED
|
@@ -30902,7 +30902,12 @@ var AgentsRoute = /** @class */ (function () {
|
|
|
30902
30902
|
answerGuidance: { url: "/agents/titles/{title_id}/guidance/{guidance_id}/answer", method: HTTP_METHODS.POST },
|
|
30903
30903
|
listMemories: { url: "/agents/titles/{title_id}/memories", method: HTTP_METHODS.GET },
|
|
30904
30904
|
results: { url: "/agents/titles/{title_id}/results", method: HTTP_METHODS.GET },
|
|
30905
|
+
usage: { url: "/agents/titles/{title_id}/usage", method: HTTP_METHODS.GET },
|
|
30906
|
+
credits: { url: "/agents/titles/{title_id}/credits", method: HTTP_METHODS.GET },
|
|
30907
|
+
purchaseCredits: { url: "/agents/titles/{title_id}/credits/purchase", method: HTTP_METHODS.POST },
|
|
30905
30908
|
startTrial: { url: "/agents/titles/{title_id}/subscription/trial", method: HTTP_METHODS.POST },
|
|
30909
|
+
agencyOverview: { url: "/agents/agency/overview", method: HTTP_METHODS.GET },
|
|
30910
|
+
agencyInbox: { url: "/agents/agency/inbox", method: HTTP_METHODS.GET },
|
|
30906
30911
|
};
|
|
30907
30912
|
return AgentsRoute;
|
|
30908
30913
|
}());
|
|
@@ -31018,12 +31023,44 @@ var Agents = /** @class */ (function () {
|
|
|
31018
31023
|
Agents.results = function (title_id, params) {
|
|
31019
31024
|
return Requests.processRoute(AgentsRoute.routes.results, {}, { title_id: title_id }, params);
|
|
31020
31025
|
};
|
|
31026
|
+
/**
|
|
31027
|
+
* Get this title's agent usage against plan limits (agents used/included, monthly runs, and
|
|
31028
|
+
* AI dollars spent vs the configured monthly AI budget). Powers usage meters and limit warnings.
|
|
31029
|
+
*/
|
|
31030
|
+
Agents.usage = function (title_id, params) {
|
|
31031
|
+
return Requests.processRoute(AgentsRoute.routes.usage, {}, { title_id: title_id }, params);
|
|
31032
|
+
};
|
|
31033
|
+
/**
|
|
31034
|
+
* Get the prepaid agent credit balance and ledger (Pay-As-You-Go plan).
|
|
31035
|
+
*/
|
|
31036
|
+
Agents.credits = function (title_id, params) {
|
|
31037
|
+
return Requests.processRoute(AgentsRoute.routes.credits, {}, { title_id: title_id }, params);
|
|
31038
|
+
};
|
|
31039
|
+
/**
|
|
31040
|
+
* Buy prepaid agent credits (Pay-As-You-Go). Charges the card up front; the agent draws down
|
|
31041
|
+
* credits per run and stops when they run out. data: { paymentMethod, amount_usd }.
|
|
31042
|
+
*/
|
|
31043
|
+
Agents.purchaseCredits = function (title_id, data, params) {
|
|
31044
|
+
return Requests.processRoute(AgentsRoute.routes.purchaseCredits, data, { title_id: title_id }, params);
|
|
31045
|
+
};
|
|
31021
31046
|
/**
|
|
31022
31047
|
* Start a Stripe-backed agent trial/subscription after setup.
|
|
31023
31048
|
*/
|
|
31024
31049
|
Agents.startTrial = function (title_id, data, params) {
|
|
31025
31050
|
return Requests.processRoute(AgentsRoute.routes.startTrial, data, { title_id: title_id }, params);
|
|
31026
31051
|
};
|
|
31052
|
+
/**
|
|
31053
|
+
* Cross-title agency cockpit: per-title agent status, billing/credits, and portfolio totals.
|
|
31054
|
+
*/
|
|
31055
|
+
Agents.agencyOverview = function (params) {
|
|
31056
|
+
return Requests.processRoute(AgentsRoute.routes.agencyOverview, {}, {}, params);
|
|
31057
|
+
};
|
|
31058
|
+
/**
|
|
31059
|
+
* Unified cross-title "needs you" inbox (open guidance + pending approvals across all titles).
|
|
31060
|
+
*/
|
|
31061
|
+
Agents.agencyInbox = function (params) {
|
|
31062
|
+
return Requests.processRoute(AgentsRoute.routes.agencyInbox, {}, {}, params);
|
|
31063
|
+
};
|
|
31027
31064
|
return Agents;
|
|
31028
31065
|
}());
|
|
31029
31066
|
|