glitch-javascript-sdk 3.2.13 → 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.
@@ -0,0 +1,7 @@
1
+ import Route from "./interface";
2
+ declare class AdminReportsRoute {
3
+ static routes: {
4
+ [key: string]: Route;
5
+ };
6
+ }
7
+ export default AdminReportsRoute;
package/dist/index.d.ts CHANGED
@@ -9224,6 +9224,14 @@ declare class Agents {
9224
9224
  * List game titles that can be managed in the Agents section.
9225
9225
  */
9226
9226
  static listTitles<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
9227
+ /**
9228
+ * List title-agent subscriptions linked to titles in a community.
9229
+ */
9230
+ static listCommunitySubscriptions<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
9231
+ /**
9232
+ * Cancel a title-agent subscription linked to a community title.
9233
+ */
9234
+ static cancelCommunitySubscription<T>(community_id: string, stripe_subscription_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
9227
9235
  /**
9228
9236
  * Return the full Laravel API route catalog agents use for route-aware planning.
9229
9237
  */
@@ -9816,6 +9824,14 @@ declare class PrDirectory {
9816
9824
  static queueVerification<T = PrQueueVerificationResponse>(data?: PrQueueVerificationRequest, params?: Record<string, any>): AxiosPromise<Response<T>>;
9817
9825
  }
9818
9826
 
9827
+ declare class AdminReports {
9828
+ /**
9829
+ * Returns aggregate site-admin reporting for user growth, churn, acquisition,
9830
+ * engagement, and user-generated revenue.
9831
+ */
9832
+ static usersRevenue<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
9833
+ }
9834
+
9819
9835
  interface Route {
9820
9836
  url: string;
9821
9837
  method: string;
@@ -10181,6 +10197,7 @@ declare class Glitch {
10181
10197
  Agents: typeof Agents;
10182
10198
  Mcp: typeof Mcp;
10183
10199
  PrDirectory: typeof PrDirectory;
10200
+ AdminReports: typeof AdminReports;
10184
10201
  };
10185
10202
  static util: {
10186
10203
  Requests: typeof Requests;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "3.2.13",
3
+ "version": "3.2.14",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -0,0 +1,16 @@
1
+ import AdminReportsRoute from "../routes/AdminReportsRoute";
2
+ import Requests from "../util/Requests";
3
+ import Response from "../util/Response";
4
+ import { AxiosPromise } from "axios";
5
+
6
+ class AdminReports {
7
+ /**
8
+ * Returns aggregate site-admin reporting for user growth, churn, acquisition,
9
+ * engagement, and user-generated revenue.
10
+ */
11
+ public static usersRevenue<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
12
+ return Requests.processRoute(AdminReportsRoute.routes.usersRevenue, undefined, undefined, params);
13
+ }
14
+ }
15
+
16
+ export default AdminReports;
package/src/api/Agents.ts CHANGED
@@ -23,6 +23,20 @@ class Agents {
23
23
  return Requests.processRoute(AgentsRoute.routes.listTitles, {}, {}, params);
24
24
  }
25
25
 
26
+ /**
27
+ * List title-agent subscriptions linked to titles in a community.
28
+ */
29
+ public static listCommunitySubscriptions<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
30
+ return Requests.processRoute(AgentsRoute.routes.listCommunitySubscriptions, {}, { community_id }, params);
31
+ }
32
+
33
+ /**
34
+ * Cancel a title-agent subscription linked to a community title.
35
+ */
36
+ public static cancelCommunitySubscription<T>(community_id: string, stripe_subscription_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
37
+ return Requests.processRoute(AgentsRoute.routes.cancelCommunitySubscription, {}, { community_id, stripe_subscription_id }, params);
38
+ }
39
+
26
40
  /**
27
41
  * Return the full Laravel API route catalog agents use for route-aware planning.
28
42
  */
package/src/api/index.ts CHANGED
@@ -48,6 +48,7 @@ import ServerOperations from "./ServerOperations";
48
48
  import Agents from "./Agents";
49
49
  import Mcp from "./Mcp";
50
50
  import PrDirectory from "./PrDirectory";
51
+ import AdminReports from "./AdminReports";
51
52
 
52
53
  export {Ads};
53
54
  export {AccessKeys};
@@ -99,3 +100,4 @@ export {ServerOperations};
99
100
  export {Agents};
100
101
  export {Mcp};
101
102
  export {PrDirectory};
103
+ export {AdminReports};
package/src/index.ts CHANGED
@@ -52,6 +52,7 @@ import {ServerOperations} from './api';
52
52
  import {Agents} from './api';
53
53
  import {Mcp} from './api';
54
54
  import {PrDirectory} from './api';
55
+ import {AdminReports} from './api';
55
56
 
56
57
  import Requests from "./util/Requests";
57
58
  import Parser from "./util/Parser";
@@ -133,6 +134,7 @@ class Glitch {
133
134
  Agents : Agents,
134
135
  Mcp : Mcp,
135
136
  PrDirectory : PrDirectory,
137
+ AdminReports : AdminReports,
136
138
  }
137
139
 
138
140
  public static util = {
@@ -0,0 +1,13 @@
1
+ import Route from "./interface";
2
+ import HTTP_METHODS from "../constants/HttpMethods";
3
+
4
+ class AdminReportsRoute {
5
+ public static routes: { [key: string]: Route } = {
6
+ usersRevenue: {
7
+ url: '/admin/reports/users-revenue',
8
+ method: HTTP_METHODS.GET
9
+ },
10
+ };
11
+ }
12
+
13
+ export default AdminReportsRoute;
@@ -4,6 +4,8 @@ import HTTP_METHODS from "../constants/HttpMethods";
4
4
  class AgentsRoute {
5
5
  public static routes: { [key: string]: Route } = {
6
6
  listTitles: { url: "/agents/titles", method: HTTP_METHODS.GET },
7
+ listCommunitySubscriptions: { url: "/agents/communities/{community_id}/subscriptions", method: HTTP_METHODS.GET },
8
+ cancelCommunitySubscription: { url: "/agents/communities/{community_id}/subscriptions/{stripe_subscription_id}", method: HTTP_METHODS.DELETE },
7
9
  routeCatalog: { url: "/agents/routes/catalog", method: HTTP_METHODS.GET },
8
10
  workspace: { url: "/agents/titles/{title_id}/workspace", method: HTTP_METHODS.GET },
9
11
  listAgents: { url: "/agents/titles/{title_id}/agents", method: HTTP_METHODS.GET },