@flow-industries/id 0.26.5 → 0.27.1

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.
@@ -0,0 +1,909 @@
1
+ import { z } from "zod";
2
+ import type { RawValue } from "../json";
3
+ import type { GitHubOperationPlan, GitHubUpstreamRequest } from "../types/github-connector";
4
+ import type { GitHubScope } from "./scopes";
5
+ /** The only host the connector ever sends a GitHub token to. */
6
+ export declare const GITHUB_API_ORIGIN = "https://api.github.com";
7
+ export declare const GITHUB_REQUEST_MAX_BYTES = 1572864;
8
+ export declare const GITHUB_RESPONSE_MAX_BYTES: number;
9
+ /**
10
+ * Every GitHub call the connector can make, keyed by a stable operation id.
11
+ * Inputs and outputs use GitHub's own field names; responses are projected to
12
+ * the listed fields, so anything else GitHub returns is dropped.
13
+ */
14
+ export declare const githubOperations: {
15
+ "viewer.get": {
16
+ plan(raw: RawValue): GitHubOperationPlan;
17
+ method: GitHubUpstreamRequest["method"];
18
+ input: z.ZodObject<{}, z.core.$strict>;
19
+ response: z.ZodObject<{
20
+ login: z.ZodString;
21
+ id: z.ZodNumber;
22
+ avatar_url: z.ZodOptional<z.ZodString>;
23
+ html_url: z.ZodOptional<z.ZodString>;
24
+ type: z.ZodOptional<z.ZodString>;
25
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
+ company: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
+ blog: z.ZodOptional<z.ZodNullable<z.ZodString>>;
30
+ location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ public_repos: z.ZodOptional<z.ZodNumber>;
32
+ followers: z.ZodOptional<z.ZodNumber>;
33
+ following: z.ZodOptional<z.ZodNumber>;
34
+ created_at: z.ZodOptional<z.ZodString>;
35
+ }, z.core.$strip>;
36
+ /** Addressed to one repository, so a 404 may mean "private, and the grant lacks `repo`". */
37
+ repository?: true;
38
+ paginated?: true;
39
+ scopes?: ((input: Record<string, never>) => readonly GitHubScope[]) | undefined;
40
+ request: (input: Record<string, never>) => Omit<GitHubUpstreamRequest, "method">;
41
+ };
42
+ "repos.listForViewer": {
43
+ plan(raw: RawValue): GitHubOperationPlan;
44
+ method: GitHubUpstreamRequest["method"];
45
+ input: z.ZodObject<{
46
+ per_page: z.ZodOptional<z.ZodNumber>;
47
+ page: z.ZodOptional<z.ZodNumber>;
48
+ visibility: z.ZodDefault<z.ZodEnum<{
49
+ public: "public";
50
+ private: "private";
51
+ all: "all";
52
+ }>>;
53
+ affiliation: z.ZodOptional<z.ZodArray<z.ZodEnum<{
54
+ owner: "owner";
55
+ collaborator: "collaborator";
56
+ organization_member: "organization_member";
57
+ }>>>;
58
+ sort: z.ZodOptional<z.ZodEnum<{
59
+ created: "created";
60
+ full_name: "full_name";
61
+ updated: "updated";
62
+ pushed: "pushed";
63
+ }>>;
64
+ direction: z.ZodOptional<z.ZodEnum<{
65
+ asc: "asc";
66
+ desc: "desc";
67
+ }>>;
68
+ }, z.core.$strict>;
69
+ response: z.ZodArray<z.ZodObject<{
70
+ id: z.ZodNumber;
71
+ name: z.ZodString;
72
+ full_name: z.ZodString;
73
+ owner: z.ZodObject<{
74
+ login: z.ZodString;
75
+ id: z.ZodNumber;
76
+ avatar_url: z.ZodOptional<z.ZodString>;
77
+ html_url: z.ZodOptional<z.ZodString>;
78
+ type: z.ZodOptional<z.ZodString>;
79
+ }, z.core.$strip>;
80
+ private: z.ZodBoolean;
81
+ visibility: z.ZodOptional<z.ZodString>;
82
+ html_url: z.ZodString;
83
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
84
+ fork: z.ZodOptional<z.ZodBoolean>;
85
+ archived: z.ZodOptional<z.ZodBoolean>;
86
+ default_branch: z.ZodOptional<z.ZodString>;
87
+ language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
+ stargazers_count: z.ZodOptional<z.ZodNumber>;
89
+ forks_count: z.ZodOptional<z.ZodNumber>;
90
+ open_issues_count: z.ZodOptional<z.ZodNumber>;
91
+ pushed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
92
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
93
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
+ permissions: z.ZodOptional<z.ZodObject<{
95
+ admin: z.ZodBoolean;
96
+ maintain: z.ZodOptional<z.ZodBoolean>;
97
+ push: z.ZodBoolean;
98
+ triage: z.ZodOptional<z.ZodBoolean>;
99
+ pull: z.ZodBoolean;
100
+ }, z.core.$strip>>;
101
+ }, z.core.$strip>>;
102
+ /** Addressed to one repository, so a 404 may mean "private, and the grant lacks `repo`". */
103
+ repository?: true;
104
+ paginated?: true;
105
+ scopes?: ((input: {
106
+ visibility: "public" | "private" | "all";
107
+ per_page?: number | undefined;
108
+ page?: number | undefined;
109
+ affiliation?: ("owner" | "collaborator" | "organization_member")[] | undefined;
110
+ sort?: "created" | "full_name" | "updated" | "pushed" | undefined;
111
+ direction?: "asc" | "desc" | undefined;
112
+ }) => readonly GitHubScope[]) | undefined;
113
+ request: (input: {
114
+ visibility: "public" | "private" | "all";
115
+ per_page?: number | undefined;
116
+ page?: number | undefined;
117
+ affiliation?: ("owner" | "collaborator" | "organization_member")[] | undefined;
118
+ sort?: "created" | "full_name" | "updated" | "pushed" | undefined;
119
+ direction?: "asc" | "desc" | undefined;
120
+ }) => Omit<GitHubUpstreamRequest, "method">;
121
+ };
122
+ "repos.get": {
123
+ plan(raw: RawValue): GitHubOperationPlan;
124
+ method: GitHubUpstreamRequest["method"];
125
+ input: z.ZodObject<{
126
+ owner: z.ZodString;
127
+ repo: z.ZodString;
128
+ }, z.core.$strict>;
129
+ response: z.ZodObject<{
130
+ id: z.ZodNumber;
131
+ name: z.ZodString;
132
+ full_name: z.ZodString;
133
+ owner: z.ZodObject<{
134
+ login: z.ZodString;
135
+ id: z.ZodNumber;
136
+ avatar_url: z.ZodOptional<z.ZodString>;
137
+ html_url: z.ZodOptional<z.ZodString>;
138
+ type: z.ZodOptional<z.ZodString>;
139
+ }, z.core.$strip>;
140
+ private: z.ZodBoolean;
141
+ visibility: z.ZodOptional<z.ZodString>;
142
+ html_url: z.ZodString;
143
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
144
+ fork: z.ZodOptional<z.ZodBoolean>;
145
+ archived: z.ZodOptional<z.ZodBoolean>;
146
+ default_branch: z.ZodOptional<z.ZodString>;
147
+ language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
148
+ stargazers_count: z.ZodOptional<z.ZodNumber>;
149
+ forks_count: z.ZodOptional<z.ZodNumber>;
150
+ open_issues_count: z.ZodOptional<z.ZodNumber>;
151
+ pushed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
152
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
153
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
154
+ permissions: z.ZodOptional<z.ZodObject<{
155
+ admin: z.ZodBoolean;
156
+ maintain: z.ZodOptional<z.ZodBoolean>;
157
+ push: z.ZodBoolean;
158
+ triage: z.ZodOptional<z.ZodBoolean>;
159
+ pull: z.ZodBoolean;
160
+ }, z.core.$strip>>;
161
+ }, z.core.$strip>;
162
+ /** Addressed to one repository, so a 404 may mean "private, and the grant lacks `repo`". */
163
+ repository?: true;
164
+ paginated?: true;
165
+ scopes?: ((input: {
166
+ owner: string;
167
+ repo: string;
168
+ }) => readonly GitHubScope[]) | undefined;
169
+ request: (input: {
170
+ owner: string;
171
+ repo: string;
172
+ }) => Omit<GitHubUpstreamRequest, "method">;
173
+ };
174
+ "issues.list": {
175
+ plan(raw: RawValue): GitHubOperationPlan;
176
+ method: GitHubUpstreamRequest["method"];
177
+ input: z.ZodObject<{
178
+ per_page: z.ZodOptional<z.ZodNumber>;
179
+ page: z.ZodOptional<z.ZodNumber>;
180
+ state: z.ZodOptional<z.ZodEnum<{
181
+ all: "all";
182
+ open: "open";
183
+ closed: "closed";
184
+ }>>;
185
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
186
+ sort: z.ZodOptional<z.ZodEnum<{
187
+ created: "created";
188
+ comments: "comments";
189
+ updated: "updated";
190
+ }>>;
191
+ direction: z.ZodOptional<z.ZodEnum<{
192
+ asc: "asc";
193
+ desc: "desc";
194
+ }>>;
195
+ since: z.ZodOptional<z.ZodISODateTime>;
196
+ owner: z.ZodString;
197
+ repo: z.ZodString;
198
+ }, z.core.$strict>;
199
+ response: z.ZodArray<z.ZodObject<{
200
+ id: z.ZodNumber;
201
+ number: z.ZodNumber;
202
+ title: z.ZodString;
203
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
204
+ state: z.ZodString;
205
+ state_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
206
+ locked: z.ZodOptional<z.ZodBoolean>;
207
+ user: z.ZodNullable<z.ZodObject<{
208
+ login: z.ZodString;
209
+ id: z.ZodNumber;
210
+ avatar_url: z.ZodOptional<z.ZodString>;
211
+ html_url: z.ZodOptional<z.ZodString>;
212
+ type: z.ZodOptional<z.ZodString>;
213
+ }, z.core.$strip>>;
214
+ labels: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
215
+ id: z.ZodOptional<z.ZodNumber>;
216
+ name: z.ZodString;
217
+ color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
218
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
219
+ }, z.core.$strip>]>>;
220
+ assignees: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
221
+ login: z.ZodString;
222
+ id: z.ZodNumber;
223
+ avatar_url: z.ZodOptional<z.ZodString>;
224
+ html_url: z.ZodOptional<z.ZodString>;
225
+ type: z.ZodOptional<z.ZodString>;
226
+ }, z.core.$strip>>>>;
227
+ milestone: z.ZodOptional<z.ZodNullable<z.ZodObject<{
228
+ number: z.ZodNumber;
229
+ title: z.ZodString;
230
+ }, z.core.$strip>>>;
231
+ comments: z.ZodOptional<z.ZodNumber>;
232
+ html_url: z.ZodString;
233
+ created_at: z.ZodString;
234
+ updated_at: z.ZodString;
235
+ closed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
236
+ author_association: z.ZodOptional<z.ZodString>;
237
+ pull_request: z.ZodOptional<z.ZodObject<{
238
+ html_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
239
+ merged_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
240
+ }, z.core.$strip>>;
241
+ }, z.core.$strip>>;
242
+ /** Addressed to one repository, so a 404 may mean "private, and the grant lacks `repo`". */
243
+ repository?: true;
244
+ paginated?: true;
245
+ scopes?: ((input: {
246
+ owner: string;
247
+ repo: string;
248
+ per_page?: number | undefined;
249
+ page?: number | undefined;
250
+ state?: "all" | "open" | "closed" | undefined;
251
+ labels?: string[] | undefined;
252
+ sort?: "created" | "comments" | "updated" | undefined;
253
+ direction?: "asc" | "desc" | undefined;
254
+ since?: string | undefined;
255
+ }) => readonly GitHubScope[]) | undefined;
256
+ request: (input: {
257
+ owner: string;
258
+ repo: string;
259
+ per_page?: number | undefined;
260
+ page?: number | undefined;
261
+ state?: "all" | "open" | "closed" | undefined;
262
+ labels?: string[] | undefined;
263
+ sort?: "created" | "comments" | "updated" | undefined;
264
+ direction?: "asc" | "desc" | undefined;
265
+ since?: string | undefined;
266
+ }) => Omit<GitHubUpstreamRequest, "method">;
267
+ };
268
+ "issues.get": {
269
+ plan(raw: RawValue): GitHubOperationPlan;
270
+ method: GitHubUpstreamRequest["method"];
271
+ input: z.ZodObject<{
272
+ issue_number: z.ZodNumber;
273
+ owner: z.ZodString;
274
+ repo: z.ZodString;
275
+ }, z.core.$strict>;
276
+ response: z.ZodObject<{
277
+ id: z.ZodNumber;
278
+ number: z.ZodNumber;
279
+ title: z.ZodString;
280
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
281
+ state: z.ZodString;
282
+ state_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
283
+ locked: z.ZodOptional<z.ZodBoolean>;
284
+ user: z.ZodNullable<z.ZodObject<{
285
+ login: z.ZodString;
286
+ id: z.ZodNumber;
287
+ avatar_url: z.ZodOptional<z.ZodString>;
288
+ html_url: z.ZodOptional<z.ZodString>;
289
+ type: z.ZodOptional<z.ZodString>;
290
+ }, z.core.$strip>>;
291
+ labels: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
292
+ id: z.ZodOptional<z.ZodNumber>;
293
+ name: z.ZodString;
294
+ color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
295
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
296
+ }, z.core.$strip>]>>;
297
+ assignees: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
298
+ login: z.ZodString;
299
+ id: z.ZodNumber;
300
+ avatar_url: z.ZodOptional<z.ZodString>;
301
+ html_url: z.ZodOptional<z.ZodString>;
302
+ type: z.ZodOptional<z.ZodString>;
303
+ }, z.core.$strip>>>>;
304
+ milestone: z.ZodOptional<z.ZodNullable<z.ZodObject<{
305
+ number: z.ZodNumber;
306
+ title: z.ZodString;
307
+ }, z.core.$strip>>>;
308
+ comments: z.ZodOptional<z.ZodNumber>;
309
+ html_url: z.ZodString;
310
+ created_at: z.ZodString;
311
+ updated_at: z.ZodString;
312
+ closed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
313
+ author_association: z.ZodOptional<z.ZodString>;
314
+ pull_request: z.ZodOptional<z.ZodObject<{
315
+ html_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
316
+ merged_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
317
+ }, z.core.$strip>>;
318
+ }, z.core.$strip>;
319
+ /** Addressed to one repository, so a 404 may mean "private, and the grant lacks `repo`". */
320
+ repository?: true;
321
+ paginated?: true;
322
+ scopes?: ((input: {
323
+ issue_number: number;
324
+ owner: string;
325
+ repo: string;
326
+ }) => readonly GitHubScope[]) | undefined;
327
+ request: (input: {
328
+ issue_number: number;
329
+ owner: string;
330
+ repo: string;
331
+ }) => Omit<GitHubUpstreamRequest, "method">;
332
+ };
333
+ "issues.create": {
334
+ plan(raw: RawValue): GitHubOperationPlan;
335
+ method: GitHubUpstreamRequest["method"];
336
+ input: z.ZodObject<{
337
+ title: z.ZodString;
338
+ body: z.ZodOptional<z.ZodString>;
339
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
340
+ assignees: z.ZodOptional<z.ZodArray<z.ZodString>>;
341
+ milestone: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
342
+ owner: z.ZodString;
343
+ repo: z.ZodString;
344
+ }, z.core.$strict>;
345
+ response: z.ZodObject<{
346
+ id: z.ZodNumber;
347
+ number: z.ZodNumber;
348
+ title: z.ZodString;
349
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
350
+ state: z.ZodString;
351
+ state_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
352
+ locked: z.ZodOptional<z.ZodBoolean>;
353
+ user: z.ZodNullable<z.ZodObject<{
354
+ login: z.ZodString;
355
+ id: z.ZodNumber;
356
+ avatar_url: z.ZodOptional<z.ZodString>;
357
+ html_url: z.ZodOptional<z.ZodString>;
358
+ type: z.ZodOptional<z.ZodString>;
359
+ }, z.core.$strip>>;
360
+ labels: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
361
+ id: z.ZodOptional<z.ZodNumber>;
362
+ name: z.ZodString;
363
+ color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
364
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
365
+ }, z.core.$strip>]>>;
366
+ assignees: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
367
+ login: z.ZodString;
368
+ id: z.ZodNumber;
369
+ avatar_url: z.ZodOptional<z.ZodString>;
370
+ html_url: z.ZodOptional<z.ZodString>;
371
+ type: z.ZodOptional<z.ZodString>;
372
+ }, z.core.$strip>>>>;
373
+ milestone: z.ZodOptional<z.ZodNullable<z.ZodObject<{
374
+ number: z.ZodNumber;
375
+ title: z.ZodString;
376
+ }, z.core.$strip>>>;
377
+ comments: z.ZodOptional<z.ZodNumber>;
378
+ html_url: z.ZodString;
379
+ created_at: z.ZodString;
380
+ updated_at: z.ZodString;
381
+ closed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
382
+ author_association: z.ZodOptional<z.ZodString>;
383
+ pull_request: z.ZodOptional<z.ZodObject<{
384
+ html_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
385
+ merged_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
386
+ }, z.core.$strip>>;
387
+ }, z.core.$strip>;
388
+ /** Addressed to one repository, so a 404 may mean "private, and the grant lacks `repo`". */
389
+ repository?: true;
390
+ paginated?: true;
391
+ scopes?: ((input: {
392
+ title: string;
393
+ owner: string;
394
+ repo: string;
395
+ body?: string | undefined;
396
+ labels?: string[] | undefined;
397
+ assignees?: string[] | undefined;
398
+ milestone?: number | null | undefined;
399
+ }) => readonly GitHubScope[]) | undefined;
400
+ request: (input: {
401
+ title: string;
402
+ owner: string;
403
+ repo: string;
404
+ body?: string | undefined;
405
+ labels?: string[] | undefined;
406
+ assignees?: string[] | undefined;
407
+ milestone?: number | null | undefined;
408
+ }) => Omit<GitHubUpstreamRequest, "method">;
409
+ };
410
+ "issues.update": {
411
+ plan(raw: RawValue): GitHubOperationPlan;
412
+ method: GitHubUpstreamRequest["method"];
413
+ input: z.ZodObject<{
414
+ issue_number: z.ZodNumber;
415
+ title: z.ZodOptional<z.ZodString>;
416
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
417
+ state: z.ZodOptional<z.ZodEnum<{
418
+ open: "open";
419
+ closed: "closed";
420
+ }>>;
421
+ state_reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
422
+ completed: "completed";
423
+ not_planned: "not_planned";
424
+ reopened: "reopened";
425
+ }>>>;
426
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
427
+ assignees: z.ZodOptional<z.ZodArray<z.ZodString>>;
428
+ milestone: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
429
+ owner: z.ZodString;
430
+ repo: z.ZodString;
431
+ }, z.core.$strict>;
432
+ response: z.ZodObject<{
433
+ id: z.ZodNumber;
434
+ number: z.ZodNumber;
435
+ title: z.ZodString;
436
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
437
+ state: z.ZodString;
438
+ state_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
439
+ locked: z.ZodOptional<z.ZodBoolean>;
440
+ user: z.ZodNullable<z.ZodObject<{
441
+ login: z.ZodString;
442
+ id: z.ZodNumber;
443
+ avatar_url: z.ZodOptional<z.ZodString>;
444
+ html_url: z.ZodOptional<z.ZodString>;
445
+ type: z.ZodOptional<z.ZodString>;
446
+ }, z.core.$strip>>;
447
+ labels: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
448
+ id: z.ZodOptional<z.ZodNumber>;
449
+ name: z.ZodString;
450
+ color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
451
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
452
+ }, z.core.$strip>]>>;
453
+ assignees: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
454
+ login: z.ZodString;
455
+ id: z.ZodNumber;
456
+ avatar_url: z.ZodOptional<z.ZodString>;
457
+ html_url: z.ZodOptional<z.ZodString>;
458
+ type: z.ZodOptional<z.ZodString>;
459
+ }, z.core.$strip>>>>;
460
+ milestone: z.ZodOptional<z.ZodNullable<z.ZodObject<{
461
+ number: z.ZodNumber;
462
+ title: z.ZodString;
463
+ }, z.core.$strip>>>;
464
+ comments: z.ZodOptional<z.ZodNumber>;
465
+ html_url: z.ZodString;
466
+ created_at: z.ZodString;
467
+ updated_at: z.ZodString;
468
+ closed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
469
+ author_association: z.ZodOptional<z.ZodString>;
470
+ pull_request: z.ZodOptional<z.ZodObject<{
471
+ html_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
472
+ merged_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
473
+ }, z.core.$strip>>;
474
+ }, z.core.$strip>;
475
+ /** Addressed to one repository, so a 404 may mean "private, and the grant lacks `repo`". */
476
+ repository?: true;
477
+ paginated?: true;
478
+ scopes?: ((input: {
479
+ issue_number: number;
480
+ owner: string;
481
+ repo: string;
482
+ title?: string | undefined;
483
+ body?: string | null | undefined;
484
+ state?: "open" | "closed" | undefined;
485
+ state_reason?: "completed" | "not_planned" | "reopened" | null | undefined;
486
+ labels?: string[] | undefined;
487
+ assignees?: string[] | undefined;
488
+ milestone?: number | null | undefined;
489
+ }) => readonly GitHubScope[]) | undefined;
490
+ request: (input: {
491
+ issue_number: number;
492
+ owner: string;
493
+ repo: string;
494
+ title?: string | undefined;
495
+ body?: string | null | undefined;
496
+ state?: "open" | "closed" | undefined;
497
+ state_reason?: "completed" | "not_planned" | "reopened" | null | undefined;
498
+ labels?: string[] | undefined;
499
+ assignees?: string[] | undefined;
500
+ milestone?: number | null | undefined;
501
+ }) => Omit<GitHubUpstreamRequest, "method">;
502
+ };
503
+ "issues.listComments": {
504
+ plan(raw: RawValue): GitHubOperationPlan;
505
+ method: GitHubUpstreamRequest["method"];
506
+ input: z.ZodObject<{
507
+ per_page: z.ZodOptional<z.ZodNumber>;
508
+ page: z.ZodOptional<z.ZodNumber>;
509
+ issue_number: z.ZodNumber;
510
+ since: z.ZodOptional<z.ZodISODateTime>;
511
+ owner: z.ZodString;
512
+ repo: z.ZodString;
513
+ }, z.core.$strict>;
514
+ response: z.ZodArray<z.ZodObject<{
515
+ id: z.ZodNumber;
516
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
517
+ user: z.ZodNullable<z.ZodObject<{
518
+ login: z.ZodString;
519
+ id: z.ZodNumber;
520
+ avatar_url: z.ZodOptional<z.ZodString>;
521
+ html_url: z.ZodOptional<z.ZodString>;
522
+ type: z.ZodOptional<z.ZodString>;
523
+ }, z.core.$strip>>;
524
+ html_url: z.ZodString;
525
+ created_at: z.ZodString;
526
+ updated_at: z.ZodString;
527
+ author_association: z.ZodOptional<z.ZodString>;
528
+ }, z.core.$strip>>;
529
+ /** Addressed to one repository, so a 404 may mean "private, and the grant lacks `repo`". */
530
+ repository?: true;
531
+ paginated?: true;
532
+ scopes?: ((input: {
533
+ issue_number: number;
534
+ owner: string;
535
+ repo: string;
536
+ per_page?: number | undefined;
537
+ page?: number | undefined;
538
+ since?: string | undefined;
539
+ }) => readonly GitHubScope[]) | undefined;
540
+ request: (input: {
541
+ issue_number: number;
542
+ owner: string;
543
+ repo: string;
544
+ per_page?: number | undefined;
545
+ page?: number | undefined;
546
+ since?: string | undefined;
547
+ }) => Omit<GitHubUpstreamRequest, "method">;
548
+ };
549
+ "issues.createComment": {
550
+ plan(raw: RawValue): GitHubOperationPlan;
551
+ method: GitHubUpstreamRequest["method"];
552
+ input: z.ZodObject<{
553
+ issue_number: z.ZodNumber;
554
+ body: z.ZodString;
555
+ owner: z.ZodString;
556
+ repo: z.ZodString;
557
+ }, z.core.$strict>;
558
+ response: z.ZodObject<{
559
+ id: z.ZodNumber;
560
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
561
+ user: z.ZodNullable<z.ZodObject<{
562
+ login: z.ZodString;
563
+ id: z.ZodNumber;
564
+ avatar_url: z.ZodOptional<z.ZodString>;
565
+ html_url: z.ZodOptional<z.ZodString>;
566
+ type: z.ZodOptional<z.ZodString>;
567
+ }, z.core.$strip>>;
568
+ html_url: z.ZodString;
569
+ created_at: z.ZodString;
570
+ updated_at: z.ZodString;
571
+ author_association: z.ZodOptional<z.ZodString>;
572
+ }, z.core.$strip>;
573
+ /** Addressed to one repository, so a 404 may mean "private, and the grant lacks `repo`". */
574
+ repository?: true;
575
+ paginated?: true;
576
+ scopes?: ((input: {
577
+ issue_number: number;
578
+ body: string;
579
+ owner: string;
580
+ repo: string;
581
+ }) => readonly GitHubScope[]) | undefined;
582
+ request: (input: {
583
+ issue_number: number;
584
+ body: string;
585
+ owner: string;
586
+ repo: string;
587
+ }) => Omit<GitHubUpstreamRequest, "method">;
588
+ };
589
+ "pulls.list": {
590
+ plan(raw: RawValue): GitHubOperationPlan;
591
+ method: GitHubUpstreamRequest["method"];
592
+ input: z.ZodObject<{
593
+ per_page: z.ZodOptional<z.ZodNumber>;
594
+ page: z.ZodOptional<z.ZodNumber>;
595
+ state: z.ZodOptional<z.ZodEnum<{
596
+ all: "all";
597
+ open: "open";
598
+ closed: "closed";
599
+ }>>;
600
+ head: z.ZodOptional<z.ZodString>;
601
+ base: z.ZodOptional<z.ZodString>;
602
+ sort: z.ZodOptional<z.ZodEnum<{
603
+ created: "created";
604
+ updated: "updated";
605
+ popularity: "popularity";
606
+ "long-running": "long-running";
607
+ }>>;
608
+ direction: z.ZodOptional<z.ZodEnum<{
609
+ asc: "asc";
610
+ desc: "desc";
611
+ }>>;
612
+ owner: z.ZodString;
613
+ repo: z.ZodString;
614
+ }, z.core.$strict>;
615
+ response: z.ZodArray<z.ZodObject<{
616
+ id: z.ZodNumber;
617
+ number: z.ZodNumber;
618
+ title: z.ZodString;
619
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
620
+ state: z.ZodString;
621
+ draft: z.ZodOptional<z.ZodBoolean>;
622
+ locked: z.ZodOptional<z.ZodBoolean>;
623
+ user: z.ZodNullable<z.ZodObject<{
624
+ login: z.ZodString;
625
+ id: z.ZodNumber;
626
+ avatar_url: z.ZodOptional<z.ZodString>;
627
+ html_url: z.ZodOptional<z.ZodString>;
628
+ type: z.ZodOptional<z.ZodString>;
629
+ }, z.core.$strip>>;
630
+ html_url: z.ZodString;
631
+ created_at: z.ZodString;
632
+ updated_at: z.ZodString;
633
+ closed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
634
+ merged_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
635
+ merged: z.ZodOptional<z.ZodBoolean>;
636
+ mergeable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
637
+ head: z.ZodObject<{
638
+ label: z.ZodOptional<z.ZodString>;
639
+ ref: z.ZodString;
640
+ sha: z.ZodString;
641
+ repo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
642
+ full_name: z.ZodString;
643
+ }, z.core.$strip>>>;
644
+ }, z.core.$strip>;
645
+ base: z.ZodObject<{
646
+ label: z.ZodOptional<z.ZodString>;
647
+ ref: z.ZodString;
648
+ sha: z.ZodString;
649
+ repo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
650
+ full_name: z.ZodString;
651
+ }, z.core.$strip>>>;
652
+ }, z.core.$strip>;
653
+ labels: z.ZodOptional<z.ZodArray<z.ZodObject<{
654
+ id: z.ZodOptional<z.ZodNumber>;
655
+ name: z.ZodString;
656
+ color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
657
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
658
+ }, z.core.$strip>>>;
659
+ assignees: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
660
+ login: z.ZodString;
661
+ id: z.ZodNumber;
662
+ avatar_url: z.ZodOptional<z.ZodString>;
663
+ html_url: z.ZodOptional<z.ZodString>;
664
+ type: z.ZodOptional<z.ZodString>;
665
+ }, z.core.$strip>>>>;
666
+ requested_reviewers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
667
+ login: z.ZodString;
668
+ id: z.ZodNumber;
669
+ avatar_url: z.ZodOptional<z.ZodString>;
670
+ html_url: z.ZodOptional<z.ZodString>;
671
+ type: z.ZodOptional<z.ZodString>;
672
+ }, z.core.$strip>>>>;
673
+ comments: z.ZodOptional<z.ZodNumber>;
674
+ commits: z.ZodOptional<z.ZodNumber>;
675
+ additions: z.ZodOptional<z.ZodNumber>;
676
+ deletions: z.ZodOptional<z.ZodNumber>;
677
+ changed_files: z.ZodOptional<z.ZodNumber>;
678
+ }, z.core.$strip>>;
679
+ /** Addressed to one repository, so a 404 may mean "private, and the grant lacks `repo`". */
680
+ repository?: true;
681
+ paginated?: true;
682
+ scopes?: ((input: {
683
+ owner: string;
684
+ repo: string;
685
+ per_page?: number | undefined;
686
+ page?: number | undefined;
687
+ state?: "all" | "open" | "closed" | undefined;
688
+ head?: string | undefined;
689
+ base?: string | undefined;
690
+ sort?: "created" | "updated" | "popularity" | "long-running" | undefined;
691
+ direction?: "asc" | "desc" | undefined;
692
+ }) => readonly GitHubScope[]) | undefined;
693
+ request: (input: {
694
+ owner: string;
695
+ repo: string;
696
+ per_page?: number | undefined;
697
+ page?: number | undefined;
698
+ state?: "all" | "open" | "closed" | undefined;
699
+ head?: string | undefined;
700
+ base?: string | undefined;
701
+ sort?: "created" | "updated" | "popularity" | "long-running" | undefined;
702
+ direction?: "asc" | "desc" | undefined;
703
+ }) => Omit<GitHubUpstreamRequest, "method">;
704
+ };
705
+ "pulls.get": {
706
+ plan(raw: RawValue): GitHubOperationPlan;
707
+ method: GitHubUpstreamRequest["method"];
708
+ input: z.ZodObject<{
709
+ pull_number: z.ZodNumber;
710
+ owner: z.ZodString;
711
+ repo: z.ZodString;
712
+ }, z.core.$strict>;
713
+ response: z.ZodObject<{
714
+ id: z.ZodNumber;
715
+ number: z.ZodNumber;
716
+ title: z.ZodString;
717
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
718
+ state: z.ZodString;
719
+ draft: z.ZodOptional<z.ZodBoolean>;
720
+ locked: z.ZodOptional<z.ZodBoolean>;
721
+ user: z.ZodNullable<z.ZodObject<{
722
+ login: z.ZodString;
723
+ id: z.ZodNumber;
724
+ avatar_url: z.ZodOptional<z.ZodString>;
725
+ html_url: z.ZodOptional<z.ZodString>;
726
+ type: z.ZodOptional<z.ZodString>;
727
+ }, z.core.$strip>>;
728
+ html_url: z.ZodString;
729
+ created_at: z.ZodString;
730
+ updated_at: z.ZodString;
731
+ closed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
732
+ merged_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
733
+ merged: z.ZodOptional<z.ZodBoolean>;
734
+ mergeable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
735
+ head: z.ZodObject<{
736
+ label: z.ZodOptional<z.ZodString>;
737
+ ref: z.ZodString;
738
+ sha: z.ZodString;
739
+ repo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
740
+ full_name: z.ZodString;
741
+ }, z.core.$strip>>>;
742
+ }, z.core.$strip>;
743
+ base: z.ZodObject<{
744
+ label: z.ZodOptional<z.ZodString>;
745
+ ref: z.ZodString;
746
+ sha: z.ZodString;
747
+ repo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
748
+ full_name: z.ZodString;
749
+ }, z.core.$strip>>>;
750
+ }, z.core.$strip>;
751
+ labels: z.ZodOptional<z.ZodArray<z.ZodObject<{
752
+ id: z.ZodOptional<z.ZodNumber>;
753
+ name: z.ZodString;
754
+ color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
755
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
756
+ }, z.core.$strip>>>;
757
+ assignees: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
758
+ login: z.ZodString;
759
+ id: z.ZodNumber;
760
+ avatar_url: z.ZodOptional<z.ZodString>;
761
+ html_url: z.ZodOptional<z.ZodString>;
762
+ type: z.ZodOptional<z.ZodString>;
763
+ }, z.core.$strip>>>>;
764
+ requested_reviewers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
765
+ login: z.ZodString;
766
+ id: z.ZodNumber;
767
+ avatar_url: z.ZodOptional<z.ZodString>;
768
+ html_url: z.ZodOptional<z.ZodString>;
769
+ type: z.ZodOptional<z.ZodString>;
770
+ }, z.core.$strip>>>>;
771
+ comments: z.ZodOptional<z.ZodNumber>;
772
+ commits: z.ZodOptional<z.ZodNumber>;
773
+ additions: z.ZodOptional<z.ZodNumber>;
774
+ deletions: z.ZodOptional<z.ZodNumber>;
775
+ changed_files: z.ZodOptional<z.ZodNumber>;
776
+ }, z.core.$strip>;
777
+ /** Addressed to one repository, so a 404 may mean "private, and the grant lacks `repo`". */
778
+ repository?: true;
779
+ paginated?: true;
780
+ scopes?: ((input: {
781
+ pull_number: number;
782
+ owner: string;
783
+ repo: string;
784
+ }) => readonly GitHubScope[]) | undefined;
785
+ request: (input: {
786
+ pull_number: number;
787
+ owner: string;
788
+ repo: string;
789
+ }) => Omit<GitHubUpstreamRequest, "method">;
790
+ };
791
+ "repos.getContent": {
792
+ plan(raw: RawValue): GitHubOperationPlan;
793
+ method: GitHubUpstreamRequest["method"];
794
+ input: z.ZodObject<{
795
+ path: z.ZodOptional<z.ZodString>;
796
+ ref: z.ZodOptional<z.ZodString>;
797
+ owner: z.ZodString;
798
+ repo: z.ZodString;
799
+ }, z.core.$strict>;
800
+ response: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
801
+ type: z.ZodEnum<{
802
+ file: "file";
803
+ dir: "dir";
804
+ symlink: "symlink";
805
+ submodule: "submodule";
806
+ }>;
807
+ name: z.ZodString;
808
+ path: z.ZodString;
809
+ sha: z.ZodString;
810
+ size: z.ZodNumber;
811
+ html_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
812
+ download_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
813
+ }, z.core.$strip>>, z.ZodObject<{
814
+ type: z.ZodEnum<{
815
+ file: "file";
816
+ dir: "dir";
817
+ symlink: "symlink";
818
+ submodule: "submodule";
819
+ }>;
820
+ name: z.ZodString;
821
+ path: z.ZodString;
822
+ sha: z.ZodString;
823
+ size: z.ZodNumber;
824
+ html_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
825
+ download_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
826
+ encoding: z.ZodOptional<z.ZodString>;
827
+ content: z.ZodOptional<z.ZodString>;
828
+ target: z.ZodOptional<z.ZodString>;
829
+ submodule_git_url: z.ZodOptional<z.ZodString>;
830
+ }, z.core.$strip>]>;
831
+ /** Addressed to one repository, so a 404 may mean "private, and the grant lacks `repo`". */
832
+ repository?: true;
833
+ paginated?: true;
834
+ scopes?: ((input: {
835
+ owner: string;
836
+ repo: string;
837
+ path?: string | undefined;
838
+ ref?: string | undefined;
839
+ }) => readonly GitHubScope[]) | undefined;
840
+ request: (input: {
841
+ owner: string;
842
+ repo: string;
843
+ path?: string | undefined;
844
+ ref?: string | undefined;
845
+ }) => Omit<GitHubUpstreamRequest, "method">;
846
+ };
847
+ "repos.createOrUpdateFile": {
848
+ plan(raw: RawValue): GitHubOperationPlan;
849
+ method: GitHubUpstreamRequest["method"];
850
+ input: z.ZodObject<{
851
+ path: z.ZodString;
852
+ message: z.ZodString;
853
+ content: z.ZodString;
854
+ sha: z.ZodOptional<z.ZodString>;
855
+ branch: z.ZodOptional<z.ZodString>;
856
+ owner: z.ZodString;
857
+ repo: z.ZodString;
858
+ }, z.core.$strict>;
859
+ response: z.ZodObject<{
860
+ content: z.ZodNullable<z.ZodObject<{
861
+ type: z.ZodEnum<{
862
+ file: "file";
863
+ dir: "dir";
864
+ symlink: "symlink";
865
+ submodule: "submodule";
866
+ }>;
867
+ name: z.ZodString;
868
+ path: z.ZodString;
869
+ sha: z.ZodString;
870
+ size: z.ZodNumber;
871
+ html_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
872
+ download_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
873
+ }, z.core.$strip>>;
874
+ commit: z.ZodObject<{
875
+ sha: z.ZodString;
876
+ html_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
877
+ message: z.ZodOptional<z.ZodString>;
878
+ }, z.core.$strip>;
879
+ }, z.core.$strip>;
880
+ /** Addressed to one repository, so a 404 may mean "private, and the grant lacks `repo`". */
881
+ repository?: true;
882
+ paginated?: true;
883
+ scopes?: ((input: {
884
+ path: string;
885
+ message: string;
886
+ content: string;
887
+ owner: string;
888
+ repo: string;
889
+ sha?: string | undefined;
890
+ branch?: string | undefined;
891
+ }) => readonly GitHubScope[]) | undefined;
892
+ request: (input: {
893
+ path: string;
894
+ message: string;
895
+ content: string;
896
+ owner: string;
897
+ repo: string;
898
+ sha?: string | undefined;
899
+ branch?: string | undefined;
900
+ }) => Omit<GitHubUpstreamRequest, "method">;
901
+ };
902
+ };
903
+ export declare function isGitHubOperationId(value: string): value is keyof typeof githubOperations;
904
+ /**
905
+ * The api.github.com URL for an operation's path segments. Each segment is
906
+ * percent-encoded on its own, and the result must keep exactly that path on
907
+ * exactly this host, so no input can steer the token elsewhere.
908
+ */
909
+ export declare function githubRequestUrl(segments: readonly string[], query?: Readonly<Record<string, string | undefined>>): URL;