gitverse-api-sdk 5.1.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +112 -7
- package/dist/api/actions.d.ts +313 -544
- package/dist/api/emails.d.ts +41 -206
- package/dist/api/issues.d.ts +100 -480
- package/dist/api/organizations.d.ts +67 -228
- package/dist/api/pages.d.ts +33 -197
- package/dist/api/pulls.d.ts +75 -520
- package/dist/api/releases.d.ts +135 -384
- package/dist/api/repositories.d.ts +354 -1067
- package/dist/api/repositories.js.map +2 -2
- package/dist/api/stars.d.ts +55 -272
- package/dist/api/teams.d.ts +51 -288
- package/dist/api/users.d.ts +52 -263
- package/dist/client.d.ts +118 -150
- package/dist/enums.d.ts +47 -48
- package/dist/errors.d.ts +39 -73
- package/dist/index.d.ts +54 -2442
- package/dist/types.d.ts +1028 -904
- package/dist/utils.d.ts +72 -61
- package/package.json +1 -3
|
@@ -1,1069 +1,356 @@
|
|
|
1
|
+
import type { GitVerseClient } from "../client";
|
|
2
|
+
import type { AddCollaboratorParams, Branch, Collaborator, CollaboratorInvitation, Commit, CompareResponse, ContentsResponse, CreateCommitParams, CreateFileParams, CreateForkParams, CreateReferenceParams, CreateRepositoryParams, CreateTreeParams, DeleteFileParams, FileCreationResponse, FileDeleteResponse, GitTreeResponse, PullRequest, Reference, Repository, RepoTree, Secret, SecretList, UpdatePullRequestParams, UpdateRepositoryParams } from "../types";
|
|
1
3
|
/**
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
page?: number;
|
|
355
|
-
sha?: string;
|
|
356
|
-
total_count?: number;
|
|
357
|
-
tree?: GitEntry[];
|
|
358
|
-
truncated?: boolean;
|
|
359
|
-
url?: string;
|
|
360
|
-
}
|
|
361
|
-
interface User {
|
|
362
|
-
/** Адрес аватарки */
|
|
363
|
-
avatar_url?: string;
|
|
364
|
-
/** О себе */
|
|
365
|
-
bio?: string;
|
|
366
|
-
/** Дата создания учетной записи */
|
|
367
|
-
created_at?: string;
|
|
368
|
-
/** Почта */
|
|
369
|
-
email?: string;
|
|
370
|
-
/** Счетчики */
|
|
371
|
-
followers?: number;
|
|
372
|
-
/** Url для получения подписчиков пользователя */
|
|
373
|
-
followers_url?: string;
|
|
374
|
-
following?: number;
|
|
375
|
-
/** Url для получения подписок пользователя */
|
|
376
|
-
following_url?: string;
|
|
377
|
-
/** Полное имя */
|
|
378
|
-
full_name?: string;
|
|
379
|
-
/** Адрес страницы пользователя */
|
|
380
|
-
html_url?: string;
|
|
381
|
-
/** Идентификатор */
|
|
382
|
-
id?: number;
|
|
383
|
-
/** Верифицирован? */
|
|
384
|
-
is_verified?: boolean;
|
|
385
|
-
/** Местоположение */
|
|
386
|
-
location?: string;
|
|
387
|
-
/** Логин пользователя */
|
|
388
|
-
login?: string;
|
|
389
|
-
/** Имя пользователя */
|
|
390
|
-
name?: string;
|
|
391
|
-
/** Url для получения организаций пользователя */
|
|
392
|
-
organizations_url?: string;
|
|
393
|
-
/** Публичные репозитории */
|
|
394
|
-
public_repos?: number;
|
|
395
|
-
/** Url для получения репозиториев пользователя */
|
|
396
|
-
repos_url?: string;
|
|
397
|
-
/** Есть ли права админа */
|
|
398
|
-
site_admin?: boolean;
|
|
399
|
-
/** Url для получения репозиториев пользователя, которые были добавлены в избранное */
|
|
400
|
-
starred_url?: string;
|
|
401
|
-
/** Количество репозиториев в избранном */
|
|
402
|
-
stars_count?: number;
|
|
403
|
-
/** Url для получения подписок пользователя */
|
|
404
|
-
subscriptions_url?: string;
|
|
405
|
-
/** Тип пользователя */
|
|
406
|
-
type?: string;
|
|
407
|
-
/** Дата изменения учетной записи */
|
|
408
|
-
updated_at?: string;
|
|
409
|
-
/** Url для получения пользователя */
|
|
410
|
-
url?: string;
|
|
411
|
-
/** Вебсайт */
|
|
412
|
-
website?: string;
|
|
413
|
-
}
|
|
414
|
-
interface Label {
|
|
415
|
-
/** example: 00aabb */
|
|
416
|
-
color?: string;
|
|
417
|
-
description?: string;
|
|
418
|
-
/** example: false */
|
|
419
|
-
exclusive?: boolean;
|
|
420
|
-
id?: number;
|
|
421
|
-
/** example: false */
|
|
422
|
-
is_archived?: boolean;
|
|
423
|
-
name?: string;
|
|
424
|
-
url?: string;
|
|
425
|
-
}
|
|
426
|
-
interface Milestone {
|
|
427
|
-
closed_at?: string;
|
|
428
|
-
closed_issues?: number;
|
|
429
|
-
created_at?: string;
|
|
430
|
-
description?: string;
|
|
431
|
-
due_on?: string;
|
|
432
|
-
id?: number;
|
|
433
|
-
open_issues?: number;
|
|
434
|
-
state?: string;
|
|
435
|
-
title?: string;
|
|
436
|
-
updated_at?: string;
|
|
437
|
-
}
|
|
438
|
-
interface Repository {
|
|
439
|
-
allow_merge_commit?: boolean;
|
|
440
|
-
allow_rebase_merge?: boolean;
|
|
441
|
-
allow_squash_merge?: boolean;
|
|
442
|
-
archived?: boolean;
|
|
443
|
-
clone_url?: string;
|
|
444
|
-
contents_url?: string;
|
|
445
|
-
created_at?: string;
|
|
446
|
-
default_branch?: string;
|
|
447
|
-
delete_branch_on_merge?: boolean;
|
|
448
|
-
description?: string;
|
|
449
|
-
disabled?: boolean;
|
|
450
|
-
fork?: boolean;
|
|
451
|
-
forks?: number;
|
|
452
|
-
forks_count?: number;
|
|
453
|
-
forks_url?: string;
|
|
454
|
-
full_name?: string;
|
|
455
|
-
has_issues?: boolean;
|
|
456
|
-
has_wiki?: boolean;
|
|
457
|
-
id?: number;
|
|
458
|
-
is_template?: boolean;
|
|
459
|
-
issue_comment_url?: string;
|
|
460
|
-
issues_url?: string;
|
|
461
|
-
language?: string;
|
|
462
|
-
languages_url?: string;
|
|
463
|
-
mirror_url?: string;
|
|
464
|
-
name?: string;
|
|
465
|
-
open_issues?: number;
|
|
466
|
-
open_issues_count?: number;
|
|
467
|
-
owner?: UserPublicInfo;
|
|
468
|
-
parent?: Repository;
|
|
469
|
-
permissions?: Permissions;
|
|
470
|
-
private?: boolean;
|
|
471
|
-
pulls_url?: string;
|
|
472
|
-
pushed_at?: string;
|
|
473
|
-
size?: number;
|
|
474
|
-
ssh_url?: string;
|
|
475
|
-
stargazers_count?: number;
|
|
476
|
-
template_repository?: Repository;
|
|
477
|
-
topics?: string[];
|
|
478
|
-
updated_at?: string;
|
|
479
|
-
url?: string;
|
|
480
|
-
visibility?: string;
|
|
481
|
-
watchers?: number;
|
|
482
|
-
watchers_count?: number;
|
|
483
|
-
}
|
|
484
|
-
interface PRBranchInfo {
|
|
485
|
-
label?: string;
|
|
486
|
-
ref?: string;
|
|
487
|
-
repo?: Repository;
|
|
488
|
-
repo_id?: number;
|
|
489
|
-
sha?: string;
|
|
490
|
-
}
|
|
491
|
-
interface Team {
|
|
492
|
-
/** Полномочия на создание репозиториев */
|
|
493
|
-
can_create_org_repo?: boolean;
|
|
494
|
-
/** Описание команды */
|
|
495
|
-
description?: string;
|
|
496
|
-
/** Идентификатор */
|
|
497
|
-
id?: number;
|
|
498
|
-
/** Включает все репозитории */
|
|
499
|
-
includes_all_repositories?: boolean;
|
|
500
|
-
/** Название команды */
|
|
501
|
-
name?: string;
|
|
502
|
-
/** Количество участников */
|
|
503
|
-
num_members?: number;
|
|
504
|
-
/** Количество репозиториев */
|
|
505
|
-
num_repos?: number;
|
|
506
|
-
/** Полномочия */
|
|
507
|
-
permission?: string;
|
|
508
|
-
/** Полномочие на действия с ветками */
|
|
509
|
-
permission_actions?: string;
|
|
510
|
-
/** Код полномочия */
|
|
511
|
-
permission_code?: string;
|
|
512
|
-
/** Полномочие на пакеты */
|
|
513
|
-
permission_packages?: string;
|
|
514
|
-
/** Полномочие на отправку пулл-реквестов */
|
|
515
|
-
permission_pulls?: string;
|
|
516
|
-
/** Полномочие на релизы */
|
|
517
|
-
permission_releases?: string;
|
|
518
|
-
}
|
|
519
|
-
interface PullRequest {
|
|
520
|
-
assignee?: User;
|
|
521
|
-
assignees?: User[];
|
|
522
|
-
base?: PRBranchInfo;
|
|
523
|
-
body?: string;
|
|
524
|
-
closed_at?: string;
|
|
525
|
-
comments?: number;
|
|
526
|
-
created_at?: string;
|
|
527
|
-
diff_url?: string;
|
|
528
|
-
head?: PRBranchInfo;
|
|
529
|
-
html_url?: string;
|
|
530
|
-
id?: number;
|
|
531
|
-
is_draft?: boolean;
|
|
532
|
-
labels?: Label[];
|
|
533
|
-
locked?: boolean;
|
|
534
|
-
maintainer_can_modify?: boolean;
|
|
535
|
-
merge_commit_sha?: string;
|
|
536
|
-
mergeable?: boolean;
|
|
537
|
-
merged?: boolean;
|
|
538
|
-
merged_at?: string;
|
|
539
|
-
merged_by?: User;
|
|
540
|
-
milestone?: Milestone;
|
|
541
|
-
number?: number;
|
|
542
|
-
patch_url?: string;
|
|
543
|
-
requested_reviewers?: User[];
|
|
544
|
-
requested_teams?: Team[];
|
|
545
|
-
state?: string;
|
|
546
|
-
title?: string;
|
|
547
|
-
updated_at?: string;
|
|
548
|
-
url?: string;
|
|
549
|
-
user?: User;
|
|
550
|
-
}
|
|
551
|
-
interface Reference {
|
|
552
|
-
object?: GitObject;
|
|
553
|
-
ref?: string;
|
|
554
|
-
url?: string;
|
|
555
|
-
}
|
|
556
|
-
interface TreeEntry {
|
|
557
|
-
mode?: string;
|
|
558
|
-
path?: string;
|
|
559
|
-
sha?: string;
|
|
560
|
-
size?: number;
|
|
561
|
-
/** "blob", "tree", "commit" */
|
|
562
|
-
type?: string;
|
|
563
|
-
}
|
|
564
|
-
interface RepoTree {
|
|
565
|
-
sha?: string;
|
|
566
|
-
tree?: TreeEntry[];
|
|
567
|
-
truncated?: boolean;
|
|
568
|
-
url?: string;
|
|
569
|
-
}
|
|
570
|
-
interface Secret {
|
|
571
|
-
created_at?: string;
|
|
572
|
-
name?: string;
|
|
573
|
-
}
|
|
574
|
-
interface SecretList {
|
|
575
|
-
secrets?: Secret[];
|
|
576
|
-
total_count?: number;
|
|
577
|
-
}
|
|
578
|
-
/**
|
|
579
|
-
* Предупреждение об устаревшей версии API
|
|
580
|
-
*/
|
|
581
|
-
declare class ApiVersionWarning {
|
|
582
|
-
/** Текущая используемая версия */
|
|
583
|
-
readonly currentVersion: string;
|
|
584
|
-
/** Последняя доступная версия */
|
|
585
|
-
readonly latestVersion: string;
|
|
586
|
-
/** Дата вывода из эксплуатации */
|
|
587
|
-
readonly decommissioning?: string;
|
|
588
|
-
constructor(currentVersion: string, latestVersion: string, decommissioning?: string);
|
|
589
|
-
/**
|
|
590
|
-
* Возвращает сообщение о предупреждении
|
|
591
|
-
*/
|
|
592
|
-
getMessage(): string;
|
|
593
|
-
}
|
|
594
|
-
declare const HTTPMethods: {
|
|
595
|
-
readonly DELETE: "DELETE"
|
|
596
|
-
readonly GET: "GET"
|
|
597
|
-
readonly PATCH: "PATCH"
|
|
598
|
-
readonly POST: "POST"
|
|
599
|
-
readonly PUT: "PUT"
|
|
600
|
-
};
|
|
601
|
-
type HTTPMethods = (typeof HTTPMethods)[keyof typeof HTTPMethods];
|
|
602
|
-
/**
|
|
603
|
-
* Параметры для конфигурации GitVerse клиента
|
|
604
|
-
*/
|
|
605
|
-
interface GitVerseClientConfig {
|
|
606
|
-
/**
|
|
607
|
-
* Базовый URL API GitVerse
|
|
608
|
-
* @default 'https://api.gitverse.ru'
|
|
609
|
-
*/
|
|
610
|
-
baseUrl?: string;
|
|
611
|
-
/**
|
|
612
|
-
* Токен доступа для авторизации в API
|
|
613
|
-
*/
|
|
614
|
-
token?: string;
|
|
615
|
-
/**
|
|
616
|
-
* Версия API
|
|
617
|
-
* @default '1'
|
|
618
|
-
*/
|
|
619
|
-
apiVersion?: string;
|
|
620
|
-
}
|
|
621
|
-
/**
|
|
622
|
-
* Основной класс для работы с GitVerse API
|
|
623
|
-
*/
|
|
624
|
-
declare class GitVerseClient {
|
|
625
|
-
private baseUrl;
|
|
626
|
-
private token?;
|
|
627
|
-
private apiVersion;
|
|
628
|
-
/**
|
|
629
|
-
* Callback для обработки предупреждений об устаревшей версии API
|
|
630
|
-
*/
|
|
631
|
-
onApiVersionWarning?: (warning: ApiVersionWarning) => void;
|
|
632
|
-
/**
|
|
633
|
-
* Создает новый экземпляр GitVerse клиента
|
|
634
|
-
* @param config Конфигурация клиента
|
|
635
|
-
*/
|
|
636
|
-
constructor(config?: GitVerseClientConfig);
|
|
637
|
-
/**
|
|
638
|
-
* Устанавливает токен авторизации
|
|
639
|
-
* @param token Токен доступа
|
|
640
|
-
*/
|
|
641
|
-
setToken(token: string): void;
|
|
642
|
-
/**
|
|
643
|
-
* Извлекает информацию о Rate Limit из заголовков ответа
|
|
644
|
-
*/
|
|
645
|
-
private extractRateLimitInfo;
|
|
646
|
-
/**
|
|
647
|
-
* Извлекает информацию о версии API из заголовков ответа
|
|
648
|
-
*/
|
|
649
|
-
private extractApiVersionInfo;
|
|
650
|
-
/**
|
|
651
|
-
* Извлекает метаданные из заголовков ответа
|
|
652
|
-
*/
|
|
653
|
-
private extractMetadata;
|
|
654
|
-
/**
|
|
655
|
-
* Выполняет API-запрос с учетом авторизации и версии API
|
|
656
|
-
* @param path Путь к API-ресурсу
|
|
657
|
-
* @param method HTTP-метод
|
|
658
|
-
* @param body Тело запроса (опционально)
|
|
659
|
-
* @param options Опции запроса (опционально)
|
|
660
|
-
* @returns Ответ от API
|
|
661
|
-
* @throws {RateLimitError} При превышении лимита запросов (429)
|
|
662
|
-
* @throws {GitVerseApiError} При других ошибках API
|
|
663
|
-
*/
|
|
664
|
-
request<T>(path: string, method: HTTPMethods, body?: unknown, options?: RequestOptions): Promise<T>;
|
|
665
|
-
/**
|
|
666
|
-
* Выполняет GET-запрос
|
|
667
|
-
* @param path Путь к API-ресурсу
|
|
668
|
-
* @param options Опции запроса (опционально)
|
|
669
|
-
* @returns Ответ от API
|
|
670
|
-
*/
|
|
671
|
-
get<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
672
|
-
/**
|
|
673
|
-
* Выполняет POST-запрос
|
|
674
|
-
* @param path Путь к API-ресурсу
|
|
675
|
-
* @param body Тело запроса
|
|
676
|
-
* @param options Опции запроса (опционально)
|
|
677
|
-
* @returns Ответ от API
|
|
678
|
-
*/
|
|
679
|
-
post<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T>;
|
|
680
|
-
/**
|
|
681
|
-
* Выполняет PUT-запрос
|
|
682
|
-
* @param path Путь к API-ресурсу
|
|
683
|
-
* @param body Тело запроса
|
|
684
|
-
* @param options Опции запроса (опционально)
|
|
685
|
-
* @returns Ответ от API
|
|
686
|
-
*/
|
|
687
|
-
put<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T>;
|
|
688
|
-
/**
|
|
689
|
-
* Выполняет DELETE-запрос
|
|
690
|
-
* @param path Путь к API-ресурсу
|
|
691
|
-
* @param body Тело запроса (опционально)
|
|
692
|
-
* @param options Опции запроса (опционально)
|
|
693
|
-
* @returns Ответ от API
|
|
694
|
-
*/
|
|
695
|
-
delete<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T>;
|
|
696
|
-
/**
|
|
697
|
-
* Выполняет PATCH-запрос
|
|
698
|
-
* @param path Путь к API-ресурсу
|
|
699
|
-
* @param body Тело запроса
|
|
700
|
-
* @param options Опции запроса (опционально)
|
|
701
|
-
* @returns Ответ от API
|
|
702
|
-
*/
|
|
703
|
-
patch<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T>;
|
|
704
|
-
/**
|
|
705
|
-
* Выполняет загрузку файла через multipart/form-data
|
|
706
|
-
* @param path Путь к API-ресурсу
|
|
707
|
-
* @param fieldName Имя поля для файла
|
|
708
|
-
* @param file Файл для загрузки (Blob или ArrayBuffer)
|
|
709
|
-
* @param fileName Имя файла
|
|
710
|
-
* @param options Опции запроса (опционально)
|
|
711
|
-
* @returns Ответ от API
|
|
712
|
-
*/
|
|
713
|
-
uploadFile<T>(path: string, fieldName: string, file: Blob | ArrayBuffer, fileName: string, options?: RequestOptions): Promise<T>;
|
|
714
|
-
}
|
|
715
|
-
/**
|
|
716
|
-
* API для работы с репозиториями
|
|
717
|
-
*/
|
|
718
|
-
declare class RepositoriesApi {
|
|
719
|
-
private client;
|
|
720
|
-
/**
|
|
721
|
-
* Создает новый экземпляр API
|
|
722
|
-
* @param client GitVerse клиент
|
|
723
|
-
*/
|
|
724
|
-
constructor(client: GitVerseClient);
|
|
725
|
-
/**
|
|
726
|
-
* Get repository details
|
|
727
|
-
* @param owner Repository owner
|
|
728
|
-
* @param repo Repository name
|
|
729
|
-
* @param options Опции запроса
|
|
730
|
-
* @returns Repository
|
|
731
|
-
*/
|
|
732
|
-
get(owner: string, repo: string, options?: {
|
|
733
|
-
signal?: AbortSignal
|
|
734
|
-
}): Promise<Repository>;
|
|
735
|
-
/**
|
|
736
|
-
* Update repository
|
|
737
|
-
* @param owner Repository owner
|
|
738
|
-
* @param repo Repository name
|
|
739
|
-
* @param params New repository settings
|
|
740
|
-
* @param options Опции запроса
|
|
741
|
-
* @returns Repository
|
|
742
|
-
*/
|
|
743
|
-
update(owner: string, repo: string, params: UpdateRepositoryParams, options?: {
|
|
744
|
-
signal?: AbortSignal
|
|
745
|
-
}): Promise<Repository>;
|
|
746
|
-
/**
|
|
747
|
-
* Delete repository
|
|
748
|
-
* @param owner Repository owner
|
|
749
|
-
* @param repo Repository name
|
|
750
|
-
* @param options Опции запроса
|
|
751
|
-
* @returns void
|
|
752
|
-
*/
|
|
753
|
-
delete(owner: string, repo: string, options?: {
|
|
754
|
-
signal?: AbortSignal
|
|
755
|
-
}): Promise<void>;
|
|
756
|
-
/**
|
|
757
|
-
* Gets a list of repository secrets
|
|
758
|
-
* @param owner Owner name
|
|
759
|
-
* @param repo Repository name
|
|
760
|
-
* @param queryParams Параметры запроса
|
|
761
|
-
* @param options Опции запроса
|
|
762
|
-
* @returns SecretList
|
|
763
|
-
*/
|
|
764
|
-
listRepoSecrets(owner: string, repo: string, queryParams?: {
|
|
765
|
-
per_page?: string
|
|
766
|
-
page?: string
|
|
767
|
-
}, options?: {
|
|
768
|
-
signal?: AbortSignal
|
|
769
|
-
}): Promise<SecretList>;
|
|
770
|
-
/**
|
|
771
|
-
* Gets secrets metadata (without values) in repositories.
|
|
772
|
-
* @param owner Owner name
|
|
773
|
-
* @param repo Repository name
|
|
774
|
-
* @param secretname Secret name
|
|
775
|
-
* @param options Опции запроса
|
|
776
|
-
* @returns Secret
|
|
777
|
-
*/
|
|
778
|
-
getRepoSecret(owner: string, repo: string, secretname: string, options?: {
|
|
779
|
-
signal?: AbortSignal
|
|
780
|
-
}): Promise<Secret>;
|
|
781
|
-
/**
|
|
782
|
-
* Creates or updates a secret in the repository, without encryption
|
|
783
|
-
* @param owner Owner name
|
|
784
|
-
* @param repo Repository name
|
|
785
|
-
* @param secretname Secret name
|
|
786
|
-
* @param queryParams Параметры запроса
|
|
787
|
-
* @param options Опции запроса
|
|
788
|
-
* @returns Secret
|
|
789
|
-
*/
|
|
790
|
-
createOrUpdateRepoSecret(owner: string, repo: string, secretname: string, queryParams?: {
|
|
791
|
-
encrypted_value: string
|
|
792
|
-
}, options?: {
|
|
793
|
-
signal?: AbortSignal
|
|
794
|
-
}): Promise<Secret>;
|
|
795
|
-
/**
|
|
796
|
-
* Removes a secret from the repository
|
|
797
|
-
* @param owner Owner name
|
|
798
|
-
* @param repo Repository name
|
|
799
|
-
* @param secretname Secret name
|
|
800
|
-
* @param options Опции запроса
|
|
801
|
-
* @returns void
|
|
802
|
-
*/
|
|
803
|
-
deleteRepoSecret(owner: string, repo: string, secretname: string, options?: {
|
|
804
|
-
signal?: AbortSignal
|
|
805
|
-
}): Promise<void>;
|
|
806
|
-
/**
|
|
807
|
-
* List repository branches
|
|
808
|
-
* @param owner Owner of the repository (username or organization)
|
|
809
|
-
* @param repo Name of the repository without .git extension
|
|
810
|
-
* @param queryParams Параметры запроса
|
|
811
|
-
* @param options Опции запроса
|
|
812
|
-
* @returns Branch[]
|
|
813
|
-
*/
|
|
814
|
-
listBranches(owner: string, repo: string, queryParams?: {
|
|
815
|
-
page?: number
|
|
816
|
-
per_page?: number
|
|
817
|
-
q?: string
|
|
818
|
-
}, options?: {
|
|
819
|
-
signal?: AbortSignal
|
|
820
|
-
}): Promise<Branch[]>;
|
|
821
|
-
/**
|
|
822
|
-
* List repository collaborators
|
|
823
|
-
* @param owner Repository owner
|
|
824
|
-
* @param repo Repository name
|
|
825
|
-
* @param queryParams Параметры запроса
|
|
826
|
-
* @param options Опции запроса
|
|
827
|
-
* @returns Collaborator[]
|
|
828
|
-
*/
|
|
829
|
-
listCollaborators(owner: string, repo: string, queryParams?: {
|
|
830
|
-
affiliation?: string
|
|
831
|
-
permission?: string
|
|
832
|
-
page?: number
|
|
833
|
-
per_page?: number
|
|
834
|
-
}, options?: {
|
|
835
|
-
signal?: AbortSignal
|
|
836
|
-
}): Promise<Collaborator[]>;
|
|
837
|
-
/**
|
|
838
|
-
* Add or update repository collaborator
|
|
839
|
-
* @param owner Repository owner
|
|
840
|
-
* @param repo Repository name
|
|
841
|
-
* @param collaborator Username of the collaborator to add or update
|
|
842
|
-
* @param params Collaborator permission settings
|
|
843
|
-
* @param options Опции запроса
|
|
844
|
-
* @returns CollaboratorInvitation
|
|
845
|
-
*/
|
|
846
|
-
addCollaborator(owner: string, repo: string, collaborator: string, params: AddCollaboratorParams, options?: {
|
|
847
|
-
signal?: AbortSignal
|
|
848
|
-
}): Promise<CollaboratorInvitation>;
|
|
849
|
-
/**
|
|
850
|
-
* Retrieve a list of repository commits
|
|
851
|
-
* @param owner Owner of the repository (owner or organization name)
|
|
852
|
-
* @param repo Name of the repository without the .git extension
|
|
853
|
-
* @param queryParams Параметры запроса
|
|
854
|
-
* @param options Опции запроса
|
|
855
|
-
* @returns Commit[]
|
|
856
|
-
*/
|
|
857
|
-
listCommits(owner: string, repo: string, queryParams?: {
|
|
858
|
-
page?: number
|
|
859
|
-
per_page?: number
|
|
860
|
-
sha?: string
|
|
861
|
-
path?: string
|
|
862
|
-
not?: string
|
|
863
|
-
author?: string
|
|
864
|
-
committer?: string
|
|
865
|
-
since?: string
|
|
866
|
-
until?: string
|
|
867
|
-
}, options?: {
|
|
868
|
-
signal?: AbortSignal
|
|
869
|
-
}): Promise<Commit[]>;
|
|
870
|
-
/**
|
|
871
|
-
* Retrieve commit information
|
|
872
|
-
* @param owner Owner of the repository (owner or organization name)
|
|
873
|
-
* @param repo Name of the repository without the .git extension
|
|
874
|
-
* @param sha Commit hash
|
|
875
|
-
* @param options Опции запроса
|
|
876
|
-
* @returns Commit
|
|
877
|
-
*/
|
|
878
|
-
getCommit(owner: string, repo: string, sha: string, options?: {
|
|
879
|
-
signal?: AbortSignal
|
|
880
|
-
}): Promise<Commit>;
|
|
881
|
-
/**
|
|
882
|
-
* Compare two branches/tags/commits
|
|
883
|
-
* @param owner Owner of the repository (username or organization name)
|
|
884
|
-
* @param repo Name of the repository without the .git extension
|
|
885
|
-
* @param basehead References to compare in BASE...HEAD format (e.g., main...feature)
|
|
886
|
-
* @param queryParams Параметры запроса
|
|
887
|
-
* @param options Опции запроса
|
|
888
|
-
* @returns CompareResponse
|
|
889
|
-
*/
|
|
890
|
-
compareCommits(owner: string, repo: string, basehead: string, queryParams?: {
|
|
891
|
-
page?: number
|
|
892
|
-
per_page?: number
|
|
893
|
-
}, options?: {
|
|
894
|
-
signal?: AbortSignal
|
|
895
|
-
}): Promise<CompareResponse>;
|
|
896
|
-
/**
|
|
897
|
-
* Get file or directory contents
|
|
898
|
-
* @param owner Repository owner
|
|
899
|
-
* @param repo Repository name
|
|
900
|
-
* @param filepath Path to file or directory in the repository
|
|
901
|
-
* @param queryParams Параметры запроса
|
|
902
|
-
* @param options Опции запроса
|
|
903
|
-
* @returns Record<string, unknown>
|
|
904
|
-
*/
|
|
905
|
-
getContent(owner: string, repo: string, filepath: string, queryParams?: {
|
|
906
|
-
ref?: string
|
|
907
|
-
scope?: string
|
|
908
|
-
}, options?: {
|
|
909
|
-
signal?: AbortSignal
|
|
910
|
-
}): Promise<Record<string, unknown>>;
|
|
911
|
-
/**
|
|
912
|
-
* Create or update file in repository
|
|
913
|
-
* @param owner Repository owner
|
|
914
|
-
* @param repo Repository name
|
|
915
|
-
* @param filepath Path to the file in the repository
|
|
916
|
-
* @param params File creation or update options, including base64 content, branch, message, etc.
|
|
917
|
-
* @param options Опции запроса
|
|
918
|
-
* @returns FileCreationResponse
|
|
919
|
-
*/
|
|
920
|
-
createOrUpdateFile(owner: string, repo: string, filepath: string, params: CreateFileParams, options?: {
|
|
921
|
-
signal?: AbortSignal
|
|
922
|
-
}): Promise<FileCreationResponse>;
|
|
923
|
-
/**
|
|
924
|
-
* Delete file in repository
|
|
925
|
-
* @param owner Repository owner
|
|
926
|
-
* @param repo Repository name
|
|
927
|
-
* @param filepath Path to the file in the repository
|
|
928
|
-
* @param params File deletion options, including SHA, branch, commit message, etc.
|
|
929
|
-
* @param options Опции запроса
|
|
930
|
-
* @returns FileDeleteResponse
|
|
931
|
-
*/
|
|
932
|
-
deleteFile(owner: string, repo: string, filepath: string, params: DeleteFileParams, options?: {
|
|
933
|
-
signal?: AbortSignal
|
|
934
|
-
}): Promise<FileDeleteResponse>;
|
|
935
|
-
/**
|
|
936
|
-
* Fork a repository
|
|
937
|
-
* @param owner Owner of the base repository
|
|
938
|
-
* @param repo Name of the base repository
|
|
939
|
-
* @param params Fork options, including target name and organization
|
|
940
|
-
* @param options Опции запроса
|
|
941
|
-
* @returns Repository
|
|
942
|
-
*/
|
|
943
|
-
createFork(owner: string, repo: string, params: CreateForkParams, options?: {
|
|
944
|
-
signal?: AbortSignal
|
|
945
|
-
}): Promise<Repository>;
|
|
946
|
-
/**
|
|
947
|
-
* Create a Git commit
|
|
948
|
-
* @param owner Owner of the repository (owner or organization name)
|
|
949
|
-
* @param repo Name of the repository without the .git extension
|
|
950
|
-
* @param params Parameters for creating the commit
|
|
951
|
-
* @param options Опции запроса
|
|
952
|
-
* @returns Commit
|
|
953
|
-
*/
|
|
954
|
-
createCommit(owner: string, repo: string, params: CreateCommitParams, options?: {
|
|
955
|
-
signal?: AbortSignal
|
|
956
|
-
}): Promise<Commit>;
|
|
957
|
-
/**
|
|
958
|
-
* Create a Git reference
|
|
959
|
-
* @param owner Owner of the repository (owner or organization name)
|
|
960
|
-
* @param repo Name of the repository without the .git extension
|
|
961
|
-
* @param params Parameters for creating the reference
|
|
962
|
-
* @param options Опции запроса
|
|
963
|
-
* @returns Reference
|
|
964
|
-
*/
|
|
965
|
-
createRef(owner: string, repo: string, params: CreateReferenceParams, options?: {
|
|
966
|
-
signal?: AbortSignal
|
|
967
|
-
}): Promise<Reference>;
|
|
968
|
-
/**
|
|
969
|
-
* Creates new Git tree
|
|
970
|
-
* @param owner owner
|
|
971
|
-
* @param repo repo
|
|
972
|
-
* @param params Параметры создания дерева
|
|
973
|
-
* @param options Опции запроса
|
|
974
|
-
* @returns RepoTree
|
|
975
|
-
*/
|
|
976
|
-
createTree(owner: string, repo: string, params: CreateTreeParams, options?: {
|
|
977
|
-
signal?: AbortSignal
|
|
978
|
-
}): Promise<RepoTree>;
|
|
979
|
-
/**
|
|
980
|
-
* Get repository tree by SHA
|
|
981
|
-
* @param owner Repository owner
|
|
982
|
-
* @param repo Repository name
|
|
983
|
-
* @param sha Commit SHA to list tree for
|
|
984
|
-
* @param queryParams Параметры запроса
|
|
985
|
-
* @param options Опции запроса
|
|
986
|
-
* @returns GitTreeResponse
|
|
987
|
-
*/
|
|
988
|
-
getTree(owner: string, repo: string, sha: string, queryParams?: {
|
|
989
|
-
page?: number
|
|
990
|
-
per_page?: number
|
|
991
|
-
recursive?: boolean
|
|
992
|
-
}, options?: {
|
|
993
|
-
signal?: AbortSignal
|
|
994
|
-
}): Promise<GitTreeResponse>;
|
|
995
|
-
/**
|
|
996
|
-
* Get repository languages
|
|
997
|
-
* @param owner Repository owner
|
|
998
|
-
* @param repo Repository name
|
|
999
|
-
* @param options Опции запроса
|
|
1000
|
-
* @returns Record<string, unknown>
|
|
1001
|
-
*/
|
|
1002
|
-
listLanguages(owner: string, repo: string, options?: {
|
|
1003
|
-
signal?: AbortSignal
|
|
1004
|
-
}): Promise<Record<string, unknown>>;
|
|
1005
|
-
/**
|
|
1006
|
-
* List pull requests
|
|
1007
|
-
* @param owner Repository owner
|
|
1008
|
-
* @param repo Repository name
|
|
1009
|
-
* @param queryParams Параметры запроса
|
|
1010
|
-
* @param options Опции запроса
|
|
1011
|
-
* @returns PullRequest[]
|
|
1012
|
-
*/
|
|
1013
|
-
listPulls(owner: string, repo: string, queryParams?: {
|
|
1014
|
-
state?: string
|
|
1015
|
-
head?: string
|
|
1016
|
-
base?: string
|
|
1017
|
-
sort?: string
|
|
1018
|
-
direction?: string
|
|
1019
|
-
page?: number
|
|
1020
|
-
per_page?: number
|
|
1021
|
-
}, options?: {
|
|
1022
|
-
signal?: AbortSignal
|
|
1023
|
-
}): Promise<PullRequest[]>;
|
|
1024
|
-
/**
|
|
1025
|
-
* Pull request details.
|
|
1026
|
-
* @param owner Repository owner
|
|
1027
|
-
* @param repo Repository name
|
|
1028
|
-
* @param pull_number The number that identifies the pull request..
|
|
1029
|
-
* @param options Опции запроса
|
|
1030
|
-
* @returns PullRequest
|
|
1031
|
-
*/
|
|
1032
|
-
getPull(owner: string, repo: string, pull_number: number, options?: {
|
|
1033
|
-
signal?: AbortSignal
|
|
1034
|
-
}): Promise<PullRequest>;
|
|
1035
|
-
/**
|
|
1036
|
-
* Update a pull request.
|
|
1037
|
-
* @param owner Repository owner
|
|
1038
|
-
* @param repo Repository name
|
|
1039
|
-
* @param pull_number The number that identifies the pull request.
|
|
1040
|
-
* @param params Pull request update parameters
|
|
1041
|
-
* @param options Опции запроса
|
|
1042
|
-
* @returns PullRequest
|
|
1043
|
-
*/
|
|
1044
|
-
updatePull(owner: string, repo: string, pull_number: number, params: UpdatePullRequestParams, options?: {
|
|
1045
|
-
signal?: AbortSignal
|
|
1046
|
-
}): Promise<PullRequest>;
|
|
1047
|
-
/**
|
|
1048
|
-
* Get authenticated user repositories
|
|
1049
|
-
* @param queryParams Параметры запроса
|
|
1050
|
-
* @param options Опции запроса
|
|
1051
|
-
* @returns Repository[]
|
|
1052
|
-
*/
|
|
1053
|
-
listForAuthenticatedUser(queryParams?: {
|
|
1054
|
-
page?: number
|
|
1055
|
-
per_page?: number
|
|
1056
|
-
}, options?: {
|
|
1057
|
-
signal?: AbortSignal
|
|
1058
|
-
}): Promise<Repository[]>;
|
|
1059
|
-
/**
|
|
1060
|
-
* Create repository
|
|
1061
|
-
* @param params Repository creation options
|
|
1062
|
-
* @param options Опции запроса
|
|
1063
|
-
* @returns Repository
|
|
1064
|
-
*/
|
|
1065
|
-
createForAuthenticatedUser(params: CreateRepositoryParams, options?: {
|
|
1066
|
-
signal?: AbortSignal
|
|
1067
|
-
}): Promise<Repository>;
|
|
4
|
+
* API для работы с репозиториями
|
|
5
|
+
*/
|
|
6
|
+
export declare class RepositoriesApi {
|
|
7
|
+
private client;
|
|
8
|
+
/**
|
|
9
|
+
* Создает новый экземпляр API
|
|
10
|
+
* @param client GitVerse клиент
|
|
11
|
+
*/
|
|
12
|
+
constructor(client: GitVerseClient);
|
|
13
|
+
/**
|
|
14
|
+
* Get repository details
|
|
15
|
+
* @param owner Repository owner
|
|
16
|
+
* @param repo Repository name
|
|
17
|
+
* @param options Опции запроса
|
|
18
|
+
* @returns Repository
|
|
19
|
+
*/
|
|
20
|
+
get(owner: string, repo: string, options?: {
|
|
21
|
+
signal?: AbortSignal;
|
|
22
|
+
}): Promise<Repository>;
|
|
23
|
+
/**
|
|
24
|
+
* Update repository
|
|
25
|
+
* @param owner Repository owner
|
|
26
|
+
* @param repo Repository name
|
|
27
|
+
* @param params New repository settings
|
|
28
|
+
* @param options Опции запроса
|
|
29
|
+
* @returns Repository
|
|
30
|
+
*/
|
|
31
|
+
update(owner: string, repo: string, params: UpdateRepositoryParams, options?: {
|
|
32
|
+
signal?: AbortSignal;
|
|
33
|
+
}): Promise<Repository>;
|
|
34
|
+
/**
|
|
35
|
+
* Delete repository
|
|
36
|
+
* @param owner Repository owner
|
|
37
|
+
* @param repo Repository name
|
|
38
|
+
* @param options Опции запроса
|
|
39
|
+
* @returns void
|
|
40
|
+
*/
|
|
41
|
+
delete(owner: string, repo: string, options?: {
|
|
42
|
+
signal?: AbortSignal;
|
|
43
|
+
}): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Gets a list of repository secrets
|
|
46
|
+
* @param owner Owner name
|
|
47
|
+
* @param repo Repository name
|
|
48
|
+
* @param queryParams Параметры запроса
|
|
49
|
+
* @param options Опции запроса
|
|
50
|
+
* @returns SecretList
|
|
51
|
+
*/
|
|
52
|
+
listRepoSecrets(owner: string, repo: string, queryParams?: {
|
|
53
|
+
per_page?: string;
|
|
54
|
+
page?: string;
|
|
55
|
+
}, options?: {
|
|
56
|
+
signal?: AbortSignal;
|
|
57
|
+
}): Promise<SecretList>;
|
|
58
|
+
/**
|
|
59
|
+
* Gets secrets metadata (without values) in repositories.
|
|
60
|
+
* @param owner Owner name
|
|
61
|
+
* @param repo Repository name
|
|
62
|
+
* @param secretname Secret name
|
|
63
|
+
* @param options Опции запроса
|
|
64
|
+
* @returns Secret
|
|
65
|
+
*/
|
|
66
|
+
getRepoSecret(owner: string, repo: string, secretname: string, options?: {
|
|
67
|
+
signal?: AbortSignal;
|
|
68
|
+
}): Promise<Secret>;
|
|
69
|
+
/**
|
|
70
|
+
* Creates or updates a secret in the repository, without encryption
|
|
71
|
+
* @param owner Owner name
|
|
72
|
+
* @param repo Repository name
|
|
73
|
+
* @param secretname Secret name
|
|
74
|
+
* @param queryParams Параметры запроса
|
|
75
|
+
* @param options Опции запроса
|
|
76
|
+
* @returns Secret
|
|
77
|
+
*/
|
|
78
|
+
createOrUpdateRepoSecret(owner: string, repo: string, secretname: string, queryParams?: {
|
|
79
|
+
encrypted_value: string;
|
|
80
|
+
}, options?: {
|
|
81
|
+
signal?: AbortSignal;
|
|
82
|
+
}): Promise<Secret>;
|
|
83
|
+
/**
|
|
84
|
+
* Removes a secret from the repository
|
|
85
|
+
* @param owner Owner name
|
|
86
|
+
* @param repo Repository name
|
|
87
|
+
* @param secretname Secret name
|
|
88
|
+
* @param options Опции запроса
|
|
89
|
+
* @returns void
|
|
90
|
+
*/
|
|
91
|
+
deleteRepoSecret(owner: string, repo: string, secretname: string, options?: {
|
|
92
|
+
signal?: AbortSignal;
|
|
93
|
+
}): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* List repository branches
|
|
96
|
+
* @param owner Owner of the repository (username or organization)
|
|
97
|
+
* @param repo Name of the repository without .git extension
|
|
98
|
+
* @param queryParams Параметры запроса
|
|
99
|
+
* @param options Опции запроса
|
|
100
|
+
* @returns Branch[]
|
|
101
|
+
*/
|
|
102
|
+
listBranches(owner: string, repo: string, queryParams?: {
|
|
103
|
+
page?: number;
|
|
104
|
+
per_page?: number;
|
|
105
|
+
q?: string;
|
|
106
|
+
}, options?: {
|
|
107
|
+
signal?: AbortSignal;
|
|
108
|
+
}): Promise<Branch[]>;
|
|
109
|
+
/**
|
|
110
|
+
* List repository collaborators
|
|
111
|
+
* @param owner Repository owner
|
|
112
|
+
* @param repo Repository name
|
|
113
|
+
* @param queryParams Параметры запроса
|
|
114
|
+
* @param options Опции запроса
|
|
115
|
+
* @returns Collaborator[]
|
|
116
|
+
*/
|
|
117
|
+
listCollaborators(owner: string, repo: string, queryParams?: {
|
|
118
|
+
affiliation?: string;
|
|
119
|
+
permission?: string;
|
|
120
|
+
page?: number;
|
|
121
|
+
per_page?: number;
|
|
122
|
+
}, options?: {
|
|
123
|
+
signal?: AbortSignal;
|
|
124
|
+
}): Promise<Collaborator[]>;
|
|
125
|
+
/**
|
|
126
|
+
* Add or update repository collaborator
|
|
127
|
+
* @param owner Repository owner
|
|
128
|
+
* @param repo Repository name
|
|
129
|
+
* @param collaborator Username of the collaborator to add or update
|
|
130
|
+
* @param params Collaborator permission settings
|
|
131
|
+
* @param options Опции запроса
|
|
132
|
+
* @returns CollaboratorInvitation
|
|
133
|
+
*/
|
|
134
|
+
addCollaborator(owner: string, repo: string, collaborator: string, params: AddCollaboratorParams, options?: {
|
|
135
|
+
signal?: AbortSignal;
|
|
136
|
+
}): Promise<CollaboratorInvitation>;
|
|
137
|
+
/**
|
|
138
|
+
* Retrieve a list of repository commits
|
|
139
|
+
* @param owner Owner of the repository (owner or organization name)
|
|
140
|
+
* @param repo Name of the repository without the .git extension
|
|
141
|
+
* @param queryParams Параметры запроса
|
|
142
|
+
* @param options Опции запроса
|
|
143
|
+
* @returns Commit[]
|
|
144
|
+
*/
|
|
145
|
+
listCommits(owner: string, repo: string, queryParams?: {
|
|
146
|
+
page?: number;
|
|
147
|
+
per_page?: number;
|
|
148
|
+
sha?: string;
|
|
149
|
+
path?: string;
|
|
150
|
+
not?: string;
|
|
151
|
+
author?: string;
|
|
152
|
+
committer?: string;
|
|
153
|
+
since?: string;
|
|
154
|
+
until?: string;
|
|
155
|
+
}, options?: {
|
|
156
|
+
signal?: AbortSignal;
|
|
157
|
+
}): Promise<Commit[]>;
|
|
158
|
+
/**
|
|
159
|
+
* Retrieve commit information
|
|
160
|
+
* @param owner Owner of the repository (owner or organization name)
|
|
161
|
+
* @param repo Name of the repository without the .git extension
|
|
162
|
+
* @param sha Commit hash
|
|
163
|
+
* @param options Опции запроса
|
|
164
|
+
* @returns Commit
|
|
165
|
+
*/
|
|
166
|
+
getCommit(owner: string, repo: string, sha: string, options?: {
|
|
167
|
+
signal?: AbortSignal;
|
|
168
|
+
}): Promise<Commit>;
|
|
169
|
+
/**
|
|
170
|
+
* Compare two branches/tags/commits
|
|
171
|
+
* @param owner Owner of the repository (username or organization name)
|
|
172
|
+
* @param repo Name of the repository without the .git extension
|
|
173
|
+
* @param basehead References to compare in BASE...HEAD format (e.g., main...feature)
|
|
174
|
+
* @param queryParams Параметры запроса
|
|
175
|
+
* @param options Опции запроса
|
|
176
|
+
* @returns CompareResponse
|
|
177
|
+
*/
|
|
178
|
+
compareCommits(owner: string, repo: string, basehead: string, queryParams?: {
|
|
179
|
+
page?: number;
|
|
180
|
+
per_page?: number;
|
|
181
|
+
}, options?: {
|
|
182
|
+
signal?: AbortSignal;
|
|
183
|
+
}): Promise<CompareResponse>;
|
|
184
|
+
/**
|
|
185
|
+
* Get file or directory contents
|
|
186
|
+
* @param owner Repository owner
|
|
187
|
+
* @param repo Repository name
|
|
188
|
+
* @param filepath Path to file or directory in the repository
|
|
189
|
+
* @param queryParams Параметры запроса
|
|
190
|
+
* @param options Опции запроса
|
|
191
|
+
* @returns ContentsResponse
|
|
192
|
+
*/
|
|
193
|
+
getContent(owner: string, repo: string, filepath: string, queryParams?: {
|
|
194
|
+
ref?: string;
|
|
195
|
+
scope?: string;
|
|
196
|
+
}, options?: {
|
|
197
|
+
signal?: AbortSignal;
|
|
198
|
+
}): Promise<ContentsResponse>;
|
|
199
|
+
/**
|
|
200
|
+
* Create or update file in repository
|
|
201
|
+
* @param owner Repository owner
|
|
202
|
+
* @param repo Repository name
|
|
203
|
+
* @param filepath Path to the file in the repository
|
|
204
|
+
* @param params File creation or update options, including base64 content, branch, message, etc.
|
|
205
|
+
* @param options Опции запроса
|
|
206
|
+
* @returns FileCreationResponse
|
|
207
|
+
*/
|
|
208
|
+
createOrUpdateFile(owner: string, repo: string, filepath: string, params: CreateFileParams, options?: {
|
|
209
|
+
signal?: AbortSignal;
|
|
210
|
+
}): Promise<FileCreationResponse>;
|
|
211
|
+
/**
|
|
212
|
+
* Delete file in repository
|
|
213
|
+
* @param owner Repository owner
|
|
214
|
+
* @param repo Repository name
|
|
215
|
+
* @param filepath Path to the file in the repository
|
|
216
|
+
* @param params File deletion options, including SHA, branch, commit message, etc.
|
|
217
|
+
* @param options Опции запроса
|
|
218
|
+
* @returns FileDeleteResponse
|
|
219
|
+
*/
|
|
220
|
+
deleteFile(owner: string, repo: string, filepath: string, params: DeleteFileParams, options?: {
|
|
221
|
+
signal?: AbortSignal;
|
|
222
|
+
}): Promise<FileDeleteResponse>;
|
|
223
|
+
/**
|
|
224
|
+
* Fork a repository
|
|
225
|
+
* @param owner Owner of the base repository
|
|
226
|
+
* @param repo Name of the base repository
|
|
227
|
+
* @param params Fork options, including target name and organization
|
|
228
|
+
* @param options Опции запроса
|
|
229
|
+
* @returns Repository
|
|
230
|
+
*/
|
|
231
|
+
createFork(owner: string, repo: string, params: CreateForkParams, options?: {
|
|
232
|
+
signal?: AbortSignal;
|
|
233
|
+
}): Promise<Repository>;
|
|
234
|
+
/**
|
|
235
|
+
* Create a Git commit
|
|
236
|
+
* @param owner Owner of the repository (owner or organization name)
|
|
237
|
+
* @param repo Name of the repository without the .git extension
|
|
238
|
+
* @param params Parameters for creating the commit
|
|
239
|
+
* @param options Опции запроса
|
|
240
|
+
* @returns Commit
|
|
241
|
+
*/
|
|
242
|
+
createCommit(owner: string, repo: string, params: CreateCommitParams, options?: {
|
|
243
|
+
signal?: AbortSignal;
|
|
244
|
+
}): Promise<Commit>;
|
|
245
|
+
/**
|
|
246
|
+
* Create a Git reference
|
|
247
|
+
* @param owner Owner of the repository (owner or organization name)
|
|
248
|
+
* @param repo Name of the repository without the .git extension
|
|
249
|
+
* @param params Parameters for creating the reference
|
|
250
|
+
* @param options Опции запроса
|
|
251
|
+
* @returns Reference
|
|
252
|
+
*/
|
|
253
|
+
createRef(owner: string, repo: string, params: CreateReferenceParams, options?: {
|
|
254
|
+
signal?: AbortSignal;
|
|
255
|
+
}): Promise<Reference>;
|
|
256
|
+
/**
|
|
257
|
+
* Creates new Git tree
|
|
258
|
+
* @param owner owner
|
|
259
|
+
* @param repo repo
|
|
260
|
+
* @param params Параметры создания дерева
|
|
261
|
+
* @param options Опции запроса
|
|
262
|
+
* @returns RepoTree
|
|
263
|
+
*/
|
|
264
|
+
createTree(owner: string, repo: string, params: CreateTreeParams, options?: {
|
|
265
|
+
signal?: AbortSignal;
|
|
266
|
+
}): Promise<RepoTree>;
|
|
267
|
+
/**
|
|
268
|
+
* Get repository tree by SHA
|
|
269
|
+
* @param owner Repository owner
|
|
270
|
+
* @param repo Repository name
|
|
271
|
+
* @param sha Commit SHA to list tree for
|
|
272
|
+
* @param queryParams Параметры запроса
|
|
273
|
+
* @param options Опции запроса
|
|
274
|
+
* @returns GitTreeResponse
|
|
275
|
+
*/
|
|
276
|
+
getTree(owner: string, repo: string, sha: string, queryParams?: {
|
|
277
|
+
page?: number;
|
|
278
|
+
per_page?: number;
|
|
279
|
+
recursive?: boolean;
|
|
280
|
+
}, options?: {
|
|
281
|
+
signal?: AbortSignal;
|
|
282
|
+
}): Promise<GitTreeResponse>;
|
|
283
|
+
/**
|
|
284
|
+
* Get repository languages
|
|
285
|
+
* @param owner Repository owner
|
|
286
|
+
* @param repo Repository name
|
|
287
|
+
* @param options Опции запроса
|
|
288
|
+
* @returns Record<string, unknown>
|
|
289
|
+
*/
|
|
290
|
+
listLanguages(owner: string, repo: string, options?: {
|
|
291
|
+
signal?: AbortSignal;
|
|
292
|
+
}): Promise<Record<string, unknown>>;
|
|
293
|
+
/**
|
|
294
|
+
* List pull requests
|
|
295
|
+
* @param owner Repository owner
|
|
296
|
+
* @param repo Repository name
|
|
297
|
+
* @param queryParams Параметры запроса
|
|
298
|
+
* @param options Опции запроса
|
|
299
|
+
* @returns PullRequest[]
|
|
300
|
+
*/
|
|
301
|
+
listPulls(owner: string, repo: string, queryParams?: {
|
|
302
|
+
state?: string;
|
|
303
|
+
head?: string;
|
|
304
|
+
base?: string;
|
|
305
|
+
sort?: string;
|
|
306
|
+
direction?: string;
|
|
307
|
+
page?: number;
|
|
308
|
+
per_page?: number;
|
|
309
|
+
}, options?: {
|
|
310
|
+
signal?: AbortSignal;
|
|
311
|
+
}): Promise<PullRequest[]>;
|
|
312
|
+
/**
|
|
313
|
+
* Pull request details.
|
|
314
|
+
* @param owner Repository owner
|
|
315
|
+
* @param repo Repository name
|
|
316
|
+
* @param pull_number The number that identifies the pull request..
|
|
317
|
+
* @param options Опции запроса
|
|
318
|
+
* @returns PullRequest
|
|
319
|
+
*/
|
|
320
|
+
getPull(owner: string, repo: string, pull_number: number, options?: {
|
|
321
|
+
signal?: AbortSignal;
|
|
322
|
+
}): Promise<PullRequest>;
|
|
323
|
+
/**
|
|
324
|
+
* Update a pull request.
|
|
325
|
+
* @param owner Repository owner
|
|
326
|
+
* @param repo Repository name
|
|
327
|
+
* @param pull_number The number that identifies the pull request.
|
|
328
|
+
* @param params Pull request update parameters
|
|
329
|
+
* @param options Опции запроса
|
|
330
|
+
* @returns PullRequest
|
|
331
|
+
*/
|
|
332
|
+
updatePull(owner: string, repo: string, pull_number: number, params: UpdatePullRequestParams, options?: {
|
|
333
|
+
signal?: AbortSignal;
|
|
334
|
+
}): Promise<PullRequest>;
|
|
335
|
+
/**
|
|
336
|
+
* Get authenticated user repositories
|
|
337
|
+
* @param queryParams Параметры запроса
|
|
338
|
+
* @param options Опции запроса
|
|
339
|
+
* @returns Repository[]
|
|
340
|
+
*/
|
|
341
|
+
listForAuthenticatedUser(queryParams?: {
|
|
342
|
+
page?: number;
|
|
343
|
+
per_page?: number;
|
|
344
|
+
}, options?: {
|
|
345
|
+
signal?: AbortSignal;
|
|
346
|
+
}): Promise<Repository[]>;
|
|
347
|
+
/**
|
|
348
|
+
* Create repository
|
|
349
|
+
* @param params Repository creation options
|
|
350
|
+
* @param options Опции запроса
|
|
351
|
+
* @returns Repository
|
|
352
|
+
*/
|
|
353
|
+
createForAuthenticatedUser(params: CreateRepositoryParams, options?: {
|
|
354
|
+
signal?: AbortSignal;
|
|
355
|
+
}): Promise<Repository>;
|
|
1068
356
|
}
|
|
1069
|
-
export { RepositoriesApi };
|