glitch-javascript-sdk 3.2.1 → 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 +29 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Agents.d.ts +17 -0
- package/dist/esm/index.js +29 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +17 -0
- package/package.json +1 -1
- package/src/api/Agents.ts +29 -0
- package/src/routes/AgentsRoute.ts +4 -0
package/dist/cjs/index.js
CHANGED
|
@@ -30903,7 +30903,11 @@ var AgentsRoute = /** @class */ (function () {
|
|
|
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
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 },
|
|
30906
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 },
|
|
30907
30911
|
};
|
|
30908
30912
|
return AgentsRoute;
|
|
30909
30913
|
}());
|
|
@@ -31026,12 +31030,37 @@ var Agents = /** @class */ (function () {
|
|
|
31026
31030
|
Agents.usage = function (title_id, params) {
|
|
31027
31031
|
return Requests.processRoute(AgentsRoute.routes.usage, {}, { title_id: title_id }, params);
|
|
31028
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
|
+
};
|
|
31029
31046
|
/**
|
|
31030
31047
|
* Start a Stripe-backed agent trial/subscription after setup.
|
|
31031
31048
|
*/
|
|
31032
31049
|
Agents.startTrial = function (title_id, data, params) {
|
|
31033
31050
|
return Requests.processRoute(AgentsRoute.routes.startTrial, data, { title_id: title_id }, params);
|
|
31034
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
|
+
};
|
|
31035
31064
|
return Agents;
|
|
31036
31065
|
}());
|
|
31037
31066
|
|