adoptai-mcp 1.0.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/README.md +70 -0
- package/bin/adoptai-mcp.js +2 -0
- package/dist/apps/canva.js +1 -0
- package/dist/apps/figma.js +1 -0
- package/dist/apps/github.js +2 -0
- package/dist/apps/notion.js +1 -0
- package/dist/apps/registry.js +20 -0
- package/dist/apps/salesforce.js +1 -0
- package/dist/cli/add.js +532 -0
- package/dist/cli/index.js +39 -0
- package/dist/cli/list.js +19 -0
- package/dist/cli/remove.js +37 -0
- package/dist/cli/serve.js +27 -0
- package/dist/cli/status.js +24 -0
- package/dist/config/clients.js +118 -0
- package/dist/config/credentials.js +34 -0
- package/dist/core/auth-manager.js +237 -0
- package/dist/core/config-writer.js +161 -0
- package/dist/core/doctor.js +199 -0
- package/dist/core/package.json +3 -0
- package/dist/core/server-base.js +81 -0
- package/dist/integrations/canva/.env +3 -0
- package/dist/integrations/canva/auth.js +287 -0
- package/dist/integrations/canva/env.js +9 -0
- package/dist/integrations/canva/index.js +12 -0
- package/dist/integrations/canva/package.json +31 -0
- package/dist/integrations/canva/publish-to-adoptai.js +365 -0
- package/dist/integrations/canva/setup.js +90 -0
- package/dist/integrations/canva/tools.js +1315 -0
- package/dist/integrations/canva/tools.original.js +1315 -0
- package/dist/integrations/figma/auth.js +48 -0
- package/dist/integrations/figma/index.js +11 -0
- package/dist/integrations/figma/package.json +27 -0
- package/dist/integrations/figma/publish-to-adoptai.js +384 -0
- package/dist/integrations/figma/setup.js +90 -0
- package/dist/integrations/figma/tools.js +1137 -0
- package/dist/integrations/github/auth.js +53 -0
- package/dist/integrations/github/index.js +11 -0
- package/dist/integrations/github/package.json +28 -0
- package/dist/integrations/github/publish-to-adoptai.js +240 -0
- package/dist/integrations/github/setup.js +103 -0
- package/dist/integrations/github/tools.js +78 -0
- package/dist/integrations/github-actions/auth.js +53 -0
- package/dist/integrations/github-actions/index.js +11 -0
- package/dist/integrations/github-actions/package.json +27 -0
- package/dist/integrations/github-actions/setup.js +103 -0
- package/dist/integrations/github-actions/tools.js +5642 -0
- package/dist/integrations/github-activity/auth.js +53 -0
- package/dist/integrations/github-activity/index.js +11 -0
- package/dist/integrations/github-activity/package.json +27 -0
- package/dist/integrations/github-activity/setup.js +103 -0
- package/dist/integrations/github-activity/tools.js +925 -0
- package/dist/integrations/github-apps/auth.js +53 -0
- package/dist/integrations/github-apps/index.js +11 -0
- package/dist/integrations/github-apps/package.json +27 -0
- package/dist/integrations/github-apps/setup.js +103 -0
- package/dist/integrations/github-apps/tools.js +791 -0
- package/dist/integrations/github-billing/auth.js +53 -0
- package/dist/integrations/github-billing/index.js +11 -0
- package/dist/integrations/github-billing/package.json +27 -0
- package/dist/integrations/github-billing/setup.js +103 -0
- package/dist/integrations/github-billing/tools.js +438 -0
- package/dist/integrations/github-checks/auth.js +53 -0
- package/dist/integrations/github-checks/index.js +11 -0
- package/dist/integrations/github-checks/package.json +27 -0
- package/dist/integrations/github-checks/setup.js +103 -0
- package/dist/integrations/github-checks/tools.js +607 -0
- package/dist/integrations/github-code-scanning/auth.js +53 -0
- package/dist/integrations/github-code-scanning/index.js +11 -0
- package/dist/integrations/github-code-scanning/package.json +27 -0
- package/dist/integrations/github-code-scanning/setup.js +103 -0
- package/dist/integrations/github-code-scanning/tools.js +987 -0
- package/dist/integrations/github-dependabot/auth.js +53 -0
- package/dist/integrations/github-dependabot/index.js +11 -0
- package/dist/integrations/github-dependabot/package.json +27 -0
- package/dist/integrations/github-dependabot/setup.js +103 -0
- package/dist/integrations/github-dependabot/tools.js +915 -0
- package/dist/integrations/github-gists/auth.js +53 -0
- package/dist/integrations/github-gists/index.js +11 -0
- package/dist/integrations/github-gists/package.json +27 -0
- package/dist/integrations/github-gists/setup.js +103 -0
- package/dist/integrations/github-gists/tools.js +545 -0
- package/dist/integrations/github-git/auth.js +53 -0
- package/dist/integrations/github-git/index.js +11 -0
- package/dist/integrations/github-git/package.json +27 -0
- package/dist/integrations/github-git/setup.js +103 -0
- package/dist/integrations/github-git/tools.js +513 -0
- package/dist/integrations/github-issues/auth.js +53 -0
- package/dist/integrations/github-issues/index.js +11 -0
- package/dist/integrations/github-issues/package.json +27 -0
- package/dist/integrations/github-issues/setup.js +103 -0
- package/dist/integrations/github-issues/tools.js +2232 -0
- package/dist/integrations/github-orgs/auth.js +53 -0
- package/dist/integrations/github-orgs/index.js +11 -0
- package/dist/integrations/github-orgs/package.json +27 -0
- package/dist/integrations/github-orgs/setup.js +103 -0
- package/dist/integrations/github-orgs/tools.js +3512 -0
- package/dist/integrations/github-packages/auth.js +53 -0
- package/dist/integrations/github-packages/index.js +11 -0
- package/dist/integrations/github-packages/package.json +27 -0
- package/dist/integrations/github-packages/setup.js +103 -0
- package/dist/integrations/github-packages/tools.js +1088 -0
- package/dist/integrations/github-pulls/auth.js +53 -0
- package/dist/integrations/github-pulls/index.js +11 -0
- package/dist/integrations/github-pulls/package.json +27 -0
- package/dist/integrations/github-pulls/setup.js +103 -0
- package/dist/integrations/github-pulls/tools.js +1252 -0
- package/dist/integrations/github-reactions/auth.js +53 -0
- package/dist/integrations/github-reactions/index.js +11 -0
- package/dist/integrations/github-reactions/package.json +27 -0
- package/dist/integrations/github-reactions/setup.js +103 -0
- package/dist/integrations/github-reactions/tools.js +706 -0
- package/dist/integrations/github-repos/auth.js +53 -0
- package/dist/integrations/github-repos/index.js +11 -0
- package/dist/integrations/github-repos/package.json +27 -0
- package/dist/integrations/github-repos/setup.js +103 -0
- package/dist/integrations/github-repos/tools.js +7286 -0
- package/dist/integrations/github-search/auth.js +53 -0
- package/dist/integrations/github-search/index.js +11 -0
- package/dist/integrations/github-search/package.json +27 -0
- package/dist/integrations/github-search/setup.js +103 -0
- package/dist/integrations/github-search/tools.js +370 -0
- package/dist/integrations/github-teams/auth.js +53 -0
- package/dist/integrations/github-teams/index.js +11 -0
- package/dist/integrations/github-teams/package.json +27 -0
- package/dist/integrations/github-teams/setup.js +103 -0
- package/dist/integrations/github-teams/tools.js +633 -0
- package/dist/integrations/github-users/auth.js +53 -0
- package/dist/integrations/github-users/index.js +11 -0
- package/dist/integrations/github-users/package.json +27 -0
- package/dist/integrations/github-users/setup.js +103 -0
- package/dist/integrations/github-users/tools.js +1118 -0
- package/dist/integrations/notion/api.js +108 -0
- package/dist/integrations/notion/auth.js +59 -0
- package/dist/integrations/notion/endpoints.json +630 -0
- package/dist/integrations/notion/index.js +11 -0
- package/dist/integrations/notion/package.json +33 -0
- package/dist/integrations/notion/publish-to-adoptai.js +271 -0
- package/dist/integrations/notion/scripts/generate-endpoints.mjs +306 -0
- package/dist/integrations/notion/setup.js +89 -0
- package/dist/integrations/notion/tools.js +586 -0
- package/dist/integrations/notion/tools.original.js +568 -0
- package/dist/integrations/salesforce/.env +8 -0
- package/dist/integrations/salesforce/.env.example +15 -0
- package/dist/integrations/salesforce/auth.js +311 -0
- package/dist/integrations/salesforce/endpoints.json +1359 -0
- package/dist/integrations/salesforce/env.js +9 -0
- package/dist/integrations/salesforce/index.js +12 -0
- package/dist/integrations/salesforce/package.json +42 -0
- package/dist/integrations/salesforce/publish-smart-specs.js +890 -0
- package/dist/integrations/salesforce/publish-to-adoptai.js +386 -0
- package/dist/integrations/salesforce/scripts/extract-postman.mjs +222 -0
- package/dist/integrations/salesforce/setup.js +112 -0
- package/dist/integrations/salesforce/tools.js +4544 -0
- package/dist/integrations/salesforce/tools.original.js +4487 -0
- package/dist/server/mcp-server.js +50 -0
- package/dist/server/tool-loader.js +47 -0
- package/dist/specs/figma-api.json +13621 -0
- package/dist/specs/split/salesforce-auth.json +3931 -0
- package/dist/specs/split/salesforce-bulk-v1.json +1489 -0
- package/dist/specs/split/salesforce-bulk-v2.json +1951 -0
- package/dist/specs/split/salesforce-composite.json +1246 -0
- package/dist/specs/split/salesforce-connect.json +11639 -0
- package/dist/specs/split/salesforce-einstein-prediction-service.json +576 -0
- package/dist/specs/split/salesforce-event-platform.json +2682 -0
- package/dist/specs/split/salesforce-graphql.json +1754 -0
- package/dist/specs/split/salesforce-industries.json +4115 -0
- package/dist/specs/split/salesforce-metadata.json +555 -0
- package/dist/specs/split/salesforce-rest.json +4798 -0
- package/dist/specs/split/salesforce-soap.json +210 -0
- package/dist/specs/split/salesforce-subscription-management.json +1299 -0
- package/dist/specs/split/salesforce-tooling.json +2026 -0
- package/dist/specs/split/salesforce-ui.json +7426 -0
- package/package.json +47 -0
|
@@ -0,0 +1,1118 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { buildAuthHeaders } from './auth.js';
|
|
3
|
+
|
|
4
|
+
const BASE_URL = 'https://api.github.com';
|
|
5
|
+
const APP_ID = 'github-users';
|
|
6
|
+
|
|
7
|
+
function handleError(err) {
|
|
8
|
+
const status = err.response?.status;
|
|
9
|
+
const msg = err.response?.data?.message || err.response?.data?.error || err.message;
|
|
10
|
+
if (status === 401) throw new Error(`Token invalid.\nRun: npx adoptai-${APP_ID}-mcp --client cursor`);
|
|
11
|
+
if (status === 403) throw new Error('Insufficient permissions. Check your API key scopes.');
|
|
12
|
+
if (status === 404) throw new Error('Resource not found. Check your parameters.');
|
|
13
|
+
if (status === 429) throw new Error('Rate limit exceeded. Please wait and try again.');
|
|
14
|
+
throw new Error(msg || 'API request failed');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async function apiRequest(method, pathTemplate, params = {}, opts = {}) {
|
|
18
|
+
const { deleteSendsJsonBody = false } = opts;
|
|
19
|
+
const headers = buildAuthHeaders();
|
|
20
|
+
let url = BASE_URL + pathTemplate;
|
|
21
|
+
const pathKeys = [...pathTemplate.matchAll(/\{([^}]+)\}/g)].map((m) => m[1]);
|
|
22
|
+
for (const key of pathKeys) {
|
|
23
|
+
const value = params[key];
|
|
24
|
+
if (value !== undefined && value !== null) url = url.replace(`{${key}}`, encodeURIComponent(String(value)));
|
|
25
|
+
}
|
|
26
|
+
const rest = { ...params };
|
|
27
|
+
for (const key of pathKeys) delete rest[key];
|
|
28
|
+
const m = method.toUpperCase();
|
|
29
|
+
const useQuery = m === 'GET' || (m === 'DELETE' && !deleteSendsJsonBody);
|
|
30
|
+
const queryParams = {};
|
|
31
|
+
const bodyParams = {};
|
|
32
|
+
for (const [key, value] of Object.entries(rest)) {
|
|
33
|
+
if (value === undefined) continue;
|
|
34
|
+
if (useQuery) queryParams[key] = value; else bodyParams[key] = value;
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
const res = await axios({
|
|
38
|
+
method: m,
|
|
39
|
+
url,
|
|
40
|
+
headers: { 'Content-Type': 'application/json', ...headers },
|
|
41
|
+
params: Object.keys(queryParams).length ? queryParams : undefined,
|
|
42
|
+
data: Object.keys(bodyParams).length ? bodyParams : undefined,
|
|
43
|
+
timeout: 30000,
|
|
44
|
+
});
|
|
45
|
+
if (res.status === 204 || res.data === '' || res.data === undefined) return { ok: true, status: res.status };
|
|
46
|
+
return res.data;
|
|
47
|
+
} catch (err) {
|
|
48
|
+
handleError(err);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const ENDPOINTS = [
|
|
53
|
+
{
|
|
54
|
+
"name": "users_get_authenticated",
|
|
55
|
+
"description": "Get the authenticated user",
|
|
56
|
+
"method": "GET",
|
|
57
|
+
"path": "/user",
|
|
58
|
+
"deleteSendsJsonBody": false,
|
|
59
|
+
"inputSchema": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"properties": {},
|
|
62
|
+
"required": []
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "users_update_authenticated",
|
|
67
|
+
"description": "Update the authenticated user",
|
|
68
|
+
"method": "PATCH",
|
|
69
|
+
"path": "/user",
|
|
70
|
+
"deleteSendsJsonBody": false,
|
|
71
|
+
"inputSchema": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"properties": {
|
|
74
|
+
"name": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "The new name of the user."
|
|
77
|
+
},
|
|
78
|
+
"email": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"description": "The publicly visible email address of the user."
|
|
81
|
+
},
|
|
82
|
+
"blog": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"description": "The new blog URL of the user."
|
|
85
|
+
},
|
|
86
|
+
"twitter_username": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"description": "The new Twitter username of the user."
|
|
89
|
+
},
|
|
90
|
+
"company": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"description": "The new company of the user."
|
|
93
|
+
},
|
|
94
|
+
"location": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"description": "The new location of the user."
|
|
97
|
+
},
|
|
98
|
+
"hireable": {
|
|
99
|
+
"type": "boolean",
|
|
100
|
+
"description": "The new hiring availability of the user."
|
|
101
|
+
},
|
|
102
|
+
"bio": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"description": "The new short biography of the user."
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"required": []
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "users_list_blocked_by_authenticated_user",
|
|
112
|
+
"description": "List users blocked by the authenticated user",
|
|
113
|
+
"method": "GET",
|
|
114
|
+
"path": "/user/blocks",
|
|
115
|
+
"deleteSendsJsonBody": false,
|
|
116
|
+
"inputSchema": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"properties": {
|
|
119
|
+
"per_page": {
|
|
120
|
+
"type": "number",
|
|
121
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
122
|
+
},
|
|
123
|
+
"page": {
|
|
124
|
+
"type": "number",
|
|
125
|
+
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"required": []
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "users_check_blocked",
|
|
133
|
+
"description": "Check if a user is blocked by the authenticated user",
|
|
134
|
+
"method": "GET",
|
|
135
|
+
"path": "/user/blocks/{username}",
|
|
136
|
+
"deleteSendsJsonBody": false,
|
|
137
|
+
"inputSchema": {
|
|
138
|
+
"type": "object",
|
|
139
|
+
"properties": {
|
|
140
|
+
"username": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"description": "The handle for the GitHub user account."
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"required": [
|
|
146
|
+
"username"
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "users_block",
|
|
152
|
+
"description": "Block a user",
|
|
153
|
+
"method": "PUT",
|
|
154
|
+
"path": "/user/blocks/{username}",
|
|
155
|
+
"deleteSendsJsonBody": false,
|
|
156
|
+
"inputSchema": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"properties": {
|
|
159
|
+
"username": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"description": "The handle for the GitHub user account."
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"required": [
|
|
165
|
+
"username"
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "users_unblock",
|
|
171
|
+
"description": "Unblock a user",
|
|
172
|
+
"method": "DELETE",
|
|
173
|
+
"path": "/user/blocks/{username}",
|
|
174
|
+
"deleteSendsJsonBody": false,
|
|
175
|
+
"inputSchema": {
|
|
176
|
+
"type": "object",
|
|
177
|
+
"properties": {
|
|
178
|
+
"username": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"description": "The handle for the GitHub user account."
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"required": [
|
|
184
|
+
"username"
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "users_set_primary_email_visibility_for_authenticated_user",
|
|
190
|
+
"description": "Set primary email visibility for the authenticated user",
|
|
191
|
+
"method": "PATCH",
|
|
192
|
+
"path": "/user/email/visibility",
|
|
193
|
+
"deleteSendsJsonBody": false,
|
|
194
|
+
"inputSchema": {
|
|
195
|
+
"type": "object",
|
|
196
|
+
"properties": {
|
|
197
|
+
"visibility": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"description": "Denotes whether an email is publicly visible.",
|
|
200
|
+
"enum": [
|
|
201
|
+
"public",
|
|
202
|
+
"private"
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"required": [
|
|
207
|
+
"visibility"
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "users_list_emails_for_authenticated_user",
|
|
213
|
+
"description": "List email addresses for the authenticated user",
|
|
214
|
+
"method": "GET",
|
|
215
|
+
"path": "/user/emails",
|
|
216
|
+
"deleteSendsJsonBody": false,
|
|
217
|
+
"inputSchema": {
|
|
218
|
+
"type": "object",
|
|
219
|
+
"properties": {
|
|
220
|
+
"per_page": {
|
|
221
|
+
"type": "number",
|
|
222
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
223
|
+
},
|
|
224
|
+
"page": {
|
|
225
|
+
"type": "number",
|
|
226
|
+
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"required": []
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "users_add_email_for_authenticated_user",
|
|
234
|
+
"description": "Add an email address for the authenticated user",
|
|
235
|
+
"method": "POST",
|
|
236
|
+
"path": "/user/emails",
|
|
237
|
+
"deleteSendsJsonBody": false,
|
|
238
|
+
"inputSchema": {
|
|
239
|
+
"type": "object",
|
|
240
|
+
"properties": {},
|
|
241
|
+
"required": []
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"name": "users_delete_email_for_authenticated_user",
|
|
246
|
+
"description": "Delete an email address for the authenticated user",
|
|
247
|
+
"method": "DELETE",
|
|
248
|
+
"path": "/user/emails",
|
|
249
|
+
"deleteSendsJsonBody": true,
|
|
250
|
+
"inputSchema": {
|
|
251
|
+
"type": "object",
|
|
252
|
+
"properties": {},
|
|
253
|
+
"required": []
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"name": "users_list_followers_for_authenticated_user",
|
|
258
|
+
"description": "List followers of the authenticated user",
|
|
259
|
+
"method": "GET",
|
|
260
|
+
"path": "/user/followers",
|
|
261
|
+
"deleteSendsJsonBody": false,
|
|
262
|
+
"inputSchema": {
|
|
263
|
+
"type": "object",
|
|
264
|
+
"properties": {
|
|
265
|
+
"per_page": {
|
|
266
|
+
"type": "number",
|
|
267
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
268
|
+
},
|
|
269
|
+
"page": {
|
|
270
|
+
"type": "number",
|
|
271
|
+
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"required": []
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": "users_list_followed_by_authenticated_user",
|
|
279
|
+
"description": "List the people the authenticated user follows",
|
|
280
|
+
"method": "GET",
|
|
281
|
+
"path": "/user/following",
|
|
282
|
+
"deleteSendsJsonBody": false,
|
|
283
|
+
"inputSchema": {
|
|
284
|
+
"type": "object",
|
|
285
|
+
"properties": {
|
|
286
|
+
"per_page": {
|
|
287
|
+
"type": "number",
|
|
288
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
289
|
+
},
|
|
290
|
+
"page": {
|
|
291
|
+
"type": "number",
|
|
292
|
+
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"required": []
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"name": "users_check_person_is_followed_by_authenticated",
|
|
300
|
+
"description": "Check if a person is followed by the authenticated user",
|
|
301
|
+
"method": "GET",
|
|
302
|
+
"path": "/user/following/{username}",
|
|
303
|
+
"deleteSendsJsonBody": false,
|
|
304
|
+
"inputSchema": {
|
|
305
|
+
"type": "object",
|
|
306
|
+
"properties": {
|
|
307
|
+
"username": {
|
|
308
|
+
"type": "string",
|
|
309
|
+
"description": "The handle for the GitHub user account."
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"required": [
|
|
313
|
+
"username"
|
|
314
|
+
]
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"name": "users_follow",
|
|
319
|
+
"description": "Follow a user",
|
|
320
|
+
"method": "PUT",
|
|
321
|
+
"path": "/user/following/{username}",
|
|
322
|
+
"deleteSendsJsonBody": false,
|
|
323
|
+
"inputSchema": {
|
|
324
|
+
"type": "object",
|
|
325
|
+
"properties": {
|
|
326
|
+
"username": {
|
|
327
|
+
"type": "string",
|
|
328
|
+
"description": "The handle for the GitHub user account."
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"required": [
|
|
332
|
+
"username"
|
|
333
|
+
]
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"name": "users_unfollow",
|
|
338
|
+
"description": "Unfollow a user",
|
|
339
|
+
"method": "DELETE",
|
|
340
|
+
"path": "/user/following/{username}",
|
|
341
|
+
"deleteSendsJsonBody": false,
|
|
342
|
+
"inputSchema": {
|
|
343
|
+
"type": "object",
|
|
344
|
+
"properties": {
|
|
345
|
+
"username": {
|
|
346
|
+
"type": "string",
|
|
347
|
+
"description": "The handle for the GitHub user account."
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"required": [
|
|
351
|
+
"username"
|
|
352
|
+
]
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"name": "users_list_gpg_keys_for_authenticated_user",
|
|
357
|
+
"description": "List GPG keys for the authenticated user",
|
|
358
|
+
"method": "GET",
|
|
359
|
+
"path": "/user/gpg_keys",
|
|
360
|
+
"deleteSendsJsonBody": false,
|
|
361
|
+
"inputSchema": {
|
|
362
|
+
"type": "object",
|
|
363
|
+
"properties": {
|
|
364
|
+
"per_page": {
|
|
365
|
+
"type": "number",
|
|
366
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
367
|
+
},
|
|
368
|
+
"page": {
|
|
369
|
+
"type": "number",
|
|
370
|
+
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
"required": []
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"name": "users_create_gpg_key_for_authenticated_user",
|
|
378
|
+
"description": "Create a GPG key for the authenticated user",
|
|
379
|
+
"method": "POST",
|
|
380
|
+
"path": "/user/gpg_keys",
|
|
381
|
+
"deleteSendsJsonBody": false,
|
|
382
|
+
"inputSchema": {
|
|
383
|
+
"type": "object",
|
|
384
|
+
"properties": {
|
|
385
|
+
"name": {
|
|
386
|
+
"type": "string",
|
|
387
|
+
"description": "A descriptive name for the new key."
|
|
388
|
+
},
|
|
389
|
+
"armored_public_key": {
|
|
390
|
+
"type": "string",
|
|
391
|
+
"description": "A GPG key in ASCII-armored format."
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
"required": [
|
|
395
|
+
"armored_public_key"
|
|
396
|
+
]
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"name": "users_get_gpg_key_for_authenticated_user",
|
|
401
|
+
"description": "Get a GPG key for the authenticated user",
|
|
402
|
+
"method": "GET",
|
|
403
|
+
"path": "/user/gpg_keys/{gpg_key_id}",
|
|
404
|
+
"deleteSendsJsonBody": false,
|
|
405
|
+
"inputSchema": {
|
|
406
|
+
"type": "object",
|
|
407
|
+
"properties": {
|
|
408
|
+
"gpg_key_id": {
|
|
409
|
+
"type": "number",
|
|
410
|
+
"description": "The unique identifier of the GPG key."
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"required": [
|
|
414
|
+
"gpg_key_id"
|
|
415
|
+
]
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"name": "users_delete_gpg_key_for_authenticated_user",
|
|
420
|
+
"description": "Delete a GPG key for the authenticated user",
|
|
421
|
+
"method": "DELETE",
|
|
422
|
+
"path": "/user/gpg_keys/{gpg_key_id}",
|
|
423
|
+
"deleteSendsJsonBody": false,
|
|
424
|
+
"inputSchema": {
|
|
425
|
+
"type": "object",
|
|
426
|
+
"properties": {
|
|
427
|
+
"gpg_key_id": {
|
|
428
|
+
"type": "number",
|
|
429
|
+
"description": "The unique identifier of the GPG key."
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
"required": [
|
|
433
|
+
"gpg_key_id"
|
|
434
|
+
]
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"name": "users_list_public_ssh_keys_for_authenticated_user",
|
|
439
|
+
"description": "List public SSH keys for the authenticated user",
|
|
440
|
+
"method": "GET",
|
|
441
|
+
"path": "/user/keys",
|
|
442
|
+
"deleteSendsJsonBody": false,
|
|
443
|
+
"inputSchema": {
|
|
444
|
+
"type": "object",
|
|
445
|
+
"properties": {
|
|
446
|
+
"per_page": {
|
|
447
|
+
"type": "number",
|
|
448
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
449
|
+
},
|
|
450
|
+
"page": {
|
|
451
|
+
"type": "number",
|
|
452
|
+
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
"required": []
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"name": "users_create_public_ssh_key_for_authenticated_user",
|
|
460
|
+
"description": "Create a public SSH key for the authenticated user",
|
|
461
|
+
"method": "POST",
|
|
462
|
+
"path": "/user/keys",
|
|
463
|
+
"deleteSendsJsonBody": false,
|
|
464
|
+
"inputSchema": {
|
|
465
|
+
"type": "object",
|
|
466
|
+
"properties": {
|
|
467
|
+
"title": {
|
|
468
|
+
"type": "string",
|
|
469
|
+
"description": "A descriptive name for the new key."
|
|
470
|
+
},
|
|
471
|
+
"key": {
|
|
472
|
+
"type": "string",
|
|
473
|
+
"description": "The public SSH key to add to your GitHub account."
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
"required": [
|
|
477
|
+
"key"
|
|
478
|
+
]
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"name": "users_get_public_ssh_key_for_authenticated_user",
|
|
483
|
+
"description": "Get a public SSH key for the authenticated user",
|
|
484
|
+
"method": "GET",
|
|
485
|
+
"path": "/user/keys/{key_id}",
|
|
486
|
+
"deleteSendsJsonBody": false,
|
|
487
|
+
"inputSchema": {
|
|
488
|
+
"type": "object",
|
|
489
|
+
"properties": {
|
|
490
|
+
"key_id": {
|
|
491
|
+
"type": "number",
|
|
492
|
+
"description": "The unique identifier of the key."
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
"required": [
|
|
496
|
+
"key_id"
|
|
497
|
+
]
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
"name": "users_delete_public_ssh_key_for_authenticated_user",
|
|
502
|
+
"description": "Delete a public SSH key for the authenticated user",
|
|
503
|
+
"method": "DELETE",
|
|
504
|
+
"path": "/user/keys/{key_id}",
|
|
505
|
+
"deleteSendsJsonBody": false,
|
|
506
|
+
"inputSchema": {
|
|
507
|
+
"type": "object",
|
|
508
|
+
"properties": {
|
|
509
|
+
"key_id": {
|
|
510
|
+
"type": "number",
|
|
511
|
+
"description": "The unique identifier of the key."
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
"required": [
|
|
515
|
+
"key_id"
|
|
516
|
+
]
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"name": "users_list_public_emails_for_authenticated_user",
|
|
521
|
+
"description": "List public email addresses for the authenticated user",
|
|
522
|
+
"method": "GET",
|
|
523
|
+
"path": "/user/public_emails",
|
|
524
|
+
"deleteSendsJsonBody": false,
|
|
525
|
+
"inputSchema": {
|
|
526
|
+
"type": "object",
|
|
527
|
+
"properties": {
|
|
528
|
+
"per_page": {
|
|
529
|
+
"type": "number",
|
|
530
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
531
|
+
},
|
|
532
|
+
"page": {
|
|
533
|
+
"type": "number",
|
|
534
|
+
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
"required": []
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"name": "users_list_social_accounts_for_authenticated_user",
|
|
542
|
+
"description": "List social accounts for the authenticated user",
|
|
543
|
+
"method": "GET",
|
|
544
|
+
"path": "/user/social_accounts",
|
|
545
|
+
"deleteSendsJsonBody": false,
|
|
546
|
+
"inputSchema": {
|
|
547
|
+
"type": "object",
|
|
548
|
+
"properties": {
|
|
549
|
+
"per_page": {
|
|
550
|
+
"type": "number",
|
|
551
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
552
|
+
},
|
|
553
|
+
"page": {
|
|
554
|
+
"type": "number",
|
|
555
|
+
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
"required": []
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"name": "users_add_social_account_for_authenticated_user",
|
|
563
|
+
"description": "Add social accounts for the authenticated user",
|
|
564
|
+
"method": "POST",
|
|
565
|
+
"path": "/user/social_accounts",
|
|
566
|
+
"deleteSendsJsonBody": false,
|
|
567
|
+
"inputSchema": {
|
|
568
|
+
"type": "object",
|
|
569
|
+
"properties": {
|
|
570
|
+
"account_urls": {
|
|
571
|
+
"type": "array",
|
|
572
|
+
"description": "Full URLs for the social media profiles to add."
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
"required": [
|
|
576
|
+
"account_urls"
|
|
577
|
+
]
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"name": "users_delete_social_account_for_authenticated_user",
|
|
582
|
+
"description": "Delete social accounts for the authenticated user",
|
|
583
|
+
"method": "DELETE",
|
|
584
|
+
"path": "/user/social_accounts",
|
|
585
|
+
"deleteSendsJsonBody": true,
|
|
586
|
+
"inputSchema": {
|
|
587
|
+
"type": "object",
|
|
588
|
+
"properties": {
|
|
589
|
+
"account_urls": {
|
|
590
|
+
"type": "array",
|
|
591
|
+
"description": "Full URLs for the social media profiles to delete."
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
"required": [
|
|
595
|
+
"account_urls"
|
|
596
|
+
]
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"name": "users_list_ssh_signing_keys_for_authenticated_user",
|
|
601
|
+
"description": "List SSH signing keys for the authenticated user",
|
|
602
|
+
"method": "GET",
|
|
603
|
+
"path": "/user/ssh_signing_keys",
|
|
604
|
+
"deleteSendsJsonBody": false,
|
|
605
|
+
"inputSchema": {
|
|
606
|
+
"type": "object",
|
|
607
|
+
"properties": {
|
|
608
|
+
"per_page": {
|
|
609
|
+
"type": "number",
|
|
610
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
611
|
+
},
|
|
612
|
+
"page": {
|
|
613
|
+
"type": "number",
|
|
614
|
+
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
"required": []
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"name": "users_create_ssh_signing_key_for_authenticated_user",
|
|
622
|
+
"description": "Create a SSH signing key for the authenticated user",
|
|
623
|
+
"method": "POST",
|
|
624
|
+
"path": "/user/ssh_signing_keys",
|
|
625
|
+
"deleteSendsJsonBody": false,
|
|
626
|
+
"inputSchema": {
|
|
627
|
+
"type": "object",
|
|
628
|
+
"properties": {
|
|
629
|
+
"title": {
|
|
630
|
+
"type": "string",
|
|
631
|
+
"description": "A descriptive name for the new key."
|
|
632
|
+
},
|
|
633
|
+
"key": {
|
|
634
|
+
"type": "string",
|
|
635
|
+
"description": "The public SSH key to add to your GitHub account. For more information, see \"[Checking for existing SSH keys](https://docs.github.com/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys).\""
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
"required": [
|
|
639
|
+
"key"
|
|
640
|
+
]
|
|
641
|
+
}
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"name": "users_get_ssh_signing_key_for_authenticated_user",
|
|
645
|
+
"description": "Get an SSH signing key for the authenticated user",
|
|
646
|
+
"method": "GET",
|
|
647
|
+
"path": "/user/ssh_signing_keys/{ssh_signing_key_id}",
|
|
648
|
+
"deleteSendsJsonBody": false,
|
|
649
|
+
"inputSchema": {
|
|
650
|
+
"type": "object",
|
|
651
|
+
"properties": {
|
|
652
|
+
"ssh_signing_key_id": {
|
|
653
|
+
"type": "number",
|
|
654
|
+
"description": "The unique identifier of the SSH signing key."
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
"required": [
|
|
658
|
+
"ssh_signing_key_id"
|
|
659
|
+
]
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"name": "users_delete_ssh_signing_key_for_authenticated_user",
|
|
664
|
+
"description": "Delete an SSH signing key for the authenticated user",
|
|
665
|
+
"method": "DELETE",
|
|
666
|
+
"path": "/user/ssh_signing_keys/{ssh_signing_key_id}",
|
|
667
|
+
"deleteSendsJsonBody": false,
|
|
668
|
+
"inputSchema": {
|
|
669
|
+
"type": "object",
|
|
670
|
+
"properties": {
|
|
671
|
+
"ssh_signing_key_id": {
|
|
672
|
+
"type": "number",
|
|
673
|
+
"description": "The unique identifier of the SSH signing key."
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
"required": [
|
|
677
|
+
"ssh_signing_key_id"
|
|
678
|
+
]
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
"name": "users_get_by_id",
|
|
683
|
+
"description": "Get a user using their ID",
|
|
684
|
+
"method": "GET",
|
|
685
|
+
"path": "/user/{account_id}",
|
|
686
|
+
"deleteSendsJsonBody": false,
|
|
687
|
+
"inputSchema": {
|
|
688
|
+
"type": "object",
|
|
689
|
+
"properties": {
|
|
690
|
+
"account_id": {
|
|
691
|
+
"type": "number",
|
|
692
|
+
"description": "account_id parameter"
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
"required": [
|
|
696
|
+
"account_id"
|
|
697
|
+
]
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"name": "users_list",
|
|
702
|
+
"description": "List users",
|
|
703
|
+
"method": "GET",
|
|
704
|
+
"path": "/users",
|
|
705
|
+
"deleteSendsJsonBody": false,
|
|
706
|
+
"inputSchema": {
|
|
707
|
+
"type": "object",
|
|
708
|
+
"properties": {
|
|
709
|
+
"since": {
|
|
710
|
+
"type": "number",
|
|
711
|
+
"description": "A user ID. Only return users with an ID greater than this ID."
|
|
712
|
+
},
|
|
713
|
+
"per_page": {
|
|
714
|
+
"type": "number",
|
|
715
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
"required": []
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"name": "users_get_by_username",
|
|
723
|
+
"description": "Get a user",
|
|
724
|
+
"method": "GET",
|
|
725
|
+
"path": "/users/{username}",
|
|
726
|
+
"deleteSendsJsonBody": false,
|
|
727
|
+
"inputSchema": {
|
|
728
|
+
"type": "object",
|
|
729
|
+
"properties": {
|
|
730
|
+
"username": {
|
|
731
|
+
"type": "string",
|
|
732
|
+
"description": "The handle for the GitHub user account."
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
"required": [
|
|
736
|
+
"username"
|
|
737
|
+
]
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
"name": "users_list_attestations_bulk",
|
|
742
|
+
"description": "List attestations by bulk subject digests",
|
|
743
|
+
"method": "POST",
|
|
744
|
+
"path": "/users/{username}/attestations/bulk-list",
|
|
745
|
+
"deleteSendsJsonBody": false,
|
|
746
|
+
"inputSchema": {
|
|
747
|
+
"type": "object",
|
|
748
|
+
"properties": {
|
|
749
|
+
"per_page": {
|
|
750
|
+
"type": "number",
|
|
751
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
752
|
+
},
|
|
753
|
+
"before": {
|
|
754
|
+
"type": "string",
|
|
755
|
+
"description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
756
|
+
},
|
|
757
|
+
"after": {
|
|
758
|
+
"type": "string",
|
|
759
|
+
"description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
760
|
+
},
|
|
761
|
+
"username": {
|
|
762
|
+
"type": "string",
|
|
763
|
+
"description": "The handle for the GitHub user account."
|
|
764
|
+
},
|
|
765
|
+
"subject_digests": {
|
|
766
|
+
"type": "array",
|
|
767
|
+
"description": "List of subject digests to fetch attestations for."
|
|
768
|
+
},
|
|
769
|
+
"predicate_type": {
|
|
770
|
+
"type": "string",
|
|
771
|
+
"description": "Optional filter for fetching attestations with a given predicate type.\nThis option accepts `provenance`, `sbom`, `release`, or freeform text\nfor custom predicate types."
|
|
772
|
+
}
|
|
773
|
+
},
|
|
774
|
+
"required": [
|
|
775
|
+
"username",
|
|
776
|
+
"subject_digests"
|
|
777
|
+
]
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"name": "users_delete_attestations_bulk",
|
|
782
|
+
"description": "Delete attestations in bulk",
|
|
783
|
+
"method": "POST",
|
|
784
|
+
"path": "/users/{username}/attestations/delete-request",
|
|
785
|
+
"deleteSendsJsonBody": false,
|
|
786
|
+
"inputSchema": {
|
|
787
|
+
"type": "object",
|
|
788
|
+
"properties": {
|
|
789
|
+
"username": {
|
|
790
|
+
"type": "string",
|
|
791
|
+
"description": "The handle for the GitHub user account."
|
|
792
|
+
}
|
|
793
|
+
},
|
|
794
|
+
"required": [
|
|
795
|
+
"username"
|
|
796
|
+
]
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
"name": "users_delete_attestations_by_subject_digest",
|
|
801
|
+
"description": "Delete attestations by subject digest",
|
|
802
|
+
"method": "DELETE",
|
|
803
|
+
"path": "/users/{username}/attestations/digest/{subject_digest}",
|
|
804
|
+
"deleteSendsJsonBody": false,
|
|
805
|
+
"inputSchema": {
|
|
806
|
+
"type": "object",
|
|
807
|
+
"properties": {
|
|
808
|
+
"username": {
|
|
809
|
+
"type": "string",
|
|
810
|
+
"description": "The handle for the GitHub user account."
|
|
811
|
+
},
|
|
812
|
+
"subject_digest": {
|
|
813
|
+
"type": "string",
|
|
814
|
+
"description": "Subject Digest"
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
"required": [
|
|
818
|
+
"username",
|
|
819
|
+
"subject_digest"
|
|
820
|
+
]
|
|
821
|
+
}
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
"name": "users_delete_attestations_by_id",
|
|
825
|
+
"description": "Delete attestations by ID",
|
|
826
|
+
"method": "DELETE",
|
|
827
|
+
"path": "/users/{username}/attestations/{attestation_id}",
|
|
828
|
+
"deleteSendsJsonBody": false,
|
|
829
|
+
"inputSchema": {
|
|
830
|
+
"type": "object",
|
|
831
|
+
"properties": {
|
|
832
|
+
"username": {
|
|
833
|
+
"type": "string",
|
|
834
|
+
"description": "The handle for the GitHub user account."
|
|
835
|
+
},
|
|
836
|
+
"attestation_id": {
|
|
837
|
+
"type": "number",
|
|
838
|
+
"description": "Attestation ID"
|
|
839
|
+
}
|
|
840
|
+
},
|
|
841
|
+
"required": [
|
|
842
|
+
"username",
|
|
843
|
+
"attestation_id"
|
|
844
|
+
]
|
|
845
|
+
}
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
"name": "users_list_attestations",
|
|
849
|
+
"description": "List attestations",
|
|
850
|
+
"method": "GET",
|
|
851
|
+
"path": "/users/{username}/attestations/{subject_digest}",
|
|
852
|
+
"deleteSendsJsonBody": false,
|
|
853
|
+
"inputSchema": {
|
|
854
|
+
"type": "object",
|
|
855
|
+
"properties": {
|
|
856
|
+
"per_page": {
|
|
857
|
+
"type": "number",
|
|
858
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
859
|
+
},
|
|
860
|
+
"before": {
|
|
861
|
+
"type": "string",
|
|
862
|
+
"description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
863
|
+
},
|
|
864
|
+
"after": {
|
|
865
|
+
"type": "string",
|
|
866
|
+
"description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
867
|
+
},
|
|
868
|
+
"username": {
|
|
869
|
+
"type": "string",
|
|
870
|
+
"description": "The handle for the GitHub user account."
|
|
871
|
+
},
|
|
872
|
+
"subject_digest": {
|
|
873
|
+
"type": "string",
|
|
874
|
+
"description": "Subject Digest"
|
|
875
|
+
},
|
|
876
|
+
"predicate_type": {
|
|
877
|
+
"type": "string",
|
|
878
|
+
"description": "Optional filter for fetching attestations with a given predicate type.\nThis option accepts `provenance`, `sbom`, `release`, or freeform text\nfor custom predicate types."
|
|
879
|
+
}
|
|
880
|
+
},
|
|
881
|
+
"required": [
|
|
882
|
+
"username",
|
|
883
|
+
"subject_digest"
|
|
884
|
+
]
|
|
885
|
+
}
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"name": "users_list_followers_for_user",
|
|
889
|
+
"description": "List followers of a user",
|
|
890
|
+
"method": "GET",
|
|
891
|
+
"path": "/users/{username}/followers",
|
|
892
|
+
"deleteSendsJsonBody": false,
|
|
893
|
+
"inputSchema": {
|
|
894
|
+
"type": "object",
|
|
895
|
+
"properties": {
|
|
896
|
+
"username": {
|
|
897
|
+
"type": "string",
|
|
898
|
+
"description": "The handle for the GitHub user account."
|
|
899
|
+
},
|
|
900
|
+
"per_page": {
|
|
901
|
+
"type": "number",
|
|
902
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
903
|
+
},
|
|
904
|
+
"page": {
|
|
905
|
+
"type": "number",
|
|
906
|
+
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
907
|
+
}
|
|
908
|
+
},
|
|
909
|
+
"required": [
|
|
910
|
+
"username"
|
|
911
|
+
]
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"name": "users_list_following_for_user",
|
|
916
|
+
"description": "List the people a user follows",
|
|
917
|
+
"method": "GET",
|
|
918
|
+
"path": "/users/{username}/following",
|
|
919
|
+
"deleteSendsJsonBody": false,
|
|
920
|
+
"inputSchema": {
|
|
921
|
+
"type": "object",
|
|
922
|
+
"properties": {
|
|
923
|
+
"username": {
|
|
924
|
+
"type": "string",
|
|
925
|
+
"description": "The handle for the GitHub user account."
|
|
926
|
+
},
|
|
927
|
+
"per_page": {
|
|
928
|
+
"type": "number",
|
|
929
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
930
|
+
},
|
|
931
|
+
"page": {
|
|
932
|
+
"type": "number",
|
|
933
|
+
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
"required": [
|
|
937
|
+
"username"
|
|
938
|
+
]
|
|
939
|
+
}
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
"name": "users_check_following_for_user",
|
|
943
|
+
"description": "Check if a user follows another user",
|
|
944
|
+
"method": "GET",
|
|
945
|
+
"path": "/users/{username}/following/{target_user}",
|
|
946
|
+
"deleteSendsJsonBody": false,
|
|
947
|
+
"inputSchema": {
|
|
948
|
+
"type": "object",
|
|
949
|
+
"properties": {
|
|
950
|
+
"username": {
|
|
951
|
+
"type": "string",
|
|
952
|
+
"description": "The handle for the GitHub user account."
|
|
953
|
+
},
|
|
954
|
+
"target_user": {
|
|
955
|
+
"type": "string",
|
|
956
|
+
"description": "The target_user parameter"
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
"required": [
|
|
960
|
+
"username",
|
|
961
|
+
"target_user"
|
|
962
|
+
]
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
"name": "users_list_gpg_keys_for_user",
|
|
967
|
+
"description": "List GPG keys for a user",
|
|
968
|
+
"method": "GET",
|
|
969
|
+
"path": "/users/{username}/gpg_keys",
|
|
970
|
+
"deleteSendsJsonBody": false,
|
|
971
|
+
"inputSchema": {
|
|
972
|
+
"type": "object",
|
|
973
|
+
"properties": {
|
|
974
|
+
"username": {
|
|
975
|
+
"type": "string",
|
|
976
|
+
"description": "The handle for the GitHub user account."
|
|
977
|
+
},
|
|
978
|
+
"per_page": {
|
|
979
|
+
"type": "number",
|
|
980
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
981
|
+
},
|
|
982
|
+
"page": {
|
|
983
|
+
"type": "number",
|
|
984
|
+
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
985
|
+
}
|
|
986
|
+
},
|
|
987
|
+
"required": [
|
|
988
|
+
"username"
|
|
989
|
+
]
|
|
990
|
+
}
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
"name": "users_get_context_for_user",
|
|
994
|
+
"description": "Get contextual information for a user",
|
|
995
|
+
"method": "GET",
|
|
996
|
+
"path": "/users/{username}/hovercard",
|
|
997
|
+
"deleteSendsJsonBody": false,
|
|
998
|
+
"inputSchema": {
|
|
999
|
+
"type": "object",
|
|
1000
|
+
"properties": {
|
|
1001
|
+
"username": {
|
|
1002
|
+
"type": "string",
|
|
1003
|
+
"description": "The handle for the GitHub user account."
|
|
1004
|
+
},
|
|
1005
|
+
"subject_type": {
|
|
1006
|
+
"type": "string",
|
|
1007
|
+
"description": "Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`.",
|
|
1008
|
+
"enum": [
|
|
1009
|
+
"organization",
|
|
1010
|
+
"repository",
|
|
1011
|
+
"issue",
|
|
1012
|
+
"pull_request"
|
|
1013
|
+
]
|
|
1014
|
+
},
|
|
1015
|
+
"subject_id": {
|
|
1016
|
+
"type": "string",
|
|
1017
|
+
"description": "Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`."
|
|
1018
|
+
}
|
|
1019
|
+
},
|
|
1020
|
+
"required": [
|
|
1021
|
+
"username"
|
|
1022
|
+
]
|
|
1023
|
+
}
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
"name": "users_list_public_keys_for_user",
|
|
1027
|
+
"description": "List public keys for a user",
|
|
1028
|
+
"method": "GET",
|
|
1029
|
+
"path": "/users/{username}/keys",
|
|
1030
|
+
"deleteSendsJsonBody": false,
|
|
1031
|
+
"inputSchema": {
|
|
1032
|
+
"type": "object",
|
|
1033
|
+
"properties": {
|
|
1034
|
+
"username": {
|
|
1035
|
+
"type": "string",
|
|
1036
|
+
"description": "The handle for the GitHub user account."
|
|
1037
|
+
},
|
|
1038
|
+
"per_page": {
|
|
1039
|
+
"type": "number",
|
|
1040
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
1041
|
+
},
|
|
1042
|
+
"page": {
|
|
1043
|
+
"type": "number",
|
|
1044
|
+
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
1045
|
+
}
|
|
1046
|
+
},
|
|
1047
|
+
"required": [
|
|
1048
|
+
"username"
|
|
1049
|
+
]
|
|
1050
|
+
}
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"name": "users_list_social_accounts_for_user",
|
|
1054
|
+
"description": "List social accounts for a user",
|
|
1055
|
+
"method": "GET",
|
|
1056
|
+
"path": "/users/{username}/social_accounts",
|
|
1057
|
+
"deleteSendsJsonBody": false,
|
|
1058
|
+
"inputSchema": {
|
|
1059
|
+
"type": "object",
|
|
1060
|
+
"properties": {
|
|
1061
|
+
"username": {
|
|
1062
|
+
"type": "string",
|
|
1063
|
+
"description": "The handle for the GitHub user account."
|
|
1064
|
+
},
|
|
1065
|
+
"per_page": {
|
|
1066
|
+
"type": "number",
|
|
1067
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
1068
|
+
},
|
|
1069
|
+
"page": {
|
|
1070
|
+
"type": "number",
|
|
1071
|
+
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
1072
|
+
}
|
|
1073
|
+
},
|
|
1074
|
+
"required": [
|
|
1075
|
+
"username"
|
|
1076
|
+
]
|
|
1077
|
+
}
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
"name": "users_list_ssh_signing_keys_for_user",
|
|
1081
|
+
"description": "List SSH signing keys for a user",
|
|
1082
|
+
"method": "GET",
|
|
1083
|
+
"path": "/users/{username}/ssh_signing_keys",
|
|
1084
|
+
"deleteSendsJsonBody": false,
|
|
1085
|
+
"inputSchema": {
|
|
1086
|
+
"type": "object",
|
|
1087
|
+
"properties": {
|
|
1088
|
+
"username": {
|
|
1089
|
+
"type": "string",
|
|
1090
|
+
"description": "The handle for the GitHub user account."
|
|
1091
|
+
},
|
|
1092
|
+
"per_page": {
|
|
1093
|
+
"type": "number",
|
|
1094
|
+
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
1095
|
+
},
|
|
1096
|
+
"page": {
|
|
1097
|
+
"type": "number",
|
|
1098
|
+
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
|
|
1099
|
+
}
|
|
1100
|
+
},
|
|
1101
|
+
"required": [
|
|
1102
|
+
"username"
|
|
1103
|
+
]
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
];
|
|
1107
|
+
|
|
1108
|
+
export const tools = ENDPOINTS.map((e) => ({
|
|
1109
|
+
name: e.name,
|
|
1110
|
+
description: e.description,
|
|
1111
|
+
method: e.method,
|
|
1112
|
+
path: e.path,
|
|
1113
|
+
deleteSendsJsonBody: Boolean(e.deleteSendsJsonBody),
|
|
1114
|
+
inputSchema: e.inputSchema,
|
|
1115
|
+
handler: async (params) => ({
|
|
1116
|
+
content: [{ type: 'text', text: JSON.stringify(await apiRequest(e.method, e.path, params, { deleteSendsJsonBody: e.deleteSendsJsonBody }), null, 2) }],
|
|
1117
|
+
}),
|
|
1118
|
+
}));
|