-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTypes.swift
More file actions
15006 lines (15002 loc) · 764 KB
/
Types.swift
File metadata and controls
15006 lines (15002 loc) · 764 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Generated by swift-openapi-generator, do not modify.
@_spi(Generated) import OpenAPIRuntime
#if os(Linux)
@preconcurrency import struct Foundation.URL
@preconcurrency import struct Foundation.Data
@preconcurrency import struct Foundation.Date
#else
import struct Foundation.URL
import struct Foundation.Data
import struct Foundation.Date
#endif
/// A type that performs HTTP operations defined by the OpenAPI document.
public protocol APIProtocol: Sendable {
/// List public events
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /events`.
/// - Remark: Generated from `#/paths//events/get(activity/list-public-events)`.
func activityListPublicEvents(_ input: Operations.ActivityListPublicEvents.Input) async throws -> Operations.ActivityListPublicEvents.Output
/// Get feeds
///
/// Lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs.
///
/// * **Timeline**: The GitHub global public timeline
/// * **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."
/// * **Current user public**: The public timeline for the authenticated user
/// * **Current user**: The private timeline for the authenticated user
/// * **Current user actor**: The private timeline for activity created by the authenticated user
/// * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.
/// * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.
///
/// By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."
///
/// > [!NOTE]
/// > Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens.
///
/// - Remark: HTTP `GET /feeds`.
/// - Remark: Generated from `#/paths//feeds/get(activity/get-feeds)`.
func activityGetFeeds(_ input: Operations.ActivityGetFeeds.Input) async throws -> Operations.ActivityGetFeeds.Output
/// List public events for a network of repositories
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /networks/{owner}/{repo}/events`.
/// - Remark: Generated from `#/paths//networks/{owner}/{repo}/events/get(activity/list-public-events-for-repo-network)`.
func activityListPublicEventsForRepoNetwork(_ input: Operations.ActivityListPublicEventsForRepoNetwork.Input) async throws -> Operations.ActivityListPublicEventsForRepoNetwork.Output
/// List notifications for the authenticated user
///
/// List all notifications for the current user, sorted by most recently updated.
///
/// - Remark: HTTP `GET /notifications`.
/// - Remark: Generated from `#/paths//notifications/get(activity/list-notifications-for-authenticated-user)`.
func activityListNotificationsForAuthenticatedUser(_ input: Operations.ActivityListNotificationsForAuthenticatedUser.Input) async throws -> Operations.ActivityListNotificationsForAuthenticatedUser.Output
/// Mark notifications as read
///
/// Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`.
///
/// - Remark: HTTP `PUT /notifications`.
/// - Remark: Generated from `#/paths//notifications/put(activity/mark-notifications-as-read)`.
func activityMarkNotificationsAsRead(_ input: Operations.ActivityMarkNotificationsAsRead.Input) async throws -> Operations.ActivityMarkNotificationsAsRead.Output
/// Get a thread
///
/// Gets information about a notification thread.
///
/// - Remark: HTTP `GET /notifications/threads/{thread_id}`.
/// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/get(activity/get-thread)`.
func activityGetThread(_ input: Operations.ActivityGetThread.Input) async throws -> Operations.ActivityGetThread.Output
/// Mark a thread as read
///
/// Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications.
///
/// - Remark: HTTP `PATCH /notifications/threads/{thread_id}`.
/// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/patch(activity/mark-thread-as-read)`.
func activityMarkThreadAsRead(_ input: Operations.ActivityMarkThreadAsRead.Input) async throws -> Operations.ActivityMarkThreadAsRead.Output
/// Mark a thread as done
///
/// Marks a thread as "done." Marking a thread as "done" is equivalent to marking a notification in your notification inbox on GitHub as done: https://github.com/notifications.
///
/// - Remark: HTTP `DELETE /notifications/threads/{thread_id}`.
/// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/delete(activity/mark-thread-as-done)`.
func activityMarkThreadAsDone(_ input: Operations.ActivityMarkThreadAsDone.Input) async throws -> Operations.ActivityMarkThreadAsDone.Output
/// Get a thread subscription for the authenticated user
///
/// This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/activity/watching#get-a-repository-subscription).
///
/// Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread.
///
/// - Remark: HTTP `GET /notifications/threads/{thread_id}/subscription`.
/// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/subscription/get(activity/get-thread-subscription-for-authenticated-user)`.
func activityGetThreadSubscriptionForAuthenticatedUser(_ input: Operations.ActivityGetThreadSubscriptionForAuthenticatedUser.Input) async throws -> Operations.ActivityGetThreadSubscriptionForAuthenticatedUser.Output
/// Set a thread subscription
///
/// If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**.
///
/// You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.
///
/// Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/activity/notifications#delete-a-thread-subscription) endpoint.
///
/// - Remark: HTTP `PUT /notifications/threads/{thread_id}/subscription`.
/// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/subscription/put(activity/set-thread-subscription)`.
func activitySetThreadSubscription(_ input: Operations.ActivitySetThreadSubscription.Input) async throws -> Operations.ActivitySetThreadSubscription.Output
/// Delete a thread subscription
///
/// Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/activity/notifications#set-a-thread-subscription) endpoint and set `ignore` to `true`.
///
/// - Remark: HTTP `DELETE /notifications/threads/{thread_id}/subscription`.
/// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/subscription/delete(activity/delete-thread-subscription)`.
func activityDeleteThreadSubscription(_ input: Operations.ActivityDeleteThreadSubscription.Input) async throws -> Operations.ActivityDeleteThreadSubscription.Output
/// List public organization events
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /orgs/{org}/events`.
/// - Remark: Generated from `#/paths//orgs/{org}/events/get(activity/list-public-org-events)`.
func activityListPublicOrgEvents(_ input: Operations.ActivityListPublicOrgEvents.Input) async throws -> Operations.ActivityListPublicOrgEvents.Output
/// List repository events
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /repos/{owner}/{repo}/events`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/events/get(activity/list-repo-events)`.
func activityListRepoEvents(_ input: Operations.ActivityListRepoEvents.Input) async throws -> Operations.ActivityListRepoEvents.Output
/// List repository notifications for the authenticated user
///
/// Lists all notifications for the current user in the specified repository.
///
/// - Remark: HTTP `GET /repos/{owner}/{repo}/notifications`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/notifications/get(activity/list-repo-notifications-for-authenticated-user)`.
func activityListRepoNotificationsForAuthenticatedUser(_ input: Operations.ActivityListRepoNotificationsForAuthenticatedUser.Input) async throws -> Operations.ActivityListRepoNotificationsForAuthenticatedUser.Output
/// Mark repository notifications as read
///
/// Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/activity/notifications#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`.
///
/// - Remark: HTTP `PUT /repos/{owner}/{repo}/notifications`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/notifications/put(activity/mark-repo-notifications-as-read)`.
func activityMarkRepoNotificationsAsRead(_ input: Operations.ActivityMarkRepoNotificationsAsRead.Input) async throws -> Operations.ActivityMarkRepoNotificationsAsRead.Output
/// List stargazers
///
/// Lists the people that have starred the repository.
///
/// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."
///
/// - **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created.
///
/// - Remark: HTTP `GET /repos/{owner}/{repo}/stargazers`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stargazers/get(activity/list-stargazers-for-repo)`.
func activityListStargazersForRepo(_ input: Operations.ActivityListStargazersForRepo.Input) async throws -> Operations.ActivityListStargazersForRepo.Output
/// List watchers
///
/// Lists the people watching the specified repository.
///
/// - Remark: HTTP `GET /repos/{owner}/{repo}/subscribers`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/subscribers/get(activity/list-watchers-for-repo)`.
func activityListWatchersForRepo(_ input: Operations.ActivityListWatchersForRepo.Input) async throws -> Operations.ActivityListWatchersForRepo.Output
/// Get a repository subscription
///
/// Gets information about whether the authenticated user is subscribed to the repository.
///
/// - Remark: HTTP `GET /repos/{owner}/{repo}/subscription`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/subscription/get(activity/get-repo-subscription)`.
func activityGetRepoSubscription(_ input: Operations.ActivityGetRepoSubscription.Input) async throws -> Operations.ActivityGetRepoSubscription.Output
/// Set a repository subscription
///
/// If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/activity/watching#delete-a-repository-subscription) completely.
///
/// - Remark: HTTP `PUT /repos/{owner}/{repo}/subscription`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/subscription/put(activity/set-repo-subscription)`.
func activitySetRepoSubscription(_ input: Operations.ActivitySetRepoSubscription.Input) async throws -> Operations.ActivitySetRepoSubscription.Output
/// Delete a repository subscription
///
/// This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/activity/watching#set-a-repository-subscription).
///
/// - Remark: HTTP `DELETE /repos/{owner}/{repo}/subscription`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/subscription/delete(activity/delete-repo-subscription)`.
func activityDeleteRepoSubscription(_ input: Operations.ActivityDeleteRepoSubscription.Input) async throws -> Operations.ActivityDeleteRepoSubscription.Output
/// List repositories starred by the authenticated user
///
/// Lists repositories the authenticated user has starred.
///
/// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."
///
/// - **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created.
///
/// - Remark: HTTP `GET /user/starred`.
/// - Remark: Generated from `#/paths//user/starred/get(activity/list-repos-starred-by-authenticated-user)`.
func activityListReposStarredByAuthenticatedUser(_ input: Operations.ActivityListReposStarredByAuthenticatedUser.Input) async throws -> Operations.ActivityListReposStarredByAuthenticatedUser.Output
/// Check if a repository is starred by the authenticated user
///
/// Whether the authenticated user has starred the repository.
///
/// - Remark: HTTP `GET /user/starred/{owner}/{repo}`.
/// - Remark: Generated from `#/paths//user/starred/{owner}/{repo}/get(activity/check-repo-is-starred-by-authenticated-user)`.
func activityCheckRepoIsStarredByAuthenticatedUser(_ input: Operations.ActivityCheckRepoIsStarredByAuthenticatedUser.Input) async throws -> Operations.ActivityCheckRepoIsStarredByAuthenticatedUser.Output
/// Star a repository for the authenticated user
///
/// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."
///
/// - Remark: HTTP `PUT /user/starred/{owner}/{repo}`.
/// - Remark: Generated from `#/paths//user/starred/{owner}/{repo}/put(activity/star-repo-for-authenticated-user)`.
func activityStarRepoForAuthenticatedUser(_ input: Operations.ActivityStarRepoForAuthenticatedUser.Input) async throws -> Operations.ActivityStarRepoForAuthenticatedUser.Output
/// Unstar a repository for the authenticated user
///
/// Unstar a repository that the authenticated user has previously starred.
///
/// - Remark: HTTP `DELETE /user/starred/{owner}/{repo}`.
/// - Remark: Generated from `#/paths//user/starred/{owner}/{repo}/delete(activity/unstar-repo-for-authenticated-user)`.
func activityUnstarRepoForAuthenticatedUser(_ input: Operations.ActivityUnstarRepoForAuthenticatedUser.Input) async throws -> Operations.ActivityUnstarRepoForAuthenticatedUser.Output
/// List repositories watched by the authenticated user
///
/// Lists repositories the authenticated user is watching.
///
/// - Remark: HTTP `GET /user/subscriptions`.
/// - Remark: Generated from `#/paths//user/subscriptions/get(activity/list-watched-repos-for-authenticated-user)`.
func activityListWatchedReposForAuthenticatedUser(_ input: Operations.ActivityListWatchedReposForAuthenticatedUser.Input) async throws -> Operations.ActivityListWatchedReposForAuthenticatedUser.Output
/// List events for the authenticated user
///
/// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. _Optional_: use the fine-grained token with following permission set to view private events: "Events" user permissions (read).
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /users/{username}/events`.
/// - Remark: Generated from `#/paths//users/{username}/events/get(activity/list-events-for-authenticated-user)`.
func activityListEventsForAuthenticatedUser(_ input: Operations.ActivityListEventsForAuthenticatedUser.Input) async throws -> Operations.ActivityListEventsForAuthenticatedUser.Output
/// List organization events for the authenticated user
///
/// This is the user's organization dashboard. You must be authenticated as the user to view this.
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /users/{username}/events/orgs/{org}`.
/// - Remark: Generated from `#/paths//users/{username}/events/orgs/{org}/get(activity/list-org-events-for-authenticated-user)`.
func activityListOrgEventsForAuthenticatedUser(_ input: Operations.ActivityListOrgEventsForAuthenticatedUser.Input) async throws -> Operations.ActivityListOrgEventsForAuthenticatedUser.Output
/// List public events for a user
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /users/{username}/events/public`.
/// - Remark: Generated from `#/paths//users/{username}/events/public/get(activity/list-public-events-for-user)`.
func activityListPublicEventsForUser(_ input: Operations.ActivityListPublicEventsForUser.Input) async throws -> Operations.ActivityListPublicEventsForUser.Output
/// List events received by the authenticated user
///
/// These are events that you've received by watching repositories and following users. If you are authenticated as the
/// given user, you will see private events. Otherwise, you'll only see public events.
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /users/{username}/received_events`.
/// - Remark: Generated from `#/paths//users/{username}/received_events/get(activity/list-received-events-for-user)`.
func activityListReceivedEventsForUser(_ input: Operations.ActivityListReceivedEventsForUser.Input) async throws -> Operations.ActivityListReceivedEventsForUser.Output
/// List public events received by a user
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /users/{username}/received_events/public`.
/// - Remark: Generated from `#/paths//users/{username}/received_events/public/get(activity/list-received-public-events-for-user)`.
func activityListReceivedPublicEventsForUser(_ input: Operations.ActivityListReceivedPublicEventsForUser.Input) async throws -> Operations.ActivityListReceivedPublicEventsForUser.Output
/// List repositories starred by a user
///
/// Lists repositories a user has starred.
///
/// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."
///
/// - **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created.
///
/// - Remark: HTTP `GET /users/{username}/starred`.
/// - Remark: Generated from `#/paths//users/{username}/starred/get(activity/list-repos-starred-by-user)`.
func activityListReposStarredByUser(_ input: Operations.ActivityListReposStarredByUser.Input) async throws -> Operations.ActivityListReposStarredByUser.Output
/// List repositories watched by a user
///
/// Lists repositories a user is watching.
///
/// - Remark: HTTP `GET /users/{username}/subscriptions`.
/// - Remark: Generated from `#/paths//users/{username}/subscriptions/get(activity/list-repos-watched-by-user)`.
func activityListReposWatchedByUser(_ input: Operations.ActivityListReposWatchedByUser.Input) async throws -> Operations.ActivityListReposWatchedByUser.Output
}
/// Convenience overloads for operation inputs.
extension APIProtocol {
/// List public events
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /events`.
/// - Remark: Generated from `#/paths//events/get(activity/list-public-events)`.
public func activityListPublicEvents(
query: Operations.ActivityListPublicEvents.Input.Query = .init(),
headers: Operations.ActivityListPublicEvents.Input.Headers = .init()
) async throws -> Operations.ActivityListPublicEvents.Output {
try await activityListPublicEvents(Operations.ActivityListPublicEvents.Input(
query: query,
headers: headers
))
}
/// Get feeds
///
/// Lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs.
///
/// * **Timeline**: The GitHub global public timeline
/// * **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."
/// * **Current user public**: The public timeline for the authenticated user
/// * **Current user**: The private timeline for the authenticated user
/// * **Current user actor**: The private timeline for activity created by the authenticated user
/// * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.
/// * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.
///
/// By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."
///
/// > [!NOTE]
/// > Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens.
///
/// - Remark: HTTP `GET /feeds`.
/// - Remark: Generated from `#/paths//feeds/get(activity/get-feeds)`.
public func activityGetFeeds(headers: Operations.ActivityGetFeeds.Input.Headers = .init()) async throws -> Operations.ActivityGetFeeds.Output {
try await activityGetFeeds(Operations.ActivityGetFeeds.Input(headers: headers))
}
/// List public events for a network of repositories
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /networks/{owner}/{repo}/events`.
/// - Remark: Generated from `#/paths//networks/{owner}/{repo}/events/get(activity/list-public-events-for-repo-network)`.
public func activityListPublicEventsForRepoNetwork(
path: Operations.ActivityListPublicEventsForRepoNetwork.Input.Path,
query: Operations.ActivityListPublicEventsForRepoNetwork.Input.Query = .init(),
headers: Operations.ActivityListPublicEventsForRepoNetwork.Input.Headers = .init()
) async throws -> Operations.ActivityListPublicEventsForRepoNetwork.Output {
try await activityListPublicEventsForRepoNetwork(Operations.ActivityListPublicEventsForRepoNetwork.Input(
path: path,
query: query,
headers: headers
))
}
/// List notifications for the authenticated user
///
/// List all notifications for the current user, sorted by most recently updated.
///
/// - Remark: HTTP `GET /notifications`.
/// - Remark: Generated from `#/paths//notifications/get(activity/list-notifications-for-authenticated-user)`.
public func activityListNotificationsForAuthenticatedUser(
query: Operations.ActivityListNotificationsForAuthenticatedUser.Input.Query = .init(),
headers: Operations.ActivityListNotificationsForAuthenticatedUser.Input.Headers = .init()
) async throws -> Operations.ActivityListNotificationsForAuthenticatedUser.Output {
try await activityListNotificationsForAuthenticatedUser(Operations.ActivityListNotificationsForAuthenticatedUser.Input(
query: query,
headers: headers
))
}
/// Mark notifications as read
///
/// Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`.
///
/// - Remark: HTTP `PUT /notifications`.
/// - Remark: Generated from `#/paths//notifications/put(activity/mark-notifications-as-read)`.
public func activityMarkNotificationsAsRead(
headers: Operations.ActivityMarkNotificationsAsRead.Input.Headers = .init(),
body: Operations.ActivityMarkNotificationsAsRead.Input.Body? = nil
) async throws -> Operations.ActivityMarkNotificationsAsRead.Output {
try await activityMarkNotificationsAsRead(Operations.ActivityMarkNotificationsAsRead.Input(
headers: headers,
body: body
))
}
/// Get a thread
///
/// Gets information about a notification thread.
///
/// - Remark: HTTP `GET /notifications/threads/{thread_id}`.
/// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/get(activity/get-thread)`.
public func activityGetThread(
path: Operations.ActivityGetThread.Input.Path,
headers: Operations.ActivityGetThread.Input.Headers = .init()
) async throws -> Operations.ActivityGetThread.Output {
try await activityGetThread(Operations.ActivityGetThread.Input(
path: path,
headers: headers
))
}
/// Mark a thread as read
///
/// Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications.
///
/// - Remark: HTTP `PATCH /notifications/threads/{thread_id}`.
/// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/patch(activity/mark-thread-as-read)`.
public func activityMarkThreadAsRead(
path: Operations.ActivityMarkThreadAsRead.Input.Path,
headers: Operations.ActivityMarkThreadAsRead.Input.Headers = .init()
) async throws -> Operations.ActivityMarkThreadAsRead.Output {
try await activityMarkThreadAsRead(Operations.ActivityMarkThreadAsRead.Input(
path: path,
headers: headers
))
}
/// Mark a thread as done
///
/// Marks a thread as "done." Marking a thread as "done" is equivalent to marking a notification in your notification inbox on GitHub as done: https://github.com/notifications.
///
/// - Remark: HTTP `DELETE /notifications/threads/{thread_id}`.
/// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/delete(activity/mark-thread-as-done)`.
public func activityMarkThreadAsDone(path: Operations.ActivityMarkThreadAsDone.Input.Path) async throws -> Operations.ActivityMarkThreadAsDone.Output {
try await activityMarkThreadAsDone(Operations.ActivityMarkThreadAsDone.Input(path: path))
}
/// Get a thread subscription for the authenticated user
///
/// This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/activity/watching#get-a-repository-subscription).
///
/// Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread.
///
/// - Remark: HTTP `GET /notifications/threads/{thread_id}/subscription`.
/// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/subscription/get(activity/get-thread-subscription-for-authenticated-user)`.
public func activityGetThreadSubscriptionForAuthenticatedUser(
path: Operations.ActivityGetThreadSubscriptionForAuthenticatedUser.Input.Path,
headers: Operations.ActivityGetThreadSubscriptionForAuthenticatedUser.Input.Headers = .init()
) async throws -> Operations.ActivityGetThreadSubscriptionForAuthenticatedUser.Output {
try await activityGetThreadSubscriptionForAuthenticatedUser(Operations.ActivityGetThreadSubscriptionForAuthenticatedUser.Input(
path: path,
headers: headers
))
}
/// Set a thread subscription
///
/// If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**.
///
/// You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.
///
/// Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/activity/notifications#delete-a-thread-subscription) endpoint.
///
/// - Remark: HTTP `PUT /notifications/threads/{thread_id}/subscription`.
/// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/subscription/put(activity/set-thread-subscription)`.
public func activitySetThreadSubscription(
path: Operations.ActivitySetThreadSubscription.Input.Path,
headers: Operations.ActivitySetThreadSubscription.Input.Headers = .init(),
body: Operations.ActivitySetThreadSubscription.Input.Body? = nil
) async throws -> Operations.ActivitySetThreadSubscription.Output {
try await activitySetThreadSubscription(Operations.ActivitySetThreadSubscription.Input(
path: path,
headers: headers,
body: body
))
}
/// Delete a thread subscription
///
/// Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/activity/notifications#set-a-thread-subscription) endpoint and set `ignore` to `true`.
///
/// - Remark: HTTP `DELETE /notifications/threads/{thread_id}/subscription`.
/// - Remark: Generated from `#/paths//notifications/threads/{thread_id}/subscription/delete(activity/delete-thread-subscription)`.
public func activityDeleteThreadSubscription(
path: Operations.ActivityDeleteThreadSubscription.Input.Path,
headers: Operations.ActivityDeleteThreadSubscription.Input.Headers = .init()
) async throws -> Operations.ActivityDeleteThreadSubscription.Output {
try await activityDeleteThreadSubscription(Operations.ActivityDeleteThreadSubscription.Input(
path: path,
headers: headers
))
}
/// List public organization events
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /orgs/{org}/events`.
/// - Remark: Generated from `#/paths//orgs/{org}/events/get(activity/list-public-org-events)`.
public func activityListPublicOrgEvents(
path: Operations.ActivityListPublicOrgEvents.Input.Path,
query: Operations.ActivityListPublicOrgEvents.Input.Query = .init(),
headers: Operations.ActivityListPublicOrgEvents.Input.Headers = .init()
) async throws -> Operations.ActivityListPublicOrgEvents.Output {
try await activityListPublicOrgEvents(Operations.ActivityListPublicOrgEvents.Input(
path: path,
query: query,
headers: headers
))
}
/// List repository events
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /repos/{owner}/{repo}/events`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/events/get(activity/list-repo-events)`.
public func activityListRepoEvents(
path: Operations.ActivityListRepoEvents.Input.Path,
query: Operations.ActivityListRepoEvents.Input.Query = .init(),
headers: Operations.ActivityListRepoEvents.Input.Headers = .init()
) async throws -> Operations.ActivityListRepoEvents.Output {
try await activityListRepoEvents(Operations.ActivityListRepoEvents.Input(
path: path,
query: query,
headers: headers
))
}
/// List repository notifications for the authenticated user
///
/// Lists all notifications for the current user in the specified repository.
///
/// - Remark: HTTP `GET /repos/{owner}/{repo}/notifications`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/notifications/get(activity/list-repo-notifications-for-authenticated-user)`.
public func activityListRepoNotificationsForAuthenticatedUser(
path: Operations.ActivityListRepoNotificationsForAuthenticatedUser.Input.Path,
query: Operations.ActivityListRepoNotificationsForAuthenticatedUser.Input.Query = .init(),
headers: Operations.ActivityListRepoNotificationsForAuthenticatedUser.Input.Headers = .init()
) async throws -> Operations.ActivityListRepoNotificationsForAuthenticatedUser.Output {
try await activityListRepoNotificationsForAuthenticatedUser(Operations.ActivityListRepoNotificationsForAuthenticatedUser.Input(
path: path,
query: query,
headers: headers
))
}
/// Mark repository notifications as read
///
/// Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/activity/notifications#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`.
///
/// - Remark: HTTP `PUT /repos/{owner}/{repo}/notifications`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/notifications/put(activity/mark-repo-notifications-as-read)`.
public func activityMarkRepoNotificationsAsRead(
path: Operations.ActivityMarkRepoNotificationsAsRead.Input.Path,
headers: Operations.ActivityMarkRepoNotificationsAsRead.Input.Headers = .init(),
body: Operations.ActivityMarkRepoNotificationsAsRead.Input.Body? = nil
) async throws -> Operations.ActivityMarkRepoNotificationsAsRead.Output {
try await activityMarkRepoNotificationsAsRead(Operations.ActivityMarkRepoNotificationsAsRead.Input(
path: path,
headers: headers,
body: body
))
}
/// List stargazers
///
/// Lists the people that have starred the repository.
///
/// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."
///
/// - **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created.
///
/// - Remark: HTTP `GET /repos/{owner}/{repo}/stargazers`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/stargazers/get(activity/list-stargazers-for-repo)`.
public func activityListStargazersForRepo(
path: Operations.ActivityListStargazersForRepo.Input.Path,
query: Operations.ActivityListStargazersForRepo.Input.Query = .init(),
headers: Operations.ActivityListStargazersForRepo.Input.Headers = .init()
) async throws -> Operations.ActivityListStargazersForRepo.Output {
try await activityListStargazersForRepo(Operations.ActivityListStargazersForRepo.Input(
path: path,
query: query,
headers: headers
))
}
/// List watchers
///
/// Lists the people watching the specified repository.
///
/// - Remark: HTTP `GET /repos/{owner}/{repo}/subscribers`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/subscribers/get(activity/list-watchers-for-repo)`.
public func activityListWatchersForRepo(
path: Operations.ActivityListWatchersForRepo.Input.Path,
query: Operations.ActivityListWatchersForRepo.Input.Query = .init(),
headers: Operations.ActivityListWatchersForRepo.Input.Headers = .init()
) async throws -> Operations.ActivityListWatchersForRepo.Output {
try await activityListWatchersForRepo(Operations.ActivityListWatchersForRepo.Input(
path: path,
query: query,
headers: headers
))
}
/// Get a repository subscription
///
/// Gets information about whether the authenticated user is subscribed to the repository.
///
/// - Remark: HTTP `GET /repos/{owner}/{repo}/subscription`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/subscription/get(activity/get-repo-subscription)`.
public func activityGetRepoSubscription(
path: Operations.ActivityGetRepoSubscription.Input.Path,
headers: Operations.ActivityGetRepoSubscription.Input.Headers = .init()
) async throws -> Operations.ActivityGetRepoSubscription.Output {
try await activityGetRepoSubscription(Operations.ActivityGetRepoSubscription.Input(
path: path,
headers: headers
))
}
/// Set a repository subscription
///
/// If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/activity/watching#delete-a-repository-subscription) completely.
///
/// - Remark: HTTP `PUT /repos/{owner}/{repo}/subscription`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/subscription/put(activity/set-repo-subscription)`.
public func activitySetRepoSubscription(
path: Operations.ActivitySetRepoSubscription.Input.Path,
headers: Operations.ActivitySetRepoSubscription.Input.Headers = .init(),
body: Operations.ActivitySetRepoSubscription.Input.Body? = nil
) async throws -> Operations.ActivitySetRepoSubscription.Output {
try await activitySetRepoSubscription(Operations.ActivitySetRepoSubscription.Input(
path: path,
headers: headers,
body: body
))
}
/// Delete a repository subscription
///
/// This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/activity/watching#set-a-repository-subscription).
///
/// - Remark: HTTP `DELETE /repos/{owner}/{repo}/subscription`.
/// - Remark: Generated from `#/paths//repos/{owner}/{repo}/subscription/delete(activity/delete-repo-subscription)`.
public func activityDeleteRepoSubscription(path: Operations.ActivityDeleteRepoSubscription.Input.Path) async throws -> Operations.ActivityDeleteRepoSubscription.Output {
try await activityDeleteRepoSubscription(Operations.ActivityDeleteRepoSubscription.Input(path: path))
}
/// List repositories starred by the authenticated user
///
/// Lists repositories the authenticated user has starred.
///
/// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."
///
/// - **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created.
///
/// - Remark: HTTP `GET /user/starred`.
/// - Remark: Generated from `#/paths//user/starred/get(activity/list-repos-starred-by-authenticated-user)`.
public func activityListReposStarredByAuthenticatedUser(
query: Operations.ActivityListReposStarredByAuthenticatedUser.Input.Query = .init(),
headers: Operations.ActivityListReposStarredByAuthenticatedUser.Input.Headers = .init()
) async throws -> Operations.ActivityListReposStarredByAuthenticatedUser.Output {
try await activityListReposStarredByAuthenticatedUser(Operations.ActivityListReposStarredByAuthenticatedUser.Input(
query: query,
headers: headers
))
}
/// Check if a repository is starred by the authenticated user
///
/// Whether the authenticated user has starred the repository.
///
/// - Remark: HTTP `GET /user/starred/{owner}/{repo}`.
/// - Remark: Generated from `#/paths//user/starred/{owner}/{repo}/get(activity/check-repo-is-starred-by-authenticated-user)`.
public func activityCheckRepoIsStarredByAuthenticatedUser(
path: Operations.ActivityCheckRepoIsStarredByAuthenticatedUser.Input.Path,
headers: Operations.ActivityCheckRepoIsStarredByAuthenticatedUser.Input.Headers = .init()
) async throws -> Operations.ActivityCheckRepoIsStarredByAuthenticatedUser.Output {
try await activityCheckRepoIsStarredByAuthenticatedUser(Operations.ActivityCheckRepoIsStarredByAuthenticatedUser.Input(
path: path,
headers: headers
))
}
/// Star a repository for the authenticated user
///
/// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."
///
/// - Remark: HTTP `PUT /user/starred/{owner}/{repo}`.
/// - Remark: Generated from `#/paths//user/starred/{owner}/{repo}/put(activity/star-repo-for-authenticated-user)`.
public func activityStarRepoForAuthenticatedUser(
path: Operations.ActivityStarRepoForAuthenticatedUser.Input.Path,
headers: Operations.ActivityStarRepoForAuthenticatedUser.Input.Headers = .init()
) async throws -> Operations.ActivityStarRepoForAuthenticatedUser.Output {
try await activityStarRepoForAuthenticatedUser(Operations.ActivityStarRepoForAuthenticatedUser.Input(
path: path,
headers: headers
))
}
/// Unstar a repository for the authenticated user
///
/// Unstar a repository that the authenticated user has previously starred.
///
/// - Remark: HTTP `DELETE /user/starred/{owner}/{repo}`.
/// - Remark: Generated from `#/paths//user/starred/{owner}/{repo}/delete(activity/unstar-repo-for-authenticated-user)`.
public func activityUnstarRepoForAuthenticatedUser(
path: Operations.ActivityUnstarRepoForAuthenticatedUser.Input.Path,
headers: Operations.ActivityUnstarRepoForAuthenticatedUser.Input.Headers = .init()
) async throws -> Operations.ActivityUnstarRepoForAuthenticatedUser.Output {
try await activityUnstarRepoForAuthenticatedUser(Operations.ActivityUnstarRepoForAuthenticatedUser.Input(
path: path,
headers: headers
))
}
/// List repositories watched by the authenticated user
///
/// Lists repositories the authenticated user is watching.
///
/// - Remark: HTTP `GET /user/subscriptions`.
/// - Remark: Generated from `#/paths//user/subscriptions/get(activity/list-watched-repos-for-authenticated-user)`.
public func activityListWatchedReposForAuthenticatedUser(
query: Operations.ActivityListWatchedReposForAuthenticatedUser.Input.Query = .init(),
headers: Operations.ActivityListWatchedReposForAuthenticatedUser.Input.Headers = .init()
) async throws -> Operations.ActivityListWatchedReposForAuthenticatedUser.Output {
try await activityListWatchedReposForAuthenticatedUser(Operations.ActivityListWatchedReposForAuthenticatedUser.Input(
query: query,
headers: headers
))
}
/// List events for the authenticated user
///
/// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. _Optional_: use the fine-grained token with following permission set to view private events: "Events" user permissions (read).
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /users/{username}/events`.
/// - Remark: Generated from `#/paths//users/{username}/events/get(activity/list-events-for-authenticated-user)`.
public func activityListEventsForAuthenticatedUser(
path: Operations.ActivityListEventsForAuthenticatedUser.Input.Path,
query: Operations.ActivityListEventsForAuthenticatedUser.Input.Query = .init(),
headers: Operations.ActivityListEventsForAuthenticatedUser.Input.Headers = .init()
) async throws -> Operations.ActivityListEventsForAuthenticatedUser.Output {
try await activityListEventsForAuthenticatedUser(Operations.ActivityListEventsForAuthenticatedUser.Input(
path: path,
query: query,
headers: headers
))
}
/// List organization events for the authenticated user
///
/// This is the user's organization dashboard. You must be authenticated as the user to view this.
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /users/{username}/events/orgs/{org}`.
/// - Remark: Generated from `#/paths//users/{username}/events/orgs/{org}/get(activity/list-org-events-for-authenticated-user)`.
public func activityListOrgEventsForAuthenticatedUser(
path: Operations.ActivityListOrgEventsForAuthenticatedUser.Input.Path,
query: Operations.ActivityListOrgEventsForAuthenticatedUser.Input.Query = .init(),
headers: Operations.ActivityListOrgEventsForAuthenticatedUser.Input.Headers = .init()
) async throws -> Operations.ActivityListOrgEventsForAuthenticatedUser.Output {
try await activityListOrgEventsForAuthenticatedUser(Operations.ActivityListOrgEventsForAuthenticatedUser.Input(
path: path,
query: query,
headers: headers
))
}
/// List public events for a user
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /users/{username}/events/public`.
/// - Remark: Generated from `#/paths//users/{username}/events/public/get(activity/list-public-events-for-user)`.
public func activityListPublicEventsForUser(
path: Operations.ActivityListPublicEventsForUser.Input.Path,
query: Operations.ActivityListPublicEventsForUser.Input.Query = .init(),
headers: Operations.ActivityListPublicEventsForUser.Input.Headers = .init()
) async throws -> Operations.ActivityListPublicEventsForUser.Output {
try await activityListPublicEventsForUser(Operations.ActivityListPublicEventsForUser.Input(
path: path,
query: query,
headers: headers
))
}
/// List events received by the authenticated user
///
/// These are events that you've received by watching repositories and following users. If you are authenticated as the
/// given user, you will see private events. Otherwise, you'll only see public events.
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /users/{username}/received_events`.
/// - Remark: Generated from `#/paths//users/{username}/received_events/get(activity/list-received-events-for-user)`.
public func activityListReceivedEventsForUser(
path: Operations.ActivityListReceivedEventsForUser.Input.Path,
query: Operations.ActivityListReceivedEventsForUser.Input.Query = .init(),
headers: Operations.ActivityListReceivedEventsForUser.Input.Headers = .init()
) async throws -> Operations.ActivityListReceivedEventsForUser.Output {
try await activityListReceivedEventsForUser(Operations.ActivityListReceivedEventsForUser.Input(
path: path,
query: query,
headers: headers
))
}
/// List public events received by a user
///
/// > [!NOTE]
/// > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.
///
/// - Remark: HTTP `GET /users/{username}/received_events/public`.
/// - Remark: Generated from `#/paths//users/{username}/received_events/public/get(activity/list-received-public-events-for-user)`.
public func activityListReceivedPublicEventsForUser(
path: Operations.ActivityListReceivedPublicEventsForUser.Input.Path,
query: Operations.ActivityListReceivedPublicEventsForUser.Input.Query = .init(),
headers: Operations.ActivityListReceivedPublicEventsForUser.Input.Headers = .init()
) async throws -> Operations.ActivityListReceivedPublicEventsForUser.Output {
try await activityListReceivedPublicEventsForUser(Operations.ActivityListReceivedPublicEventsForUser.Input(
path: path,
query: query,
headers: headers
))
}
/// List repositories starred by a user
///
/// Lists repositories a user has starred.
///
/// This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."
///
/// - **`application/vnd.github.star+json`**: Includes a timestamp of when the star was created.
///
/// - Remark: HTTP `GET /users/{username}/starred`.
/// - Remark: Generated from `#/paths//users/{username}/starred/get(activity/list-repos-starred-by-user)`.
public func activityListReposStarredByUser(
path: Operations.ActivityListReposStarredByUser.Input.Path,
query: Operations.ActivityListReposStarredByUser.Input.Query = .init(),
headers: Operations.ActivityListReposStarredByUser.Input.Headers = .init()
) async throws -> Operations.ActivityListReposStarredByUser.Output {
try await activityListReposStarredByUser(Operations.ActivityListReposStarredByUser.Input(
path: path,
query: query,
headers: headers
))
}
/// List repositories watched by a user
///
/// Lists repositories a user is watching.
///
/// - Remark: HTTP `GET /users/{username}/subscriptions`.
/// - Remark: Generated from `#/paths//users/{username}/subscriptions/get(activity/list-repos-watched-by-user)`.
public func activityListReposWatchedByUser(
path: Operations.ActivityListReposWatchedByUser.Input.Path,
query: Operations.ActivityListReposWatchedByUser.Input.Query = .init(),
headers: Operations.ActivityListReposWatchedByUser.Input.Headers = .init()
) async throws -> Operations.ActivityListReposWatchedByUser.Output {
try await activityListReposWatchedByUser(Operations.ActivityListReposWatchedByUser.Input(
path: path,
query: query,
headers: headers
))
}
}
/// Server URLs defined in the OpenAPI document.
public enum Servers {
public enum Server1 {
public static func url() throws -> Foundation.URL {
try Foundation.URL(
validatingOpenAPIServerURL: "https://api.github.com",
variables: []
)
}
}
@available(*, deprecated, renamed: "Servers.Server1.url")
public static func server1() throws -> Foundation.URL {
try Foundation.URL(
validatingOpenAPIServerURL: "https://api.github.com",
variables: []
)
}
}
/// Types generated from the components section of the OpenAPI document.
public enum Components {
/// Types generated from the `#/components/schemas` section of the OpenAPI document.
public enum Schemas {
/// A GitHub user.
///
/// - Remark: Generated from `#/components/schemas/simple-user`.
public struct SimpleUser: Codable, Hashable, Sendable {
/// - Remark: Generated from `#/components/schemas/simple-user/name`.
public var name: Swift.String?
/// - Remark: Generated from `#/components/schemas/simple-user/email`.
public var email: Swift.String?
/// - Remark: Generated from `#/components/schemas/simple-user/login`.
public var login: Swift.String
/// - Remark: Generated from `#/components/schemas/simple-user/id`.
public var id: Swift.Int64
/// - Remark: Generated from `#/components/schemas/simple-user/node_id`.
public var nodeId: Swift.String
/// - Remark: Generated from `#/components/schemas/simple-user/avatar_url`.
public var avatarUrl: Swift.String
/// - Remark: Generated from `#/components/schemas/simple-user/gravatar_id`.
public var gravatarId: Swift.String?
/// - Remark: Generated from `#/components/schemas/simple-user/url`.
public var url: Swift.String
/// - Remark: Generated from `#/components/schemas/simple-user/html_url`.
public var htmlUrl: Swift.String
/// - Remark: Generated from `#/components/schemas/simple-user/followers_url`.
public var followersUrl: Swift.String
/// - Remark: Generated from `#/components/schemas/simple-user/following_url`.
public var followingUrl: Swift.String
/// - Remark: Generated from `#/components/schemas/simple-user/gists_url`.
public var gistsUrl: Swift.String
/// - Remark: Generated from `#/components/schemas/simple-user/starred_url`.
public var starredUrl: Swift.String
/// - Remark: Generated from `#/components/schemas/simple-user/subscriptions_url`.
public var subscriptionsUrl: Swift.String
/// - Remark: Generated from `#/components/schemas/simple-user/organizations_url`.
public var organizationsUrl: Swift.String
/// - Remark: Generated from `#/components/schemas/simple-user/repos_url`.
public var reposUrl: Swift.String
/// - Remark: Generated from `#/components/schemas/simple-user/events_url`.
public var eventsUrl: Swift.String
/// - Remark: Generated from `#/components/schemas/simple-user/received_events_url`.
public var receivedEventsUrl: Swift.String
/// - Remark: Generated from `#/components/schemas/simple-user/type`.
public var _type: Swift.String
/// - Remark: Generated from `#/components/schemas/simple-user/site_admin`.
public var siteAdmin: Swift.Bool
/// - Remark: Generated from `#/components/schemas/simple-user/starred_at`.
public var starredAt: Swift.String?
/// - Remark: Generated from `#/components/schemas/simple-user/user_view_type`.
public var userViewType: Swift.String?
/// Creates a new `SimpleUser`.
///
/// - Parameters:
/// - name:
/// - email:
/// - login:
/// - id:
/// - nodeId:
/// - avatarUrl:
/// - gravatarId:
/// - url:
/// - htmlUrl:
/// - followersUrl:
/// - followingUrl:
/// - gistsUrl:
/// - starredUrl:
/// - subscriptionsUrl:
/// - organizationsUrl:
/// - reposUrl:
/// - eventsUrl:
/// - receivedEventsUrl:
/// - _type:
/// - siteAdmin:
/// - starredAt:
/// - userViewType:
public init(
name: Swift.String? = nil,
email: Swift.String? = nil,
login: Swift.String,
id: Swift.Int64,
nodeId: Swift.String,
avatarUrl: Swift.String,
gravatarId: Swift.String? = nil,
url: Swift.String,
htmlUrl: Swift.String,
followersUrl: Swift.String,
followingUrl: Swift.String,
gistsUrl: Swift.String,
starredUrl: Swift.String,
subscriptionsUrl: Swift.String,
organizationsUrl: Swift.String,
reposUrl: Swift.String,
eventsUrl: Swift.String,
receivedEventsUrl: Swift.String,
_type: Swift.String,
siteAdmin: Swift.Bool,
starredAt: Swift.String? = nil,
userViewType: Swift.String? = nil
) {
self.name = name
self.email = email
self.login = login
self.id = id
self.nodeId = nodeId
self.avatarUrl = avatarUrl
self.gravatarId = gravatarId
self.url = url
self.htmlUrl = htmlUrl
self.followersUrl = followersUrl
self.followingUrl = followingUrl
self.gistsUrl = gistsUrl
self.starredUrl = starredUrl
self.subscriptionsUrl = subscriptionsUrl
self.organizationsUrl = organizationsUrl
self.reposUrl = reposUrl
self.eventsUrl = eventsUrl
self.receivedEventsUrl = receivedEventsUrl
self._type = _type
self.siteAdmin = siteAdmin
self.starredAt = starredAt
self.userViewType = userViewType
}
public enum CodingKeys: String, CodingKey {
case name
case email
case login
case id
case nodeId = "node_id"
case avatarUrl = "avatar_url"
case gravatarId = "gravatar_id"
case url
case htmlUrl = "html_url"
case followersUrl = "followers_url"
case followingUrl = "following_url"
case gistsUrl = "gists_url"
case starredUrl = "starred_url"
case subscriptionsUrl = "subscriptions_url"
case organizationsUrl = "organizations_url"
case reposUrl = "repos_url"
case eventsUrl = "events_url"
case receivedEventsUrl = "received_events_url"
case _type = "type"
case siteAdmin = "site_admin"
case starredAt = "starred_at"
case userViewType = "user_view_type"
}
}
/// Basic Error