glitch-javascript-sdk 3.1.5 → 3.2.0
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 +233 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Agents.d.ts +81 -0
- package/dist/esm/api/RedditSubreddits.d.ts +35 -0
- package/dist/esm/api/Scheduler.d.ts +17 -1
- package/dist/esm/api/index.d.ts +4 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +233 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/AgentsRoute.d.ts +7 -0
- package/dist/esm/routes/RedditSubredditsRoute.d.ts +7 -0
- package/dist/index.d.ts +131 -1
- package/package.json +4 -1
- package/src/api/Agents.ts +141 -0
- package/src/api/RedditSubreddits.ts +53 -0
- package/src/api/Scheduler.ts +23 -1
- package/src/api/index.ts +4 -0
- package/src/index.ts +4 -0
- package/src/routes/AgentsRoute.ts +28 -0
- package/src/routes/RedditSubredditsRoute.ts +14 -0
- package/src/routes/SchedulerRoute.ts +2 -0
package/dist/cjs/index.js
CHANGED
|
@@ -27611,6 +27611,8 @@ var SchedulerRoute = /** @class */ (function () {
|
|
|
27611
27611
|
},
|
|
27612
27612
|
getRedditRecommendations: { url: '/schedulers/{scheduler_id}/reddit/recommendations', method: HTTP_METHODS.POST },
|
|
27613
27613
|
generateRedditContent: { url: '/schedulers/{scheduler_id}/reddit/generateContent', method: HTTP_METHODS.POST },
|
|
27614
|
+
getRedditSubredditMatches: { url: '/schedulers/{scheduler_id}/reddit/subreddit-matches', method: HTTP_METHODS.POST },
|
|
27615
|
+
getRedditSubredditPositioning: { url: '/schedulers/{scheduler_id}/reddit/subreddit-positioning', method: HTTP_METHODS.POST },
|
|
27614
27616
|
listDestinations: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations', method: HTTP_METHODS.GET },
|
|
27615
27617
|
createDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations', method: HTTP_METHODS.POST },
|
|
27616
27618
|
getDestination: { url: '/schedulers/{scheduler_id}/updates/{update_id}/destinations/{destination_id}', method: HTTP_METHODS.GET },
|
|
@@ -28241,7 +28243,7 @@ var Scheduler = /** @class */ (function () {
|
|
|
28241
28243
|
return Requests.processRoute(SchedulerRoute.routes.deleteDestination, {}, { scheduler_id: scheduler_id, update_id: update_id, destination_id: destination_id }, params);
|
|
28242
28244
|
};
|
|
28243
28245
|
/**
|
|
28244
|
-
* Get
|
|
28246
|
+
* Get subreddit recommendations for a scheduler.
|
|
28245
28247
|
*
|
|
28246
28248
|
* @see https://api.glitch.fun/api/documentation#/Scheduler/getSchedulerRedditRecommendations
|
|
28247
28249
|
*
|
|
@@ -28264,6 +28266,27 @@ var Scheduler = /** @class */ (function () {
|
|
|
28264
28266
|
Scheduler.generateRedditContent = function (scheduler_id, data, params) {
|
|
28265
28267
|
return Requests.processRoute(SchedulerRoute.routes.generateRedditContent, data, { scheduler_id: scheduler_id }, params);
|
|
28266
28268
|
};
|
|
28269
|
+
/**
|
|
28270
|
+
* Match the scheduler title to indexed Reddit communities.
|
|
28271
|
+
*
|
|
28272
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
28273
|
+
* @param data Optional post context and filters.
|
|
28274
|
+
* @returns promise
|
|
28275
|
+
*/
|
|
28276
|
+
Scheduler.getRedditSubredditMatches = function (scheduler_id, data, params) {
|
|
28277
|
+
if (data === void 0) { data = {}; }
|
|
28278
|
+
return Requests.processRoute(SchedulerRoute.routes.getRedditSubredditMatches, data, { scheduler_id: scheduler_id }, params);
|
|
28279
|
+
};
|
|
28280
|
+
/**
|
|
28281
|
+
* Position a registered game for a subreddit and optionally prepare Reddit draft content.
|
|
28282
|
+
*
|
|
28283
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
28284
|
+
* @param data The target subreddit and optional post context.
|
|
28285
|
+
* @returns promise
|
|
28286
|
+
*/
|
|
28287
|
+
Scheduler.getRedditSubredditPositioning = function (scheduler_id, data, params) {
|
|
28288
|
+
return Requests.processRoute(SchedulerRoute.routes.getRedditSubredditPositioning, data, { scheduler_id: scheduler_id }, params);
|
|
28289
|
+
};
|
|
28267
28290
|
/**
|
|
28268
28291
|
* Get all posts and comments for a scheduler.
|
|
28269
28292
|
*
|
|
@@ -28369,6 +28392,66 @@ var Scheduler = /** @class */ (function () {
|
|
|
28369
28392
|
return Scheduler;
|
|
28370
28393
|
}());
|
|
28371
28394
|
|
|
28395
|
+
var RedditSubredditsRoute = /** @class */ (function () {
|
|
28396
|
+
function RedditSubredditsRoute() {
|
|
28397
|
+
}
|
|
28398
|
+
RedditSubredditsRoute.routes = {
|
|
28399
|
+
list: { url: '/reddit/subreddits', method: HTTP_METHODS.GET },
|
|
28400
|
+
show: { url: '/reddit/subreddits/{subreddit}', method: HTTP_METHODS.GET },
|
|
28401
|
+
match: { url: '/reddit/subreddits/match', method: HTTP_METHODS.POST },
|
|
28402
|
+
ingest: { url: '/admin/reddit/subreddits/ingest', method: HTTP_METHODS.POST },
|
|
28403
|
+
refresh: { url: '/admin/reddit/subreddits/{subreddit}/refresh', method: HTTP_METHODS.POST },
|
|
28404
|
+
};
|
|
28405
|
+
return RedditSubredditsRoute;
|
|
28406
|
+
}());
|
|
28407
|
+
|
|
28408
|
+
var RedditSubreddits = /** @class */ (function () {
|
|
28409
|
+
function RedditSubreddits() {
|
|
28410
|
+
}
|
|
28411
|
+
/**
|
|
28412
|
+
* Search indexed Reddit communities for game marketing research.
|
|
28413
|
+
*
|
|
28414
|
+
* @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/indexRedditSubreddits
|
|
28415
|
+
*/
|
|
28416
|
+
RedditSubreddits.list = function (params) {
|
|
28417
|
+
return Requests.processRoute(RedditSubredditsRoute.routes.list, undefined, undefined, params);
|
|
28418
|
+
};
|
|
28419
|
+
/**
|
|
28420
|
+
* Get an analyzed subreddit record by display name.
|
|
28421
|
+
*
|
|
28422
|
+
* @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/showRedditSubreddit
|
|
28423
|
+
*/
|
|
28424
|
+
RedditSubreddits.show = function (subreddit, params) {
|
|
28425
|
+
return Requests.processRoute(RedditSubredditsRoute.routes.show, undefined, { subreddit: subreddit }, params);
|
|
28426
|
+
};
|
|
28427
|
+
/**
|
|
28428
|
+
* Match a game concept to relevant Reddit communities.
|
|
28429
|
+
*
|
|
28430
|
+
* @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/matchRedditSubreddits
|
|
28431
|
+
*/
|
|
28432
|
+
RedditSubreddits.match = function (data, params) {
|
|
28433
|
+
return Requests.processRoute(RedditSubredditsRoute.routes.match, data, undefined, params);
|
|
28434
|
+
};
|
|
28435
|
+
/**
|
|
28436
|
+
* Admin-only ingestion of subreddit metadata and rules.
|
|
28437
|
+
*
|
|
28438
|
+
* @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/ingestRedditSubreddits
|
|
28439
|
+
*/
|
|
28440
|
+
RedditSubreddits.ingest = function (data, params) {
|
|
28441
|
+
return Requests.processRoute(RedditSubredditsRoute.routes.ingest, data, undefined, params);
|
|
28442
|
+
};
|
|
28443
|
+
/**
|
|
28444
|
+
* Admin-only refresh for one subreddit.
|
|
28445
|
+
*
|
|
28446
|
+
* @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/refreshRedditSubreddit
|
|
28447
|
+
*/
|
|
28448
|
+
RedditSubreddits.refresh = function (subreddit, data, params) {
|
|
28449
|
+
if (data === void 0) { data = {}; }
|
|
28450
|
+
return Requests.processRoute(RedditSubredditsRoute.routes.refresh, data, { subreddit: subreddit }, params);
|
|
28451
|
+
};
|
|
28452
|
+
return RedditSubreddits;
|
|
28453
|
+
}());
|
|
28454
|
+
|
|
28372
28455
|
// src/routes/FunnelRoutes.tsx
|
|
28373
28456
|
var FunnelRoutes = /** @class */ (function () {
|
|
28374
28457
|
function FunnelRoutes() {
|
|
@@ -30797,6 +30880,153 @@ var ServerOperations = /** @class */ (function () {
|
|
|
30797
30880
|
return ServerOperations;
|
|
30798
30881
|
}());
|
|
30799
30882
|
|
|
30883
|
+
var AgentsRoute = /** @class */ (function () {
|
|
30884
|
+
function AgentsRoute() {
|
|
30885
|
+
}
|
|
30886
|
+
AgentsRoute.routes = {
|
|
30887
|
+
listTitles: { url: "/agents/titles", method: HTTP_METHODS.GET },
|
|
30888
|
+
routeCatalog: { url: "/agents/routes/catalog", method: HTTP_METHODS.GET },
|
|
30889
|
+
workspace: { url: "/agents/titles/{title_id}/workspace", method: HTTP_METHODS.GET },
|
|
30890
|
+
listAgents: { url: "/agents/titles/{title_id}/agents", method: HTTP_METHODS.GET },
|
|
30891
|
+
createAgent: { url: "/agents/titles/{title_id}/agents", method: HTTP_METHODS.POST },
|
|
30892
|
+
viewAgent: { url: "/agents/titles/{title_id}/agents/{agent_id}", method: HTTP_METHODS.GET },
|
|
30893
|
+
updateAgent: { url: "/agents/titles/{title_id}/agents/{agent_id}", method: HTTP_METHODS.PUT },
|
|
30894
|
+
deleteAgent: { url: "/agents/titles/{title_id}/agents/{agent_id}", method: HTTP_METHODS.DELETE },
|
|
30895
|
+
runAgent: { url: "/agents/titles/{title_id}/agents/{agent_id}/run", method: HTTP_METHODS.POST },
|
|
30896
|
+
listRuns: { url: "/agents/titles/{title_id}/runs", method: HTTP_METHODS.GET },
|
|
30897
|
+
listActions: { url: "/agents/titles/{title_id}/actions", method: HTTP_METHODS.GET },
|
|
30898
|
+
approveAction: { url: "/agents/titles/{title_id}/actions/{action_id}/approve", method: HTTP_METHODS.POST },
|
|
30899
|
+
rejectAction: { url: "/agents/titles/{title_id}/actions/{action_id}/reject", method: HTTP_METHODS.POST },
|
|
30900
|
+
executeAction: { url: "/agents/titles/{title_id}/actions/{action_id}/execute", method: HTTP_METHODS.POST },
|
|
30901
|
+
listGuidance: { url: "/agents/titles/{title_id}/guidance", method: HTTP_METHODS.GET },
|
|
30902
|
+
answerGuidance: { url: "/agents/titles/{title_id}/guidance/{guidance_id}/answer", method: HTTP_METHODS.POST },
|
|
30903
|
+
listMemories: { url: "/agents/titles/{title_id}/memories", method: HTTP_METHODS.GET },
|
|
30904
|
+
results: { url: "/agents/titles/{title_id}/results", method: HTTP_METHODS.GET },
|
|
30905
|
+
startTrial: { url: "/agents/titles/{title_id}/subscription/trial", method: HTTP_METHODS.POST },
|
|
30906
|
+
};
|
|
30907
|
+
return AgentsRoute;
|
|
30908
|
+
}());
|
|
30909
|
+
|
|
30910
|
+
var Agents = /** @class */ (function () {
|
|
30911
|
+
function Agents() {
|
|
30912
|
+
}
|
|
30913
|
+
/**
|
|
30914
|
+
* List game titles that can be managed in the Agents section.
|
|
30915
|
+
*/
|
|
30916
|
+
Agents.listTitles = function (params) {
|
|
30917
|
+
return Requests.processRoute(AgentsRoute.routes.listTitles, {}, {}, params);
|
|
30918
|
+
};
|
|
30919
|
+
/**
|
|
30920
|
+
* Return the full Laravel API route catalog agents use for route-aware planning.
|
|
30921
|
+
*/
|
|
30922
|
+
Agents.routeCatalog = function (params) {
|
|
30923
|
+
return Requests.processRoute(AgentsRoute.routes.routeCatalog, {}, {}, params);
|
|
30924
|
+
};
|
|
30925
|
+
/**
|
|
30926
|
+
* Get a title-scoped agent workspace with setup, billing, counts, and route summary.
|
|
30927
|
+
*/
|
|
30928
|
+
Agents.workspace = function (title_id, params) {
|
|
30929
|
+
return Requests.processRoute(AgentsRoute.routes.workspace, {}, { title_id: title_id }, params);
|
|
30930
|
+
};
|
|
30931
|
+
/**
|
|
30932
|
+
* List agents for a title.
|
|
30933
|
+
*/
|
|
30934
|
+
Agents.listAgents = function (title_id, params) {
|
|
30935
|
+
return Requests.processRoute(AgentsRoute.routes.listAgents, {}, { title_id: title_id }, params);
|
|
30936
|
+
};
|
|
30937
|
+
/**
|
|
30938
|
+
* Create an agent before payment. Runs/results remain gated until trial/subscription.
|
|
30939
|
+
*/
|
|
30940
|
+
Agents.createAgent = function (title_id, data, params) {
|
|
30941
|
+
return Requests.processRoute(AgentsRoute.routes.createAgent, data, { title_id: title_id }, params);
|
|
30942
|
+
};
|
|
30943
|
+
/**
|
|
30944
|
+
* View one agent.
|
|
30945
|
+
*/
|
|
30946
|
+
Agents.viewAgent = function (title_id, agent_id, params) {
|
|
30947
|
+
return Requests.processRoute(AgentsRoute.routes.viewAgent, {}, { title_id: title_id, agent_id: agent_id }, params);
|
|
30948
|
+
};
|
|
30949
|
+
/**
|
|
30950
|
+
* Update an agent's setup, policies, and guidance stop rules.
|
|
30951
|
+
*/
|
|
30952
|
+
Agents.updateAgent = function (title_id, agent_id, data, params) {
|
|
30953
|
+
return Requests.processRoute(AgentsRoute.routes.updateAgent, data, { title_id: title_id, agent_id: agent_id }, params);
|
|
30954
|
+
};
|
|
30955
|
+
/**
|
|
30956
|
+
* Archive an agent.
|
|
30957
|
+
*/
|
|
30958
|
+
Agents.deleteAgent = function (title_id, agent_id, params) {
|
|
30959
|
+
return Requests.processRoute(AgentsRoute.routes.deleteAgent, {}, { title_id: title_id, agent_id: agent_id }, params);
|
|
30960
|
+
};
|
|
30961
|
+
/**
|
|
30962
|
+
* Run an agent planning cycle. Returns 402 when trial/subscription is required.
|
|
30963
|
+
*/
|
|
30964
|
+
Agents.runAgent = function (title_id, agent_id, data, params) {
|
|
30965
|
+
return Requests.processRoute(AgentsRoute.routes.runAgent, data, { title_id: title_id, agent_id: agent_id }, params);
|
|
30966
|
+
};
|
|
30967
|
+
/**
|
|
30968
|
+
* List agent runs for a title.
|
|
30969
|
+
*/
|
|
30970
|
+
Agents.listRuns = function (title_id, params) {
|
|
30971
|
+
return Requests.processRoute(AgentsRoute.routes.listRuns, {}, { title_id: title_id }, params);
|
|
30972
|
+
};
|
|
30973
|
+
/**
|
|
30974
|
+
* List agent actions/approval queue for a title.
|
|
30975
|
+
*/
|
|
30976
|
+
Agents.listActions = function (title_id, params) {
|
|
30977
|
+
return Requests.processRoute(AgentsRoute.routes.listActions, {}, { title_id: title_id }, params);
|
|
30978
|
+
};
|
|
30979
|
+
/**
|
|
30980
|
+
* Approve an agent action.
|
|
30981
|
+
*/
|
|
30982
|
+
Agents.approveAction = function (title_id, action_id, data, params) {
|
|
30983
|
+
return Requests.processRoute(AgentsRoute.routes.approveAction, data || {}, { title_id: title_id, action_id: action_id }, params);
|
|
30984
|
+
};
|
|
30985
|
+
/**
|
|
30986
|
+
* Reject an agent action.
|
|
30987
|
+
*/
|
|
30988
|
+
Agents.rejectAction = function (title_id, action_id, data, params) {
|
|
30989
|
+
return Requests.processRoute(AgentsRoute.routes.rejectAction, data || {}, { title_id: title_id, action_id: action_id }, params);
|
|
30990
|
+
};
|
|
30991
|
+
/**
|
|
30992
|
+
* Execute an approved safe action.
|
|
30993
|
+
*/
|
|
30994
|
+
Agents.executeAction = function (title_id, action_id, data, params) {
|
|
30995
|
+
return Requests.processRoute(AgentsRoute.routes.executeAction, data || {}, { title_id: title_id, action_id: action_id }, params);
|
|
30996
|
+
};
|
|
30997
|
+
/**
|
|
30998
|
+
* List guidance requests where agents have stopped for developer direction.
|
|
30999
|
+
*/
|
|
31000
|
+
Agents.listGuidance = function (title_id, params) {
|
|
31001
|
+
return Requests.processRoute(AgentsRoute.routes.listGuidance, {}, { title_id: title_id }, params);
|
|
31002
|
+
};
|
|
31003
|
+
/**
|
|
31004
|
+
* Answer a guidance request and write structured agent memory.
|
|
31005
|
+
*/
|
|
31006
|
+
Agents.answerGuidance = function (title_id, guidance_id, data, params) {
|
|
31007
|
+
return Requests.processRoute(AgentsRoute.routes.answerGuidance, data, { title_id: title_id, guidance_id: guidance_id }, params);
|
|
31008
|
+
};
|
|
31009
|
+
/**
|
|
31010
|
+
* List structured agent memories for a title.
|
|
31011
|
+
*/
|
|
31012
|
+
Agents.listMemories = function (title_id, params) {
|
|
31013
|
+
return Requests.processRoute(AgentsRoute.routes.listMemories, {}, { title_id: title_id }, params);
|
|
31014
|
+
};
|
|
31015
|
+
/**
|
|
31016
|
+
* Get results and outcome summary for title agents. Returns 402 until trial/subscription is active.
|
|
31017
|
+
*/
|
|
31018
|
+
Agents.results = function (title_id, params) {
|
|
31019
|
+
return Requests.processRoute(AgentsRoute.routes.results, {}, { title_id: title_id }, params);
|
|
31020
|
+
};
|
|
31021
|
+
/**
|
|
31022
|
+
* Start a Stripe-backed agent trial/subscription after setup.
|
|
31023
|
+
*/
|
|
31024
|
+
Agents.startTrial = function (title_id, data, params) {
|
|
31025
|
+
return Requests.processRoute(AgentsRoute.routes.startTrial, data, { title_id: title_id }, params);
|
|
31026
|
+
};
|
|
31027
|
+
return Agents;
|
|
31028
|
+
}());
|
|
31029
|
+
|
|
30800
31030
|
var Parser = /** @class */ (function () {
|
|
30801
31031
|
function Parser() {
|
|
30802
31032
|
}
|
|
@@ -31325,6 +31555,7 @@ var Glitch = /** @class */ (function () {
|
|
|
31325
31555
|
PlayTests: PlayTests,
|
|
31326
31556
|
Media: Media,
|
|
31327
31557
|
Scheduler: Scheduler,
|
|
31558
|
+
RedditSubreddits: RedditSubreddits,
|
|
31328
31559
|
Funnel: Funnel,
|
|
31329
31560
|
SocialStats: SocialStats,
|
|
31330
31561
|
WebsiteAnalytics: WebsiteAnalytics,
|
|
@@ -31339,6 +31570,7 @@ var Glitch = /** @class */ (function () {
|
|
|
31339
31570
|
Crm: Crm,
|
|
31340
31571
|
Multiplayer: Multiplayer,
|
|
31341
31572
|
ServerOperations: ServerOperations,
|
|
31573
|
+
Agents: Agents,
|
|
31342
31574
|
};
|
|
31343
31575
|
Glitch.util = {
|
|
31344
31576
|
Requests: Requests,
|