@mesadev/rest 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +28 -0
  3. package/dist/client/client.gen.d.ts +2 -0
  4. package/dist/client/client.gen.js +234 -0
  5. package/dist/client/index.d.ts +8 -0
  6. package/dist/client/index.js +6 -0
  7. package/dist/client/types.gen.d.ts +117 -0
  8. package/dist/client/types.gen.js +2 -0
  9. package/dist/client/utils.gen.d.ts +33 -0
  10. package/dist/client/utils.gen.js +228 -0
  11. package/dist/client.gen.d.ts +12 -0
  12. package/dist/client.gen.js +3 -0
  13. package/dist/core/auth.gen.d.ts +18 -0
  14. package/dist/core/auth.gen.js +14 -0
  15. package/dist/core/bodySerializer.gen.d.ts +25 -0
  16. package/dist/core/bodySerializer.gen.js +57 -0
  17. package/dist/core/params.gen.d.ts +43 -0
  18. package/dist/core/params.gen.js +100 -0
  19. package/dist/core/pathSerializer.gen.d.ts +33 -0
  20. package/dist/core/pathSerializer.gen.js +106 -0
  21. package/dist/core/queryKeySerializer.gen.d.ts +18 -0
  22. package/dist/core/queryKeySerializer.gen.js +92 -0
  23. package/dist/core/serverSentEvents.gen.d.ts +71 -0
  24. package/dist/core/serverSentEvents.gen.js +133 -0
  25. package/dist/core/types.gen.d.ts +78 -0
  26. package/dist/core/types.gen.js +2 -0
  27. package/dist/core/utils.gen.d.ts +19 -0
  28. package/dist/core/utils.gen.js +87 -0
  29. package/dist/index.d.ts +2 -0
  30. package/dist/index.js +2 -0
  31. package/dist/sdk.gen.d.ts +135 -0
  32. package/dist/sdk.gen.js +226 -0
  33. package/dist/types.gen.d.ts +2547 -0
  34. package/dist/types.gen.js +2 -0
  35. package/package.json +37 -0
  36. package/src/client/client.gen.ts +288 -0
  37. package/src/client/index.ts +25 -0
  38. package/src/client/types.gen.ts +214 -0
  39. package/src/client/utils.gen.ts +316 -0
  40. package/src/client.gen.ts +16 -0
  41. package/src/core/auth.gen.ts +41 -0
  42. package/src/core/bodySerializer.gen.ts +84 -0
  43. package/src/core/params.gen.ts +169 -0
  44. package/src/core/pathSerializer.gen.ts +171 -0
  45. package/src/core/queryKeySerializer.gen.ts +117 -0
  46. package/src/core/serverSentEvents.gen.ts +243 -0
  47. package/src/core/types.gen.ts +104 -0
  48. package/src/core/utils.gen.ts +140 -0
  49. package/src/index.ts +4 -0
  50. package/src/sdk.gen.ts +263 -0
  51. package/src/types.gen.ts +2649 -0
