glitch-javascript-sdk 3.2.13 → 3.2.15
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 +91 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/AdminReports.d.ts +10 -0
- package/dist/esm/api/Agents.d.ts +8 -0
- package/dist/esm/api/Feedback.d.ts +24 -0
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +91 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/AdminReportsRoute.d.ts +7 -0
- package/dist/index.d.ts +41 -0
- package/package.json +1 -1
- package/src/api/AdminReports.ts +16 -0
- package/src/api/Agents.ts +14 -0
- package/src/api/Feedback.ts +52 -1
- package/src/api/index.ts +2 -0
- package/src/index.ts +2 -0
- package/src/routes/AdminReportsRoute.ts +13 -0
- package/src/routes/AgentsRoute.ts +2 -0
- package/src/routes/FeedbackRoute.ts +10 -1
package/dist/index.d.ts
CHANGED
|
@@ -5780,6 +5780,30 @@ declare class Feedback {
|
|
|
5780
5780
|
* @returns promise
|
|
5781
5781
|
*/
|
|
5782
5782
|
static viewFeedback<T>(feedback_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5783
|
+
/**
|
|
5784
|
+
* List support tickets owned by the logged-in user.
|
|
5785
|
+
*/
|
|
5786
|
+
static listSupportTickets<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5787
|
+
/**
|
|
5788
|
+
* Create a support ticket for the logged-in user.
|
|
5789
|
+
*/
|
|
5790
|
+
static createSupportTicket<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5791
|
+
/**
|
|
5792
|
+
* View a support ticket owned by the logged-in user.
|
|
5793
|
+
*/
|
|
5794
|
+
static viewSupportTicket<T>(feedback_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5795
|
+
/**
|
|
5796
|
+
* Reply to a support ticket owned by the logged-in user.
|
|
5797
|
+
*/
|
|
5798
|
+
static replySupportTicket<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5799
|
+
/**
|
|
5800
|
+
* Admin support inbox covering support tickets and feedback.
|
|
5801
|
+
*/
|
|
5802
|
+
static adminListFeedback<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5803
|
+
static adminViewFeedback<T>(feedback_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5804
|
+
static adminUpdateFeedback<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5805
|
+
static adminReplyFeedback<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5806
|
+
static adminRewardFeedback<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
5783
5807
|
/**
|
|
5784
5808
|
* Submit feedback.
|
|
5785
5809
|
*
|
|
@@ -9224,6 +9248,14 @@ declare class Agents {
|
|
|
9224
9248
|
* List game titles that can be managed in the Agents section.
|
|
9225
9249
|
*/
|
|
9226
9250
|
static listTitles<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
9251
|
+
/**
|
|
9252
|
+
* List title-agent subscriptions linked to titles in a community.
|
|
9253
|
+
*/
|
|
9254
|
+
static listCommunitySubscriptions<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
9255
|
+
/**
|
|
9256
|
+
* Cancel a title-agent subscription linked to a community title.
|
|
9257
|
+
*/
|
|
9258
|
+
static cancelCommunitySubscription<T>(community_id: string, stripe_subscription_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
9227
9259
|
/**
|
|
9228
9260
|
* Return the full Laravel API route catalog agents use for route-aware planning.
|
|
9229
9261
|
*/
|
|
@@ -9816,6 +9848,14 @@ declare class PrDirectory {
|
|
|
9816
9848
|
static queueVerification<T = PrQueueVerificationResponse>(data?: PrQueueVerificationRequest, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
9817
9849
|
}
|
|
9818
9850
|
|
|
9851
|
+
declare class AdminReports {
|
|
9852
|
+
/**
|
|
9853
|
+
* Returns aggregate site-admin reporting for user growth, churn, acquisition,
|
|
9854
|
+
* engagement, and user-generated revenue.
|
|
9855
|
+
*/
|
|
9856
|
+
static usersRevenue<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
9857
|
+
}
|
|
9858
|
+
|
|
9819
9859
|
interface Route {
|
|
9820
9860
|
url: string;
|
|
9821
9861
|
method: string;
|
|
@@ -10181,6 +10221,7 @@ declare class Glitch {
|
|
|
10181
10221
|
Agents: typeof Agents;
|
|
10182
10222
|
Mcp: typeof Mcp;
|
|
10183
10223
|
PrDirectory: typeof PrDirectory;
|
|
10224
|
+
AdminReports: typeof AdminReports;
|
|
10184
10225
|
};
|
|
10185
10226
|
static util: {
|
|
10186
10227
|
Requests: typeof Requests;
|
package/package.json
CHANGED
|
@@ -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/Feedback.ts
CHANGED
|
@@ -27,6 +27,57 @@ class Feedback {
|
|
|
27
27
|
return Requests.processRoute(FeedbackRoute.routes.viewFeedback, undefined, { feedback_id: feedback_id }, params);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
/**
|
|
31
|
+
* List support tickets owned by the logged-in user.
|
|
32
|
+
*/
|
|
33
|
+
public static listSupportTickets<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
34
|
+
return Requests.processRoute(FeedbackRoute.routes.listSupportTickets, undefined, undefined, params);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Create a support ticket for the logged-in user.
|
|
39
|
+
*/
|
|
40
|
+
public static createSupportTicket<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
41
|
+
return Requests.processRoute(FeedbackRoute.routes.createSupportTicket, data, {}, params);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* View a support ticket owned by the logged-in user.
|
|
46
|
+
*/
|
|
47
|
+
public static viewSupportTicket<T>(feedback_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
48
|
+
return Requests.processRoute(FeedbackRoute.routes.viewSupportTicket, undefined, { feedback_id: feedback_id }, params);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Reply to a support ticket owned by the logged-in user.
|
|
53
|
+
*/
|
|
54
|
+
public static replySupportTicket<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
55
|
+
return Requests.processRoute(FeedbackRoute.routes.replySupportTicket, data, { feedback_id: feedback_id }, params);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Admin support inbox covering support tickets and feedback.
|
|
60
|
+
*/
|
|
61
|
+
public static adminListFeedback<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
62
|
+
return Requests.processRoute(FeedbackRoute.routes.adminListFeedback, undefined, undefined, params);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
public static adminViewFeedback<T>(feedback_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
66
|
+
return Requests.processRoute(FeedbackRoute.routes.adminViewFeedback, undefined, { feedback_id: feedback_id }, params);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
public static adminUpdateFeedback<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
70
|
+
return Requests.processRoute(FeedbackRoute.routes.adminUpdateFeedback, data, { feedback_id: feedback_id }, params);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
public static adminReplyFeedback<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
74
|
+
return Requests.processRoute(FeedbackRoute.routes.adminReplyFeedback, data, { feedback_id: feedback_id }, params);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
public static adminRewardFeedback<T>(feedback_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
78
|
+
return Requests.processRoute(FeedbackRoute.routes.adminRewardFeedback, data, { feedback_id: feedback_id }, params);
|
|
79
|
+
}
|
|
80
|
+
|
|
30
81
|
/**
|
|
31
82
|
* Submit feedback.
|
|
32
83
|
*
|
|
@@ -77,4 +128,4 @@ class Feedback {
|
|
|
77
128
|
|
|
78
129
|
}
|
|
79
130
|
|
|
80
|
-
export default Feedback;
|
|
131
|
+
export default Feedback;
|
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 },
|
|
@@ -7,8 +7,17 @@ class FeedbackRoute {
|
|
|
7
7
|
listFeedback: { url: '/feedback', method: HTTP_METHODS.GET },
|
|
8
8
|
sendFeedback: { url: '/feedback', method: HTTP_METHODS.POST },
|
|
9
9
|
viewFeedback: { url: '/feedback/{feedback_id}', method: HTTP_METHODS.GET },
|
|
10
|
+
listSupportTickets: { url: '/support/tickets', method: HTTP_METHODS.GET },
|
|
11
|
+
createSupportTicket: { url: '/support/tickets', method: HTTP_METHODS.POST },
|
|
12
|
+
viewSupportTicket: { url: '/support/tickets/{feedback_id}', method: HTTP_METHODS.GET },
|
|
13
|
+
replySupportTicket: { url: '/support/tickets/{feedback_id}/replies', method: HTTP_METHODS.POST },
|
|
14
|
+
adminListFeedback: { url: '/admin/support/feedback', method: HTTP_METHODS.GET },
|
|
15
|
+
adminViewFeedback: { url: '/admin/support/feedback/{feedback_id}', method: HTTP_METHODS.GET },
|
|
16
|
+
adminUpdateFeedback: { url: '/admin/support/feedback/{feedback_id}', method: HTTP_METHODS.PUT },
|
|
17
|
+
adminReplyFeedback: { url: '/admin/support/feedback/{feedback_id}/reply', method: HTTP_METHODS.POST },
|
|
18
|
+
adminRewardFeedback: { url: '/admin/support/feedback/{feedback_id}/reward', method: HTTP_METHODS.POST },
|
|
10
19
|
};
|
|
11
20
|
|
|
12
21
|
}
|
|
13
22
|
|
|
14
|
-
export default FeedbackRoute;
|
|
23
|
+
export default FeedbackRoute;
|