gitverse-api-sdk 5.0.1 → 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.
Files changed (49) hide show
  1. package/README.md +112 -7
  2. package/dist/api/actions.d.ts +313 -520
  3. package/dist/api/actions.js +3 -3
  4. package/dist/api/actions.js.map +3 -3
  5. package/dist/api/emails.d.ts +41 -206
  6. package/dist/api/emails.js +2 -2
  7. package/dist/api/emails.js.map +1 -1
  8. package/dist/api/issues.d.ts +100 -480
  9. package/dist/api/issues.js +2 -2
  10. package/dist/api/issues.js.map +1 -1
  11. package/dist/api/organizations.d.ts +67 -228
  12. package/dist/api/organizations.js +2 -2
  13. package/dist/api/organizations.js.map +1 -1
  14. package/dist/api/pages.d.ts +35 -0
  15. package/dist/api/pages.js +4 -0
  16. package/dist/api/pages.js.map +10 -0
  17. package/dist/api/pulls.d.ts +75 -520
  18. package/dist/api/pulls.js +2 -2
  19. package/dist/api/pulls.js.map +1 -1
  20. package/dist/api/releases.d.ts +135 -384
  21. package/dist/api/releases.js +2 -2
  22. package/dist/api/releases.js.map +1 -1
  23. package/dist/api/repositories.d.ts +354 -1067
  24. package/dist/api/repositories.js +2 -2
  25. package/dist/api/repositories.js.map +3 -3
  26. package/dist/api/stars.d.ts +55 -272
  27. package/dist/api/stars.js +2 -2
  28. package/dist/api/stars.js.map +1 -1
  29. package/dist/api/teams.d.ts +51 -288
  30. package/dist/api/teams.js +2 -2
  31. package/dist/api/teams.js.map +1 -1
  32. package/dist/api/users.d.ts +52 -263
  33. package/dist/api/users.js +2 -2
  34. package/dist/api/users.js.map +1 -1
  35. package/dist/client.d.ts +118 -150
  36. package/dist/client.js +2 -2
  37. package/dist/client.js.map +1 -1
  38. package/dist/enums.d.ts +47 -48
  39. package/dist/enums.js +2 -2
  40. package/dist/enums.js.map +1 -1
  41. package/dist/errors.d.ts +39 -73
  42. package/dist/errors.js +2 -2
  43. package/dist/errors.js.map +1 -1
  44. package/dist/index.d.ts +54 -2373
  45. package/dist/index.js +2 -2
  46. package/dist/index.js.map +3 -3
  47. package/dist/types.d.ts +1028 -880
  48. package/dist/utils.d.ts +72 -61
  49. package/package.json +1 -3
