glitch-javascript-sdk 3.2.12 → 3.2.14

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 CHANGED
@@ -31083,6 +31083,8 @@ var AgentsRoute = /** @class */ (function () {
31083
31083
  }
31084
31084
  AgentsRoute.routes = {
31085
31085
  listTitles: { url: "/agents/titles", method: HTTP_METHODS.GET },
31086
+ listCommunitySubscriptions: { url: "/agents/communities/{community_id}/subscriptions", method: HTTP_METHODS.GET },
31087
+ cancelCommunitySubscription: { url: "/agents/communities/{community_id}/subscriptions/{stripe_subscription_id}", method: HTTP_METHODS.DELETE },
31086
31088
  routeCatalog: { url: "/agents/routes/catalog", method: HTTP_METHODS.GET },
31087
31089
  workspace: { url: "/agents/titles/{title_id}/workspace", method: HTTP_METHODS.GET },
31088
31090
  listAgents: { url: "/agents/titles/{title_id}/agents", method: HTTP_METHODS.GET },
@@ -31128,6 +31130,18 @@ var Agents = /** @class */ (function () {
31128
31130
  Agents.listTitles = function (params) {
31129
31131
  return Requests.processRoute(AgentsRoute.routes.listTitles, {}, {}, params);
31130
31132
  };
31133
+ /**
31134
+ * List title-agent subscriptions linked to titles in a community.
31135
+ */
31136
+ Agents.listCommunitySubscriptions = function (community_id, params) {
31137
+ return Requests.processRoute(AgentsRoute.routes.listCommunitySubscriptions, {}, { community_id: community_id }, params);
31138
+ };
31139
+ /**
31140
+ * Cancel a title-agent subscription linked to a community title.
31141
+ */
31142
+ Agents.cancelCommunitySubscription = function (community_id, stripe_subscription_id, params) {
31143
+ return Requests.processRoute(AgentsRoute.routes.cancelCommunitySubscription, {}, { community_id: community_id, stripe_subscription_id: stripe_subscription_id }, params);
31144
+ };
31131
31145
  /**
31132
31146
  * Return the full Laravel API route catalog agents use for route-aware planning.
31133
31147
  */
@@ -31147,7 +31161,7 @@ var Agents = /** @class */ (function () {
31147
31161
  return Requests.processRoute(AgentsRoute.routes.listAgents, {}, { title_id: title_id }, params);
31148
31162
  };
31149
31163
  /**
31150
- * Create an agent before payment. Runs/results remain gated until trial/subscription.
31164
+ * Create an agent before payment. Runs/results remain gated until subscription or prepaid credits.
31151
31165
  */
31152
31166
  Agents.createAgent = function (title_id, data, params) {
31153
31167
  return Requests.processRoute(AgentsRoute.routes.createAgent, data, { title_id: title_id }, params);
@@ -31171,7 +31185,7 @@ var Agents = /** @class */ (function () {
31171
31185
  return Requests.processRoute(AgentsRoute.routes.deleteAgent, {}, { title_id: title_id, agent_id: agent_id }, params);
31172
31186
  };
31173
31187
  /**
31174
- * Run an agent planning cycle. Returns 402 when trial/subscription is required.
31188
+ * Run an agent planning cycle. Returns 402 when subscription or prepaid credits are required.
31175
31189
  */
31176
31190
  Agents.runAgent = function (title_id, agent_id, data, params) {
31177
31191
  return Requests.processRoute(AgentsRoute.routes.runAgent, data, { title_id: title_id, agent_id: agent_id }, params);
@@ -31277,7 +31291,7 @@ var Agents = /** @class */ (function () {
31277
31291
  return Requests.processRoute(AgentsRoute.routes.listMemories, {}, { title_id: title_id }, params);
31278
31292
  };
31279
31293
  /**
31280
- * Get results and outcome summary for title agents. Returns 402 until trial/subscription is active.
31294
+ * Get results and outcome summary for title agents. Returns 402 until subscription or prepaid credits are active.
31281
31295
  */
31282
31296
  Agents.results = function (title_id, params) {
31283
31297
  return Requests.processRoute(AgentsRoute.routes.results, {}, { title_id: title_id }, params);
@@ -31303,7 +31317,7 @@ var Agents = /** @class */ (function () {
31303
31317
  return Requests.processRoute(AgentsRoute.routes.purchaseCredits, data, { title_id: title_id }, params);
31304
31318
  };
31305
31319
  /**
31306
- * Start a Stripe-backed agent trial/subscription after setup.
31320
+ * Start a Stripe-backed agent subscription after setup.
31307
31321
  */
31308
31322
  Agents.startTrial = function (title_id, data, params) {
31309
31323
  return Requests.processRoute(AgentsRoute.routes.startTrial, data, { title_id: title_id }, params);
@@ -31596,6 +31610,31 @@ var PrDirectory = /** @class */ (function () {
31596
31610
  return PrDirectory;
31597
31611
  }());
31598
31612
 
31613
+ var AdminReportsRoute = /** @class */ (function () {
31614
+ function AdminReportsRoute() {
31615
+ }
31616
+ AdminReportsRoute.routes = {
31617
+ usersRevenue: {
31618
+ url: '/admin/reports/users-revenue',
31619
+ method: HTTP_METHODS.GET
31620
+ },
31621
+ };
31622
+ return AdminReportsRoute;
31623
+ }());
31624
+
31625
+ var AdminReports = /** @class */ (function () {
31626
+ function AdminReports() {
31627
+ }
31628
+ /**
31629
+ * Returns aggregate site-admin reporting for user growth, churn, acquisition,
31630
+ * engagement, and user-generated revenue.
31631
+ */
31632
+ AdminReports.usersRevenue = function (params) {
31633
+ return Requests.processRoute(AdminReportsRoute.routes.usersRevenue, undefined, undefined, params);
31634
+ };
31635
+ return AdminReports;
31636
+ }());
31637
+
31599
31638
  var Parser = /** @class */ (function () {
31600
31639
  function Parser() {
31601
31640
  }
@@ -32142,6 +32181,7 @@ var Glitch = /** @class */ (function () {
32142
32181
  Agents: Agents,
32143
32182
  Mcp: Mcp,
32144
32183
  PrDirectory: PrDirectory,
32184
+ AdminReports: AdminReports,
32145
32185
  };
32146
32186
  Glitch.util = {
32147
32187
  Requests: Requests,