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/esm/api/Agents.d.ts
CHANGED
|
@@ -78,9 +78,26 @@ declare class Agents {
|
|
|
78
78
|
* AI dollars spent vs the configured monthly AI budget). Powers usage meters and limit warnings.
|
|
79
79
|
*/
|
|
80
80
|
static usage<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
81
|
+
/**
|
|
82
|
+
* Get the prepaid agent credit balance and ledger (Pay-As-You-Go plan).
|
|
83
|
+
*/
|
|
84
|
+
static credits<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
85
|
+
/**
|
|
86
|
+
* Buy prepaid agent credits (Pay-As-You-Go). Charges the card up front; the agent draws down
|
|
87
|
+
* credits per run and stops when they run out. data: { paymentMethod, amount_usd }.
|
|
88
|
+
*/
|
|
89
|
+
static purchaseCredits<T>(title_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
81
90
|
/**
|
|
82
91
|
* Start a Stripe-backed agent trial/subscription after setup.
|
|
83
92
|
*/
|
|
84
93
|
static startTrial<T>(title_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
94
|
+
/**
|
|
95
|
+
* Cross-title agency cockpit: per-title agent status, billing/credits, and portfolio totals.
|
|
96
|
+
*/
|
|
97
|
+
static agencyOverview<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
98
|
+
/**
|
|
99
|
+
* Unified cross-title "needs you" inbox (open guidance + pending approvals across all titles).
|
|
100
|
+
*/
|
|
101
|
+
static agencyInbox<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
85
102
|
}
|
|
86
103
|
export default Agents;
|
package/dist/esm/index.js
CHANGED
|
@@ -18905,7 +18905,11 @@ var AgentsRoute = /** @class */ (function () {
|
|
|
18905
18905
|
listMemories: { url: "/agents/titles/{title_id}/memories", method: HTTP_METHODS.GET },
|
|
18906
18906
|
results: { url: "/agents/titles/{title_id}/results", method: HTTP_METHODS.GET },
|
|
18907
18907
|
usage: { url: "/agents/titles/{title_id}/usage", method: HTTP_METHODS.GET },
|
|
18908
|
+
credits: { url: "/agents/titles/{title_id}/credits", method: HTTP_METHODS.GET },
|
|
18909
|
+
purchaseCredits: { url: "/agents/titles/{title_id}/credits/purchase", method: HTTP_METHODS.POST },
|
|
18908
18910
|
startTrial: { url: "/agents/titles/{title_id}/subscription/trial", method: HTTP_METHODS.POST },
|
|
18911
|
+
agencyOverview: { url: "/agents/agency/overview", method: HTTP_METHODS.GET },
|
|
18912
|
+
agencyInbox: { url: "/agents/agency/inbox", method: HTTP_METHODS.GET },
|
|
18909
18913
|
};
|
|
18910
18914
|
return AgentsRoute;
|
|
18911
18915
|
}());
|
|
@@ -19028,12 +19032,37 @@ var Agents = /** @class */ (function () {
|
|
|
19028
19032
|
Agents.usage = function (title_id, params) {
|
|
19029
19033
|
return Requests.processRoute(AgentsRoute.routes.usage, {}, { title_id: title_id }, params);
|
|
19030
19034
|
};
|
|
19035
|
+
/**
|
|
19036
|
+
* Get the prepaid agent credit balance and ledger (Pay-As-You-Go plan).
|
|
19037
|
+
*/
|
|
19038
|
+
Agents.credits = function (title_id, params) {
|
|
19039
|
+
return Requests.processRoute(AgentsRoute.routes.credits, {}, { title_id: title_id }, params);
|
|
19040
|
+
};
|
|
19041
|
+
/**
|
|
19042
|
+
* Buy prepaid agent credits (Pay-As-You-Go). Charges the card up front; the agent draws down
|
|
19043
|
+
* credits per run and stops when they run out. data: { paymentMethod, amount_usd }.
|
|
19044
|
+
*/
|
|
19045
|
+
Agents.purchaseCredits = function (title_id, data, params) {
|
|
19046
|
+
return Requests.processRoute(AgentsRoute.routes.purchaseCredits, data, { title_id: title_id }, params);
|
|
19047
|
+
};
|
|
19031
19048
|
/**
|
|
19032
19049
|
* Start a Stripe-backed agent trial/subscription after setup.
|
|
19033
19050
|
*/
|
|
19034
19051
|
Agents.startTrial = function (title_id, data, params) {
|
|
19035
19052
|
return Requests.processRoute(AgentsRoute.routes.startTrial, data, { title_id: title_id }, params);
|
|
19036
19053
|
};
|
|
19054
|
+
/**
|
|
19055
|
+
* Cross-title agency cockpit: per-title agent status, billing/credits, and portfolio totals.
|
|
19056
|
+
*/
|
|
19057
|
+
Agents.agencyOverview = function (params) {
|
|
19058
|
+
return Requests.processRoute(AgentsRoute.routes.agencyOverview, {}, {}, params);
|
|
19059
|
+
};
|
|
19060
|
+
/**
|
|
19061
|
+
* Unified cross-title "needs you" inbox (open guidance + pending approvals across all titles).
|
|
19062
|
+
*/
|
|
19063
|
+
Agents.agencyInbox = function (params) {
|
|
19064
|
+
return Requests.processRoute(AgentsRoute.routes.agencyInbox, {}, {}, params);
|
|
19065
|
+
};
|
|
19037
19066
|
return Agents;
|
|
19038
19067
|
}());
|
|
19039
19068
|
|