package/dist/index.d.ts CHANGED
@@ -1,2374 +1,55 @@
1
- /**
2
- * Типы данных для GitVerse API
3
- * @generated Сгенерировано автоматически из OpenAPI спецификации
4
- */
5
- /**
6
- * Опции для выполнения HTTP-запросов
7
- */
8
- interface RequestOptions {
9
- /**
10
- * AbortSignal для отмены запроса
11
- * @example
12
- * const controller = new AbortController();
13
- * const promise = client.users.getCurrent({ signal: controller.signal });
14
- * controller.abort(); // Отменяет запрос
15
- */
16
- signal?: AbortSignal;
17
- }
18
- /**
19
- * Базовые параметры пагинации
20
- */
21
- interface PaginationParams {
22
- /** Номер страницы (начиная с 1) */
23
- page?: number;
24
- /** Количество элементов на странице */
25
- per_page?: number;
26
- }
27
- /**
28
- * Информация об ошибке API
29
- */
30
- interface ApiError {
31
- /** Сообщение об ошибке */
32
- message?: string;
33
- /** URL документации */
34
- documentation_url?: string;
35
- }
36
- /**
37
- * Информация о лимитах запросов
38
- */
39
- interface RateLimitInfo {
40
- /** Максимальное количество запросов */
41
- limit: number;
42
- /** Оставшееся количество запросов */
43
- remaining: number;
44
- /** Unix timestamp сброса лимита */
45
- reset: number;
46
- /** Секунд до сброса лимита */
47
- retryAfter: number;
48
- }
49
- /**
50
- * Информация о версии API
51
- */
52
- interface ApiVersionInfo {
53
- /** Текущая используемая версия */
54
- version: string;
55
- /** Последняя доступная версия */
56
- latestVersion: string;
57
- /** Версия помечена как устаревшая */
58
- deprecated: boolean;
59
- /** Дата вывода из эксплуатации */
60
- decommissioning?: string;
61
- }
62
- /**
63
- * Метаданные ответа API
64
- */
65
- interface ApiResponseMetadata {
66
- /** Уникальный идентификатор запроса */
67
- requestId?: string;
68
- /** Информация о лимитах */
69
- rateLimit?: RateLimitInfo;
70
- /** Информация о версии API */
71
- apiVersion?: ApiVersionInfo;
72
- }
73
- interface AddCollaboratorParams {
74
- /** enum: read,write,admin */
75
- permission?: string;
76
- }
77
- interface CommitUserParams {
78
- date?: string;
79
- email: string;
80
- name: string;
81
- }
82
- interface CreateCommitParams {
83
- author?: CommitUserParams;
84
- committer?: CommitUserParams;
85
- message: string;
86
- parents?: string[];
87
- tree: string;
88
- }
89
- interface CreateEmailParams {
90
- emails?: string[];
91
- }
92
- interface CreateFileParams {
93
- /** ветка на которой будет базировать коммит, если пустая то будет использована ветка по умолчанию */
94
- branch?: string;
95
- /** content must be base64 encoded */
96
- content?: string;
97
- /** SHA string `json:"sha" binding:"Required"`
98
- from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL */
99
- from_path?: string;
100
- /** Сообщение для описания коммита, если пустое то будет использовано сообщение по умолчанию */
101
- message?: string;
102
- /** новая ветка которая будет отведена от указанной выше ветки и вней будет создан новый коммит */
103
- new_branch?: string;
104
- /** sha is the SHA for the file that already exists */
105
- sha?: string;
106
- /** Подписывать ли коммит */
107
- signoff?: boolean;
108
- }
109
- interface CreatePullRequestParams {
110
- /** список ответственных */
111
- assignees?: string[];
112
- /** ветка в которую происходит слияние */
113
- base?: string;
114
- /** тело запроса */
115
- body?: string;
116
- /** черновик */
117
- draft?: boolean;
118
- /** Deadline */
119
- due_date?: string;
120
- /** ветка из которой происходит слияние */
121
- head?: string;
122
- /** ветка из которой происходит слияние */
123
- head_repo?: string;
124
- /** Метки */
125
- labels?: number[];
126
- /** могут ли мэйнтейнеры изменять PR */
127
- maintainer_can_modify?: boolean;
128
- /** идентификатор "этапа" */
129
- milestone?: number;
130
- /** заголовок запроса */
131
- title?: string;
132
- }
133
- interface CreateReferenceParams {
134
- ref?: string;
135
- sha?: string;
136
- }
137
- interface CreateReleaseParams {
138
- body?: string;
139
- draft?: boolean;
140
- name?: string;
141
- prerelease?: boolean;
142
- tag_name?: string;
143
- target_commitish?: string;
144
- }
145
- interface CreateRepositoryParams {
146
- auto_init?: boolean;
147
- description?: string;
148
- gitignores?: string[];
149
- is_template?: boolean;
150
- name?: string;
151
- private?: boolean;
152
- }
153
- interface TreeItem {
154
- content?: string;
155
- mode?: string;
156
- path?: string;
157
- sha?: string;
158
- type?: string;
159
- }
160
- interface CreateTreeParams {
161
- base_tree?: string;
162
- tree?: TreeItem[];
163
- }
164
- interface CreateVariableParams {
165
- name?: string;
166
- value?: string;
167
- }
168
- interface DeleteEmailParams {
169
- emails?: string[];
170
- }
171
- interface DeleteFileParams {
172
- /** ветка на которой будет базировать коммит, если пустая то будет использована ветка по умолчанию */
173
- branch?: string;
174
- /** Сообщение для описания коммита, если пустое то будет использовано сообщение по умолчанию */
175
- message?: string;
176
- /** новая ветка которая будет отведена от указанной выше ветки и вней будет создан новый коммит */
177
- new_branch?: string;
178
- /** sha is the SHA for the file that already exists */
179
- sha?: string;
180
- /** Подписывать ли коммит */
181
- signoff?: boolean;
182
- }
183
- interface UpdateReleaseParams {
184
- body?: string;
185
- draft?: boolean;
186
- name?: string;
187
- prerelease?: boolean;
188
- tag_name?: string;
189
- target_commitish?: string;
190
- }
191
- interface CreateForkParams {
192
- /** Описание */
193
- description?: string;
194
- /** Имя форкнутого репозитория */
195
- name?: string;
196
- /** Название организации, если форкаем в организацию */
197
- organization?: string;
198
- }
199
- interface UpdateRepositoryParams {
200
- allow_auto_merge?: boolean;
201
- allow_merge?: boolean;
202
- allow_rebase?: boolean;
203
- allow_rebase_merge?: boolean;
204
- allow_squash_merge?: boolean;
205
- allow_update_branch?: boolean;
206
- archived?: boolean;
207
- autodetect_manual_merge?: boolean;
208
- default_allow_maintainer_edit?: boolean;
209
- default_branch?: string;
210
- default_merge_style?: string;
211
- delete_branch_on_merge?: boolean;
212
- description?: string;
213
- homepage?: string;
214
- ignore_whitespace?: boolean;
215
- is_template?: boolean;
216
- /** обработаны */
217
- name?: string;
218
- private?: boolean;
219
- }
220
- interface TeamRepoPermissions {
221
- permission?: string;
222
- }
223
- interface UpdateBranchParams {
224
- expected_head_sha?: string;
225
- }
226
- interface UpdatePullRequestParams {
227
- /** ветка в которую происходит слияние */
228
- base?: string;
229
- /** тело запроса */
230
- body?: string;
231
- /** могут ли мэйнтейнеры изменять PR */
232
- maintainer_can_modify?: boolean;
233
- /** статус запроса */
234
- state?: string;
235
- /** заголовок запроса */
236
- title?: string;
237
- }
238
- interface ActionWorkflowRun {
239
- head_sha?: string;
240
- id?: number;
241
- repository_id?: number;
242
- }
243
- interface ActionArtifact {
244
- archive_download_url?: string;
245
- created_at?: string;
246
- expired?: boolean;
247
- expires_at?: string;
248
- id?: number;
249
- name?: string;
250
- size_in_bytes?: number;
251
- updated_at?: string;
252
- url?: string;
253
- workflow_run?: ActionWorkflowRun;
254
- }
255
- interface ActionArtifactList {
256
- artifacts?: ActionArtifact[];
257
- total_count?: number;
258
- }
259
- interface ActionRunnerLabel {
260
- id?: number;
261
- name?: string;
262
- type?: string;
263
- }
264
- interface ActionRunner {
265
- busy?: boolean;
266
- id?: number;
267
- labels?: ActionRunnerLabel[];
268
- name?: string;
269
- status?: string;
270
- }
271
- interface ActionRunners {
272
- runners?: ActionRunner[];
273
- total_count?: number;
274
- }
275
- interface Attachment {
276
- browser_download_url?: string;
277
- created_at?: string;
278
- download_count?: number;
279
- id?: number;
280
- name?: string;
281
- size?: number;
282
- uuid?: string;
283
- }
284
- interface CommitMeta {
285
- created?: string;
286
- html_url?: string;
287
- sha?: string;
288
- url?: string;
289
- }
290
- interface Branch {
291
- commit?: CommitMeta;
292
- name?: string;
293
- protected?: boolean;
294
- }
295
- interface Permissions {
296
- admin?: boolean;
297
- pull?: boolean;
298
- push?: boolean;
299
- }
300
- interface Collaborator {
301
- /** Адрес аватарки */
302
- avatar_url?: string;
303
- /** О себе */
304
- bio?: string;
305
- /** Почта */
306
- email?: string;
307
- /** Url для получения подписчиков пользователя */
308
- followers_url?: string;
309
- /** Url для получения подписок пользователя */
310
- following_url?: string;
311
- /** Полное имя */
312
- full_name?: string;
313
- /** Адрес страницы пользователя */
314
- html_url?: string;
315
- /** Идентификатор */
316
- id?: number;
317
- /** Логин пользователя */
318
- login?: string;
319
- /** Имя пользователя */
320
- name?: string;
321
- /** Url для получения организаций пользователя */
322
- organizations_url?: string;
323
- /** Полномочия */
324
- permissions?: Permissions;
325
- /** Url для получения репозиториев пользователя */
326
- repos_url?: string;
327
- /** Есть ли права админа */
328
- site_admin?: boolean;
329
- /** Url для получения репозиториев пользователя, которые были добавлены в избранное */
330
- starred_url?: string;
331
- /** Url для получения подписок пользователя */
332
- subscriptions_url?: string;
333
- /** Тип пользователя */
334
- type?: string;
335
- /** Url для получения пользователя */
336
- url?: string;
337
- /** Вебсайт */
338
- website?: string;
339
- }
340
- interface UserPublicInfo {
341
- avatar_url?: string;
342
- followers_url?: string;
343
- following_url?: string;
344
- html_url?: string;
345
- id?: number;
346
- login?: string;
347
- organizations_url?: string;
348
- repos_url?: string;
349
- site_admin?: boolean;
350
- type?: string;
351
- url?: string;
352
- }
353
- interface RepoPublicInfo {
354
- contents_url?: string;
355
- description?: string;
356
- fork?: boolean;
357
- forks_url?: string;
358
- full_name?: string;
359
- html_url?: string;
360
- id?: number;
361
- issue_comment_url?: string;
362
- issues_url?: string;
363
- languages_url?: string;
364
- name?: string;
365
- owner?: UserPublicInfo;
366
- private?: boolean;
367
- pulls_url?: string;
368
- url?: string;
369
- }
370
- interface CollaboratorInvitation {
371
- created_at?: string;
372
- id?: number;
373
- invitee?: UserPublicInfo;
374
- inviter?: UserPublicInfo;
375
- permissions?: string;
376
- repository?: RepoPublicInfo;
377
- }
378
- interface Comment {
379
- author_association?: string;
380
- body?: string;
381
- created_at?: string;
382
- /** Адрес страницы с комметарием */
383
- html_url?: string;
384
- id?: number;
385
- /** Url для получения issue/PR */
386
- issue_url?: string;
387
- updated_at?: string;
388
- /** Url для получения пользователя */
389
- url?: string;
390
- user?: UserPublicInfo;
391
- }
392
- interface CommitFiles {
393
- additions?: number;
394
- blob_url?: string;
395
- changes?: number;
396
- contents_url?: string;
397
- deletions?: number;
398
- filename?: string;
399
- patch?: string;
400
- raw_url?: string;
401
- sha?: string;
402
- status?: string;
403
- }
404
- interface CommitUser {
405
- date?: string;
406
- email?: string;
407
- name?: string;
408
- }
409
- interface TreeMeta {
410
- created?: string;
411
- sha?: string;
412
- url?: string;
413
- }
414
- interface RepoCommit {
415
- author?: CommitUser;
416
- committer?: CommitUser;
417
- message?: string;
418
- tree?: TreeMeta;
419
- url?: string;
420
- }
421
- interface CommitStats {
422
- additions?: number;
423
- deletions?: number;
424
- total?: number;
425
- }
426
- interface Commit {
427
- author?: UserPublicInfo;
428
- branch?: string;
429
- commit?: RepoCommit;
430
- committer?: UserPublicInfo;
431
- created?: string;
432
- files?: CommitFiles[];
433
- html_url?: string;
434
- parents?: CommitMeta[];
435
- sha?: string;
436
- stats?: CommitStats;
437
- url?: string;
438
- }
439
- interface CommitVerification {
440
- payload?: string;
441
- reason?: string;
442
- signature?: string;
443
- verified?: boolean;
444
- verifiedAt?: string;
445
- }
446
- interface CompareResponse {
447
- ahead_by?: number;
448
- base_commit?: Commit;
449
- behind_by?: number;
450
- commits?: Commit[];
451
- files?: CommitFiles[];
452
- html_url?: string;
453
- merge_base_commit?: Commit;
454
- status?: string;
455
- total_commits?: number;
456
- url?: string;
457
- }
458
- interface FileLinksResponse {
459
- git?: string;
460
- html?: string;
461
- self?: string;
462
- }
463
- interface ContentsResponse {
464
- /** Ссылки */
465
- _links?: FileLinksResponse;
466
- /** `content` is populated when `type` is `file`, otherwise null */
467
- content?: string;
468
- /** DownloadURL ссылка на скачивание файла */
469
- download_url?: string;
470
- /** `encoding` is populated when `type` is `file`, otherwise null */
471
- encoding?: string;
472
- /** GitURL ссылка на получение файла */
473
- git_url?: string;
474
- /** HtmlURL ссылка на страницу с содержимым файла */
475
- html_url?: string;
476
- /** Язык программирования используемый в файле (если тип файл) */
477
- language?: string;
478
- name?: string;
479
- path?: string;
480
- sha?: string;
481
- size?: number;
482
- /** `submodule_git_url` is populated when `type` is `submodule`, otherwise null */
483
- submodule_git_url?: string;
484
- /** `target` is populated when `type` is `symlink`, otherwise null */
485
- target?: string;
486
- /** `type` will be `file`, `dir`, `symlink`, or `submodule` */
487
- type?: string;
488
- /** Url возвращает ссылку на получение такого же JSON */
489
- url?: string;
490
- }
491
- interface FileCommitResponse {
492
- author?: CommitUser;
493
- committer?: CommitUser;
494
- created?: string;
495
- html_url?: string;
496
- message?: string;
497
- parents?: CommitMeta[];
498
- sha?: string;
499
- tree?: CommitMeta;
500
- url?: string;
501
- verification?: CommitVerification;
502
- }
503
- interface FileCreationResponse {
504
- commit?: FileCommitResponse;
505
- content?: ContentsResponse;
506
- }
507
- interface FileDeleteResponse {
508
- commit?: FileCommitResponse;
509
- content?: unknown;
510
- }
511
- interface Email {
512
- email?: string;
513
- primary?: boolean;
514
- verified?: boolean;
515
- visibility?: string;
516
- }
517
- interface GitEntry {
518
- mode?: string;
519
- path?: string;
520
- sha?: string;
521
- size?: number;
522
- type?: string;
523
- url?: string;
524
- }
525
- interface GitObject {
526
- sha?: string;
527
- type?: string;
528
- url?: string;
529
- }
530
- interface GitTreeResponse {
531
- page?: number;
532
- sha?: string;
533
- total_count?: number;
534
- tree?: GitEntry[];
535
- truncated?: boolean;
536
- url?: string;
537
- }
538
- interface User2 {
539
- /** Адрес аватарки */
540
- avatar_url?: string;
541
- /** О себе */
542
- bio?: string;
543
- /** Дата создания учетной записи */
544
- created_at?: string;
545
- /** Почта */
546
- email?: string;
547
- /** Счетчики */
548
- followers?: number;
549
- /** Url для получения подписчиков пользователя */
550
- followers_url?: string;
551
- following?: number;
552
- /** Url для получения подписок пользователя */
553
- following_url?: string;
554
- /** Полное имя */
555
- full_name?: string;
556
- /** Адрес страницы пользователя */
557
- html_url?: string;
558
- /** Идентификатор */
559
- id?: number;
560
- /** Верифицирован? */
561
- is_verified?: boolean;
562
- /** Местоположение */
563
- location?: string;
564
- /** Логин пользователя */
565
- login?: string;
566
- /** Имя пользователя */
567
- name?: string;
568
- /** Url для получения организаций пользователя */
569
- organizations_url?: string;
570
- /** Публичные репозитории */
571
- public_repos?: number;
572
- /** Url для получения репозиториев пользователя */
573
- repos_url?: string;
574
- /** Есть ли права админа */
575
- site_admin?: boolean;
576
- /** Url для получения репозиториев пользователя, которые были добавлены в избранное */
577
- starred_url?: string;
578
- /** Количество репозиториев в избранном */
579
- stars_count?: number;
580
- /** Url для получения подписок пользователя */
581
- subscriptions_url?: string;
582
- /** Тип пользователя */
583
- type?: string;
584
- /** Дата изменения учетной записи */
585
- updated_at?: string;
586
- /** Url для получения пользователя */
587
- url?: string;
588
- /** Вебсайт */
589
- website?: string;
590
- }
591
- interface Label {
592
- /** example: 00aabb */
593
- color?: string;
594
- description?: string;
595
- /** example: false */
596
- exclusive?: boolean;
597
- id?: number;
598
- /** example: false */
599
- is_archived?: boolean;
600
- name?: string;
601
- url?: string;
602
- }
603
- interface Milestone {
604
- closed_at?: string;
605
- closed_issues?: number;
606
- created_at?: string;
607
- description?: string;
608
- due_on?: string;
609
- id?: number;
610
- open_issues?: number;
611
- state?: string;
612
- title?: string;
613
- updated_at?: string;
614
- }
615
- interface PullRequestMeta {
616
- draft?: boolean;
617
- html_url?: string;
618
- merged?: boolean;
619
- merged_at?: string;
620
- }
621
- interface RepositoryMeta {
622
- full_name?: string;
623
- id?: number;
624
- name?: string;
625
- owner?: string;
626
- }
627
- interface Issue {
628
- assets?: Attachment[];
629
- assignee?: User2;
630
- assignees?: User2[];
631
- body?: string;
632
- closed_at?: string;
633
- comments?: number;
634
- created_at?: string;
635
- due_date?: string;
636
- html_url?: string;
637
- id?: number;
638
- is_locked?: boolean;
639
- labels?: Label[];
640
- milestone?: Milestone;
641
- number?: number;
642
- original_author?: string;
643
- original_author_id?: number;
644
- pull_request?: PullRequestMeta;
645
- ref?: string;
646
- repository?: RepositoryMeta;
647
- state?: string;
648
- title?: string;
649
- updated_at?: string;
650
- url?: string;
651
- user?: User2;
652
- }
653
- interface Repository {
654
- allow_merge_commit?: boolean;
655
- allow_rebase_merge?: boolean;
656
- allow_squash_merge?: boolean;
657
- archived?: boolean;
658
- clone_url?: string;
659
- contents_url?: string;
660
- created_at?: string;
661
- default_branch?: string;
662
- delete_branch_on_merge?: boolean;
663
- description?: string;
664
- disabled?: boolean;
665
- fork?: boolean;
666
- forks?: number;
667
- forks_count?: number;
668
- forks_url?: string;
669
- full_name?: string;
670
- has_issues?: boolean;
671
- has_wiki?: boolean;
672
- id?: number;
673
- is_template?: boolean;
674
- issue_comment_url?: string;
675
- issues_url?: string;
676
- language?: string;
677
- languages_url?: string;
678
- mirror_url?: string;
679
- name?: string;
680
- open_issues?: number;
681
- open_issues_count?: number;
682
- owner?: UserPublicInfo;
683
- parent?: Repository;
684
- permissions?: Permissions;
685
- private?: boolean;
686
- pulls_url?: string;
687
- pushed_at?: string;
688
- size?: number;
689
- ssh_url?: string;
690
- stargazers_count?: number;
691
- template_repository?: Repository;
692
- topics?: string[];
693
- updated_at?: string;
694
- url?: string;
695
- visibility?: string;
696
- watchers?: number;
697
- watchers_count?: number;
698
- }
699
- interface PRBranchInfo {
700
- label?: string;
701
- ref?: string;
702
- repo?: Repository;
703
- repo_id?: number;
704
- sha?: string;
705
- }
706
- interface Team {
707
- /** Полномочия на создание репозиториев */
708
- can_create_org_repo?: boolean;
709
- /** Описание команды */
710
- description?: string;
711
- /** Идентификатор */
712
- id?: number;
713
- /** Включает все репозитории */
714
- includes_all_repositories?: boolean;
715
- /** Название команды */
716
- name?: string;
717
- /** Количество участников */
718
- num_members?: number;
719
- /** Количество репозиториев */
720
- num_repos?: number;
721
- /** Полномочия */
722
- permission?: string;
723
- /** Полномочие на действия с ветками */
724
- permission_actions?: string;
725
- /** Код полномочия */
726
- permission_code?: string;
727
- /** Полномочие на пакеты */
728
- permission_packages?: string;
729
- /** Полномочие на отправку пулл-реквестов */
730
- permission_pulls?: string;
731
- /** Полномочие на релизы */
732
- permission_releases?: string;
733
- }
734
- interface PullRequest {
735
- assignee?: User2;
736
- assignees?: User2[];
737
- base?: PRBranchInfo;
738
- body?: string;
739
- closed_at?: string;
740
- comments?: number;
741
- created_at?: string;
742
- diff_url?: string;
743
- head?: PRBranchInfo;
744
- html_url?: string;
745
- id?: number;
746
- is_draft?: boolean;
747
- labels?: Label[];
748
- locked?: boolean;
749
- maintainer_can_modify?: boolean;
750
- merge_commit_sha?: string;
751
- mergeable?: boolean;
752
- merged?: boolean;
753
- merged_at?: string;
754
- merged_by?: User2;
755
- milestone?: Milestone;
756
- number?: number;
757
- patch_url?: string;
758
- requested_reviewers?: User2[];
759
- requested_teams?: Team[];
760
- state?: string;
761
- title?: string;
762
- updated_at?: string;
763
- url?: string;
764
- user?: User2;
765
- }
766
- interface Reference {
767
- object?: GitObject;
768
- ref?: string;
769
- url?: string;
770
- }
771
- interface RegistrationToken {
772
- token?: string;
773
- }
774
- interface Release {
775
- assets?: Attachment[];
776
- author?: User2;
777
- body?: string;
778
- created_at?: string;
779
- draft?: boolean;
780
- html_url?: string;
781
- id?: number;
782
- name?: string;
783
- prerelease?: boolean;
784
- published_at?: string;
785
- tag_name?: string;
786
- tarball_url?: string;
787
- target_commitish?: string;
788
- upload_url?: string;
789
- url?: string;
790
- zipball_url?: string;
791
- }
792
- interface TreeEntry {
793
- mode?: string;
794
- path?: string;
795
- sha?: string;
796
- size?: number;
797
- /** "blob", "tree", "commit" */
798
- type?: string;
799
- }
800
- interface RepoTree {
801
- sha?: string;
802
- tree?: TreeEntry[];
803
- truncated?: boolean;
804
- url?: string;
805
- }
806
- interface Secret {
807
- created_at?: string;
808
- name?: string;
809
- }
810
- interface SecretList {
811
- secrets?: Secret[];
812
- total_count?: number;
813
- }
814
- interface TrackedTime {
815
- /** swagger:strfmt date-time */
816
- created?: string;
817
- id?: number;
818
- issue?: Issue;
819
- /** deprecated (only for backwards compatibility) */
820
- issue_id?: number;
821
- /** Time in seconds */
822
- time?: number;
823
- /** deprecated (only for backwards compatibility) */
824
- user_id?: number;
825
- user_name?: string;
826
- }
827
- interface TimelineComment {
828
- assignee?: User2;
829
- assignee_team?: Team;
830
- body?: string;
831
- /** swagger:strfmt date-time */
832
- created_at?: string;
833
- dependent_issue?: Issue;
834
- html_url?: string;
835
- id?: number;
836
- issue_url?: string;
837
- label?: Label;
838
- milestone?: Milestone;
839
- new_ref?: string;
840
- new_title?: string;
841
- old_milestone?: Milestone;
842
- old_project_id?: number;
843
- old_ref?: string;
844
- old_title?: string;
845
- project_id?: number;
846
- pull_request_url?: string;
847
- ref_action?: string;
848
- ref_comment?: Comment;
849
- /** commit SHA where issue/PR was referenced */
850
- ref_commit_sha?: string;
851
- ref_issue?: Issue;
852
- /** whether the assignees were removed or added */
853
- removed_assignee?: boolean;
854
- resolve_doer?: User2;
855
- review_id?: number;
856
- tracked_time?: TrackedTime;
857
- type?: string;
858
- /** swagger:strfmt date-time */
859
- updated_at?: string;
860
- user?: User2;
861
- }
862
- interface UpdateBranchResponse {
863
- message?: string;
864
- url?: string;
865
- }
866
- interface UserPrefsArray {
867
- incomplete_results?: boolean;
868
- items?: User2[];
869
- total_count?: number;
870
- }
871
- interface Variable {
872
- created_at?: string;
873
- name?: string;
874
- updated_at?: string;
875
- value?: string;
876
- }
877
- interface VariableList {
878
- total_count?: number;
879
- variables?: Variable[];
880
- }
881
- interface WorkflowDispatchInput {
882
- default?: string;
883
- description?: string;
884
- name?: string;
885
- options?: string[];
886
- required?: boolean;
887
- type?: string;
888
- }
889
- interface WorkflowDispatchInputList {
890
- inputs?: WorkflowDispatchInput[];
891
- }
892
- /**
893
- * Базовая ошибка GitVerse API
894
- */
895
- declare class GitVerseApiError extends Error {
896
- /** HTTP статус код */
897
- readonly status: number;
898
- /** Метаданные ответа API */
899
- readonly metadata?: ApiResponseMetadata;
900
- constructor(status: number, message: string, metadata?: ApiResponseMetadata);
901
- }
902
- /**
903
- * Ошибка превышения лимита запросов (429 Too Many Requests)
904
- */
905
- declare class RateLimitError extends GitVerseApiError {
906
- /** Информация о лимитах */
907
- readonly rateLimit: RateLimitInfo;
908
- constructor(message: string, rateLimit: RateLimitInfo, metadata?: ApiResponseMetadata);
909
- /**
910
- * Возвращает количество секунд до сброса лимита
911
- */
912
- getRetryAfterSeconds(): number;
913
- /**
914
- * Возвращает дату/время сброса лимита
915
- */
916
- getResetDate(): Date;
917
- }
918
- /**
919
- * Предупреждение об устаревшей версии API
920
- */
921
- declare class ApiVersionWarning {
922
- /** Текущая используемая версия */
923
- readonly currentVersion: string;
924
- /** Последняя доступная версия */
925
- readonly latestVersion: string;
926
- /** Дата вывода из эксплуатации */
927
- readonly decommissioning?: string;
928
- constructor(currentVersion: string, latestVersion: string, decommissioning?: string);
929
- /**
930
- * Возвращает сообщение о предупреждении
931
- */
932
- getMessage(): string;
933
- }
934
- declare const HTTPMethods: {
935
- readonly DELETE: "DELETE"
936
- readonly GET: "GET"
937
- readonly PATCH: "PATCH"
938
- readonly POST: "POST"
939
- readonly PUT: "PUT"
940
- };
941
- type HTTPMethods = (typeof HTTPMethods)[keyof typeof HTTPMethods];
942
- /**
943
- * Параметры для конфигурации GitVerse клиента
944
- */
945
- interface GitVerseClientConfig {
946
- /**
947
- * Базовый URL API GitVerse
948
- * @default 'https://api.gitverse.ru'
949
- */
950
- baseUrl?: string;
951
- /**
952
- * Токен доступа для авторизации в API
953
- */
954
- token?: string;
955
- /**
956
- * Версия API
957
- * @default '1'
958
- */
959
- apiVersion?: string;
960
- }
961
- /**
962
- * Основной класс для работы с GitVerse API
963
- */
964
- declare class GitVerseClient {
965
- private baseUrl;
966
- private token?;
967
- private apiVersion;
968
- /**
969
- * Callback для обработки предупреждений об устаревшей версии API
970
- */
971
- onApiVersionWarning?: (warning: ApiVersionWarning) => void;
972
- /**
973
- * Создает новый экземпляр GitVerse клиента
974
- * @param config Конфигурация клиента
975
- */
976
- constructor(config?: GitVerseClientConfig);
977
- /**
978
- * Устанавливает токен авторизации
979
- * @param token Токен доступа
980
- */
981
- setToken(token: string): void;
982
- /**
983
- * Извлекает информацию о Rate Limit из заголовков ответа
984
- */
985
- private extractRateLimitInfo;
986
- /**
987
- * Извлекает информацию о версии API из заголовков ответа
988
- */
989
- private extractApiVersionInfo;
990
- /**
991
- * Извлекает метаданные из заголовков ответа
992
- */
993
- private extractMetadata;
994
- /**
995
- * Выполняет API-запрос с учетом авторизации и версии API
996
- * @param path Путь к API-ресурсу
997
- * @param method HTTP-метод
998
- * @param body Тело запроса (опционально)
999
- * @param options Опции запроса (опционально)
1000
- * @returns Ответ от API
1001
- * @throws {RateLimitError} При превышении лимита запросов (429)
1002
- * @throws {GitVerseApiError} При других ошибках API
1003
- */
1004
- request<T>(path: string, method: HTTPMethods, body?: unknown, options?: RequestOptions): Promise<T>;
1005
- /**
1006
- * Выполняет GET-запрос
1007
- * @param path Путь к API-ресурсу
1008
- * @param options Опции запроса (опционально)
1009
- * @returns Ответ от API
1010
- */
1011
- get<T>(path: string, options?: RequestOptions): Promise<T>;
1012
- /**
1013
- * Выполняет POST-запрос
1014
- * @param path Путь к API-ресурсу
1015
- * @param body Тело запроса
1016
- * @param options Опции запроса (опционально)
1017
- * @returns Ответ от API
1018
- */
1019
- post<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T>;
1020
- /**
1021
- * Выполняет PUT-запрос
1022
- * @param path Путь к API-ресурсу
1023
- * @param body Тело запроса
1024
- * @param options Опции запроса (опционально)
1025
- * @returns Ответ от API
1026
- */
1027
- put<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T>;
1028
- /**
1029
- * Выполняет DELETE-запрос
1030
- * @param path Путь к API-ресурсу
1031
- * @param body Тело запроса (опционально)
1032
- * @param options Опции запроса (опционально)
1033
- * @returns Ответ от API
1034
- */
1035
- delete<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T>;
1036
- /**
1037
- * Выполняет PATCH-запрос
1038
- * @param path Путь к API-ресурсу
1039
- * @param body Тело запроса
1040
- * @param options Опции запроса (опционально)
1041
- * @returns Ответ от API
1042
- */
1043
- patch<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T>;
1044
- /**
1045
- * Выполняет загрузку файла через multipart/form-data
1046
- * @param path Путь к API-ресурсу
1047
- * @param fieldName Имя поля для файла
1048
- * @param file Файл для загрузки (Blob или ArrayBuffer)
1049
- * @param fileName Имя файла
1050
- * @param options Опции запроса (опционально)
1051
- * @returns Ответ от API
1052
- */
1053
- uploadFile<T>(path: string, fieldName: string, file: Blob | ArrayBuffer, fileName: string, options?: RequestOptions): Promise<T>;
1054
- }
1055
- /**
1056
- * API для работы с GitHub Actions
1057
- */
1058
- declare class ActionsApi {
1059
- private client;
1060
- /**
1061
- * Создает новый экземпляр API
1062
- * @param client GitVerse клиент
1063
- */
1064
- constructor(client: GitVerseClient);
1065
- /**
1066
- * Returns a list of self-hosted runners for an organization
1067
- * @param org The organization name
1068
- * @param queryParams Параметры запроса
1069
- * @param options Опции запроса
1070
- * @returns ActionRunners
1071
- */
1072
- listOrgRunners(org: string, queryParams?: {
1073
- page?: number
1074
- per_page?: number
1075
- }, options?: {
1076
- signal?: AbortSignal
1077
- }): Promise<ActionRunners>;
1078
- /**
1079
- * Creates a registration token for an organization runner
1080
- * @param org The organization name
1081
- * @param options Опции запроса
1082
- * @returns RegistrationToken
1083
- */
1084
- createOrgRunnerRegistrationToken(org: string, options?: {
1085
- signal?: AbortSignal
1086
- }): Promise<RegistrationToken>;
1087
- /**
1088
- * Gets a specific self-hosted runner for an organization
1089
- * @param org The organization name
1090
- * @param runner_id Unique identifier of the runner
1091
- * @param options Опции запроса
1092
- * @returns ActionRunner
1093
- */
1094
- getOrgRunner(org: string, runner_id: number, options?: {
1095
- signal?: AbortSignal
1096
- }): Promise<ActionRunner>;
1097
- /**
1098
- * Deletes a specific self-hosted runner from the organization
1099
- * @param org The organization name
1100
- * @param runner_id Unique identifier of the runner
1101
- * @param options Опции запроса
1102
- * @returns void
1103
- */
1104
- deleteOrgRunner(org: string, runner_id: number, options?: {
1105
- signal?: AbortSignal
1106
- }): Promise<void>;
1107
- /**
1108
- * List organization variables
1109
- * @param org The organization name
1110
- * @param queryParams Параметры запроса
1111
- * @param options Опции запроса
1112
- * @returns VariableList
1113
- */
1114
- listOrgVariables(org: string, queryParams?: {
1115
- per_page?: number
1116
- page?: number
1117
- }, options?: {
1118
- signal?: AbortSignal
1119
- }): Promise<VariableList>;
1120
- /**
1121
- * Create an organization variable
1122
- * @param org The organization name
1123
- * @param params The request body
1124
- * @param options Опции запроса
1125
- * @returns void
1126
- */
1127
- createOrgVariable(org: string, params: CreateVariableParams, options?: {
1128
- signal?: AbortSignal
1129
- }): Promise<void>;
1130
- /**
1131
- * Get an organization variable
1132
- * @param org The organization name
1133
- * @param name The name of the variable
1134
- * @param options Опции запроса
1135
- * @returns Variable
1136
- */
1137
- getOrgVariable(org: string, name: string, options?: {
1138
- signal?: AbortSignal
1139
- }): Promise<Variable>;
1140
- /**
1141
- * Update an organization variable
1142
- * @param org The organization name
1143
- * @param name The name of the variable
1144
- * @param params The request body
1145
- * @param options Опции запроса
1146
- * @returns void
1147
- */
1148
- updateOrgVariable(org: string, name: string, params: CreateVariableParams, options?: {
1149
- signal?: AbortSignal
1150
- }): Promise<void>;
1151
- /**
1152
- * Delete an organization variable
1153
- * @param org The organization name
1154
- * @param name The name of the variable
1155
- * @param options Опции запроса
1156
- * @returns void
1157
- */
1158
- deleteOrgVariable(org: string, name: string, options?: {
1159
- signal?: AbortSignal
1160
- }): Promise<void>;
1161
- /**
1162
- * Returns a list of artifacts in the repository
1163
- * @param owner Owner of the repository (owner or organization name)
1164
- * @param repo Name of the repository without the .git extension
1165
- * @param queryParams Параметры запроса
1166
- * @param options Опции запроса
1167
- * @returns ActionArtifactList
1168
- */
1169
- listArtifacts(owner: string, repo: string, queryParams?: {
1170
- page?: number
1171
- per_page?: number
1172
- name?: string
1173
- }, options?: {
1174
- signal?: AbortSignal
1175
- }): Promise<ActionArtifactList>;
1176
- /**
1177
- * Returns a specific artifact from the repository
1178
- * @param owner Owner of the repository (owner or organization name)
1179
- * @param repo Name of the repository without the .git extension
1180
- * @param artifact_id Identifier of the artifact
1181
- * @param options Опции запроса
1182
- * @returns ActionArtifact
1183
- */
1184
- getArtifact(owner: string, repo: string, artifact_id: string, options?: {
1185
- signal?: AbortSignal
1186
- }): Promise<ActionArtifact>;
1187
- /**
1188
- * Deletes a specific artifact
1189
- * @param owner Owner of the repository (owner or organization name)
1190
- * @param repo Name of the repository without the .git extension
1191
- * @param artifact_id Identifier of the artifact
1192
- * @param options Опции запроса
1193
- * @returns void
1194
- */
1195
- deleteArtifact(owner: string, repo: string, artifact_id: string, options?: {
1196
- signal?: AbortSignal
1197
- }): Promise<void>;
1198
- /**
1199
- * Downloads a specific artifact as a ZIP archive
1200
- * @param owner Owner of the repository (owner or organization name)
1201
- * @param repo Name of the repository without the .git extension
1202
- * @param artifact_id Identifier of the artifact
1203
- * @param options Опции запроса
1204
- * @returns void
1205
- */
1206
- downloadArtifact(owner: string, repo: string, artifact_id: string, options?: {
1207
- signal?: AbortSignal
1208
- }): Promise<void>;
1209
- /**
1210
- * Downloads the artifact ZIP archive directly
1211
- * @param owner Owner of the repository (owner or organization name)
1212
- * @param repo Name of the repository without the .git extension
1213
- * @param artifact_id Identifier of the artifact
1214
- * @param options Опции запроса
1215
- * @returns string
1216
- */
1217
- downloadArtifactRaw(owner: string, repo: string, artifact_id: string, options?: {
1218
- signal?: AbortSignal
1219
- }): Promise<string>;
1220
- /**
1221
- * Returns a list of runners for the repository
1222
- * @param owner Owner of the repository (owner or organization name)
1223
- * @param repo Name of the repository without the .git extension
1224
- * @param queryParams Параметры запроса
1225
- * @param options Опции запроса
1226
- * @returns ActionRunners
1227
- */
1228
- listRepoRunners(owner: string, repo: string, queryParams?: {
1229
- page?: number
1230
- per_page?: number
1231
- }, options?: {
1232
- signal?: AbortSignal
1233
- }): Promise<ActionRunners>;
1234
- /**
1235
- * Creates a registration token for a repository runner
1236
- * @param owner Owner of the repository (owner or organization name)
1237
- * @param repo Name of the repository without the .git extension
1238
- * @param options Опции запроса
1239
- * @returns RegistrationToken
1240
- */
1241
- createRepoRunnerRegistrationToken(owner: string, repo: string, options?: {
1242
- signal?: AbortSignal
1243
- }): Promise<RegistrationToken>;
1244
- /**
1245
- * Gets a specific runner for a repository
1246
- * @param owner Owner of the repository (owner or organization name)
1247
- * @param repo Name of the repository without the .git extension
1248
- * @param runner_id Unique identifier of the runner
1249
- * @param options Опции запроса
1250
- * @returns ActionRunner
1251
- */
1252
- getRepoRunner(owner: string, repo: string, runner_id: number, options?: {
1253
- signal?: AbortSignal
1254
- }): Promise<ActionRunner>;
1255
- /**
1256
- * Deletes a specific self-hosted runner from the repository
1257
- * @param owner Owner of the repository (owner or organization name)
1258
- * @param repo Name of the repository without the .git extension
1259
- * @param runner_id Unique identifier of the runner
1260
- * @param options Опции запроса
1261
- * @returns void
1262
- */
1263
- deleteRepoRunner(owner: string, repo: string, runner_id: number, options?: {
1264
- signal?: AbortSignal
1265
- }): Promise<void>;
1266
- /**
1267
- * List repository variables
1268
- * @param owner The account owner of the repository
1269
- * @param repo The name of the repository
1270
- * @param queryParams Параметры запроса
1271
- * @param options Опции запроса
1272
- * @returns VariableList
1273
- */
1274
- listRepoVariables(owner: string, repo: string, queryParams?: {
1275
- per_page?: number
1276
- page?: number
1277
- }, options?: {
1278
- signal?: AbortSignal
1279
- }): Promise<VariableList>;
1280
- /**
1281
- * Create a repository variable
1282
- * @param owner The account owner of the repository
1283
- * @param repo The name of the repository
1284
- * @param params The request body
1285
- * @param options Опции запроса
1286
- * @returns void
1287
- */
1288
- createRepoVariable(owner: string, repo: string, params: CreateVariableParams, options?: {
1289
- signal?: AbortSignal
1290
- }): Promise<void>;
1291
- /**
1292
- * Get a repository variable
1293
- * @param owner The account owner of the repository
1294
- * @param repo The name of the repository
1295
- * @param name The name of the variable
1296
- * @param options Опции запроса
1297
- * @returns Variable
1298
- */
1299
- getRepoVariable(owner: string, repo: string, name: string, options?: {
1300
- signal?: AbortSignal
1301
- }): Promise<Variable>;
1302
- /**
1303
- * Update a repository variable
1304
- * @param owner The account owner of the repository
1305
- * @param repo The name of the repository
1306
- * @param name The name of the variable
1307
- * @param params The request body
1308
- * @param options Опции запроса
1309
- * @returns void
1310
- */
1311
- updateRepoVariable(owner: string, repo: string, name: string, params: CreateVariableParams, options?: {
1312
- signal?: AbortSignal
1313
- }): Promise<void>;
1314
- /**
1315
- * Delete a repository variable
1316
- * @param owner The account owner of the repository
1317
- * @param repo The name of the repository
1318
- * @param name The name of the variable
1319
- * @param options Опции запроса
1320
- * @returns void
1321
- */
1322
- deleteRepoVariable(owner: string, repo: string, name: string, options?: {
1323
- signal?: AbortSignal
1324
- }): Promise<void>;
1325
- /**
1326
- * Get workflow_dispatch parameters
1327
- * @param owner Repository owner owner
1328
- * @param repo Repository name
1329
- * @param workflow Workflow name filter
1330
- * @param queryParams Параметры запроса
1331
- * @param options Опции запроса
1332
- * @returns WorkflowDispatchInputList
1333
- */
1334
- getWorkflowDispatchInputs(owner: string, repo: string, workflow: string, queryParams?: {
1335
- branch?: string
1336
- tag?: string
1337
- }, options?: {
1338
- signal?: AbortSignal
1339
- }): Promise<WorkflowDispatchInputList>;
1340
- /**
1341
- * Trigger workflow_dispatch
1342
- * @param owner Repository owner owner
1343
- * @param repo Repository name
1344
- * @param workflow Workflow filename
1345
- * @param params Output parameters for workflow dispatch. Key - input parameter name, Value - input parameter value
1346
- * @param queryParams Параметры запроса
1347
- * @param options Опции запроса
1348
- * @returns void
1349
- */
1350
- dispatchWorkflow(owner: string, repo: string, workflow: string, params: unknown, queryParams?: {
1351
- branch?: string
1352
- tag?: string
1353
- }, options?: {
1354
- signal?: AbortSignal
1355
- }): Promise<void>;
1356
- }
1357
- /**
1358
- * API для работы с email адресами
1359
- */
1360
- declare class EmailsApi {
1361
- private client;
1362
- /**
1363
- * Создает новый экземпляр API
1364
- * @param client GitVerse клиент
1365
- */
1366
- constructor(client: GitVerseClient);
1367
- /**
1368
- * Get user email addresses
1369
- * @param queryParams Параметры запроса
1370
- * @param options Опции запроса
1371
- * @returns Email[]
1372
- */
1373
- list(queryParams?: {
1374
- page?: number
1375
- per_page?: number
1376
- }, options?: {
1377
- signal?: AbortSignal
1378
- }): Promise<Email[]>;
1379
- /**
1380
- * Add email addresses
1381
- * @param params Email addresses to add
1382
- * @param options Опции запроса
1383
- * @returns Email[]
1384
- */
1385
- create(params: CreateEmailParams, options?: {
1386
- signal?: AbortSignal
1387
- }): Promise<Email[]>;
1388
- /**
1389
- * Delete email addresses
1390
- * @param params Email addresses to delete
1391
- * @param options Опции запроса
1392
- * @returns void
1393
- */
1394
- delete(params: DeleteEmailParams, options?: {
1395
- signal?: AbortSignal
1396
- }): Promise<void>;
1397
- }
1398
- /**
1399
- * API для работы с issues
1400
- */
1401
- declare class IssuesApi {
1402
- private client;
1403
- /**
1404
- * Создает новый экземпляр API
1405
- * @param client GitVerse клиент
1406
- */
1407
- constructor(client: GitVerseClient);
1408
- /**
1409
- * List issues and pull requests
1410
- * @param owner Repository owner
1411
- * @param repo Repository name
1412
- * @param queryParams Параметры запроса
1413
- * @param options Опции запроса
1414
- * @returns Issue[]
1415
- */
1416
- list(owner: string, repo: string, queryParams?: {
1417
- state?: string
1418
- q?: string
1419
- labels?: string
1420
- milestones?: string
1421
- created_by?: string
1422
- assigned_by?: string
1423
- mentioned_by?: string
1424
- type?: string
1425
- since?: string
1426
- before?: string
1427
- page?: number
1428
- per_page?: number
1429
- }, options?: {
1430
- signal?: AbortSignal
1431
- }): Promise<Issue[]>;
1432
- /**
1433
- * Get a specific issue comment
1434
- * @param owner Repository owner
1435
- * @param repo Repository name
1436
- * @param id Comment ID
1437
- * @param options Опции запроса
1438
- * @returns Comment
1439
- */
1440
- getComment(owner: string, repo: string, id: number, options?: {
1441
- signal?: AbortSignal
1442
- }): Promise<Comment>;
1443
- /**
1444
- * Get issue or pull request
1445
- * @param owner Repository owner
1446
- * @param repo Repository name
1447
- * @param index Issue or pull request index in the repository
1448
- * @param options Опции запроса
1449
- * @returns Issue
1450
- */
1451
- get(owner: string, repo: string, index: number, options?: {
1452
- signal?: AbortSignal
1453
- }): Promise<Issue>;
1454
- /**
1455
- * List issue comments
1456
- * @param owner Repository owner
1457
- * @param repo Repository name
1458
- * @param index Issue or pull request index in the repository
1459
- * @param queryParams Параметры запроса
1460
- * @param options Опции запроса
1461
- * @returns Comment[]
1462
- */
1463
- listComments(owner: string, repo: string, index: number, queryParams?: {
1464
- since?: string
1465
- before?: string
1466
- }, options?: {
1467
- signal?: AbortSignal
1468
- }): Promise<Comment[]>;
1469
- /**
1470
- * List issue labels
1471
- * @param owner Repository owner
1472
- * @param repo Repository name
1473
- * @param index Issue index in the repository
1474
- * @param options Опции запроса
1475
- * @returns Label[]
1476
- */
1477
- listLabels(owner: string, repo: string, index: number, options?: {
1478
- signal?: AbortSignal
1479
- }): Promise<Label[]>;
1480
- /**
1481
- * List issue comments and timeline events
1482
- * @param owner Repository owner
1483
- * @param repo Repository name
1484
- * @param index Issue index in the repository
1485
- * @param queryParams Параметры запроса
1486
- * @param options Опции запроса
1487
- * @returns TimelineComment[]
1488
- */
1489
- listTimeline(owner: string, repo: string, index: number, queryParams?: {
1490
- page?: number
1491
- per_page?: number
1492
- since?: string
1493
- before?: string
1494
- }, options?: {
1495
- signal?: AbortSignal
1496
- }): Promise<TimelineComment[]>;
1497
- }
1498
- /**
1499
- * API для работы с организациями
1500
- */
1501
- declare class OrganizationsApi {
1502
- private client;
1503
- /**
1504
- * Создает новый экземпляр API
1505
- * @param client GitVerse клиент
1506
- */
1507
- constructor(client: GitVerseClient);
1508
- /**
1509
- * Gets a list of organization secrets
1510
- * @param org Organization name
1511
- * @param queryParams Параметры запроса
1512
- * @param options Опции запроса
1513
- * @returns SecretList
1514
- */
1515
- listOrgSecrets(org: string, queryParams?: {
1516
- per_page?: string
1517
- page?: string
1518
- }, options?: {
1519
- signal?: AbortSignal
1520
- }): Promise<SecretList>;
1521
- /**
1522
- * Gets the metadata of a secret (without value) in an organization
1523
- * @param org Organization name
1524
- * @param secretname Secret name
1525
- * @param options Опции запроса
1526
- * @returns Secret
1527
- */
1528
- getOrgSecret(org: string, secretname: string, options?: {
1529
- signal?: AbortSignal
1530
- }): Promise<Secret>;
1531
- /**
1532
- * Creates or updates a secret in the organization, without encryption
1533
- * @param org Organization name
1534
- * @param secretname Secret name
1535
- * @param queryParams Параметры запроса
1536
- * @param options Опции запроса
1537
- * @returns Secret
1538
- */
1539
- createOrUpdateOrgSecret(org: string, secretname: string, queryParams?: {
1540
- encrypted_value: string
1541
- }, options?: {
1542
- signal?: AbortSignal
1543
- }): Promise<Secret>;
1544
- /**
1545
- * Removes a secret from an organization
1546
- * @param org Organization name
1547
- * @param secretname Secret name
1548
- * @param options Опции запроса
1549
- * @returns void
1550
- */
1551
- deleteOrgSecret(org: string, secretname: string, options?: {
1552
- signal?: AbortSignal
1553
- }): Promise<void>;
1554
- /**
1555
- * Check organization membership for a user
1556
- * @param org The organization name.
1557
- * @param username Username of the member to check.
1558
- * @param options Опции запроса
1559
- * @returns void
1560
- */
1561
- isMember(org: string, username: string, options?: {
1562
- signal?: AbortSignal
1563
- }): Promise<void>;
1564
- }
1565
- /**
1566
- * API для работы с запросами на слияние
1567
- */
1568
- declare class PullsApi {
1569
- private client;
1570
- /**
1571
- * Создает новый экземпляр API
1572
- * @param client GitVerse клиент
1573
- */
1574
- constructor(client: GitVerseClient);
1575
- /**
1576
- * Create a pull request
1577
- * @param owner Repository owner
1578
- * @param repo Repository name
1579
- * @param params Pull request creation parameters
1580
- * @param options Опции запроса
1581
- * @returns PullRequest
1582
- */
1583
- create(owner: string, repo: string, params: CreatePullRequestParams, options?: {
1584
- signal?: AbortSignal
1585
- }): Promise<PullRequest>;
1586
- /**
1587
- * List pull request commits
1588
- * @param owner Owner of the repository (username or organization)
1589
- * @param repo Name of the repository without .git extension
1590
- * @param pull_number The number that identifies the pull request
1591
- * @param queryParams Параметры запроса
1592
- * @param options Опции запроса
1593
- * @returns Commit[]
1594
- */
1595
- listCommits(owner: string, repo: string, pull_number: number, queryParams?: {
1596
- page?: number
1597
- per_page?: number
1598
- }, options?: {
1599
- signal?: AbortSignal
1600
- }): Promise<Commit[]>;
1601
- /**
1602
- * List pull request files
1603
- * @param owner Owner of the repository (username or organization)
1604
- * @param repo Name of the repository without .git extension
1605
- * @param pull_number The number that identifies the pull request
1606
- * @param queryParams Параметры запроса
1607
- * @param options Опции запроса
1608
- * @returns CommitFiles[]
1609
- */
1610
- listFiles(owner: string, repo: string, pull_number: number, queryParams?: {
1611
- page?: number
1612
- per_page?: number
1613
- }, options?: {
1614
- signal?: AbortSignal
1615
- }): Promise<CommitFiles[]>;
1616
- /**
1617
- * Checks if a pull request has been merged into the base branch.
1618
- * @param owner Owner of the repository (username or organization)
1619
- * @param repo Name of the repository without .git extension
1620
- * @param pull_number The number that identifies the pull request
1621
- * @param options Опции запроса
1622
- * @returns void
1623
- */
1624
- isMerged(owner: string, repo: string, pull_number: number, options?: {
1625
- signal?: AbortSignal
1626
- }): Promise<void>;
1627
- /**
1628
- * Update a pull request branch
1629
- * @param owner Repository owner
1630
- * @param repo Repository name
1631
- * @param pull_number The number that identifies the pull request
1632
- * @param params Expected head SHA
1633
- * @param options Опции запроса
1634
- * @returns UpdateBranchResponse
1635
- */
1636
- updateBranch(owner: string, repo: string, pull_number: number, params: UpdateBranchParams, options?: {
1637
- signal?: AbortSignal
1638
- }): Promise<UpdateBranchResponse>;
1639
- }
1640
- /**
1641
- * API для работы с релизами
1642
- */
1643
- declare class ReleasesApi {
1644
- private client;
1645
- /**
1646
- * Создает новый экземпляр API
1647
- * @param client GitVerse клиент
1648
- */
1649
- constructor(client: GitVerseClient);
1650
- /**
1651
- * Returns a list of releases
1652
- * @param owner Owner of the repository (owner or organization name)
1653
- * @param repo Name of the repository without the .git extension
1654
- * @param queryParams Параметры запроса
1655
- * @param options Опции запроса
1656
- * @returns Release[]
1657
- */
1658
- list(owner: string, repo: string, queryParams?: {
1659
- page?: number
1660
- per_page?: number
1661
- draft?: boolean
1662
- pre_release?: boolean
1663
- }, options?: {
1664
- signal?: AbortSignal
1665
- }): Promise<Release[]>;
1666
- /**
1667
- * Create a release
1668
- * @param owner Owner of the repository (owner or organization name)
1669
- * @param repo Name of the repository without the .git extension
1670
- * @param params Parameters for creating the release
1671
- * @param options Опции запроса
1672
- * @returns Release
1673
- */
1674
- create(owner: string, repo: string, params: CreateReleaseParams, options?: {
1675
- signal?: AbortSignal
1676
- }): Promise<Release>;
1677
- /**
1678
- * Gets a release by its tag name
1679
- * @param owner Owner of the repository (owner or organization name)
1680
- * @param repo Name of the repository without the .git extension
1681
- * @param tag Tag name of the release to retrieve (e.g., 'v1.0.0')
1682
- * @param options Опции запроса
1683
- * @returns Release
1684
- */
1685
- getByTag(owner: string, repo: string, tag: string, options?: {
1686
- signal?: AbortSignal
1687
- }): Promise<Release>;
1688
- /**
1689
- * Deletes a release by its tag name
1690
- * @param owner Owner of the repository (owner or organization name)
1691
- * @param repo Name of the repository without the .git extension
1692
- * @param tag Tag name of the release to delete (e.g., 'v1.0.0')
1693
- * @param options Опции запроса
1694
- * @returns void
1695
- */
1696
- deleteByTag(owner: string, repo: string, tag: string, options?: {
1697
- signal?: AbortSignal
1698
- }): Promise<void>;
1699
- /**
1700
- * Return a release
1701
- * @param owner Owner of the repository (owner or organization name)
1702
- * @param repo Name of the repository without the .git extension
1703
- * @param release_id Identifier of the release
1704
- * @param options Опции запроса
1705
- * @returns Release
1706
- */
1707
- get(owner: string, repo: string, release_id: string, options?: {
1708
- signal?: AbortSignal
1709
- }): Promise<Release>;
1710
- /**
1711
- * Edit a release
1712
- * @param owner Owner of the repository (owner or organization name)
1713
- * @param repo Name of the repository without the .git extension
1714
- * @param release_id Identifier of the release
1715
- * @param params Parameters for editing the release
1716
- * @param options Опции запроса
1717
- * @returns Release
1718
- */
1719
- update(owner: string, repo: string, release_id: string, params: UpdateReleaseParams, options?: {
1720
- signal?: AbortSignal
1721
- }): Promise<Release>;
1722
- /**
1723
- * Delete a release
1724
- * @param owner Owner of the repository (owner or organization name)
1725
- * @param repo Name of the repository without the .git extension
1726
- * @param release_id Identifier of the release
1727
- * @param options Опции запроса
1728
- * @returns void
1729
- */
1730
- delete(owner: string, repo: string, release_id: string, options?: {
1731
- signal?: AbortSignal
1732
- }): Promise<void>;
1733
- /**
1734
- * Returns a list of assets (files) for a release
1735
- * @param owner Owner of the repository (owner or organization name)
1736
- * @param repo Name of the repository without the .git extension
1737
- * @param release_id Identifier of the release
1738
- * @param queryParams Параметры запроса
1739
- * @param options Опции запроса
1740
- * @returns Attachment[]
1741
- */
1742
- listAssets(owner: string, repo: string, release_id: string, queryParams?: {
1743
- page?: number
1744
- per_page?: number
1745
- }, options?: {
1746
- signal?: AbortSignal
1747
- }): Promise<Attachment[]>;
1748
- /**
1749
- * Upload asset to release
1750
- * @param owner Owner of the repository (owner or organization name)
1751
- * @param repo Name of the repository without the .git extension
1752
- * @param release_id Identifier of the release
1753
- * @param queryParams Параметры запроса
1754
- * @param options Опции запроса
1755
- * @returns Attachment
1756
- */
1757
- uploadAsset(owner: string, repo: string, release_id: string, queryParams?: {
1758
- name: string
1759
- }, options?: {
1760
- signal?: AbortSignal
1761
- }): Promise<Attachment>;
1762
- /**
1763
- * Delete asset from release
1764
- * @param owner Owner of the repository (owner or organization name)
1765
- * @param repo Name of the repository without the .git extension
1766
- * @param release_id Identifier of the release
1767
- * @param asset_id Identifier of the asset
1768
- * @param options Опции запроса
1769
- * @returns void
1770
- */
1771
- deleteAsset(owner: string, repo: string, release_id: string, asset_id: string, options?: {
1772
- signal?: AbortSignal
1773
- }): Promise<void>;
1774
- }
1775
- /**
1776
- * API для работы с репозиториями
1777
- */
1778
- declare class RepositoriesApi {
1779
- private client;
1780
- /**
1781
- * Создает новый экземпляр API
1782
- * @param client GitVerse клиент
1783
- */
1784
- constructor(client: GitVerseClient);
1785
- /**
1786
- * Get repository details
1787
- * @param owner Repository owner
1788
- * @param repo Repository name
1789
- * @param options Опции запроса
1790
- * @returns Repository
1791
- */
1792
- get(owner: string, repo: string, options?: {
1793
- signal?: AbortSignal
1794
- }): Promise<Repository>;
1795
- /**
1796
- * Update repository
1797
- * @param owner Repository owner
1798
- * @param repo Repository name
1799
- * @param params New repository settings
1800
- * @param options Опции запроса
1801
- * @returns Repository
1802
- */
1803
- update(owner: string, repo: string, params: UpdateRepositoryParams, options?: {
1804
- signal?: AbortSignal
1805
- }): Promise<Repository>;
1806
- /**
1807
- * Delete repository
1808
- * @param owner Repository owner
1809
- * @param repo Repository name
1810
- * @param options Опции запроса
1811
- * @returns void
1812
- */
1813
- delete(owner: string, repo: string, options?: {
1814
- signal?: AbortSignal
1815
- }): Promise<void>;
1816
- /**
1817
- * Gets a list of repository secrets
1818
- * @param owner Owner name
1819
- * @param repo Repository name
1820
- * @param queryParams Параметры запроса
1821
- * @param options Опции запроса
1822
- * @returns SecretList
1823
- */
1824
- listRepoSecrets(owner: string, repo: string, queryParams?: {
1825
- per_page?: string
1826
- page?: string
1827
- }, options?: {
1828
- signal?: AbortSignal
1829
- }): Promise<SecretList>;
1830
- /**
1831
- * Gets secrets metadata (without values) in repositories.
1832
- * @param owner Owner name
1833
- * @param repo Repository name
1834
- * @param secretname Secret name
1835
- * @param options Опции запроса
1836
- * @returns Secret
1837
- */
1838
- getRepoSecret(owner: string, repo: string, secretname: string, options?: {
1839
- signal?: AbortSignal
1840
- }): Promise<Secret>;
1841
- /**
1842
- * Creates or updates a secret in the repository, without encryption
1843
- * @param owner Owner name
1844
- * @param repo Repository name
1845
- * @param secretname Secret name
1846
- * @param queryParams Параметры запроса
1847
- * @param options Опции запроса
1848
- * @returns Secret
1849
- */
1850
- createOrUpdateRepoSecret(owner: string, repo: string, secretname: string, queryParams?: {
1851
- encrypted_value: string
1852
- }, options?: {
1853
- signal?: AbortSignal
1854
- }): Promise<Secret>;
1855
- /**
1856
- * Removes a secret from the repository
1857
- * @param owner Owner name
1858
- * @param repo Repository name
1859
- * @param secretname Secret name
1860
- * @param options Опции запроса
1861
- * @returns void
1862
- */
1863
- deleteRepoSecret(owner: string, repo: string, secretname: string, options?: {
1864
- signal?: AbortSignal
1865
- }): Promise<void>;
1866
- /**
1867
- * List repository branches
1868
- * @param owner Owner of the repository (username or organization)
1869
- * @param repo Name of the repository without .git extension
1870
- * @param queryParams Параметры запроса
1871
- * @param options Опции запроса
1872
- * @returns Branch[]
1873
- */
1874
- listBranches(owner: string, repo: string, queryParams?: {
1875
- page?: number
1876
- per_page?: number
1877
- q?: string
1878
- }, options?: {
1879
- signal?: AbortSignal
1880
- }): Promise<Branch[]>;
1881
- /**
1882
- * List repository collaborators
1883
- * @param owner Repository owner
1884
- * @param repo Repository name
1885
- * @param queryParams Параметры запроса
1886
- * @param options Опции запроса
1887
- * @returns Collaborator[]
1888
- */
1889
- listCollaborators(owner: string, repo: string, queryParams?: {
1890
- affiliation?: string
1891
- permission?: string
1892
- page?: number
1893
- per_page?: number
1894
- }, options?: {
1895
- signal?: AbortSignal
1896
- }): Promise<Collaborator[]>;
1897
- /**
1898
- * Add or update repository collaborator
1899
- * @param owner Repository owner
1900
- * @param repo Repository name
1901
- * @param collaborator Username of the collaborator to add or update
1902
- * @param params Collaborator permission settings
1903
- * @param options Опции запроса
1904
- * @returns CollaboratorInvitation
1905
- */
1906
- addCollaborator(owner: string, repo: string, collaborator: string, params: AddCollaboratorParams, options?: {
1907
- signal?: AbortSignal
1908
- }): Promise<CollaboratorInvitation>;
1909
- /**
1910
- * Retrieve a list of repository commits
1911
- * @param owner Owner of the repository (owner or organization name)
1912
- * @param repo Name of the repository without the .git extension
1913
- * @param queryParams Параметры запроса
1914
- * @param options Опции запроса
1915
- * @returns Commit[]
1916
- */
1917
- listCommits(owner: string, repo: string, queryParams?: {
1918
- page?: number
1919
- per_page?: number
1920
- sha?: string
1921
- path?: string
1922
- not?: string
1923
- author?: string
1924
- committer?: string
1925
- since?: string
1926
- until?: string
1927
- }, options?: {
1928
- signal?: AbortSignal
1929
- }): Promise<Commit[]>;
1930
- /**
1931
- * Retrieve commit information
1932
- * @param owner Owner of the repository (owner or organization name)
1933
- * @param repo Name of the repository without the .git extension
1934
- * @param sha Commit hash
1935
- * @param options Опции запроса
1936
- * @returns Commit
1937
- */
1938
- getCommit(owner: string, repo: string, sha: string, options?: {
1939
- signal?: AbortSignal
1940
- }): Promise<Commit>;
1941
- /**
1942
- * Compare two branches/tags/commits
1943
- * @param owner Owner of the repository (username or organization name)
1944
- * @param repo Name of the repository without the .git extension
1945
- * @param basehead References to compare in BASE...HEAD format (e.g., main...feature)
1946
- * @param queryParams Параметры запроса
1947
- * @param options Опции запроса
1948
- * @returns CompareResponse
1949
- */
1950
- compareCommits(owner: string, repo: string, basehead: string, queryParams?: {
1951
- page?: number
1952
- per_page?: number
1953
- }, options?: {
1954
- signal?: AbortSignal
1955
- }): Promise<CompareResponse>;
1956
- /**
1957
- * Get file or directory contents
1958
- * @param owner Repository owner
1959
- * @param repo Repository name
1960
- * @param filepath Path to file or directory in the repository
1961
- * @param queryParams Параметры запроса
1962
- * @param options Опции запроса
1963
- * @returns Record<string, unknown>
1964
- */
1965
- getContent(owner: string, repo: string, filepath: string, queryParams?: {
1966
- ref?: string
1967
- scope?: string
1968
- }, options?: {
1969
- signal?: AbortSignal
1970
- }): Promise<Record<string, unknown>>;
1971
- /**
1972
- * Create or update file in repository
1973
- * @param owner Repository owner
1974
- * @param repo Repository name
1975
- * @param filepath Path to the file in the repository
1976
- * @param params File creation or update options, including base64 content, branch, message, etc.
1977
- * @param options Опции запроса
1978
- * @returns FileCreationResponse
1979
- */
1980
- createOrUpdateFile(owner: string, repo: string, filepath: string, params: CreateFileParams, options?: {
1981
- signal?: AbortSignal
1982
- }): Promise<FileCreationResponse>;
1983
- /**
1984
- * Delete file in repository
1985
- * @param owner Repository owner
1986
- * @param repo Repository name
1987
- * @param filepath Path to the file in the repository
1988
- * @param params File deletion options, including SHA, branch, commit message, etc.
1989
- * @param options Опции запроса
1990
- * @returns FileDeleteResponse
1991
- */
1992
- deleteFile(owner: string, repo: string, filepath: string, params: DeleteFileParams, options?: {
1993
- signal?: AbortSignal
1994
- }): Promise<FileDeleteResponse>;
1995
- /**
1996
- * Fork a repository
1997
- * @param owner Owner of the base repository
1998
- * @param repo Name of the base repository
1999
- * @param params Fork options, including target name and organization
2000
- * @param options Опции запроса
2001
- * @returns Repository
2002
- */
2003
- createFork(owner: string, repo: string, params: CreateForkParams, options?: {
2004
- signal?: AbortSignal
2005
- }): Promise<Repository>;
2006
- /**
2007
- * Create a Git commit
2008
- * @param owner Owner of the repository (owner or organization name)
2009
- * @param repo Name of the repository without the .git extension
2010
- * @param params Parameters for creating the commit
2011
- * @param options Опции запроса
2012
- * @returns Commit
2013
- */
2014
- createCommit(owner: string, repo: string, params: CreateCommitParams, options?: {
2015
- signal?: AbortSignal
2016
- }): Promise<Commit>;
2017
- /**
2018
- * Create a Git reference
2019
- * @param owner Owner of the repository (owner or organization name)
2020
- * @param repo Name of the repository without the .git extension
2021
- * @param params Parameters for creating the reference
2022
- * @param options Опции запроса
2023
- * @returns Reference
2024
- */
2025
- createRef(owner: string, repo: string, params: CreateReferenceParams, options?: {
2026
- signal?: AbortSignal
2027
- }): Promise<Reference>;
2028
- /**
2029
- * Creates new Git tree
2030
- * @param owner owner
2031
- * @param repo repo
2032
- * @param params Параметры создания дерева
2033
- * @param options Опции запроса
2034
- * @returns RepoTree
2035
- */
2036
- createTree(owner: string, repo: string, params: CreateTreeParams, options?: {
2037
- signal?: AbortSignal
2038
- }): Promise<RepoTree>;
2039
- /**
2040
- * Get repository tree by SHA
2041
- * @param owner Repository owner
2042
- * @param repo Repository name
2043
- * @param sha Commit SHA to list tree for
2044
- * @param queryParams Параметры запроса
2045
- * @param options Опции запроса
2046
- * @returns GitTreeResponse
2047
- */
2048
- getTree(owner: string, repo: string, sha: string, queryParams?: {
2049
- page?: number
2050
- per_page?: number
2051
- recursive?: boolean
2052
- }, options?: {
2053
- signal?: AbortSignal
2054
- }): Promise<GitTreeResponse>;
2055
- /**
2056
- * Get repository languages
2057
- * @param owner Repository owner
2058
- * @param repo Repository name
2059
- * @param options Опции запроса
2060
- * @returns Record<string, unknown>
2061
- */
2062
- listLanguages(owner: string, repo: string, options?: {
2063
- signal?: AbortSignal
2064
- }): Promise<Record<string, unknown>>;
2065
- /**
2066
- * List pull requests
2067
- * @param owner Repository owner
2068
- * @param repo Repository name
2069
- * @param queryParams Параметры запроса
2070
- * @param options Опции запроса
2071
- * @returns PullRequest[]
2072
- */
2073
- listPulls(owner: string, repo: string, queryParams?: {
2074
- state?: string
2075
- head?: string
2076
- base?: string
2077
- sort?: string
2078
- direction?: string
2079
- page?: number
2080
- per_page?: number
2081
- }, options?: {
2082
- signal?: AbortSignal
2083
- }): Promise<PullRequest[]>;
2084
- /**
2085
- * Pull request details.
2086
- * @param owner Repository owner
2087
- * @param repo Repository name
2088
- * @param pull_number The number that identifies the pull request..
2089
- * @param options Опции запроса
2090
- * @returns PullRequest
2091
- */
2092
- getPull(owner: string, repo: string, pull_number: number, options?: {
2093
- signal?: AbortSignal
2094
- }): Promise<PullRequest>;
2095
- /**
2096
- * Update a pull request.
2097
- * @param owner Repository owner
2098
- * @param repo Repository name
2099
- * @param pull_number The number that identifies the pull request.
2100
- * @param params Pull request update parameters
2101
- * @param options Опции запроса
2102
- * @returns PullRequest
2103
- */
2104
- updatePull(owner: string, repo: string, pull_number: number, params: UpdatePullRequestParams, options?: {
2105
- signal?: AbortSignal
2106
- }): Promise<PullRequest>;
2107
- /**
2108
- * Get authenticated user repositories
2109
- * @param queryParams Параметры запроса
2110
- * @param options Опции запроса
2111
- * @returns Repository[]
2112
- */
2113
- listForAuthenticatedUser(queryParams?: {
2114
- page?: number
2115
- per_page?: number
2116
- }, options?: {
2117
- signal?: AbortSignal
2118
- }): Promise<Repository[]>;
2119
- /**
2120
- * Create repository
2121
- * @param params Repository creation options
2122
- * @param options Опции запроса
2123
- * @returns Repository
2124
- */
2125
- createForAuthenticatedUser(params: CreateRepositoryParams, options?: {
2126
- signal?: AbortSignal
2127
- }): Promise<Repository>;
2128
- }
2129
- /**
2130
- * API для работы со звёздами (избранное)
2131
- */
2132
- declare class StarsApi {
2133
- private client;
2134
- /**
2135
- * Создает новый экземпляр API
2136
- * @param client GitVerse клиент
2137
- */
2138
- constructor(client: GitVerseClient);
2139
- /**
2140
- * Get list of favorites repositories of authenticated user
2141
- * @param queryParams Параметры запроса
2142
- * @param options Опции запроса
2143
- * @returns Repository[]
2144
- */
2145
- list(queryParams?: {
2146
- page?: number
2147
- per_page?: number
2148
- sort?: string
2149
- direction?: string
2150
- }, options?: {
2151
- signal?: AbortSignal
2152
- }): Promise<Repository[]>;
2153
- /**
2154
- * Check if repository is in favorites
2155
- * @param owner Repository owner
2156
- * @param repo Repository name
2157
- * @param options Опции запроса
2158
- * @returns void
2159
- */
2160
- isStarred(owner: string, repo: string, options?: {
2161
- signal?: AbortSignal
2162
- }): Promise<void>;
2163
- /**
2164
- * Add repository to favorites
2165
- * @param owner Repository owner
2166
- * @param repo Repository name
2167
- * @param options Опции запроса
2168
- * @returns void
2169
- */
2170
- star(owner: string, repo: string, options?: {
2171
- signal?: AbortSignal
2172
- }): Promise<void>;
2173
- /**
2174
- * Remove repository from favorites
2175
- * @param owner Repository owner
2176
- * @param repo Repository name
2177
- * @param options Опции запроса
2178
- * @returns void
2179
- */
2180
- unstar(owner: string, repo: string, options?: {
2181
- signal?: AbortSignal
2182
- }): Promise<void>;
2183
- }
2184
- /**
2185
- * API для работы с командами
2186
- */
2187
- declare class TeamsApi {
2188
- private client;
2189
- /**
2190
- * Создает новый экземпляр API
2191
- * @param client GitVerse клиент
2192
- */
2193
- constructor(client: GitVerseClient);
2194
- /**
2195
- * Lists teams
2196
- * @param org The organization name.
2197
- * @param queryParams Параметры запроса
2198
- * @param options Опции запроса
2199
- * @returns Team[]
2200
- */
2201
- list(org: string, queryParams?: {
2202
- page?: number
2203
- per_page?: number
2204
- }, options?: {
2205
- signal?: AbortSignal
2206
- }): Promise<Team[]>;
2207
- /**
2208
- * Lists team members
2209
- * @param org The organization name.
2210
- * @param team The slug of the team name.
2211
- * @param queryParams Параметры запроса
2212
- * @param options Опции запроса
2213
- * @returns User[]
2214
- */
2215
- listMembers(org: string, team: string, queryParams?: {
2216
- page?: number
2217
- per_page?: number
2218
- }, options?: {
2219
- signal?: AbortSignal
2220
- }): Promise<User2[]>;
2221
- /**
2222
- * Add or update team repository permissions
2223
- * @param org The organization name.
2224
- * @param team The slug of the team name.
2225
- * @param owner Repository owner
2226
- * @param repo Repository name
2227
- * @param params New repository permissions
2228
- * @param options Опции запроса
2229
- * @returns void
2230
- */
2231
- updateRepo(org: string, team: string, owner: string, repo: string, params: TeamRepoPermissions, options?: {
2232
- signal?: AbortSignal
2233
- }): Promise<void>;
2234
- }
2235
- /**
2236
- * API для работы с пользователями
2237
- */
2238
- declare class UsersApi {
2239
- private client;
2240
- /**
2241
- * Создает новый экземпляр API
2242
- * @param client GitVerse клиент
2243
- */
2244
- constructor(client: GitVerseClient);
2245
- /**
2246
- * Search users by query
2247
- * @param queryParams Параметры запроса
2248
- * @param options Опции запроса
2249
- * @returns UserPrefsArray
2250
- */
2251
- list(queryParams?: {
2252
- q: string
2253
- sort?: string
2254
- order?: string
2255
- page?: number
2256
- per_page?: number
2257
- }, options?: {
2258
- signal?: AbortSignal
2259
- }): Promise<UserPrefsArray>;
2260
- /**
2261
- * Get authenticated user information
2262
- * @param options Опции запроса
2263
- * @returns User
2264
- */
2265
- getAuthenticated(options?: {
2266
- signal?: AbortSignal
2267
- }): Promise<User2>;
2268
- /**
2269
- * Get user information by ID
2270
- * @param account_id Account_id parameter
2271
- * @param options Опции запроса
2272
- * @returns User
2273
- */
2274
- get(account_id: number, options?: {
2275
- signal?: AbortSignal
2276
- }): Promise<User2>;
2277
- /**
2278
- * Get user information by username
2279
- * @param username User name
2280
- * @param options Опции запроса
2281
- * @returns User
2282
- */
2283
- getByUsername(username: string, options?: {
2284
- signal?: AbortSignal
2285
- }): Promise<User2>;
2286
- }
2287
- /**
2288
- * Перечисления для GitVerse API
2289
- * @generated Сгенерировано автоматически из OpenAPI спецификации
2290
- */
2291
- declare const ContentType: {
2292
- readonly Dir: "dir"
2293
- readonly File: "file"
2294
- };
2295
- type ContentType = (typeof ContentType)[keyof typeof ContentType];
2296
- declare const IssueState: {
2297
- readonly Closed: "closed"
2298
- readonly Open: "open"
2299
- };
2300
- type IssueState = (typeof IssueState)[keyof typeof IssueState];
2301
- declare const PullRequestSortCriteria: {
2302
- readonly Created: "created"
2303
- readonly LongRunning: "long-running"
2304
- readonly Popularity: "popularity"
2305
- readonly Updated: "updated"
2306
- };
2307
- type PullRequestSortCriteria = (typeof PullRequestSortCriteria)[keyof typeof PullRequestSortCriteria];
2308
- declare const PullRequestSortDirection: {
2309
- readonly Asc: "asc"
2310
- readonly Desc: "desc"
2311
- };
2312
- type PullRequestSortDirection = (typeof PullRequestSortDirection)[keyof typeof PullRequestSortDirection];
2313
- declare const PullRequestState: {
2314
- readonly Closed: "closed"
2315
- readonly Open: "open"
2316
- };
2317
- type PullRequestState = (typeof PullRequestState)[keyof typeof PullRequestState];
2318
- declare const PullRequestStateFilter: {
2319
- readonly All: "all"
2320
- readonly Closed: "closed"
2321
- readonly Open: "open"
2322
- };
2323
- type PullRequestStateFilter = (typeof PullRequestStateFilter)[keyof typeof PullRequestStateFilter];
2324
- declare const UserType: {
2325
- readonly Organization: "Organization"
2326
- readonly User: "User"
2327
- };
2328
- type UserType = (typeof UserType)[keyof typeof UserType];
2329
- declare const VisibilityType: {
2330
- readonly Limited: "limited"
2331
- readonly Private: "private"
2332
- readonly Public: "public"
2333
- };
2334
- type VisibilityType = (typeof VisibilityType)[keyof typeof VisibilityType];
2335
- /**
2336
- * Главный класс для работы с GitVerse API
2337
- *
2338
- * @example
2339
- * ```typescript
2340
- * const gitverse = new GitVerse({ token: "your-token" });
2341
- * const user = await gitverse.users.getCurrent();');
2342
- * ```
2343
- *
2344
- * @remarks
2345
- * Для оптимизации размера бандла можно импортировать модули напрямую:
2346
- * ```typescript
2347
- * import { UsersApi, GitVerseClient } from "gitverse-api-sdk/api/users";
2348
- * ```
2349
- */
2350
- declare class GitVerse {
2351
- readonly client: GitVerseClient;
2352
- readonly actions: ActionsApi;
2353
- readonly orgs: OrganizationsApi;
2354
- readonly teams: TeamsApi;
2355
- readonly repos: RepositoriesApi;
2356
- readonly issues: IssuesApi;
2357
- readonly pulls: PullsApi;
2358
- readonly releases: ReleasesApi;
2359
- readonly users: UsersApi;
2360
- readonly emails: EmailsApi;
2361
- readonly stars: StarsApi;
2362
- /**
2363
- * Создает новый экземпляр GitVerse API клиента
2364
- * @param config Конфигурация клиента
2365
- */
2366
- constructor(config?: GitVerseClientConfig);
2367
- /**
2368
- * Устанавливает токен авторизации
2369
- * @param token Токен доступа
2370
- * @returns this для цепочки вызовов
2371
- */
2372
- setToken(token: string): GitVerse;
1
+ import { ActionsApi } from "./api/actions";
2
+ import { EmailsApi } from "./api/emails";
3
+ import { IssuesApi } from "./api/issues";
4
+ import { OrganizationsApi } from "./api/organizations";
5
+ import { PagesApi } from "./api/pages";
6
+ import { PullsApi } from "./api/pulls";
7
+ import { ReleasesApi } from "./api/releases";
8
+ import { RepositoriesApi } from "./api/repositories";
9
+ import { StarsApi } from "./api/stars";
10
+ import { TeamsApi } from "./api/teams";
11
+ import { UsersApi } from "./api/users";
12
+ import { GitVerseClient, type GitVerseClientConfig } from "./client";
13
+ export * from "./enums";
14
+ export * from "./errors";
15
+ export type * from "./types";
16
+ /**
17
+ * Главный класс для работы с GitVerse API
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * const gitverse = new GitVerse({ token: "your-token" });
22
+ * const user = await gitverse.users.getCurrent();');
23
+ * ```
24
+ *
25
+ * @remarks
26
+ * Для оптимизации размера бандла можно импортировать модули напрямую:
27
+ * ```typescript
28
+ * import { UsersApi, GitVerseClient } from "gitverse-api-sdk/api/users";
29
+ * ```
30
+ */
31
+ export declare class GitVerse {
32
+ readonly client: GitVerseClient;
33
+ readonly actions: ActionsApi;
34
+ readonly orgs: OrganizationsApi;
35
+ readonly teams: TeamsApi;
36
+ readonly repos: RepositoriesApi;
37
+ readonly issues: IssuesApi;
38
+ readonly pages: PagesApi;
39
+ readonly pulls: PullsApi;
40
+ readonly releases: ReleasesApi;
41
+ readonly users: UsersApi;
42
+ readonly emails: EmailsApi;
43
+ readonly stars: StarsApi;
44
+ /**
45
+ * Создает новый экземпляр GitVerse API клиента
46
+ * @param config Конфигурация клиента
47
+ */
48
+ constructor(config?: GitVerseClientConfig);
49
+ /**
50
+ * Устанавливает токен авторизации
51
+ * @param token Токен доступа
52
+ * @returns this для цепочки вызовов
53
+ */
54
+ setToken(token: string): GitVerse;
2373
55
  }
2374
- export { WorkflowDispatchInputList, WorkflowDispatchInput, VisibilityType, VariableList, Variable, UserType, UserPublicInfo, UserPrefsArray, User2 as User, UpdateRepositoryParams, UpdateReleaseParams, UpdatePullRequestParams, UpdateBranchResponse, UpdateBranchParams, TreeMeta, TreeItem, TreeEntry, TrackedTime, TimelineComment, TeamRepoPermissions, Team, SecretList, Secret, RequestOptions, RepositoryMeta, Repository, RepoTree, RepoPublicInfo, RepoCommit, Release, RegistrationToken, Reference, RateLimitInfo, RateLimitError, PullRequestStateFilter, PullRequestState, PullRequestSortDirection, PullRequestSortCriteria, PullRequestMeta, PullRequest, Permissions, PaginationParams, PRBranchInfo, Milestone, Label, IssueState, Issue, GitVerseApiError, GitVerse, GitTreeResponse, GitObject, GitEntry, FileLinksResponse, FileDeleteResponse, FileCreationResponse, FileCommitResponse, Email, DeleteFileParams, DeleteEmailParams, CreateVariableParams, CreateTreeParams, CreateRepositoryParams, CreateReleaseParams, CreateReferenceParams, CreatePullRequestParams, CreateForkParams, CreateFileParams, CreateEmailParams, CreateCommitParams, ContentsResponse, ContentType, CompareResponse, CommitVerification, CommitUserParams, CommitUser, CommitStats, CommitMeta, CommitFiles, Commit, Comment, CollaboratorInvitation, Collaborator, Branch, Attachment, ApiVersionWarning, ApiVersionInfo, ApiResponseMetadata, ApiError, AddCollaboratorParams, ActionWorkflowRun, ActionRunners, ActionRunnerLabel, ActionRunner, ActionArtifactList, ActionArtifact };