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