@@ -0,0 +1,2649 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ export type ClientOptions = {
4
+ baseUrl: 'https://api.mesa.dev/api/v1' | (string & {});
5
+ };
6
+
7
+ export type GetByOrgApiKeysData = {
8
+ body?: never;
9
+ path: {
10
+ org: string;
11
+ };
12
+ query?: never;
13
+ url: '/{org}/api-keys';
14
+ };
15
+
16
+ export type GetByOrgApiKeysErrors = {
17
+ /**
18
+ * Invalid request
19
+ */
20
+ 400: {
21
+ error: {
22
+ code: string;
23
+ message: string;
24
+ details?: {
25
+ [key: string]: unknown;
26
+ };
27
+ };
28
+ };
29
+ /**
30
+ * Unauthorized
31
+ */
32
+ 401: {
33
+ error: {
34
+ code: string;
35
+ message: string;
36
+ details?: {
37
+ [key: string]: unknown;
38
+ };
39
+ };
40
+ };
41
+ /**
42
+ * Forbidden
43
+ */
44
+ 403: {
45
+ error: {
46
+ code: string;
47
+ message: string;
48
+ details?: {
49
+ [key: string]: unknown;
50
+ };
51
+ };
52
+ };
53
+ /**
54
+ * Not found
55
+ */
56
+ 404: {
57
+ error: {
58
+ code: string;
59
+ message: string;
60
+ details?: {
61
+ [key: string]: unknown;
62
+ };
63
+ };
64
+ };
65
+ /**
66
+ * Not acceptable
67
+ */
68
+ 406: {
69
+ error: {
70
+ code: string;
71
+ message: string;
72
+ details?: {
73
+ [key: string]: unknown;
74
+ };
75
+ };
76
+ };
77
+ /**
78
+ * Conflict
79
+ */
80
+ 409: {
81
+ error: {
82
+ code: string;
83
+ message: string;
84
+ details?: {
85
+ [key: string]: unknown;
86
+ };
87
+ };
88
+ };
89
+ /**
90
+ * Internal error
91
+ */
92
+ 500: {
93
+ error: {
94
+ code: string;
95
+ message: string;
96
+ details?: {
97
+ [key: string]: unknown;
98
+ };
99
+ };
100
+ };
101
+ };
102
+
103
+ export type GetByOrgApiKeysError = GetByOrgApiKeysErrors[keyof GetByOrgApiKeysErrors];
104
+
105
+ export type GetByOrgApiKeysResponses = {
106
+ /**
107
+ * API keys list
108
+ */
109
+ 200: {
110
+ api_keys: Array<{
111
+ id: string;
112
+ name: string | null;
113
+ scopes: Array<string>;
114
+ last_used_at: string | null;
115
+ expires_at: string | null;
116
+ revoked_at: string | null;
117
+ created_at: string;
118
+ }>;
119
+ };
120
+ };
121
+
122
+ export type GetByOrgApiKeysResponse = GetByOrgApiKeysResponses[keyof GetByOrgApiKeysResponses];
123
+
124
+ export type PostByOrgApiKeysData = {
125
+ body: {
126
+ name?: string;
127
+ scopes?: Array<'git:read' | 'git:write' | 'repo:read' | 'repo:create' | 'repo:delete' | 'webhook:read' | 'webhook:write' | 'admin'>;
128
+ };
129
+ path: {
130
+ org: string;
131
+ };
132
+ query?: never;
133
+ url: '/{org}/api-keys';
134
+ };
135
+
136
+ export type PostByOrgApiKeysErrors = {
137
+ /**
138
+ * Invalid request
139
+ */
140
+ 400: {
141
+ error: {
142
+ code: string;
143
+ message: string;
144
+ details?: {
145
+ [key: string]: unknown;
146
+ };
147
+ };
148
+ };
149
+ /**
150
+ * Unauthorized
151
+ */
152
+ 401: {
153
+ error: {
154
+ code: string;
155
+ message: string;
156
+ details?: {
157
+ [key: string]: unknown;
158
+ };
159
+ };
160
+ };
161
+ /**
162
+ * Forbidden
163
+ */
164
+ 403: {
165
+ error: {
166
+ code: string;
167
+ message: string;
168
+ details?: {
169
+ [key: string]: unknown;
170
+ };
171
+ };
172
+ };
173
+ /**
174
+ * Not found
175
+ */
176
+ 404: {
177
+ error: {
178
+ code: string;
179
+ message: string;
180
+ details?: {
181
+ [key: string]: unknown;
182
+ };
183
+ };
184
+ };
185
+ /**
186
+ * Not acceptable
187
+ */
188
+ 406: {
189
+ error: {
190
+ code: string;
191
+ message: string;
192
+ details?: {
193
+ [key: string]: unknown;
194
+ };
195
+ };
196
+ };
197
+ /**
198
+ * Conflict
199
+ */
200
+ 409: {
201
+ error: {
202
+ code: string;
203
+ message: string;
204
+ details?: {
205
+ [key: string]: unknown;
206
+ };
207
+ };
208
+ };
209
+ /**
210
+ * Internal error
211
+ */
212
+ 500: {
213
+ error: {
214
+ code: string;
215
+ message: string;
216
+ details?: {
217
+ [key: string]: unknown;
218
+ };
219
+ };
220
+ };
221
+ };
222
+
223
+ export type PostByOrgApiKeysError = PostByOrgApiKeysErrors[keyof PostByOrgApiKeysErrors];
224
+
225
+ export type PostByOrgApiKeysResponses = {
226
+ /**
227
+ * API key created
228
+ */
229
+ 201: {
230
+ id: string;
231
+ key: string;
232
+ name: string | null;
233
+ scopes: Array<string>;
234
+ created_at: string;
235
+ };
236
+ };
237
+
238
+ export type PostByOrgApiKeysResponse = PostByOrgApiKeysResponses[keyof PostByOrgApiKeysResponses];
239
+
240
+ export type DeleteByOrgApiKeysByIdData = {
241
+ body?: never;
242
+ path: {
243
+ id: string;
244
+ org: string;
245
+ };
246
+ query?: never;
247
+ url: '/{org}/api-keys/{id}';
248
+ };
249
+
250
+ export type DeleteByOrgApiKeysByIdErrors = {
251
+ /**
252
+ * Invalid request
253
+ */
254
+ 400: {
255
+ error: {
256
+ code: string;
257
+ message: string;
258
+ details?: {
259
+ [key: string]: unknown;
260
+ };
261
+ };
262
+ };
263
+ /**
264
+ * Unauthorized
265
+ */
266
+ 401: {
267
+ error: {
268
+ code: string;
269
+ message: string;
270
+ details?: {
271
+ [key: string]: unknown;
272
+ };
273
+ };
274
+ };
275
+ /**
276
+ * Forbidden
277
+ */
278
+ 403: {
279
+ error: {
280
+ code: string;
281
+ message: string;
282
+ details?: {
283
+ [key: string]: unknown;
284
+ };
285
+ };
286
+ };
287
+ /**
288
+ * Not found
289
+ */
290
+ 404: {
291
+ error: {
292
+ code: string;
293
+ message: string;
294
+ details?: {
295
+ [key: string]: unknown;
296
+ };
297
+ };
298
+ };
299
+ /**
300
+ * Not acceptable
301
+ */
302
+ 406: {
303
+ error: {
304
+ code: string;
305
+ message: string;
306
+ details?: {
307
+ [key: string]: unknown;
308
+ };
309
+ };
310
+ };
311
+ /**
312
+ * Conflict
313
+ */
314
+ 409: {
315
+ error: {
316
+ code: string;
317
+ message: string;
318
+ details?: {
319
+ [key: string]: unknown;
320
+ };
321
+ };
322
+ };
323
+ /**
324
+ * Internal error
325
+ */
326
+ 500: {
327
+ error: {
328
+ code: string;
329
+ message: string;
330
+ details?: {
331
+ [key: string]: unknown;
332
+ };
333
+ };
334
+ };
335
+ };
336
+
337
+ export type DeleteByOrgApiKeysByIdError = DeleteByOrgApiKeysByIdErrors[keyof DeleteByOrgApiKeysByIdErrors];
338
+
339
+ export type DeleteByOrgApiKeysByIdResponses = {
340
+ /**
341
+ * API key revoked
342
+ */
343
+ 200: {
344
+ success: true;
345
+ };
346
+ };
347
+
348
+ export type DeleteByOrgApiKeysByIdResponse = DeleteByOrgApiKeysByIdResponses[keyof DeleteByOrgApiKeysByIdResponses];
349
+
350
+ export type GetByOrgReposData = {
351
+ body?: never;
352
+ path: {
353
+ org: string;
354
+ };
355
+ query?: {
356
+ cursor?: string;
357
+ limit?: number;
358
+ };
359
+ url: '/{org}/repos';
360
+ };
361
+
362
+ export type GetByOrgReposErrors = {
363
+ /**
364
+ * Invalid request
365
+ */
366
+ 400: {
367
+ error: {
368
+ code: string;
369
+ message: string;
370
+ details?: {
371
+ [key: string]: unknown;
372
+ };
373
+ };
374
+ };
375
+ /**
376
+ * Unauthorized
377
+ */
378
+ 401: {
379
+ error: {
380
+ code: string;
381
+ message: string;
382
+ details?: {
383
+ [key: string]: unknown;
384
+ };
385
+ };
386
+ };
387
+ /**
388
+ * Forbidden
389
+ */
390
+ 403: {
391
+ error: {
392
+ code: string;
393
+ message: string;
394
+ details?: {
395
+ [key: string]: unknown;
396
+ };
397
+ };
398
+ };
399
+ /**
400
+ * Not found
401
+ */
402
+ 404: {
403
+ error: {
404
+ code: string;
405
+ message: string;
406
+ details?: {
407
+ [key: string]: unknown;
408
+ };
409
+ };
410
+ };
411
+ /**
412
+ * Not acceptable
413
+ */
414
+ 406: {
415
+ error: {
416
+ code: string;
417
+ message: string;
418
+ details?: {
419
+ [key: string]: unknown;
420
+ };
421
+ };
422
+ };
423
+ /**
424
+ * Conflict
425
+ */
426
+ 409: {
427
+ error: {
428
+ code: string;
429
+ message: string;
430
+ details?: {
431
+ [key: string]: unknown;
432
+ };
433
+ };
434
+ };
435
+ /**
436
+ * Internal error
437
+ */
438
+ 500: {
439
+ error: {
440
+ code: string;
441
+ message: string;
442
+ details?: {
443
+ [key: string]: unknown;
444
+ };
445
+ };
446
+ };
447
+ };
448
+
449
+ export type GetByOrgReposError = GetByOrgReposErrors[keyof GetByOrgReposErrors];
450
+
451
+ export type GetByOrgReposResponses = {
452
+ /**
453
+ * Repository list
454
+ */
455
+ 200: {
456
+ next_cursor: string | null;
457
+ has_more: boolean;
458
+ repos: Array<{
459
+ id: string;
460
+ org: string;
461
+ name: string;
462
+ default_branch: string;
463
+ head_oid: string | null;
464
+ size_bytes: number;
465
+ created_at: string;
466
+ /**
467
+ * Optionally add an upstream repository. You can configure automatic syncing from the upstream repository.
468
+ */
469
+ upstream: {
470
+ /**
471
+ * URL of the upstream repository
472
+ */
473
+ uri: string;
474
+ /**
475
+ * Automatic sync configuration, if enabled
476
+ */
477
+ autosync: {
478
+ type: 'poll';
479
+ /**
480
+ * Polling period in seconds
481
+ */
482
+ period: number;
483
+ /**
484
+ * Conflict resolution strategy. "none" means sync will fail on conflicts.
485
+ */
486
+ resolution_strategy: 'none';
487
+ } | null;
488
+ /**
489
+ * Timestamp of the last sync attempt
490
+ */
491
+ last_sync_attempt: string | null;
492
+ /**
493
+ * Timestamp of the last successful sync
494
+ */
495
+ last_sync_success: string | null;
496
+ /**
497
+ * Error message from the last failed sync attempt
498
+ */
499
+ last_sync_error: string | null;
500
+ /**
501
+ * Whether this upstream has an authentication credential configured
502
+ */
503
+ has_credential: boolean;
504
+ /**
505
+ * The host the credential is scoped to (e.g. "github.com")
506
+ */
507
+ credential_host: string | null;
508
+ } | null;
509
+ }>;
510
+ };
511
+ };
512
+
513
+ export type GetByOrgReposResponse = GetByOrgReposResponses[keyof GetByOrgReposResponses];
514
+
515
+ export type PostByOrgReposData = {
516
+ body: {
517
+ name: string;
518
+ default_branch?: string;
519
+ upstream?: {
520
+ /**
521
+ * URL of the upstream repository
522
+ */
523
+ uri: string;
524
+ /**
525
+ * Optionally enable automatic sync from the upstream repository
526
+ */
527
+ autosync?: {
528
+ type: 'poll';
529
+ /**
530
+ * Polling period in seconds (60s to 24.8d)
531
+ */
532
+ period: number;
533
+ /**
534
+ * Conflict resolution strategy. "none" means sync will fail on conflicts.
535
+ */
536
+ resolution_strategy?: 'none';
537
+ };
538
+ /**
539
+ * Personal access token for private upstream repos. Set to null to unlink credential.
540
+ */
541
+ token?: string | null;
542
+ /**
543
+ * Username for git credential auth. Defaults to "x-access-token". Use actual username for Bitbucket app passwords.
544
+ */
545
+ token_username?: string;
546
+ };
547
+ };
548
+ path: {
549
+ org: string;
550
+ };
551
+ query?: never;
552
+ url: '/{org}/repos';
553
+ };
554
+
555
+ export type PostByOrgReposErrors = {
556
+ /**
557
+ * Invalid request
558
+ */
559
+ 400: {
560
+ error: {
561
+ code: string;
562
+ message: string;
563
+ details?: {
564
+ [key: string]: unknown;
565
+ };
566
+ };
567
+ };
568
+ /**
569
+ * Unauthorized
570
+ */
571
+ 401: {
572
+ error: {
573
+ code: string;
574
+ message: string;
575
+ details?: {
576
+ [key: string]: unknown;
577
+ };
578
+ };
579
+ };
580
+ /**
581
+ * Forbidden
582
+ */
583
+ 403: {
584
+ error: {
585
+ code: string;
586
+ message: string;
587
+ details?: {
588
+ [key: string]: unknown;
589
+ };
590
+ };
591
+ };
592
+ /**
593
+ * Not found
594
+ */
595
+ 404: {
596
+ error: {
597
+ code: string;
598
+ message: string;
599
+ details?: {
600
+ [key: string]: unknown;
601
+ };
602
+ };
603
+ };
604
+ /**
605
+ * Not acceptable
606
+ */
607
+ 406: {
608
+ error: {
609
+ code: string;
610
+ message: string;
611
+ details?: {
612
+ [key: string]: unknown;
613
+ };
614
+ };
615
+ };
616
+ /**
617
+ * Conflict
618
+ */
619
+ 409: {
620
+ error: {
621
+ code: string;
622
+ message: string;
623
+ details?: {
624
+ [key: string]: unknown;
625
+ };
626
+ };
627
+ };
628
+ /**
629
+ * Internal error
630
+ */
631
+ 500: {
632
+ error: {
633
+ code: string;
634
+ message: string;
635
+ details?: {
636
+ [key: string]: unknown;
637
+ };
638
+ };
639
+ };
640
+ };
641
+
642
+ export type PostByOrgReposError = PostByOrgReposErrors[keyof PostByOrgReposErrors];
643
+
644
+ export type PostByOrgReposResponses = {
645
+ /**
646
+ * Repository created
647
+ */
648
+ 201: {
649
+ id: string;
650
+ org: string;
651
+ name: string;
652
+ default_branch: string;
653
+ head_oid: string | null;
654
+ size_bytes: number;
655
+ created_at: string;
656
+ /**
657
+ * Optionally add an upstream repository. You can configure automatic syncing from the upstream repository.
658
+ */
659
+ upstream: {
660
+ /**
661
+ * URL of the upstream repository
662
+ */
663
+ uri: string;
664
+ /**
665
+ * Automatic sync configuration, if enabled
666
+ */
667
+ autosync: {
668
+ type: 'poll';
669
+ /**
670
+ * Polling period in seconds
671
+ */
672
+ period: number;
673
+ /**
674
+ * Conflict resolution strategy. "none" means sync will fail on conflicts.
675
+ */
676
+ resolution_strategy: 'none';
677
+ } | null;
678
+ /**
679
+ * Timestamp of the last sync attempt
680
+ */
681
+ last_sync_attempt: string | null;
682
+ /**
683
+ * Timestamp of the last successful sync
684
+ */
685
+ last_sync_success: string | null;
686
+ /**
687
+ * Error message from the last failed sync attempt
688
+ */
689
+ last_sync_error: string | null;
690
+ /**
691
+ * Whether this upstream has an authentication credential configured
692
+ */
693
+ has_credential: boolean;
694
+ /**
695
+ * The host the credential is scoped to (e.g. "github.com")
696
+ */
697
+ credential_host: string | null;
698
+ } | null;
699
+ };
700
+ };
701
+
702
+ export type PostByOrgReposResponse = PostByOrgReposResponses[keyof PostByOrgReposResponses];
703
+
704
+ export type DeleteByOrgByRepoData = {
705
+ body?: never;
706
+ path: {
707
+ org: string;
708
+ repo: string;
709
+ };
710
+ query?: never;
711
+ url: '/{org}/{repo}';
712
+ };
713
+
714
+ export type DeleteByOrgByRepoErrors = {
715
+ /**
716
+ * Invalid request
717
+ */
718
+ 400: {
719
+ error: {
720
+ code: string;
721
+ message: string;
722
+ details?: {
723
+ [key: string]: unknown;
724
+ };
725
+ };
726
+ };
727
+ /**
728
+ * Unauthorized
729
+ */
730
+ 401: {
731
+ error: {
732
+ code: string;
733
+ message: string;
734
+ details?: {
735
+ [key: string]: unknown;
736
+ };
737
+ };
738
+ };
739
+ /**
740
+ * Forbidden
741
+ */
742
+ 403: {
743
+ error: {
744
+ code: string;
745
+ message: string;
746
+ details?: {
747
+ [key: string]: unknown;
748
+ };
749
+ };
750
+ };
751
+ /**
752
+ * Not found
753
+ */
754
+ 404: {
755
+ error: {
756
+ code: string;
757
+ message: string;
758
+ details?: {
759
+ [key: string]: unknown;
760
+ };
761
+ };
762
+ };
763
+ /**
764
+ * Not acceptable
765
+ */
766
+ 406: {
767
+ error: {
768
+ code: string;
769
+ message: string;
770
+ details?: {
771
+ [key: string]: unknown;
772
+ };
773
+ };
774
+ };
775
+ /**
776
+ * Conflict
777
+ */
778
+ 409: {
779
+ error: {
780
+ code: string;
781
+ message: string;
782
+ details?: {
783
+ [key: string]: unknown;
784
+ };
785
+ };
786
+ };
787
+ /**
788
+ * Internal error
789
+ */
790
+ 500: {
791
+ error: {
792
+ code: string;
793
+ message: string;
794
+ details?: {
795
+ [key: string]: unknown;
796
+ };
797
+ };
798
+ };
799
+ };
800
+
801
+ export type DeleteByOrgByRepoError = DeleteByOrgByRepoErrors[keyof DeleteByOrgByRepoErrors];
802
+
803
+ export type DeleteByOrgByRepoResponses = {
804
+ /**
805
+ * Repository deleted
806
+ */
807
+ 200: {
808
+ success: true;
809
+ };
810
+ };
811
+
812
+ export type DeleteByOrgByRepoResponse = DeleteByOrgByRepoResponses[keyof DeleteByOrgByRepoResponses];
813
+
814
+ export type GetByOrgByRepoData = {
815
+ body?: never;
816
+ path: {
817
+ org: string;
818
+ repo: string;
819
+ };
820
+ query?: never;
821
+ url: '/{org}/{repo}';
822
+ };
823
+
824
+ export type GetByOrgByRepoErrors = {
825
+ /**
826
+ * Invalid request
827
+ */
828
+ 400: {
829
+ error: {
830
+ code: string;
831
+ message: string;
832
+ details?: {
833
+ [key: string]: unknown;
834
+ };
835
+ };
836
+ };
837
+ /**
838
+ * Unauthorized
839
+ */
840
+ 401: {
841
+ error: {
842
+ code: string;
843
+ message: string;
844
+ details?: {
845
+ [key: string]: unknown;
846
+ };
847
+ };
848
+ };
849
+ /**
850
+ * Forbidden
851
+ */
852
+ 403: {
853
+ error: {
854
+ code: string;
855
+ message: string;
856
+ details?: {
857
+ [key: string]: unknown;
858
+ };
859
+ };
860
+ };
861
+ /**
862
+ * Not found
863
+ */
864
+ 404: {
865
+ error: {
866
+ code: string;
867
+ message: string;
868
+ details?: {
869
+ [key: string]: unknown;
870
+ };
871
+ };
872
+ };
873
+ /**
874
+ * Not acceptable
875
+ */
876
+ 406: {
877
+ error: {
878
+ code: string;
879
+ message: string;
880
+ details?: {
881
+ [key: string]: unknown;
882
+ };
883
+ };
884
+ };
885
+ /**
886
+ * Conflict
887
+ */
888
+ 409: {
889
+ error: {
890
+ code: string;
891
+ message: string;
892
+ details?: {
893
+ [key: string]: unknown;
894
+ };
895
+ };
896
+ };
897
+ /**
898
+ * Internal error
899
+ */
900
+ 500: {
901
+ error: {
902
+ code: string;
903
+ message: string;
904
+ details?: {
905
+ [key: string]: unknown;
906
+ };
907
+ };
908
+ };
909
+ };
910
+
911
+ export type GetByOrgByRepoError = GetByOrgByRepoErrors[keyof GetByOrgByRepoErrors];
912
+
913
+ export type GetByOrgByRepoResponses = {
914
+ /**
915
+ * Repository
916
+ */
917
+ 200: {
918
+ id: string;
919
+ org: string;
920
+ name: string;
921
+ default_branch: string;
922
+ head_oid: string | null;
923
+ size_bytes: number;
924
+ created_at: string;
925
+ /**
926
+ * Optionally add an upstream repository. You can configure automatic syncing from the upstream repository.
927
+ */
928
+ upstream: {
929
+ /**
930
+ * URL of the upstream repository
931
+ */
932
+ uri: string;
933
+ /**
934
+ * Automatic sync configuration, if enabled
935
+ */
936
+ autosync: {
937
+ type: 'poll';
938
+ /**
939
+ * Polling period in seconds
940
+ */
941
+ period: number;
942
+ /**
943
+ * Conflict resolution strategy. "none" means sync will fail on conflicts.
944
+ */
945
+ resolution_strategy: 'none';
946
+ } | null;
947
+ /**
948
+ * Timestamp of the last sync attempt
949
+ */
950
+ last_sync_attempt: string | null;
951
+ /**
952
+ * Timestamp of the last successful sync
953
+ */
954
+ last_sync_success: string | null;
955
+ /**
956
+ * Error message from the last failed sync attempt
957
+ */
958
+ last_sync_error: string | null;
959
+ /**
960
+ * Whether this upstream has an authentication credential configured
961
+ */
962
+ has_credential: boolean;
963
+ /**
964
+ * The host the credential is scoped to (e.g. "github.com")
965
+ */
966
+ credential_host: string | null;
967
+ } | null;
968
+ };
969
+ };
970
+
971
+ export type GetByOrgByRepoResponse = GetByOrgByRepoResponses[keyof GetByOrgByRepoResponses];
972
+
973
+ export type PatchByOrgByRepoData = {
974
+ body: {
975
+ name?: string;
976
+ default_branch?: string;
977
+ upstream?: {
978
+ /**
979
+ * URL of the upstream repository
980
+ */
981
+ uri: string;
982
+ /**
983
+ * Optionally enable automatic sync from the upstream repository
984
+ */
985
+ autosync?: {
986
+ type: 'poll';
987
+ /**
988
+ * Polling period in seconds (60s to 24.8d)
989
+ */
990
+ period: number;
991
+ /**
992
+ * Conflict resolution strategy. "none" means sync will fail on conflicts.
993
+ */
994
+ resolution_strategy?: 'none';
995
+ };
996
+ /**
997
+ * Personal access token for private upstream repos. Set to null to unlink credential.
998
+ */
999
+ token?: string | null;
1000
+ /**
1001
+ * Username for git credential auth. Defaults to "x-access-token". Use actual username for Bitbucket app passwords.
1002
+ */
1003
+ token_username?: string;
1004
+ } | null;
1005
+ };
1006
+ path: {
1007
+ org: string;
1008
+ repo: string;
1009
+ };
1010
+ query?: never;
1011
+ url: '/{org}/{repo}';
1012
+ };
1013
+
1014
+ export type PatchByOrgByRepoErrors = {
1015
+ /**
1016
+ * Invalid request
1017
+ */
1018
+ 400: {
1019
+ error: {
1020
+ code: string;
1021
+ message: string;
1022
+ details?: {
1023
+ [key: string]: unknown;
1024
+ };
1025
+ };
1026
+ };
1027
+ /**
1028
+ * Unauthorized
1029
+ */
1030
+ 401: {
1031
+ error: {
1032
+ code: string;
1033
+ message: string;
1034
+ details?: {
1035
+ [key: string]: unknown;
1036
+ };
1037
+ };
1038
+ };
1039
+ /**
1040
+ * Forbidden
1041
+ */
1042
+ 403: {
1043
+ error: {
1044
+ code: string;
1045
+ message: string;
1046
+ details?: {
1047
+ [key: string]: unknown;
1048
+ };
1049
+ };
1050
+ };
1051
+ /**
1052
+ * Not found
1053
+ */
1054
+ 404: {
1055
+ error: {
1056
+ code: string;
1057
+ message: string;
1058
+ details?: {
1059
+ [key: string]: unknown;
1060
+ };
1061
+ };
1062
+ };
1063
+ /**
1064
+ * Not acceptable
1065
+ */
1066
+ 406: {
1067
+ error: {
1068
+ code: string;
1069
+ message: string;
1070
+ details?: {
1071
+ [key: string]: unknown;
1072
+ };
1073
+ };
1074
+ };
1075
+ /**
1076
+ * Conflict
1077
+ */
1078
+ 409: {
1079
+ error: {
1080
+ code: string;
1081
+ message: string;
1082
+ details?: {
1083
+ [key: string]: unknown;
1084
+ };
1085
+ };
1086
+ };
1087
+ /**
1088
+ * Internal error
1089
+ */
1090
+ 500: {
1091
+ error: {
1092
+ code: string;
1093
+ message: string;
1094
+ details?: {
1095
+ [key: string]: unknown;
1096
+ };
1097
+ };
1098
+ };
1099
+ };
1100
+
1101
+ export type PatchByOrgByRepoError = PatchByOrgByRepoErrors[keyof PatchByOrgByRepoErrors];
1102
+
1103
+ export type PatchByOrgByRepoResponses = {
1104
+ /**
1105
+ * Repository updated
1106
+ */
1107
+ 200: {
1108
+ id: string;
1109
+ org: string;
1110
+ name: string;
1111
+ default_branch: string;
1112
+ head_oid: string | null;
1113
+ size_bytes: number;
1114
+ created_at: string;
1115
+ /**
1116
+ * Optionally add an upstream repository. You can configure automatic syncing from the upstream repository.
1117
+ */
1118
+ upstream: {
1119
+ /**
1120
+ * URL of the upstream repository
1121
+ */
1122
+ uri: string;
1123
+ /**
1124
+ * Automatic sync configuration, if enabled
1125
+ */
1126
+ autosync: {
1127
+ type: 'poll';
1128
+ /**
1129
+ * Polling period in seconds
1130
+ */
1131
+ period: number;
1132
+ /**
1133
+ * Conflict resolution strategy. "none" means sync will fail on conflicts.
1134
+ */
1135
+ resolution_strategy: 'none';
1136
+ } | null;
1137
+ /**
1138
+ * Timestamp of the last sync attempt
1139
+ */
1140
+ last_sync_attempt: string | null;
1141
+ /**
1142
+ * Timestamp of the last successful sync
1143
+ */
1144
+ last_sync_success: string | null;
1145
+ /**
1146
+ * Error message from the last failed sync attempt
1147
+ */
1148
+ last_sync_error: string | null;
1149
+ /**
1150
+ * Whether this upstream has an authentication credential configured
1151
+ */
1152
+ has_credential: boolean;
1153
+ /**
1154
+ * The host the credential is scoped to (e.g. "github.com")
1155
+ */
1156
+ credential_host: string | null;
1157
+ } | null;
1158
+ };
1159
+ };
1160
+
1161
+ export type PatchByOrgByRepoResponse = PatchByOrgByRepoResponses[keyof PatchByOrgByRepoResponses];
1162
+
1163
+ export type GetByOrgByRepoContentData = {
1164
+ body?: never;
1165
+ path: {
1166
+ org: string;
1167
+ repo: string;
1168
+ };
1169
+ query?: {
1170
+ oid?: string;
1171
+ path?: string;
1172
+ depth?: number;
1173
+ };
1174
+ url: '/{org}/{repo}/content';
1175
+ };
1176
+
1177
+ export type GetByOrgByRepoContentErrors = {
1178
+ /**
1179
+ * Invalid request
1180
+ */
1181
+ 400: {
1182
+ error: {
1183
+ code: string;
1184
+ message: string;
1185
+ details?: {
1186
+ [key: string]: unknown;
1187
+ };
1188
+ };
1189
+ };
1190
+ /**
1191
+ * Unauthorized
1192
+ */
1193
+ 401: {
1194
+ error: {
1195
+ code: string;
1196
+ message: string;
1197
+ details?: {
1198
+ [key: string]: unknown;
1199
+ };
1200
+ };
1201
+ };
1202
+ /**
1203
+ * Forbidden
1204
+ */
1205
+ 403: {
1206
+ error: {
1207
+ code: string;
1208
+ message: string;
1209
+ details?: {
1210
+ [key: string]: unknown;
1211
+ };
1212
+ };
1213
+ };
1214
+ /**
1215
+ * Not found
1216
+ */
1217
+ 404: {
1218
+ error: {
1219
+ code: string;
1220
+ message: string;
1221
+ details?: {
1222
+ [key: string]: unknown;
1223
+ };
1224
+ };
1225
+ };
1226
+ /**
1227
+ * Not acceptable
1228
+ */
1229
+ 406: {
1230
+ error: {
1231
+ code: string;
1232
+ message: string;
1233
+ details?: {
1234
+ [key: string]: unknown;
1235
+ };
1236
+ };
1237
+ };
1238
+ /**
1239
+ * Conflict
1240
+ */
1241
+ 409: {
1242
+ error: {
1243
+ code: string;
1244
+ message: string;
1245
+ details?: {
1246
+ [key: string]: unknown;
1247
+ };
1248
+ };
1249
+ };
1250
+ /**
1251
+ * Internal error
1252
+ */
1253
+ 500: {
1254
+ error: {
1255
+ code: string;
1256
+ message: string;
1257
+ details?: {
1258
+ [key: string]: unknown;
1259
+ };
1260
+ };
1261
+ };
1262
+ };
1263
+
1264
+ export type GetByOrgByRepoContentError = GetByOrgByRepoContentErrors[keyof GetByOrgByRepoContentErrors];
1265
+
1266
+ export type GetByOrgByRepoContentResponses = {
1267
+ /**
1268
+ * Content response
1269
+ */
1270
+ 200: {
1271
+ type: 'file';
1272
+ name: string;
1273
+ path: string;
1274
+ sha: string;
1275
+ size: number;
1276
+ encoding: 'base64';
1277
+ content: string;
1278
+ mode: number;
1279
+ } | {
1280
+ type: 'symlink';
1281
+ name: string;
1282
+ path: string;
1283
+ sha: string;
1284
+ size: number;
1285
+ encoding: 'base64';
1286
+ content: string;
1287
+ mode: number;
1288
+ } | {
1289
+ type: 'dir';
1290
+ name: string;
1291
+ path: string;
1292
+ sha: string;
1293
+ child_count: number;
1294
+ entries: Array<{
1295
+ type: 'file';
1296
+ name: string;
1297
+ path: string;
1298
+ sha: string;
1299
+ size: number;
1300
+ mode: number;
1301
+ } | {
1302
+ type: 'symlink';
1303
+ name: string;
1304
+ path: string;
1305
+ sha: string;
1306
+ size: number;
1307
+ mode: number;
1308
+ } | {
1309
+ type: 'dir';
1310
+ name: string;
1311
+ path: string;
1312
+ sha: string;
1313
+ }>;
1314
+ next_cursor: string | null;
1315
+ has_more: boolean;
1316
+ };
1317
+ };
1318
+
1319
+ export type GetByOrgByRepoContentResponse = GetByOrgByRepoContentResponses[keyof GetByOrgByRepoContentResponses];
1320
+
1321
+ export type GetByOrgByRepoBranchesData = {
1322
+ body?: never;
1323
+ path: {
1324
+ org: string;
1325
+ repo: string;
1326
+ };
1327
+ query?: {
1328
+ cursor?: string;
1329
+ limit?: number;
1330
+ };
1331
+ url: '/{org}/{repo}/branches';
1332
+ };
1333
+
1334
+ export type GetByOrgByRepoBranchesErrors = {
1335
+ /**
1336
+ * Invalid request
1337
+ */
1338
+ 400: {
1339
+ error: {
1340
+ code: string;
1341
+ message: string;
1342
+ details?: {
1343
+ [key: string]: unknown;
1344
+ };
1345
+ };
1346
+ };
1347
+ /**
1348
+ * Unauthorized
1349
+ */
1350
+ 401: {
1351
+ error: {
1352
+ code: string;
1353
+ message: string;
1354
+ details?: {
1355
+ [key: string]: unknown;
1356
+ };
1357
+ };
1358
+ };
1359
+ /**
1360
+ * Forbidden
1361
+ */
1362
+ 403: {
1363
+ error: {
1364
+ code: string;
1365
+ message: string;
1366
+ details?: {
1367
+ [key: string]: unknown;
1368
+ };
1369
+ };
1370
+ };
1371
+ /**
1372
+ * Not found
1373
+ */
1374
+ 404: {
1375
+ error: {
1376
+ code: string;
1377
+ message: string;
1378
+ details?: {
1379
+ [key: string]: unknown;
1380
+ };
1381
+ };
1382
+ };
1383
+ /**
1384
+ * Not acceptable
1385
+ */
1386
+ 406: {
1387
+ error: {
1388
+ code: string;
1389
+ message: string;
1390
+ details?: {
1391
+ [key: string]: unknown;
1392
+ };
1393
+ };
1394
+ };
1395
+ /**
1396
+ * Conflict
1397
+ */
1398
+ 409: {
1399
+ error: {
1400
+ code: string;
1401
+ message: string;
1402
+ details?: {
1403
+ [key: string]: unknown;
1404
+ };
1405
+ };
1406
+ };
1407
+ /**
1408
+ * Internal error
1409
+ */
1410
+ 500: {
1411
+ error: {
1412
+ code: string;
1413
+ message: string;
1414
+ details?: {
1415
+ [key: string]: unknown;
1416
+ };
1417
+ };
1418
+ };
1419
+ };
1420
+
1421
+ export type GetByOrgByRepoBranchesError = GetByOrgByRepoBranchesErrors[keyof GetByOrgByRepoBranchesErrors];
1422
+
1423
+ export type GetByOrgByRepoBranchesResponses = {
1424
+ /**
1425
+ * Branch list
1426
+ */
1427
+ 200: {
1428
+ next_cursor: string | null;
1429
+ has_more: boolean;
1430
+ branches: Array<{
1431
+ name: string;
1432
+ head_oid: string;
1433
+ is_default: boolean;
1434
+ }>;
1435
+ };
1436
+ };
1437
+
1438
+ export type GetByOrgByRepoBranchesResponse = GetByOrgByRepoBranchesResponses[keyof GetByOrgByRepoBranchesResponses];
1439
+
1440
+ export type PostByOrgByRepoBranchesData = {
1441
+ body: {
1442
+ name: string;
1443
+ from: string;
1444
+ };
1445
+ path: {
1446
+ org: string;
1447
+ repo: string;
1448
+ };
1449
+ query?: never;
1450
+ url: '/{org}/{repo}/branches';
1451
+ };
1452
+
1453
+ export type PostByOrgByRepoBranchesErrors = {
1454
+ /**
1455
+ * Invalid request
1456
+ */
1457
+ 400: {
1458
+ error: {
1459
+ code: string;
1460
+ message: string;
1461
+ details?: {
1462
+ [key: string]: unknown;
1463
+ };
1464
+ };
1465
+ };
1466
+ /**
1467
+ * Unauthorized
1468
+ */
1469
+ 401: {
1470
+ error: {
1471
+ code: string;
1472
+ message: string;
1473
+ details?: {
1474
+ [key: string]: unknown;
1475
+ };
1476
+ };
1477
+ };
1478
+ /**
1479
+ * Forbidden
1480
+ */
1481
+ 403: {
1482
+ error: {
1483
+ code: string;
1484
+ message: string;
1485
+ details?: {
1486
+ [key: string]: unknown;
1487
+ };
1488
+ };
1489
+ };
1490
+ /**
1491
+ * Not found
1492
+ */
1493
+ 404: {
1494
+ error: {
1495
+ code: string;
1496
+ message: string;
1497
+ details?: {
1498
+ [key: string]: unknown;
1499
+ };
1500
+ };
1501
+ };
1502
+ /**
1503
+ * Not acceptable
1504
+ */
1505
+ 406: {
1506
+ error: {
1507
+ code: string;
1508
+ message: string;
1509
+ details?: {
1510
+ [key: string]: unknown;
1511
+ };
1512
+ };
1513
+ };
1514
+ /**
1515
+ * Conflict
1516
+ */
1517
+ 409: {
1518
+ error: {
1519
+ code: string;
1520
+ message: string;
1521
+ details?: {
1522
+ [key: string]: unknown;
1523
+ };
1524
+ };
1525
+ };
1526
+ /**
1527
+ * Internal error
1528
+ */
1529
+ 500: {
1530
+ error: {
1531
+ code: string;
1532
+ message: string;
1533
+ details?: {
1534
+ [key: string]: unknown;
1535
+ };
1536
+ };
1537
+ };
1538
+ };
1539
+
1540
+ export type PostByOrgByRepoBranchesError = PostByOrgByRepoBranchesErrors[keyof PostByOrgByRepoBranchesErrors];
1541
+
1542
+ export type PostByOrgByRepoBranchesResponses = {
1543
+ /**
1544
+ * Branch created
1545
+ */
1546
+ 201: {
1547
+ name: string;
1548
+ head_oid: string;
1549
+ is_default: boolean;
1550
+ };
1551
+ };
1552
+
1553
+ export type PostByOrgByRepoBranchesResponse = PostByOrgByRepoBranchesResponses[keyof PostByOrgByRepoBranchesResponses];
1554
+
1555
+ export type DeleteByOrgByRepoBranchesByBranchData = {
1556
+ body?: never;
1557
+ path: {
1558
+ org: string;
1559
+ repo: string;
1560
+ branch: string;
1561
+ };
1562
+ query?: never;
1563
+ url: '/{org}/{repo}/branches/{branch}';
1564
+ };
1565
+
1566
+ export type DeleteByOrgByRepoBranchesByBranchErrors = {
1567
+ /**
1568
+ * Invalid request
1569
+ */
1570
+ 400: {
1571
+ error: {
1572
+ code: string;
1573
+ message: string;
1574
+ details?: {
1575
+ [key: string]: unknown;
1576
+ };
1577
+ };
1578
+ };
1579
+ /**
1580
+ * Unauthorized
1581
+ */
1582
+ 401: {
1583
+ error: {
1584
+ code: string;
1585
+ message: string;
1586
+ details?: {
1587
+ [key: string]: unknown;
1588
+ };
1589
+ };
1590
+ };
1591
+ /**
1592
+ * Forbidden
1593
+ */
1594
+ 403: {
1595
+ error: {
1596
+ code: string;
1597
+ message: string;
1598
+ details?: {
1599
+ [key: string]: unknown;
1600
+ };
1601
+ };
1602
+ };
1603
+ /**
1604
+ * Not found
1605
+ */
1606
+ 404: {
1607
+ error: {
1608
+ code: string;
1609
+ message: string;
1610
+ details?: {
1611
+ [key: string]: unknown;
1612
+ };
1613
+ };
1614
+ };
1615
+ /**
1616
+ * Not acceptable
1617
+ */
1618
+ 406: {
1619
+ error: {
1620
+ code: string;
1621
+ message: string;
1622
+ details?: {
1623
+ [key: string]: unknown;
1624
+ };
1625
+ };
1626
+ };
1627
+ /**
1628
+ * Conflict
1629
+ */
1630
+ 409: {
1631
+ error: {
1632
+ code: string;
1633
+ message: string;
1634
+ details?: {
1635
+ [key: string]: unknown;
1636
+ };
1637
+ };
1638
+ };
1639
+ /**
1640
+ * Internal error
1641
+ */
1642
+ 500: {
1643
+ error: {
1644
+ code: string;
1645
+ message: string;
1646
+ details?: {
1647
+ [key: string]: unknown;
1648
+ };
1649
+ };
1650
+ };
1651
+ };
1652
+
1653
+ export type DeleteByOrgByRepoBranchesByBranchError = DeleteByOrgByRepoBranchesByBranchErrors[keyof DeleteByOrgByRepoBranchesByBranchErrors];
1654
+
1655
+ export type DeleteByOrgByRepoBranchesByBranchResponses = {
1656
+ /**
1657
+ * Branch deleted
1658
+ */
1659
+ 200: {
1660
+ success: true;
1661
+ };
1662
+ };
1663
+
1664
+ export type DeleteByOrgByRepoBranchesByBranchResponse = DeleteByOrgByRepoBranchesByBranchResponses[keyof DeleteByOrgByRepoBranchesByBranchResponses];
1665
+
1666
+ export type GetByOrgByRepoCommitsData = {
1667
+ body?: never;
1668
+ path: {
1669
+ org: string;
1670
+ repo: string;
1671
+ };
1672
+ query?: {
1673
+ cursor?: string;
1674
+ limit?: number;
1675
+ ref?: string;
1676
+ };
1677
+ url: '/{org}/{repo}/commits';
1678
+ };
1679
+
1680
+ export type GetByOrgByRepoCommitsErrors = {
1681
+ /**
1682
+ * Invalid request
1683
+ */
1684
+ 400: {
1685
+ error: {
1686
+ code: string;
1687
+ message: string;
1688
+ details?: {
1689
+ [key: string]: unknown;
1690
+ };
1691
+ };
1692
+ };
1693
+ /**
1694
+ * Unauthorized
1695
+ */
1696
+ 401: {
1697
+ error: {
1698
+ code: string;
1699
+ message: string;
1700
+ details?: {
1701
+ [key: string]: unknown;
1702
+ };
1703
+ };
1704
+ };
1705
+ /**
1706
+ * Forbidden
1707
+ */
1708
+ 403: {
1709
+ error: {
1710
+ code: string;
1711
+ message: string;
1712
+ details?: {
1713
+ [key: string]: unknown;
1714
+ };
1715
+ };
1716
+ };
1717
+ /**
1718
+ * Not found
1719
+ */
1720
+ 404: {
1721
+ error: {
1722
+ code: string;
1723
+ message: string;
1724
+ details?: {
1725
+ [key: string]: unknown;
1726
+ };
1727
+ };
1728
+ };
1729
+ /**
1730
+ * Not acceptable
1731
+ */
1732
+ 406: {
1733
+ error: {
1734
+ code: string;
1735
+ message: string;
1736
+ details?: {
1737
+ [key: string]: unknown;
1738
+ };
1739
+ };
1740
+ };
1741
+ /**
1742
+ * Conflict
1743
+ */
1744
+ 409: {
1745
+ error: {
1746
+ code: string;
1747
+ message: string;
1748
+ details?: {
1749
+ [key: string]: unknown;
1750
+ };
1751
+ };
1752
+ };
1753
+ /**
1754
+ * Internal error
1755
+ */
1756
+ 500: {
1757
+ error: {
1758
+ code: string;
1759
+ message: string;
1760
+ details?: {
1761
+ [key: string]: unknown;
1762
+ };
1763
+ };
1764
+ };
1765
+ };
1766
+
1767
+ export type GetByOrgByRepoCommitsError = GetByOrgByRepoCommitsErrors[keyof GetByOrgByRepoCommitsErrors];
1768
+
1769
+ export type GetByOrgByRepoCommitsResponses = {
1770
+ /**
1771
+ * Commit list
1772
+ */
1773
+ 200: {
1774
+ next_cursor: string | null;
1775
+ has_more: boolean;
1776
+ commits: Array<{
1777
+ sha: string;
1778
+ message: string;
1779
+ author: {
1780
+ name: string;
1781
+ email: string;
1782
+ date?: string;
1783
+ };
1784
+ committer: {
1785
+ name: string;
1786
+ email: string;
1787
+ date?: string;
1788
+ };
1789
+ }>;
1790
+ };
1791
+ };
1792
+
1793
+ export type GetByOrgByRepoCommitsResponse = GetByOrgByRepoCommitsResponses[keyof GetByOrgByRepoCommitsResponses];
1794
+
1795
+ export type PostByOrgByRepoCommitsData = {
1796
+ body: {
1797
+ branch: string;
1798
+ message: string;
1799
+ author: {
1800
+ name: string;
1801
+ email: string;
1802
+ date?: string;
1803
+ };
1804
+ committer?: {
1805
+ name: string;
1806
+ email: string;
1807
+ date?: string;
1808
+ };
1809
+ base_sha?: string;
1810
+ files: Array<{
1811
+ path: string;
1812
+ content: string;
1813
+ encoding?: 'utf-8' | 'base64';
1814
+ action?: 'upsert';
1815
+ mode?: '100644' | '100755';
1816
+ } | {
1817
+ path: string;
1818
+ action: 'delete';
1819
+ }>;
1820
+ };
1821
+ path: {
1822
+ org: string;
1823
+ repo: string;
1824
+ };
1825
+ query?: never;
1826
+ url: '/{org}/{repo}/commits';
1827
+ };
1828
+
1829
+ export type PostByOrgByRepoCommitsErrors = {
1830
+ /**
1831
+ * Invalid request
1832
+ */
1833
+ 400: {
1834
+ error: {
1835
+ code: string;
1836
+ message: string;
1837
+ details?: {
1838
+ [key: string]: unknown;
1839
+ };
1840
+ };
1841
+ };
1842
+ /**
1843
+ * Unauthorized
1844
+ */
1845
+ 401: {
1846
+ error: {
1847
+ code: string;
1848
+ message: string;
1849
+ details?: {
1850
+ [key: string]: unknown;
1851
+ };
1852
+ };
1853
+ };
1854
+ /**
1855
+ * Forbidden
1856
+ */
1857
+ 403: {
1858
+ error: {
1859
+ code: string;
1860
+ message: string;
1861
+ details?: {
1862
+ [key: string]: unknown;
1863
+ };
1864
+ };
1865
+ };
1866
+ /**
1867
+ * Not found
1868
+ */
1869
+ 404: {
1870
+ error: {
1871
+ code: string;
1872
+ message: string;
1873
+ details?: {
1874
+ [key: string]: unknown;
1875
+ };
1876
+ };
1877
+ };
1878
+ /**
1879
+ * Not acceptable
1880
+ */
1881
+ 406: {
1882
+ error: {
1883
+ code: string;
1884
+ message: string;
1885
+ details?: {
1886
+ [key: string]: unknown;
1887
+ };
1888
+ };
1889
+ };
1890
+ /**
1891
+ * Conflict
1892
+ */
1893
+ 409: {
1894
+ error: {
1895
+ code: string;
1896
+ message: string;
1897
+ details?: {
1898
+ [key: string]: unknown;
1899
+ };
1900
+ };
1901
+ };
1902
+ /**
1903
+ * Internal error
1904
+ */
1905
+ 500: {
1906
+ error: {
1907
+ code: string;
1908
+ message: string;
1909
+ details?: {
1910
+ [key: string]: unknown;
1911
+ };
1912
+ };
1913
+ };
1914
+ };
1915
+
1916
+ export type PostByOrgByRepoCommitsError = PostByOrgByRepoCommitsErrors[keyof PostByOrgByRepoCommitsErrors];
1917
+
1918
+ export type PostByOrgByRepoCommitsResponses = {
1919
+ /**
1920
+ * Commit created
1921
+ */
1922
+ 201: {
1923
+ sha: string;
1924
+ branch: string;
1925
+ message: string;
1926
+ };
1927
+ };
1928
+
1929
+ export type PostByOrgByRepoCommitsResponse = PostByOrgByRepoCommitsResponses[keyof PostByOrgByRepoCommitsResponses];
1930
+
1931
+ export type GetByOrgByRepoCommitsByShaData = {
1932
+ body?: never;
1933
+ path: {
1934
+ org: string;
1935
+ repo: string;
1936
+ sha: string;
1937
+ };
1938
+ query?: never;
1939
+ url: '/{org}/{repo}/commits/{sha}';
1940
+ };
1941
+
1942
+ export type GetByOrgByRepoCommitsByShaErrors = {
1943
+ /**
1944
+ * Invalid request
1945
+ */
1946
+ 400: {
1947
+ error: {
1948
+ code: string;
1949
+ message: string;
1950
+ details?: {
1951
+ [key: string]: unknown;
1952
+ };
1953
+ };
1954
+ };
1955
+ /**
1956
+ * Unauthorized
1957
+ */
1958
+ 401: {
1959
+ error: {
1960
+ code: string;
1961
+ message: string;
1962
+ details?: {
1963
+ [key: string]: unknown;
1964
+ };
1965
+ };
1966
+ };
1967
+ /**
1968
+ * Forbidden
1969
+ */
1970
+ 403: {
1971
+ error: {
1972
+ code: string;
1973
+ message: string;
1974
+ details?: {
1975
+ [key: string]: unknown;
1976
+ };
1977
+ };
1978
+ };
1979
+ /**
1980
+ * Not found
1981
+ */
1982
+ 404: {
1983
+ error: {
1984
+ code: string;
1985
+ message: string;
1986
+ details?: {
1987
+ [key: string]: unknown;
1988
+ };
1989
+ };
1990
+ };
1991
+ /**
1992
+ * Not acceptable
1993
+ */
1994
+ 406: {
1995
+ error: {
1996
+ code: string;
1997
+ message: string;
1998
+ details?: {
1999
+ [key: string]: unknown;
2000
+ };
2001
+ };
2002
+ };
2003
+ /**
2004
+ * Conflict
2005
+ */
2006
+ 409: {
2007
+ error: {
2008
+ code: string;
2009
+ message: string;
2010
+ details?: {
2011
+ [key: string]: unknown;
2012
+ };
2013
+ };
2014
+ };
2015
+ /**
2016
+ * Internal error
2017
+ */
2018
+ 500: {
2019
+ error: {
2020
+ code: string;
2021
+ message: string;
2022
+ details?: {
2023
+ [key: string]: unknown;
2024
+ };
2025
+ };
2026
+ };
2027
+ };
2028
+
2029
+ export type GetByOrgByRepoCommitsByShaError = GetByOrgByRepoCommitsByShaErrors[keyof GetByOrgByRepoCommitsByShaErrors];
2030
+
2031
+ export type GetByOrgByRepoCommitsByShaResponses = {
2032
+ /**
2033
+ * Commit
2034
+ */
2035
+ 200: {
2036
+ sha: string;
2037
+ message: string;
2038
+ author: {
2039
+ name: string;
2040
+ email: string;
2041
+ date?: string;
2042
+ };
2043
+ committer: {
2044
+ name: string;
2045
+ email: string;
2046
+ date?: string;
2047
+ };
2048
+ };
2049
+ };
2050
+
2051
+ export type GetByOrgByRepoCommitsByShaResponse = GetByOrgByRepoCommitsByShaResponses[keyof GetByOrgByRepoCommitsByShaResponses];
2052
+
2053
+ export type GetByOrgByRepoDiffData = {
2054
+ body?: never;
2055
+ path: {
2056
+ org: string;
2057
+ repo: string;
2058
+ };
2059
+ query: {
2060
+ base: string;
2061
+ head: string;
2062
+ };
2063
+ url: '/{org}/{repo}/diff';
2064
+ };
2065
+
2066
+ export type GetByOrgByRepoDiffErrors = {
2067
+ /**
2068
+ * Invalid request
2069
+ */
2070
+ 400: {
2071
+ error: {
2072
+ code: string;
2073
+ message: string;
2074
+ details?: {
2075
+ [key: string]: unknown;
2076
+ };
2077
+ };
2078
+ };
2079
+ /**
2080
+ * Unauthorized
2081
+ */
2082
+ 401: {
2083
+ error: {
2084
+ code: string;
2085
+ message: string;
2086
+ details?: {
2087
+ [key: string]: unknown;
2088
+ };
2089
+ };
2090
+ };
2091
+ /**
2092
+ * Forbidden
2093
+ */
2094
+ 403: {
2095
+ error: {
2096
+ code: string;
2097
+ message: string;
2098
+ details?: {
2099
+ [key: string]: unknown;
2100
+ };
2101
+ };
2102
+ };
2103
+ /**
2104
+ * Not found
2105
+ */
2106
+ 404: {
2107
+ error: {
2108
+ code: string;
2109
+ message: string;
2110
+ details?: {
2111
+ [key: string]: unknown;
2112
+ };
2113
+ };
2114
+ };
2115
+ /**
2116
+ * Not acceptable
2117
+ */
2118
+ 406: {
2119
+ error: {
2120
+ code: string;
2121
+ message: string;
2122
+ details?: {
2123
+ [key: string]: unknown;
2124
+ };
2125
+ };
2126
+ };
2127
+ /**
2128
+ * Conflict
2129
+ */
2130
+ 409: {
2131
+ error: {
2132
+ code: string;
2133
+ message: string;
2134
+ details?: {
2135
+ [key: string]: unknown;
2136
+ };
2137
+ };
2138
+ };
2139
+ /**
2140
+ * Internal error
2141
+ */
2142
+ 500: {
2143
+ error: {
2144
+ code: string;
2145
+ message: string;
2146
+ details?: {
2147
+ [key: string]: unknown;
2148
+ };
2149
+ };
2150
+ };
2151
+ };
2152
+
2153
+ export type GetByOrgByRepoDiffError = GetByOrgByRepoDiffErrors[keyof GetByOrgByRepoDiffErrors];
2154
+
2155
+ export type GetByOrgByRepoDiffResponses = {
2156
+ /**
2157
+ * Diff response
2158
+ */
2159
+ 200: {
2160
+ base: string;
2161
+ head: string;
2162
+ truncated: boolean;
2163
+ stats: {
2164
+ files: number;
2165
+ additions: number;
2166
+ deletions: number;
2167
+ changes: number;
2168
+ };
2169
+ files: Array<{
2170
+ path: string;
2171
+ status: 'A' | 'M' | 'D' | 'R' | 'C' | 'T';
2172
+ old_path?: string;
2173
+ bytes?: number;
2174
+ is_eof?: boolean;
2175
+ raw?: string;
2176
+ }>;
2177
+ filtered_files: Array<{
2178
+ path: string;
2179
+ status: 'A' | 'M' | 'D' | 'R' | 'C' | 'T';
2180
+ old_path?: string;
2181
+ bytes?: number;
2182
+ is_eof?: boolean;
2183
+ }>;
2184
+ };
2185
+ };
2186
+
2187
+ export type GetByOrgByRepoDiffResponse = GetByOrgByRepoDiffResponses[keyof GetByOrgByRepoDiffResponses];
2188
+
2189
+ export type GetByOrgByRepoWebhooksData = {
2190
+ body?: never;
2191
+ path: {
2192
+ org: string;
2193
+ repo: string;
2194
+ };
2195
+ query?: never;
2196
+ url: '/{org}/{repo}/webhooks';
2197
+ };
2198
+
2199
+ export type GetByOrgByRepoWebhooksErrors = {
2200
+ /**
2201
+ * Invalid request
2202
+ */
2203
+ 400: {
2204
+ error: {
2205
+ code: string;
2206
+ message: string;
2207
+ details?: {
2208
+ [key: string]: unknown;
2209
+ };
2210
+ };
2211
+ };
2212
+ /**
2213
+ * Unauthorized
2214
+ */
2215
+ 401: {
2216
+ error: {
2217
+ code: string;
2218
+ message: string;
2219
+ details?: {
2220
+ [key: string]: unknown;
2221
+ };
2222
+ };
2223
+ };
2224
+ /**
2225
+ * Forbidden
2226
+ */
2227
+ 403: {
2228
+ error: {
2229
+ code: string;
2230
+ message: string;
2231
+ details?: {
2232
+ [key: string]: unknown;
2233
+ };
2234
+ };
2235
+ };
2236
+ /**
2237
+ * Not found
2238
+ */
2239
+ 404: {
2240
+ error: {
2241
+ code: string;
2242
+ message: string;
2243
+ details?: {
2244
+ [key: string]: unknown;
2245
+ };
2246
+ };
2247
+ };
2248
+ /**
2249
+ * Not acceptable
2250
+ */
2251
+ 406: {
2252
+ error: {
2253
+ code: string;
2254
+ message: string;
2255
+ details?: {
2256
+ [key: string]: unknown;
2257
+ };
2258
+ };
2259
+ };
2260
+ /**
2261
+ * Conflict
2262
+ */
2263
+ 409: {
2264
+ error: {
2265
+ code: string;
2266
+ message: string;
2267
+ details?: {
2268
+ [key: string]: unknown;
2269
+ };
2270
+ };
2271
+ };
2272
+ /**
2273
+ * Internal error
2274
+ */
2275
+ 500: {
2276
+ error: {
2277
+ code: string;
2278
+ message: string;
2279
+ details?: {
2280
+ [key: string]: unknown;
2281
+ };
2282
+ };
2283
+ };
2284
+ };
2285
+
2286
+ export type GetByOrgByRepoWebhooksError = GetByOrgByRepoWebhooksErrors[keyof GetByOrgByRepoWebhooksErrors];
2287
+
2288
+ export type GetByOrgByRepoWebhooksResponses = {
2289
+ /**
2290
+ * Webhook list
2291
+ */
2292
+ 200: {
2293
+ webhooks: Array<{
2294
+ id: string;
2295
+ url: string;
2296
+ events: Array<'push'>;
2297
+ branches: Array<string> | null;
2298
+ globs: Array<string> | null;
2299
+ created_at: string;
2300
+ updated_at: string;
2301
+ }>;
2302
+ };
2303
+ };
2304
+
2305
+ export type GetByOrgByRepoWebhooksResponse = GetByOrgByRepoWebhooksResponses[keyof GetByOrgByRepoWebhooksResponses];
2306
+
2307
+ export type PostByOrgByRepoWebhooksData = {
2308
+ body: {
2309
+ url: string;
2310
+ events?: Array<'push'>;
2311
+ branches?: Array<string>;
2312
+ globs?: Array<string>;
2313
+ secret?: string;
2314
+ };
2315
+ path: {
2316
+ org: string;
2317
+ repo: string;
2318
+ };
2319
+ query?: never;
2320
+ url: '/{org}/{repo}/webhooks';
2321
+ };
2322
+
2323
+ export type PostByOrgByRepoWebhooksErrors = {
2324
+ /**
2325
+ * Invalid request
2326
+ */
2327
+ 400: {
2328
+ error: {
2329
+ code: string;
2330
+ message: string;
2331
+ details?: {
2332
+ [key: string]: unknown;
2333
+ };
2334
+ };
2335
+ };
2336
+ /**
2337
+ * Unauthorized
2338
+ */
2339
+ 401: {
2340
+ error: {
2341
+ code: string;
2342
+ message: string;
2343
+ details?: {
2344
+ [key: string]: unknown;
2345
+ };
2346
+ };
2347
+ };
2348
+ /**
2349
+ * Forbidden
2350
+ */
2351
+ 403: {
2352
+ error: {
2353
+ code: string;
2354
+ message: string;
2355
+ details?: {
2356
+ [key: string]: unknown;
2357
+ };
2358
+ };
2359
+ };
2360
+ /**
2361
+ * Not found
2362
+ */
2363
+ 404: {
2364
+ error: {
2365
+ code: string;
2366
+ message: string;
2367
+ details?: {
2368
+ [key: string]: unknown;
2369
+ };
2370
+ };
2371
+ };
2372
+ /**
2373
+ * Not acceptable
2374
+ */
2375
+ 406: {
2376
+ error: {
2377
+ code: string;
2378
+ message: string;
2379
+ details?: {
2380
+ [key: string]: unknown;
2381
+ };
2382
+ };
2383
+ };
2384
+ /**
2385
+ * Conflict
2386
+ */
2387
+ 409: {
2388
+ error: {
2389
+ code: string;
2390
+ message: string;
2391
+ details?: {
2392
+ [key: string]: unknown;
2393
+ };
2394
+ };
2395
+ };
2396
+ /**
2397
+ * Internal error
2398
+ */
2399
+ 500: {
2400
+ error: {
2401
+ code: string;
2402
+ message: string;
2403
+ details?: {
2404
+ [key: string]: unknown;
2405
+ };
2406
+ };
2407
+ };
2408
+ };
2409
+
2410
+ export type PostByOrgByRepoWebhooksError = PostByOrgByRepoWebhooksErrors[keyof PostByOrgByRepoWebhooksErrors];
2411
+
2412
+ export type PostByOrgByRepoWebhooksResponses = {
2413
+ /**
2414
+ * Webhook created
2415
+ */
2416
+ 201: {
2417
+ id: string;
2418
+ url: string;
2419
+ events: Array<'push'>;
2420
+ branches: Array<string> | null;
2421
+ globs: Array<string> | null;
2422
+ created_at: string;
2423
+ updated_at: string;
2424
+ secret: string;
2425
+ };
2426
+ };
2427
+
2428
+ export type PostByOrgByRepoWebhooksResponse = PostByOrgByRepoWebhooksResponses[keyof PostByOrgByRepoWebhooksResponses];
2429
+
2430
+ export type DeleteByOrgByRepoWebhooksByWebhookIdData = {
2431
+ body?: never;
2432
+ path: {
2433
+ org: string;
2434
+ repo: string;
2435
+ webhookId: string;
2436
+ };
2437
+ query?: never;
2438
+ url: '/{org}/{repo}/webhooks/{webhookId}';
2439
+ };
2440
+
2441
+ export type DeleteByOrgByRepoWebhooksByWebhookIdErrors = {
2442
+ /**
2443
+ * Invalid request
2444
+ */
2445
+ 400: {
2446
+ error: {
2447
+ code: string;
2448
+ message: string;
2449
+ details?: {
2450
+ [key: string]: unknown;
2451
+ };
2452
+ };
2453
+ };
2454
+ /**
2455
+ * Unauthorized
2456
+ */
2457
+ 401: {
2458
+ error: {
2459
+ code: string;
2460
+ message: string;
2461
+ details?: {
2462
+ [key: string]: unknown;
2463
+ };
2464
+ };
2465
+ };
2466
+ /**
2467
+ * Forbidden
2468
+ */
2469
+ 403: {
2470
+ error: {
2471
+ code: string;
2472
+ message: string;
2473
+ details?: {
2474
+ [key: string]: unknown;
2475
+ };
2476
+ };
2477
+ };
2478
+ /**
2479
+ * Not found
2480
+ */
2481
+ 404: {
2482
+ error: {
2483
+ code: string;
2484
+ message: string;
2485
+ details?: {
2486
+ [key: string]: unknown;
2487
+ };
2488
+ };
2489
+ };
2490
+ /**
2491
+ * Not acceptable
2492
+ */
2493
+ 406: {
2494
+ error: {
2495
+ code: string;
2496
+ message: string;
2497
+ details?: {
2498
+ [key: string]: unknown;
2499
+ };
2500
+ };
2501
+ };
2502
+ /**
2503
+ * Conflict
2504
+ */
2505
+ 409: {
2506
+ error: {
2507
+ code: string;
2508
+ message: string;
2509
+ details?: {
2510
+ [key: string]: unknown;
2511
+ };
2512
+ };
2513
+ };
2514
+ /**
2515
+ * Internal error
2516
+ */
2517
+ 500: {
2518
+ error: {
2519
+ code: string;
2520
+ message: string;
2521
+ details?: {
2522
+ [key: string]: unknown;
2523
+ };
2524
+ };
2525
+ };
2526
+ };
2527
+
2528
+ export type DeleteByOrgByRepoWebhooksByWebhookIdError = DeleteByOrgByRepoWebhooksByWebhookIdErrors[keyof DeleteByOrgByRepoWebhooksByWebhookIdErrors];
2529
+
2530
+ export type DeleteByOrgByRepoWebhooksByWebhookIdResponses = {
2531
+ /**
2532
+ * Webhook deleted
2533
+ */
2534
+ 200: {
2535
+ success: true;
2536
+ };
2537
+ };
2538
+
2539
+ export type DeleteByOrgByRepoWebhooksByWebhookIdResponse = DeleteByOrgByRepoWebhooksByWebhookIdResponses[keyof DeleteByOrgByRepoWebhooksByWebhookIdResponses];
2540
+
2541
+ export type GetByOrgData = {
2542
+ body?: never;
2543
+ path: {
2544
+ org: string;
2545
+ };
2546
+ query?: never;
2547
+ url: '/{org}';
2548
+ };
2549
+
2550
+ export type GetByOrgErrors = {
2551
+ /**
2552
+ * Invalid request
2553
+ */
2554
+ 400: {
2555
+ error: {
2556
+ code: string;
2557
+ message: string;
2558
+ details?: {
2559
+ [key: string]: unknown;
2560
+ };
2561
+ };
2562
+ };
2563
+ /**
2564
+ * Unauthorized
2565
+ */
2566
+ 401: {
2567
+ error: {
2568
+ code: string;
2569
+ message: string;
2570
+ details?: {
2571
+ [key: string]: unknown;
2572
+ };
2573
+ };
2574
+ };
2575
+ /**
2576
+ * Forbidden
2577
+ */
2578
+ 403: {
2579
+ error: {
2580
+ code: string;
2581
+ message: string;
2582
+ details?: {
2583
+ [key: string]: unknown;
2584
+ };
2585
+ };
2586
+ };
2587
+ /**
2588
+ * Not found
2589
+ */
2590
+ 404: {
2591
+ error: {
2592
+ code: string;
2593
+ message: string;
2594
+ details?: {
2595
+ [key: string]: unknown;
2596
+ };
2597
+ };
2598
+ };
2599
+ /**
2600
+ * Not acceptable
2601
+ */
2602
+ 406: {
2603
+ error: {
2604
+ code: string;
2605
+ message: string;
2606
+ details?: {
2607
+ [key: string]: unknown;
2608
+ };
2609
+ };
2610
+ };
2611
+ /**
2612
+ * Conflict
2613
+ */
2614
+ 409: {
2615
+ error: {
2616
+ code: string;
2617
+ message: string;
2618
+ details?: {
2619
+ [key: string]: unknown;
2620
+ };
2621
+ };
2622
+ };
2623
+ /**
2624
+ * Internal error
2625
+ */
2626
+ 500: {
2627
+ error: {
2628
+ code: string;
2629
+ message: string;
2630
+ details?: {
2631
+ [key: string]: unknown;
2632
+ };
2633
+ };
2634
+ };
2635
+ };
2636
+
2637
+ export type GetByOrgError = GetByOrgErrors[keyof GetByOrgErrors];
2638
+
2639
+ export type GetByOrgResponses = {
2640
+ /**
2641
+ * Organization summary
2642
+ */
2643
+ 200: {
2644
+ created_at: string;
2645
+ num_repos: number;
2646
+ };
2647
+ };
2648
+
2649
+ export type GetByOrgResponse = GetByOrgResponses[keyof GetByOrgResponses];