glitch-javascript-sdk 3.2.9 → 3.2.12
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 +310 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Agents.d.ts +4 -0
- package/dist/esm/api/Mcp.d.ts +73 -0
- package/dist/esm/api/PrDirectory.d.ts +386 -0
- package/dist/esm/api/Users.d.ts +8 -0
- package/dist/esm/api/index.d.ts +4 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +310 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models/user.d.ts +10 -0
- package/dist/esm/routes/McpRoute.d.ts +15 -0
- package/dist/esm/routes/PrDirectoryRoutes.d.ts +15 -0
- package/dist/esm/util/Requests.d.ts +7 -0
- package/dist/index.d.ts +476 -0
- package/package.json +1 -1
- package/src/api/Agents.ts +7 -0
- package/src/api/Mcp.ts +150 -0
- package/src/api/PrDirectory.ts +440 -0
- package/src/api/Users.ts +13 -1
- package/src/api/index.ts +4 -0
- package/src/index.ts +4 -0
- package/src/models/user.ts +10 -1
- package/src/routes/AgentsRoute.ts +1 -0
- package/src/routes/McpRoute.ts +38 -0
- package/src/routes/PrDirectoryRoutes.ts +25 -0
- package/src/routes/UserRoutes.ts +2 -1
- package/src/util/Requests.ts +29 -0
package/dist/cjs/index.js
CHANGED
|
@@ -17324,6 +17324,35 @@ var Requests = /** @class */ (function () {
|
|
|
17324
17324
|
Requests.setCommunityID = function (community_id) {
|
|
17325
17325
|
Requests.community_id = community_id;
|
|
17326
17326
|
};
|
|
17327
|
+
/**
|
|
17328
|
+
* Build an absolute API URL using the currently configured base URL.
|
|
17329
|
+
*
|
|
17330
|
+
* This is useful for browser primitives such as EventSource that need a URL
|
|
17331
|
+
* string instead of an Axios request wrapper.
|
|
17332
|
+
*/
|
|
17333
|
+
Requests.buildUrl = function (url, params) {
|
|
17334
|
+
var path = url;
|
|
17335
|
+
if (params && Object.keys(params).length > 0) {
|
|
17336
|
+
var queryString = Object.entries(params)
|
|
17337
|
+
.filter(function (_a) {
|
|
17338
|
+
var value = _a[1];
|
|
17339
|
+
return value !== undefined && value !== null && value !== '';
|
|
17340
|
+
})
|
|
17341
|
+
.map(function (_a) {
|
|
17342
|
+
var key = _a[0], value = _a[1];
|
|
17343
|
+
if (Array.isArray(value)) {
|
|
17344
|
+
return value.map(function (item) { return "".concat(key, "[]=").concat(encodeURIComponent(item)); }).join('&');
|
|
17345
|
+
}
|
|
17346
|
+
return "".concat(key, "=").concat(encodeURIComponent(value));
|
|
17347
|
+
})
|
|
17348
|
+
.filter(Boolean)
|
|
17349
|
+
.join('&');
|
|
17350
|
+
if (queryString) {
|
|
17351
|
+
path = "".concat(path).concat(path.includes('?') ? '&' : '?').concat(queryString);
|
|
17352
|
+
}
|
|
17353
|
+
}
|
|
17354
|
+
return Requests.baseUrl.replace(/\/+$/, '') + '/' + path.replace(/^\/+/, '');
|
|
17355
|
+
};
|
|
17327
17356
|
Requests.request = function (method, url, data, fileData) {
|
|
17328
17357
|
var headers = {
|
|
17329
17358
|
'Content-Type': 'application/json',
|
|
@@ -20829,6 +20858,7 @@ var UserRoutes = /** @class */ (function () {
|
|
|
20829
20858
|
clearTwitchAuth: { url: '/users/clearTwitchAuth', method: HTTP_METHODS.DELETE },
|
|
20830
20859
|
clearFacebookAuth: { url: '/users/clearFacebookAuth', method: HTTP_METHODS.DELETE },
|
|
20831
20860
|
clearGoogleAuth: { url: '/users/clearGoogleAuth', method: HTTP_METHODS.DELETE },
|
|
20861
|
+
clearGmailAuth: { url: '/users/clearGmailAuth', method: HTTP_METHODS.DELETE },
|
|
20832
20862
|
clearStripeAuth: { url: '/users/clearStripeAuth', method: HTTP_METHODS.DELETE },
|
|
20833
20863
|
clearTikTokAuth: { url: '/users/clearTikTokAuth', method: HTTP_METHODS.DELETE },
|
|
20834
20864
|
clearYoutubeAuth: { url: '/users/clearYoutubeAuth', method: HTTP_METHODS.DELETE },
|
|
@@ -21094,6 +21124,16 @@ var Users = /** @class */ (function () {
|
|
|
21094
21124
|
Users.clearGoogleAuth = function () {
|
|
21095
21125
|
return Requests.processRoute(UserRoutes.routes.clearGoogleAuth, {});
|
|
21096
21126
|
};
|
|
21127
|
+
/**
|
|
21128
|
+
* Clear Gmail Workspace authentication information from the current user.
|
|
21129
|
+
*
|
|
21130
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/clearGmailAuth
|
|
21131
|
+
*
|
|
21132
|
+
* @returns promise
|
|
21133
|
+
*/
|
|
21134
|
+
Users.clearGmailAuth = function () {
|
|
21135
|
+
return Requests.processRoute(UserRoutes.routes.clearGmailAuth, {});
|
|
21136
|
+
};
|
|
21097
21137
|
/**
|
|
21098
21138
|
* Clear Stripe authentication information from the current user.
|
|
21099
21139
|
*
|
|
@@ -31064,6 +31104,7 @@ var AgentsRoute = /** @class */ (function () {
|
|
|
31064
31104
|
executeAction: { url: "/agents/titles/{title_id}/actions/{action_id}/execute", method: HTTP_METHODS.POST },
|
|
31065
31105
|
listGuidance: { url: "/agents/titles/{title_id}/guidance", method: HTTP_METHODS.GET },
|
|
31066
31106
|
answerGuidance: { url: "/agents/titles/{title_id}/guidance/{guidance_id}/answer", method: HTTP_METHODS.POST },
|
|
31107
|
+
rewriteAgentDraft: { url: "/agents/titles/{title_id}/drafts/rewrite", method: HTTP_METHODS.POST },
|
|
31067
31108
|
listMemories: { url: "/agents/titles/{title_id}/memories", method: HTTP_METHODS.GET },
|
|
31068
31109
|
results: { url: "/agents/titles/{title_id}/results", method: HTTP_METHODS.GET },
|
|
31069
31110
|
usage: { url: "/agents/titles/{title_id}/usage", method: HTTP_METHODS.GET },
|
|
@@ -31223,6 +31264,12 @@ var Agents = /** @class */ (function () {
|
|
|
31223
31264
|
Agents.answerGuidance = function (title_id, guidance_id, data, params) {
|
|
31224
31265
|
return Requests.processRoute(AgentsRoute.routes.answerGuidance, data, { title_id: title_id, guidance_id: guidance_id }, params);
|
|
31225
31266
|
};
|
|
31267
|
+
/**
|
|
31268
|
+
* Rewrite an editable agent draft for review without executing the parent action.
|
|
31269
|
+
*/
|
|
31270
|
+
Agents.rewriteAgentDraft = function (title_id, data, params) {
|
|
31271
|
+
return Requests.processRoute(AgentsRoute.routes.rewriteAgentDraft, data, { title_id: title_id }, params);
|
|
31272
|
+
};
|
|
31226
31273
|
/**
|
|
31227
31274
|
* List structured agent memories for a title.
|
|
31228
31275
|
*/
|
|
@@ -31288,6 +31335,267 @@ var Agents = /** @class */ (function () {
|
|
|
31288
31335
|
return Agents;
|
|
31289
31336
|
}());
|
|
31290
31337
|
|
|
31338
|
+
/**
|
|
31339
|
+
* Glitch MCP paid facade (/mcp/v1).
|
|
31340
|
+
*
|
|
31341
|
+
* Mirrors the routes served by McpAgentController. These endpoints authenticate
|
|
31342
|
+
* with either a Glitch user JWT or a title-scoped MCP token and keep all planner,
|
|
31343
|
+
* billing, and executor logic server-side. The public @glitch/mcp adapter calls
|
|
31344
|
+
* the same endpoints; this SDK surface lets first-party TypeScript clients reuse them.
|
|
31345
|
+
*/
|
|
31346
|
+
var McpRoute = /** @class */ (function () {
|
|
31347
|
+
function McpRoute() {
|
|
31348
|
+
}
|
|
31349
|
+
McpRoute.routes = {
|
|
31350
|
+
authStatus: { url: "/mcp/v1/auth/status", method: HTTP_METHODS.GET },
|
|
31351
|
+
listTitles: { url: "/mcp/v1/titles", method: HTTP_METHODS.GET },
|
|
31352
|
+
titleContext: { url: "/mcp/v1/titles/{title_id}/context", method: HTTP_METHODS.GET },
|
|
31353
|
+
billing: { url: "/mcp/v1/titles/{title_id}/billing", method: HTTP_METHODS.GET },
|
|
31354
|
+
startRun: { url: "/mcp/v1/titles/{title_id}/runs", method: HTTP_METHODS.POST },
|
|
31355
|
+
viewRun: { url: "/mcp/v1/titles/{title_id}/runs/{run_id}", method: HTTP_METHODS.GET },
|
|
31356
|
+
runEvents: { url: "/mcp/v1/titles/{title_id}/runs/{run_id}/events", method: HTTP_METHODS.GET },
|
|
31357
|
+
streamRun: { url: "/mcp/v1/titles/{title_id}/runs/{run_id}/stream", method: HTTP_METHODS.GET },
|
|
31358
|
+
finalReport: { url: "/mcp/v1/titles/{title_id}/runs/{run_id}/report", method: HTTP_METHODS.GET },
|
|
31359
|
+
artifacts: { url: "/mcp/v1/titles/{title_id}/runs/{run_id}/artifacts", method: HTTP_METHODS.GET },
|
|
31360
|
+
listActions: { url: "/mcp/v1/titles/{title_id}/actions", method: HTTP_METHODS.GET },
|
|
31361
|
+
approveAction: { url: "/mcp/v1/titles/{title_id}/actions/{action_id}/approve", method: HTTP_METHODS.POST },
|
|
31362
|
+
rejectAction: { url: "/mcp/v1/titles/{title_id}/actions/{action_id}/reject", method: HTTP_METHODS.POST },
|
|
31363
|
+
executeAction: { url: "/mcp/v1/titles/{title_id}/actions/{action_id}/execute", method: HTTP_METHODS.POST },
|
|
31364
|
+
listGuidance: { url: "/mcp/v1/titles/{title_id}/guidance", method: HTTP_METHODS.GET },
|
|
31365
|
+
answerGuidance: { url: "/mcp/v1/titles/{title_id}/guidance/{guidance_id}/answer", method: HTTP_METHODS.POST },
|
|
31366
|
+
createUpload: { url: "/mcp/v1/titles/{title_id}/uploads", method: HTTP_METHODS.POST },
|
|
31367
|
+
uploadFile: { url: "/mcp/v1/titles/{title_id}/files", method: HTTP_METHODS.POST },
|
|
31368
|
+
listTokens: { url: "/mcp/v1/titles/{title_id}/tokens", method: HTTP_METHODS.GET },
|
|
31369
|
+
createToken: { url: "/mcp/v1/titles/{title_id}/tokens", method: HTTP_METHODS.POST },
|
|
31370
|
+
revokeToken: { url: "/mcp/v1/titles/{title_id}/tokens/{token_id}", method: HTTP_METHODS.DELETE },
|
|
31371
|
+
};
|
|
31372
|
+
return McpRoute;
|
|
31373
|
+
}());
|
|
31374
|
+
|
|
31375
|
+
/**
|
|
31376
|
+
* Client for the Glitch MCP paid facade (/mcp/v1).
|
|
31377
|
+
*
|
|
31378
|
+
* Authenticate with a Glitch user JWT or a title-scoped MCP token. The facade
|
|
31379
|
+
* enforces subscription, title permissions, scope, and approval guardrails on
|
|
31380
|
+
* every call; this client only forwards requests.
|
|
31381
|
+
*/
|
|
31382
|
+
var Mcp = /** @class */ (function () {
|
|
31383
|
+
function Mcp() {
|
|
31384
|
+
}
|
|
31385
|
+
/** Health/auth probe. Returns authenticated=false (200) when no credential is set. */
|
|
31386
|
+
Mcp.authStatus = function (params) {
|
|
31387
|
+
return Requests.processRoute(McpRoute.routes.authStatus, {}, {}, params);
|
|
31388
|
+
};
|
|
31389
|
+
/** List titles visible to the current user token or title-scoped MCP token. */
|
|
31390
|
+
Mcp.listTitles = function (params) {
|
|
31391
|
+
return Requests.processRoute(McpRoute.routes.listTitles, {}, {}, params);
|
|
31392
|
+
};
|
|
31393
|
+
/** Fetch safe, subscription-gated workspace context for a title. */
|
|
31394
|
+
Mcp.titleContext = function (title_id, params) {
|
|
31395
|
+
return Requests.processRoute(McpRoute.routes.titleContext, {}, { title_id: title_id }, params);
|
|
31396
|
+
};
|
|
31397
|
+
/** Check subscription, trial, plan, and credit state for a title. */
|
|
31398
|
+
Mcp.billing = function (title_id, params) {
|
|
31399
|
+
return Requests.processRoute(McpRoute.routes.billing, {}, { title_id: title_id }, params);
|
|
31400
|
+
};
|
|
31401
|
+
/** Start a paid Glitch Agent run for a title. */
|
|
31402
|
+
Mcp.startRun = function (title_id, data, params) {
|
|
31403
|
+
return Requests.processRoute(McpRoute.routes.startRun, data !== null && data !== void 0 ? data : {}, { title_id: title_id }, params);
|
|
31404
|
+
};
|
|
31405
|
+
/** Fetch a durable run with status, actions, guidance, events, files, and report. */
|
|
31406
|
+
Mcp.viewRun = function (title_id, run_id, params) {
|
|
31407
|
+
return Requests.processRoute(McpRoute.routes.viewRun, {}, { title_id: title_id, run_id: run_id }, params);
|
|
31408
|
+
};
|
|
31409
|
+
/** List user-visible timeline events for a run. */
|
|
31410
|
+
Mcp.runEvents = function (title_id, run_id, params) {
|
|
31411
|
+
return Requests.processRoute(McpRoute.routes.runEvents, {}, { title_id: title_id, run_id: run_id }, params);
|
|
31412
|
+
};
|
|
31413
|
+
/** Fetch the human-friendly final or partial report for a run. */
|
|
31414
|
+
Mcp.finalReport = function (title_id, run_id, params) {
|
|
31415
|
+
return Requests.processRoute(McpRoute.routes.finalReport, {}, { title_id: title_id, run_id: run_id }, params);
|
|
31416
|
+
};
|
|
31417
|
+
/**
|
|
31418
|
+
* Server-Sent Events URL for a run's live event stream.
|
|
31419
|
+
*
|
|
31420
|
+
* Returns the absolute URL to open with an EventSource/fetch reader; the
|
|
31421
|
+
* endpoint emits `status`, `run_event`, and a terminal `settled`/`timeout` event.
|
|
31422
|
+
*/
|
|
31423
|
+
Mcp.runStreamUrl = function (title_id, run_id, params) {
|
|
31424
|
+
var url = McpRoute.routes.streamRun.url
|
|
31425
|
+
.replace("{title_id}", encodeURIComponent(title_id))
|
|
31426
|
+
.replace("{run_id}", encodeURIComponent(run_id));
|
|
31427
|
+
return Requests.buildUrl(url, params);
|
|
31428
|
+
};
|
|
31429
|
+
/** List downloadable files and hosted report artifacts for a run. */
|
|
31430
|
+
Mcp.artifacts = function (title_id, run_id, params) {
|
|
31431
|
+
return Requests.processRoute(McpRoute.routes.artifacts, {}, { title_id: title_id, run_id: run_id }, params);
|
|
31432
|
+
};
|
|
31433
|
+
/** List proposed/guidance/approval/executed actions for a title. */
|
|
31434
|
+
Mcp.listActions = function (title_id, params) {
|
|
31435
|
+
return Requests.processRoute(McpRoute.routes.listActions, {}, { title_id: title_id }, params);
|
|
31436
|
+
};
|
|
31437
|
+
/** Approve a reviewable action. Execution remains guarded server-side. */
|
|
31438
|
+
Mcp.approveAction = function (title_id, action_id, data, params) {
|
|
31439
|
+
return Requests.processRoute(McpRoute.routes.approveAction, data !== null && data !== void 0 ? data : {}, { title_id: title_id, action_id: action_id }, params);
|
|
31440
|
+
};
|
|
31441
|
+
/** Reject a proposed or approval-needed action. */
|
|
31442
|
+
Mcp.rejectAction = function (title_id, action_id, data, params) {
|
|
31443
|
+
return Requests.processRoute(McpRoute.routes.rejectAction, data !== null && data !== void 0 ? data : {}, { title_id: title_id, action_id: action_id }, params);
|
|
31444
|
+
};
|
|
31445
|
+
/** Execute an approved action. Public/paid/creator-facing work stays guarded. */
|
|
31446
|
+
Mcp.executeAction = function (title_id, action_id, data, params) {
|
|
31447
|
+
return Requests.processRoute(McpRoute.routes.executeAction, data !== null && data !== void 0 ? data : {}, { title_id: title_id, action_id: action_id }, params);
|
|
31448
|
+
};
|
|
31449
|
+
/** List open or answered guidance requests for a title or run. */
|
|
31450
|
+
Mcp.listGuidance = function (title_id, params) {
|
|
31451
|
+
return Requests.processRoute(McpRoute.routes.listGuidance, {}, { title_id: title_id }, params);
|
|
31452
|
+
};
|
|
31453
|
+
/** Answer a guidance request and resume the server-side workflow when possible. */
|
|
31454
|
+
Mcp.answerGuidance = function (title_id, guidance_id, data, params) {
|
|
31455
|
+
return Requests.processRoute(McpRoute.routes.answerGuidance, data !== null && data !== void 0 ? data : {}, { title_id: title_id, guidance_id: guidance_id }, params);
|
|
31456
|
+
};
|
|
31457
|
+
/** Get instructions for uploading a file (points at uploadFile below). */
|
|
31458
|
+
Mcp.createUpload = function (title_id, data, params) {
|
|
31459
|
+
return Requests.processRoute(McpRoute.routes.createUpload, data !== null && data !== void 0 ? data : {}, { title_id: title_id }, params);
|
|
31460
|
+
};
|
|
31461
|
+
/**
|
|
31462
|
+
* Upload a file (image, video, or document) to a title or run as multipart/form-data.
|
|
31463
|
+
* The facade re-checks the title scope, subscription, and allowed mime types.
|
|
31464
|
+
*/
|
|
31465
|
+
Mcp.uploadFile = function (title_id, file, data, params, onUploadProgress) {
|
|
31466
|
+
var url = McpRoute.routes.uploadFile.url.replace("{title_id}", title_id);
|
|
31467
|
+
return Requests.uploadFile(url, "file", file, data, params, onUploadProgress);
|
|
31468
|
+
};
|
|
31469
|
+
/** List MCP title tokens (user JWT only). */
|
|
31470
|
+
Mcp.listTokens = function (title_id, params) {
|
|
31471
|
+
return Requests.processRoute(McpRoute.routes.listTokens, {}, { title_id: title_id }, params);
|
|
31472
|
+
};
|
|
31473
|
+
/** Create a revocable title-scoped MCP token (user JWT only). */
|
|
31474
|
+
Mcp.createToken = function (title_id, data, params) {
|
|
31475
|
+
return Requests.processRoute(McpRoute.routes.createToken, data !== null && data !== void 0 ? data : {}, { title_id: title_id }, params);
|
|
31476
|
+
};
|
|
31477
|
+
/** Revoke a title-scoped MCP token (user JWT only). */
|
|
31478
|
+
Mcp.revokeToken = function (title_id, token_id, params) {
|
|
31479
|
+
return Requests.processRoute(McpRoute.routes.revokeToken, {}, { title_id: title_id, token_id: token_id }, params);
|
|
31480
|
+
};
|
|
31481
|
+
return Mcp;
|
|
31482
|
+
}());
|
|
31483
|
+
|
|
31484
|
+
/**
|
|
31485
|
+
* Route declarations for the PR Directory API.
|
|
31486
|
+
*
|
|
31487
|
+
* These mirror the Laravel routes under `/api/pr/*` and the title-scoped
|
|
31488
|
+
* matcher route under `/api/titles/{title_id}/pr/matches`. Keeping the URL
|
|
31489
|
+
* templates in one place lets the SDK methods stay small and consistent with
|
|
31490
|
+
* the rest of the package's route-wrapper pattern.
|
|
31491
|
+
*/
|
|
31492
|
+
var PrDirectoryRoutes = /** @class */ (function () {
|
|
31493
|
+
function PrDirectoryRoutes() {
|
|
31494
|
+
}
|
|
31495
|
+
PrDirectoryRoutes.routes = {
|
|
31496
|
+
listPublications: { url: "/pr/publications", method: HTTP_METHODS.GET },
|
|
31497
|
+
viewPublication: { url: "/pr/publications/{publication_id}", method: HTTP_METHODS.GET },
|
|
31498
|
+
listPeople: { url: "/pr/people", method: HTTP_METHODS.GET },
|
|
31499
|
+
viewPerson: { url: "/pr/people/{person_id}", method: HTTP_METHODS.GET },
|
|
31500
|
+
listTags: { url: "/pr/tags", method: HTTP_METHODS.GET },
|
|
31501
|
+
report: { url: "/pr/report", method: HTTP_METHODS.GET },
|
|
31502
|
+
titleMatches: { url: "/titles/{title_id}/pr/matches", method: HTTP_METHODS.GET },
|
|
31503
|
+
queueVerification: { url: "/admin/pr/verification/queue", method: HTTP_METHODS.POST },
|
|
31504
|
+
};
|
|
31505
|
+
return PrDirectoryRoutes;
|
|
31506
|
+
}());
|
|
31507
|
+
|
|
31508
|
+
/**
|
|
31509
|
+
* SDK wrapper for the PR Directory API.
|
|
31510
|
+
*
|
|
31511
|
+
* The PR directory is read-friendly by default: public endpoints expose
|
|
31512
|
+
* searchable publications, people, tags, and reporting metrics. Authenticated
|
|
31513
|
+
* title admins can request title-specific PR matches, and site admins can queue
|
|
31514
|
+
* monthly-style verification jobs.
|
|
31515
|
+
*/
|
|
31516
|
+
var PrDirectory = /** @class */ (function () {
|
|
31517
|
+
function PrDirectory() {
|
|
31518
|
+
}
|
|
31519
|
+
/**
|
|
31520
|
+
* Search gaming-focused PR publications, independent blogs, and podcasts.
|
|
31521
|
+
*
|
|
31522
|
+
* @example
|
|
31523
|
+
* ```ts
|
|
31524
|
+
* Glitch.api.PrDirectory.listPublications({
|
|
31525
|
+
* q: "indie RPG",
|
|
31526
|
+
* has_email: true,
|
|
31527
|
+
* eligibility_status: "eligible",
|
|
31528
|
+
* sort: "-last_verified_at",
|
|
31529
|
+
* });
|
|
31530
|
+
* ```
|
|
31531
|
+
*/
|
|
31532
|
+
PrDirectory.listPublications = function (params) {
|
|
31533
|
+
return Requests.processRoute(PrDirectoryRoutes.routes.listPublications, {}, {}, params);
|
|
31534
|
+
};
|
|
31535
|
+
/**
|
|
31536
|
+
* Retrieve one PR publication profile with loaded people, contact points,
|
|
31537
|
+
* evidence links, and tags.
|
|
31538
|
+
*/
|
|
31539
|
+
PrDirectory.viewPublication = function (publication_id, params) {
|
|
31540
|
+
return Requests.processRoute(PrDirectoryRoutes.routes.viewPublication, {}, { publication_id: publication_id }, params);
|
|
31541
|
+
};
|
|
31542
|
+
/**
|
|
31543
|
+
* Search PR people and roles across all known publications.
|
|
31544
|
+
*
|
|
31545
|
+
* @example
|
|
31546
|
+
* ```ts
|
|
31547
|
+
* Glitch.api.PrDirectory.listPeople({
|
|
31548
|
+
* q: "reviews editor",
|
|
31549
|
+
* has_email: true,
|
|
31550
|
+
* role_category: "editor",
|
|
31551
|
+
* });
|
|
31552
|
+
* ```
|
|
31553
|
+
*/
|
|
31554
|
+
PrDirectory.listPeople = function (params) {
|
|
31555
|
+
return Requests.processRoute(PrDirectoryRoutes.routes.listPeople, {}, {}, params);
|
|
31556
|
+
};
|
|
31557
|
+
/**
|
|
31558
|
+
* Retrieve one PR person profile with their outlet roles, profile links,
|
|
31559
|
+
* contact points, and metadata tags.
|
|
31560
|
+
*/
|
|
31561
|
+
PrDirectory.viewPerson = function (person_id, params) {
|
|
31562
|
+
return Requests.processRoute(PrDirectoryRoutes.routes.viewPerson, {}, { person_id: person_id }, params);
|
|
31563
|
+
};
|
|
31564
|
+
/**
|
|
31565
|
+
* List the normalized tag vocabulary used for PR search, filters, matching,
|
|
31566
|
+
* and reporting.
|
|
31567
|
+
*/
|
|
31568
|
+
PrDirectory.listTags = function (params) {
|
|
31569
|
+
return Requests.processRoute(PrDirectoryRoutes.routes.listTags, {}, {}, params);
|
|
31570
|
+
};
|
|
31571
|
+
/**
|
|
31572
|
+
* Get aggregate PR directory reporting metrics. Publication filters can be
|
|
31573
|
+
* supplied to scope the outlet portion of the report.
|
|
31574
|
+
*/
|
|
31575
|
+
PrDirectory.report = function (params) {
|
|
31576
|
+
return Requests.processRoute(PrDirectoryRoutes.routes.report, {}, {}, params);
|
|
31577
|
+
};
|
|
31578
|
+
/**
|
|
31579
|
+
* Match a registered game title to PR outlets. Requires an auth token for a
|
|
31580
|
+
* user who can administer the requested title.
|
|
31581
|
+
*/
|
|
31582
|
+
PrDirectory.titleMatches = function (title_id, params) {
|
|
31583
|
+
return Requests.processRoute(PrDirectoryRoutes.routes.titleMatches, {}, { title_id: title_id }, params);
|
|
31584
|
+
};
|
|
31585
|
+
/**
|
|
31586
|
+
* Queue PR verification jobs. Requires a site-admin auth token.
|
|
31587
|
+
*
|
|
31588
|
+
* @example
|
|
31589
|
+
* ```ts
|
|
31590
|
+
* Glitch.api.PrDirectory.queueVerification({ due: true, limit: 250 });
|
|
31591
|
+
* ```
|
|
31592
|
+
*/
|
|
31593
|
+
PrDirectory.queueVerification = function (data, params) {
|
|
31594
|
+
return Requests.processRoute(PrDirectoryRoutes.routes.queueVerification, data || {}, {}, params);
|
|
31595
|
+
};
|
|
31596
|
+
return PrDirectory;
|
|
31597
|
+
}());
|
|
31598
|
+
|
|
31291
31599
|
var Parser = /** @class */ (function () {
|
|
31292
31600
|
function Parser() {
|
|
31293
31601
|
}
|
|
@@ -31832,6 +32140,8 @@ var Glitch = /** @class */ (function () {
|
|
|
31832
32140
|
Multiplayer: Multiplayer,
|
|
31833
32141
|
ServerOperations: ServerOperations,
|
|
31834
32142
|
Agents: Agents,
|
|
32143
|
+
Mcp: Mcp,
|
|
32144
|
+
PrDirectory: PrDirectory,
|
|
31835
32145
|
};
|
|
31836
32146
|
Glitch.util = {
|
|
31837
32147
|
Requests: Requests,
|