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/esm/api/Agents.d.ts
CHANGED
|
@@ -105,6 +105,10 @@ declare class Agents {
|
|
|
105
105
|
* Answer a guidance request and write structured agent memory.
|
|
106
106
|
*/
|
|
107
107
|
static answerGuidance<T>(title_id: string, guidance_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
108
|
+
/**
|
|
109
|
+
* Rewrite an editable agent draft for review without executing the parent action.
|
|
110
|
+
*/
|
|
111
|
+
static rewriteAgentDraft<T>(title_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
108
112
|
/**
|
|
109
113
|
* List structured agent memories for a title.
|
|
110
114
|
*/
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import Response from "../util/Response";
|
|
2
|
+
import { AxiosPromise, AxiosProgressEvent } from "axios";
|
|
3
|
+
export interface McpStartRunRequest {
|
|
4
|
+
agent_id?: string | null;
|
|
5
|
+
initial_message?: string | null;
|
|
6
|
+
prompt?: string | null;
|
|
7
|
+
run_type?: string;
|
|
8
|
+
trigger_source?: string;
|
|
9
|
+
background?: boolean;
|
|
10
|
+
live_mode?: boolean;
|
|
11
|
+
attachment_ids?: string[];
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Client for the Glitch MCP paid facade (/mcp/v1).
|
|
16
|
+
*
|
|
17
|
+
* Authenticate with a Glitch user JWT or a title-scoped MCP token. The facade
|
|
18
|
+
* enforces subscription, title permissions, scope, and approval guardrails on
|
|
19
|
+
* every call; this client only forwards requests.
|
|
20
|
+
*/
|
|
21
|
+
declare class Mcp {
|
|
22
|
+
/** Health/auth probe. Returns authenticated=false (200) when no credential is set. */
|
|
23
|
+
static authStatus<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
24
|
+
/** List titles visible to the current user token or title-scoped MCP token. */
|
|
25
|
+
static listTitles<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
26
|
+
/** Fetch safe, subscription-gated workspace context for a title. */
|
|
27
|
+
static titleContext<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
28
|
+
/** Check subscription, trial, plan, and credit state for a title. */
|
|
29
|
+
static billing<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
30
|
+
/** Start a paid Glitch Agent run for a title. */
|
|
31
|
+
static startRun<T>(title_id: string, data?: McpStartRunRequest, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
32
|
+
/** Fetch a durable run with status, actions, guidance, events, files, and report. */
|
|
33
|
+
static viewRun<T>(title_id: string, run_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
34
|
+
/** List user-visible timeline events for a run. */
|
|
35
|
+
static runEvents<T>(title_id: string, run_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
36
|
+
/** Fetch the human-friendly final or partial report for a run. */
|
|
37
|
+
static finalReport<T>(title_id: string, run_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
38
|
+
/**
|
|
39
|
+
* Server-Sent Events URL for a run's live event stream.
|
|
40
|
+
*
|
|
41
|
+
* Returns the absolute URL to open with an EventSource/fetch reader; the
|
|
42
|
+
* endpoint emits `status`, `run_event`, and a terminal `settled`/`timeout` event.
|
|
43
|
+
*/
|
|
44
|
+
static runStreamUrl(title_id: string, run_id: string, params?: Record<string, any>): string;
|
|
45
|
+
/** List downloadable files and hosted report artifacts for a run. */
|
|
46
|
+
static artifacts<T>(title_id: string, run_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
47
|
+
/** List proposed/guidance/approval/executed actions for a title. */
|
|
48
|
+
static listActions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
49
|
+
/** Approve a reviewable action. Execution remains guarded server-side. */
|
|
50
|
+
static approveAction<T>(title_id: string, action_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
51
|
+
/** Reject a proposed or approval-needed action. */
|
|
52
|
+
static rejectAction<T>(title_id: string, action_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
53
|
+
/** Execute an approved action. Public/paid/creator-facing work stays guarded. */
|
|
54
|
+
static executeAction<T>(title_id: string, action_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
55
|
+
/** List open or answered guidance requests for a title or run. */
|
|
56
|
+
static listGuidance<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
57
|
+
/** Answer a guidance request and resume the server-side workflow when possible. */
|
|
58
|
+
static answerGuidance<T>(title_id: string, guidance_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
59
|
+
/** Get instructions for uploading a file (points at uploadFile below). */
|
|
60
|
+
static createUpload<T>(title_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
61
|
+
/**
|
|
62
|
+
* Upload a file (image, video, or document) to a title or run as multipart/form-data.
|
|
63
|
+
* The facade re-checks the title scope, subscription, and allowed mime types.
|
|
64
|
+
*/
|
|
65
|
+
static uploadFile<T>(title_id: string, file: File | Blob, data?: object, params?: Record<string, any>, onUploadProgress?: (progressEvent: AxiosProgressEvent) => void): AxiosPromise<Response<T>>;
|
|
66
|
+
/** List MCP title tokens (user JWT only). */
|
|
67
|
+
static listTokens<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
68
|
+
/** Create a revocable title-scoped MCP token (user JWT only). */
|
|
69
|
+
static createToken<T>(title_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
70
|
+
/** Revoke a title-scoped MCP token (user JWT only). */
|
|
71
|
+
static revokeToken<T>(title_id: string, token_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
72
|
+
}
|
|
73
|
+
export default Mcp;
|
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import Response from "../util/Response";
|
|
2
|
+
import { AxiosPromise } from "axios";
|
|
3
|
+
/**
|
|
4
|
+
* Allowed outlet types in the PR directory.
|
|
5
|
+
*/
|
|
6
|
+
export type PrPublicationType = "blog" | "podcast" | "publication";
|
|
7
|
+
/**
|
|
8
|
+
* Eligibility state for a PR outlet.
|
|
9
|
+
*/
|
|
10
|
+
export type PrEligibilityStatus = "eligible" | "ineligible" | "needs_review" | "duplicate" | "archived";
|
|
11
|
+
/**
|
|
12
|
+
* Verification state used by PR outlets, people, links, and contact points.
|
|
13
|
+
*/
|
|
14
|
+
export type PrVerificationStatus = "unverified" | "verified" | "stale" | "blocked" | "failed" | "needs_review";
|
|
15
|
+
/**
|
|
16
|
+
* Email health status stored on the outlet-level PR email field.
|
|
17
|
+
*/
|
|
18
|
+
export type PrEmailStatus = "unknown" | "verified" | "bounced" | "missing" | "needs_review";
|
|
19
|
+
/**
|
|
20
|
+
* Contact verification state for normalized contact points.
|
|
21
|
+
*/
|
|
22
|
+
export type PrContactVerificationStatus = "unverified" | "verified" | "stale" | "bounced" | "invalid" | "blocked" | "needs_review";
|
|
23
|
+
/**
|
|
24
|
+
* Link refresh status for evidence URLs.
|
|
25
|
+
*/
|
|
26
|
+
export type PrLinkStatus = "unverified" | "ok" | "redirected" | "broken" | "blocked" | "failed" | "stale";
|
|
27
|
+
/**
|
|
28
|
+
* Filters accepted by `/pr/publications` and `/pr/report`.
|
|
29
|
+
*
|
|
30
|
+
* Tag filters are human-readable slugs from `/pr/tags`. The backend accepts
|
|
31
|
+
* format, genre, platform, and audience as namespace-specific tag filters so
|
|
32
|
+
* frontend screens can expose simple controls without knowing pivot table
|
|
33
|
+
* details.
|
|
34
|
+
*/
|
|
35
|
+
export interface PrPublicationSearchParams {
|
|
36
|
+
q?: string;
|
|
37
|
+
type?: PrPublicationType;
|
|
38
|
+
eligibility_status?: PrEligibilityStatus;
|
|
39
|
+
verification_status?: PrVerificationStatus;
|
|
40
|
+
dedicated_to_gaming?: boolean;
|
|
41
|
+
has_email?: boolean;
|
|
42
|
+
country?: string;
|
|
43
|
+
language?: string;
|
|
44
|
+
canonical_domain?: string;
|
|
45
|
+
tag?: string;
|
|
46
|
+
format?: string;
|
|
47
|
+
genre?: string;
|
|
48
|
+
platform?: string;
|
|
49
|
+
audience?: string;
|
|
50
|
+
sort?: "name" | "-name" | "type" | "-type" | "eligibility_status" | "-eligibility_status" | "verification_status" | "-verification_status" | "last_verified_at" | "-last_verified_at" | "updated_at" | "-updated_at" | string;
|
|
51
|
+
page?: number;
|
|
52
|
+
per_page?: number;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Filters accepted by `/pr/people`.
|
|
56
|
+
*/
|
|
57
|
+
export interface PrPeopleSearchParams {
|
|
58
|
+
q?: string;
|
|
59
|
+
publication_id?: string;
|
|
60
|
+
role_category?: string;
|
|
61
|
+
is_active?: boolean;
|
|
62
|
+
verification_status?: PrVerificationStatus;
|
|
63
|
+
has_email?: boolean;
|
|
64
|
+
tag?: string;
|
|
65
|
+
role?: string;
|
|
66
|
+
sort?: "name" | "-name" | "verification_status" | "-verification_status" | "last_verified_at" | "-last_verified_at" | "updated_at" | "-updated_at" | string;
|
|
67
|
+
page?: number;
|
|
68
|
+
per_page?: number;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Filters accepted by `/pr/tags`.
|
|
72
|
+
*/
|
|
73
|
+
export interface PrTagSearchParams {
|
|
74
|
+
namespace?: string;
|
|
75
|
+
q?: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Query parameters accepted by `/titles/{title_id}/pr/matches`.
|
|
79
|
+
*
|
|
80
|
+
* The title matcher uses the title profile plus optional human-readable search
|
|
81
|
+
* context to rank eligible outlets and explain why each outlet is a fit.
|
|
82
|
+
*/
|
|
83
|
+
export interface PrTitleMatchParams extends PrPublicationSearchParams {
|
|
84
|
+
genres?: string[];
|
|
85
|
+
platforms?: string[];
|
|
86
|
+
audiences?: string[];
|
|
87
|
+
limit?: number;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Request body accepted by `/admin/pr/verification/queue`.
|
|
91
|
+
*/
|
|
92
|
+
export interface PrQueueVerificationRequest {
|
|
93
|
+
due?: boolean;
|
|
94
|
+
limit?: number;
|
|
95
|
+
link_ids?: string[];
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* A normalized metadata tag used to filter and match PR outlets, people, and
|
|
99
|
+
* roles.
|
|
100
|
+
*/
|
|
101
|
+
export interface PrTag {
|
|
102
|
+
id: string;
|
|
103
|
+
namespace: string;
|
|
104
|
+
slug: string;
|
|
105
|
+
label: string;
|
|
106
|
+
description?: string | null;
|
|
107
|
+
pivot?: {
|
|
108
|
+
confidence?: number | null;
|
|
109
|
+
source?: string | null;
|
|
110
|
+
source_link_id?: string | null;
|
|
111
|
+
verified_at?: string | null;
|
|
112
|
+
metadata?: Record<string, any> | null;
|
|
113
|
+
};
|
|
114
|
+
metadata?: Record<string, any>;
|
|
115
|
+
created_at?: string | null;
|
|
116
|
+
updated_at?: string | null;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A refreshable evidence URL that supports an outlet, person, role, or contact
|
|
120
|
+
* point.
|
|
121
|
+
*/
|
|
122
|
+
export interface PrLink {
|
|
123
|
+
id: string;
|
|
124
|
+
linkable_type?: string | null;
|
|
125
|
+
linkable_id?: string | null;
|
|
126
|
+
link_type: string;
|
|
127
|
+
url: string;
|
|
128
|
+
canonical_url?: string | null;
|
|
129
|
+
final_url?: string | null;
|
|
130
|
+
domain?: string | null;
|
|
131
|
+
priority: number;
|
|
132
|
+
http_status?: number | null;
|
|
133
|
+
status: PrLinkStatus;
|
|
134
|
+
content_type?: string | null;
|
|
135
|
+
content_hash?: string | null;
|
|
136
|
+
etag?: string | null;
|
|
137
|
+
last_modified_at?: string | null;
|
|
138
|
+
last_checked_at?: string | null;
|
|
139
|
+
next_check_at?: string | null;
|
|
140
|
+
last_error?: string | null;
|
|
141
|
+
is_source_of_truth: boolean;
|
|
142
|
+
metadata?: Record<string, any>;
|
|
143
|
+
created_at?: string | null;
|
|
144
|
+
updated_at?: string | null;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* A normalized way to reach an outlet, person, or publication role.
|
|
148
|
+
*/
|
|
149
|
+
export interface PrContactPoint {
|
|
150
|
+
id: string;
|
|
151
|
+
contactable_type: string;
|
|
152
|
+
contactable_id: string;
|
|
153
|
+
pr_link_id?: string | null;
|
|
154
|
+
contact_type: "email" | "linkedin" | "x" | "bluesky" | "contact_form" | string;
|
|
155
|
+
label?: string | null;
|
|
156
|
+
value: string;
|
|
157
|
+
normalized_value: string;
|
|
158
|
+
verification_status: PrContactVerificationStatus;
|
|
159
|
+
confidence?: number | null;
|
|
160
|
+
is_primary: boolean;
|
|
161
|
+
first_seen_at?: string | null;
|
|
162
|
+
last_seen_at?: string | null;
|
|
163
|
+
source_link?: PrLink | null;
|
|
164
|
+
metadata?: Record<string, any>;
|
|
165
|
+
created_at?: string | null;
|
|
166
|
+
updated_at?: string | null;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* The role a PR person has at one publication, blog, or podcast.
|
|
170
|
+
*/
|
|
171
|
+
export interface PublicationPerson {
|
|
172
|
+
id: string;
|
|
173
|
+
publication_id: string;
|
|
174
|
+
pr_person_id: string;
|
|
175
|
+
source_link_id?: string | null;
|
|
176
|
+
role_title?: string | null;
|
|
177
|
+
role_category?: string | null;
|
|
178
|
+
email?: string | null;
|
|
179
|
+
email_status: "unknown" | "verified" | "bounced" | "invalid" | "needs_review";
|
|
180
|
+
is_primary_contact: boolean;
|
|
181
|
+
is_current: boolean;
|
|
182
|
+
confidence?: number | null;
|
|
183
|
+
started_at?: string | null;
|
|
184
|
+
ended_at?: string | null;
|
|
185
|
+
last_verified_at?: string | null;
|
|
186
|
+
source_notes?: string | null;
|
|
187
|
+
person?: PrPerson | null;
|
|
188
|
+
publication?: PrPublication | null;
|
|
189
|
+
source_link?: PrLink | null;
|
|
190
|
+
contact_points?: PrContactPoint[];
|
|
191
|
+
tags?: PrTag[];
|
|
192
|
+
metadata?: Record<string, any>;
|
|
193
|
+
created_at?: string | null;
|
|
194
|
+
updated_at?: string | null;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* A gaming-focused publication, independent blog, or podcast in the PR
|
|
198
|
+
* directory.
|
|
199
|
+
*/
|
|
200
|
+
export interface PrPublication {
|
|
201
|
+
id: string;
|
|
202
|
+
name: string;
|
|
203
|
+
slug?: string | null;
|
|
204
|
+
type: PrPublicationType;
|
|
205
|
+
url?: string | null;
|
|
206
|
+
canonical_domain?: string | null;
|
|
207
|
+
description?: string | null;
|
|
208
|
+
main_pr_email?: string | null;
|
|
209
|
+
main_pr_email_status: PrEmailStatus;
|
|
210
|
+
dedicated_to_gaming: boolean;
|
|
211
|
+
eligibility_status: PrEligibilityStatus;
|
|
212
|
+
exclusion_reason?: string | null;
|
|
213
|
+
language?: string | null;
|
|
214
|
+
country?: string | null;
|
|
215
|
+
network_or_owner?: string | null;
|
|
216
|
+
verification_status: PrVerificationStatus;
|
|
217
|
+
last_verified_at?: string | null;
|
|
218
|
+
next_verification_at?: string | null;
|
|
219
|
+
source_imported_at?: string | null;
|
|
220
|
+
people_count?: number;
|
|
221
|
+
contact_points_count?: number;
|
|
222
|
+
links_count?: number;
|
|
223
|
+
people?: PublicationPerson[];
|
|
224
|
+
contact_points?: PrContactPoint[];
|
|
225
|
+
links?: PrLink[];
|
|
226
|
+
tags?: PrTag[];
|
|
227
|
+
metadata?: Record<string, any>;
|
|
228
|
+
created_at?: string | null;
|
|
229
|
+
updated_at?: string | null;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* A journalist, editor, podcast host, producer, contributor, or other PR
|
|
233
|
+
* contact associated with one or more gaming-focused outlets.
|
|
234
|
+
*/
|
|
235
|
+
export interface PrPerson {
|
|
236
|
+
id: string;
|
|
237
|
+
name: string;
|
|
238
|
+
slug?: string | null;
|
|
239
|
+
bio?: string | null;
|
|
240
|
+
location?: string | null;
|
|
241
|
+
linkedin_url?: string | null;
|
|
242
|
+
x_url?: string | null;
|
|
243
|
+
bluesky_url?: string | null;
|
|
244
|
+
website_url?: string | null;
|
|
245
|
+
is_active: boolean;
|
|
246
|
+
verification_status: PrVerificationStatus;
|
|
247
|
+
last_verified_at?: string | null;
|
|
248
|
+
next_verification_at?: string | null;
|
|
249
|
+
roles_count?: number;
|
|
250
|
+
contact_points_count?: number;
|
|
251
|
+
links_count?: number;
|
|
252
|
+
roles?: PublicationPerson[];
|
|
253
|
+
contact_points?: PrContactPoint[];
|
|
254
|
+
links?: PrLink[];
|
|
255
|
+
tags?: PrTag[];
|
|
256
|
+
metadata?: Record<string, any>;
|
|
257
|
+
created_at?: string | null;
|
|
258
|
+
updated_at?: string | null;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Aggregate PR directory health metrics returned by `/pr/report`.
|
|
262
|
+
*/
|
|
263
|
+
export interface PrDirectoryReport {
|
|
264
|
+
generated_at: string;
|
|
265
|
+
publications: {
|
|
266
|
+
total: number;
|
|
267
|
+
by_type: Record<string, number>;
|
|
268
|
+
by_eligibility_status: Record<string, number>;
|
|
269
|
+
by_verification_status: Record<string, number>;
|
|
270
|
+
dedicated_to_gaming: number;
|
|
271
|
+
with_email: number;
|
|
272
|
+
due_for_verification: number;
|
|
273
|
+
};
|
|
274
|
+
people: {
|
|
275
|
+
total: number;
|
|
276
|
+
active: number;
|
|
277
|
+
with_email: number;
|
|
278
|
+
by_verification_status: Record<string, number>;
|
|
279
|
+
};
|
|
280
|
+
links: {
|
|
281
|
+
total: number;
|
|
282
|
+
by_type: Record<string, number>;
|
|
283
|
+
by_status: Record<string, number>;
|
|
284
|
+
due_for_check: number;
|
|
285
|
+
};
|
|
286
|
+
contacts: {
|
|
287
|
+
total: number;
|
|
288
|
+
by_type: Record<string, number>;
|
|
289
|
+
by_status: Record<string, number>;
|
|
290
|
+
};
|
|
291
|
+
tags: {
|
|
292
|
+
total: number;
|
|
293
|
+
by_namespace: Record<string, number>;
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* A ranked title-to-outlet match with evidence, contact route, and plain-English
|
|
298
|
+
* explanation.
|
|
299
|
+
*/
|
|
300
|
+
export interface PrTitleMatch {
|
|
301
|
+
publication: PrPublication;
|
|
302
|
+
score: number;
|
|
303
|
+
matched_tags: string[];
|
|
304
|
+
best_contact_path?: Record<string, any> | null;
|
|
305
|
+
why: string[];
|
|
306
|
+
risks: string[];
|
|
307
|
+
evidence_links: PrLink[];
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Response body returned after queueing PR verification jobs.
|
|
311
|
+
*/
|
|
312
|
+
export interface PrQueueVerificationResponse {
|
|
313
|
+
queued: number;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* SDK wrapper for the PR Directory API.
|
|
317
|
+
*
|
|
318
|
+
* The PR directory is read-friendly by default: public endpoints expose
|
|
319
|
+
* searchable publications, people, tags, and reporting metrics. Authenticated
|
|
320
|
+
* title admins can request title-specific PR matches, and site admins can queue
|
|
321
|
+
* monthly-style verification jobs.
|
|
322
|
+
*/
|
|
323
|
+
declare class PrDirectory {
|
|
324
|
+
/**
|
|
325
|
+
* Search gaming-focused PR publications, independent blogs, and podcasts.
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* ```ts
|
|
329
|
+
* Glitch.api.PrDirectory.listPublications({
|
|
330
|
+
* q: "indie RPG",
|
|
331
|
+
* has_email: true,
|
|
332
|
+
* eligibility_status: "eligible",
|
|
333
|
+
* sort: "-last_verified_at",
|
|
334
|
+
* });
|
|
335
|
+
* ```
|
|
336
|
+
*/
|
|
337
|
+
static listPublications<T = PrPublication[]>(params?: PrPublicationSearchParams): AxiosPromise<Response<T>>;
|
|
338
|
+
/**
|
|
339
|
+
* Retrieve one PR publication profile with loaded people, contact points,
|
|
340
|
+
* evidence links, and tags.
|
|
341
|
+
*/
|
|
342
|
+
static viewPublication<T = PrPublication>(publication_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
343
|
+
/**
|
|
344
|
+
* Search PR people and roles across all known publications.
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* ```ts
|
|
348
|
+
* Glitch.api.PrDirectory.listPeople({
|
|
349
|
+
* q: "reviews editor",
|
|
350
|
+
* has_email: true,
|
|
351
|
+
* role_category: "editor",
|
|
352
|
+
* });
|
|
353
|
+
* ```
|
|
354
|
+
*/
|
|
355
|
+
static listPeople<T = PrPerson[]>(params?: PrPeopleSearchParams): AxiosPromise<Response<T>>;
|
|
356
|
+
/**
|
|
357
|
+
* Retrieve one PR person profile with their outlet roles, profile links,
|
|
358
|
+
* contact points, and metadata tags.
|
|
359
|
+
*/
|
|
360
|
+
static viewPerson<T = PrPerson>(person_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
361
|
+
/**
|
|
362
|
+
* List the normalized tag vocabulary used for PR search, filters, matching,
|
|
363
|
+
* and reporting.
|
|
364
|
+
*/
|
|
365
|
+
static listTags<T = PrTag[]>(params?: PrTagSearchParams): AxiosPromise<Response<T>>;
|
|
366
|
+
/**
|
|
367
|
+
* Get aggregate PR directory reporting metrics. Publication filters can be
|
|
368
|
+
* supplied to scope the outlet portion of the report.
|
|
369
|
+
*/
|
|
370
|
+
static report<T = PrDirectoryReport>(params?: PrPublicationSearchParams): AxiosPromise<Response<T>>;
|
|
371
|
+
/**
|
|
372
|
+
* Match a registered game title to PR outlets. Requires an auth token for a
|
|
373
|
+
* user who can administer the requested title.
|
|
374
|
+
*/
|
|
375
|
+
static titleMatches<T = PrTitleMatch[]>(title_id: string, params?: PrTitleMatchParams): AxiosPromise<Response<T>>;
|
|
376
|
+
/**
|
|
377
|
+
* Queue PR verification jobs. Requires a site-admin auth token.
|
|
378
|
+
*
|
|
379
|
+
* @example
|
|
380
|
+
* ```ts
|
|
381
|
+
* Glitch.api.PrDirectory.queueVerification({ due: true, limit: 250 });
|
|
382
|
+
* ```
|
|
383
|
+
*/
|
|
384
|
+
static queueVerification<T = PrQueueVerificationResponse>(data?: PrQueueVerificationRequest, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
385
|
+
}
|
|
386
|
+
export default PrDirectory;
|
package/dist/esm/api/Users.d.ts
CHANGED
|
@@ -179,6 +179,14 @@ declare class Users {
|
|
|
179
179
|
* @returns promise
|
|
180
180
|
*/
|
|
181
181
|
static clearGoogleAuth<T>(): AxiosPromise<Response<T>>;
|
|
182
|
+
/**
|
|
183
|
+
* Clear Gmail Workspace authentication information from the current user.
|
|
184
|
+
*
|
|
185
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/clearGmailAuth
|
|
186
|
+
*
|
|
187
|
+
* @returns promise
|
|
188
|
+
*/
|
|
189
|
+
static clearGmailAuth<T>(): AxiosPromise<Response<T>>;
|
|
182
190
|
/**
|
|
183
191
|
* Clear Stripe authentication information from the current user.
|
|
184
192
|
*
|
package/dist/esm/api/index.d.ts
CHANGED
|
@@ -46,6 +46,8 @@ import Crm from "./Crm";
|
|
|
46
46
|
import Multiplayer from "./Multiplayer";
|
|
47
47
|
import ServerOperations from "./ServerOperations";
|
|
48
48
|
import Agents from "./Agents";
|
|
49
|
+
import Mcp from "./Mcp";
|
|
50
|
+
import PrDirectory from "./PrDirectory";
|
|
49
51
|
export { Ads };
|
|
50
52
|
export { AccessKeys };
|
|
51
53
|
export { Auth };
|
|
@@ -94,3 +96,5 @@ export { Crm };
|
|
|
94
96
|
export { Multiplayer };
|
|
95
97
|
export { ServerOperations };
|
|
96
98
|
export { Agents };
|
|
99
|
+
export { Mcp };
|
|
100
|
+
export { PrDirectory };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -46,6 +46,8 @@ import { Crm } from './api';
|
|
|
46
46
|
import { Multiplayer } from './api';
|
|
47
47
|
import { ServerOperations } from './api';
|
|
48
48
|
import { Agents } from './api';
|
|
49
|
+
import { Mcp } from './api';
|
|
50
|
+
import { PrDirectory } from './api';
|
|
49
51
|
import Requests from "./util/Requests";
|
|
50
52
|
import Parser from "./util/Parser";
|
|
51
53
|
import Session from "./util/Session";
|
|
@@ -113,6 +115,8 @@ declare class Glitch {
|
|
|
113
115
|
Multiplayer: typeof Multiplayer;
|
|
114
116
|
ServerOperations: typeof ServerOperations;
|
|
115
117
|
Agents: typeof Agents;
|
|
118
|
+
Mcp: typeof Mcp;
|
|
119
|
+
PrDirectory: typeof PrDirectory;
|
|
116
120
|
};
|
|
117
121
|
static util: {
|
|
118
122
|
Requests: typeof Requests;
|