@mesadev/rest 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/index.d.mts +3361 -0
  2. package/dist/index.d.mts.map +1 -0
  3. package/dist/index.mjs +944 -0
  4. package/dist/index.mjs.map +1 -0
  5. package/package.json +8 -6
  6. package/src/index.ts +18 -18
  7. package/src/sdk.gen.ts +13 -13
  8. package/src/types.gen.ts +32 -32
  9. package/dist/client/client.gen.d.ts +0 -3
  10. package/dist/client/client.gen.d.ts.map +0 -1
  11. package/dist/client/client.gen.js +0 -235
  12. package/dist/client/client.gen.js.map +0 -1
  13. package/dist/client/index.d.ts +0 -9
  14. package/dist/client/index.d.ts.map +0 -1
  15. package/dist/client/index.js +0 -7
  16. package/dist/client/index.js.map +0 -1
  17. package/dist/client/types.gen.d.ts +0 -118
  18. package/dist/client/types.gen.d.ts.map +0 -1
  19. package/dist/client/types.gen.js +0 -3
  20. package/dist/client/types.gen.js.map +0 -1
  21. package/dist/client/utils.gen.d.ts +0 -34
  22. package/dist/client/utils.gen.d.ts.map +0 -1
  23. package/dist/client/utils.gen.js +0 -229
  24. package/dist/client/utils.gen.js.map +0 -1
  25. package/dist/client.gen.d.ts +0 -13
  26. package/dist/client.gen.d.ts.map +0 -1
  27. package/dist/client.gen.js +0 -4
  28. package/dist/client.gen.js.map +0 -1
  29. package/dist/core/auth.gen.d.ts +0 -19
  30. package/dist/core/auth.gen.d.ts.map +0 -1
  31. package/dist/core/auth.gen.js +0 -15
  32. package/dist/core/auth.gen.js.map +0 -1
  33. package/dist/core/bodySerializer.gen.d.ts +0 -26
  34. package/dist/core/bodySerializer.gen.d.ts.map +0 -1
  35. package/dist/core/bodySerializer.gen.js +0 -58
  36. package/dist/core/bodySerializer.gen.js.map +0 -1
  37. package/dist/core/params.gen.d.ts +0 -44
  38. package/dist/core/params.gen.d.ts.map +0 -1
  39. package/dist/core/params.gen.js +0 -101
  40. package/dist/core/params.gen.js.map +0 -1
  41. package/dist/core/pathSerializer.gen.d.ts +0 -34
  42. package/dist/core/pathSerializer.gen.d.ts.map +0 -1
  43. package/dist/core/pathSerializer.gen.js +0 -107
  44. package/dist/core/pathSerializer.gen.js.map +0 -1
  45. package/dist/core/queryKeySerializer.gen.d.ts +0 -19
  46. package/dist/core/queryKeySerializer.gen.d.ts.map +0 -1
  47. package/dist/core/queryKeySerializer.gen.js +0 -93
  48. package/dist/core/queryKeySerializer.gen.js.map +0 -1
  49. package/dist/core/serverSentEvents.gen.d.ts +0 -72
  50. package/dist/core/serverSentEvents.gen.d.ts.map +0 -1
  51. package/dist/core/serverSentEvents.gen.js +0 -134
  52. package/dist/core/serverSentEvents.gen.js.map +0 -1
  53. package/dist/core/types.gen.d.ts +0 -79
  54. package/dist/core/types.gen.d.ts.map +0 -1
  55. package/dist/core/types.gen.js +0 -3
  56. package/dist/core/types.gen.js.map +0 -1
  57. package/dist/core/utils.gen.d.ts +0 -20
  58. package/dist/core/utils.gen.d.ts.map +0 -1
  59. package/dist/core/utils.gen.js +0 -88
  60. package/dist/core/utils.gen.js.map +0 -1
  61. package/dist/index.d.ts +0 -3
  62. package/dist/index.d.ts.map +0 -1
  63. package/dist/index.js +0 -3
  64. package/dist/index.js.map +0 -1
  65. package/dist/sdk.gen.d.ts +0 -154
  66. package/dist/sdk.gen.d.ts.map +0 -1
  67. package/dist/sdk.gen.js +0 -261
  68. package/dist/sdk.gen.js.map +0 -1
  69. package/dist/types.gen.d.ts +0 -2895
  70. package/dist/types.gen.d.ts.map +0 -1
  71. package/dist/types.gen.js +0 -3
  72. package/dist/types.gen.js.map +0 -1
@@ -0,0 +1,3361 @@
1
+ //#region src/core/auth.gen.d.ts
2
+ type AuthToken = string | undefined;
3
+ interface Auth {
4
+ /**
5
+ * Which part of the request do we use to send the auth?
6
+ *
7
+ * @default 'header'
8
+ */
9
+ in?: 'header' | 'query' | 'cookie';
10
+ /**
11
+ * Header or query parameter name.
12
+ *
13
+ * @default 'Authorization'
14
+ */
15
+ name?: string;
16
+ scheme?: 'basic' | 'bearer';
17
+ type: 'apiKey' | 'http';
18
+ }
19
+ //#endregion
20
+ //#region src/core/pathSerializer.gen.d.ts
21
+ interface SerializerOptions<T> {
22
+ /**
23
+ * @default true
24
+ */
25
+ explode: boolean;
26
+ style: T;
27
+ }
28
+ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
29
+ type ObjectStyle = 'form' | 'deepObject';
30
+ //#endregion
31
+ //#region src/core/bodySerializer.gen.d.ts
32
+ type QuerySerializer = (query: Record<string, unknown>) => string;
33
+ type BodySerializer = (body: any) => any;
34
+ type QuerySerializerOptionsObject = {
35
+ allowReserved?: boolean;
36
+ array?: Partial<SerializerOptions<ArrayStyle>>;
37
+ object?: Partial<SerializerOptions<ObjectStyle>>;
38
+ };
39
+ type QuerySerializerOptions = QuerySerializerOptionsObject & {
40
+ /**
41
+ * Per-parameter serialization overrides. When provided, these settings
42
+ * override the global array/object settings for specific parameter names.
43
+ */
44
+ parameters?: Record<string, QuerySerializerOptionsObject>;
45
+ };
46
+ //#endregion
47
+ //#region src/core/types.gen.d.ts
48
+ type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
49
+ type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
50
+ /**
51
+ * Returns the final request URL.
52
+ */
53
+ buildUrl: BuildUrlFn;
54
+ getConfig: () => Config;
55
+ request: RequestFn;
56
+ setConfig: (config: Config) => Config;
57
+ } & { [K in HttpMethod]: MethodFn } & ([SseFn] extends [never] ? {
58
+ sse?: never;
59
+ } : {
60
+ sse: { [K in HttpMethod]: SseFn };
61
+ });
62
+ interface Config$1 {
63
+ /**
64
+ * Auth token or a function returning auth token. The resolved value will be
65
+ * added to the request payload as defined by its `security` array.
66
+ */
67
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
68
+ /**
69
+ * A function for serializing request body parameter. By default,
70
+ * {@link JSON.stringify()} will be used.
71
+ */
72
+ bodySerializer?: BodySerializer | null;
73
+ /**
74
+ * An object containing any HTTP headers that you want to pre-populate your
75
+ * `Headers` object with.
76
+ *
77
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
78
+ */
79
+ headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
80
+ /**
81
+ * The request method.
82
+ *
83
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
84
+ */
85
+ method?: Uppercase<HttpMethod>;
86
+ /**
87
+ * A function for serializing request query parameters. By default, arrays
88
+ * will be exploded in form style, objects will be exploded in deepObject
89
+ * style, and reserved characters are percent-encoded.
90
+ *
91
+ * This method will have no effect if the native `paramsSerializer()` Axios
92
+ * API function is used.
93
+ *
94
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
95
+ */
96
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
97
+ /**
98
+ * A function validating request data. This is useful if you want to ensure
99
+ * the request conforms to the desired shape, so it can be safely sent to
100
+ * the server.
101
+ */
102
+ requestValidator?: (data: unknown) => Promise<unknown>;
103
+ /**
104
+ * A function transforming response data before it's returned. This is useful
105
+ * for post-processing data, e.g. converting ISO strings into Date objects.
106
+ */
107
+ responseTransformer?: (data: unknown) => Promise<unknown>;
108
+ /**
109
+ * A function validating response data. This is useful if you want to ensure
110
+ * the response conforms to the desired shape, so it can be safely passed to
111
+ * the transformers and returned to the user.
112
+ */
113
+ responseValidator?: (data: unknown) => Promise<unknown>;
114
+ }
115
+ //#endregion
116
+ //#region src/core/serverSentEvents.gen.d.ts
117
+ type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
118
+ /**
119
+ * Fetch API implementation. You can use this option to provide a custom
120
+ * fetch instance.
121
+ *
122
+ * @default globalThis.fetch
123
+ */
124
+ fetch?: typeof fetch;
125
+ /**
126
+ * Implementing clients can call request interceptors inside this hook.
127
+ */
128
+ onRequest?: (url: string, init: RequestInit) => Promise<Request>;
129
+ /**
130
+ * Callback invoked when a network or parsing error occurs during streaming.
131
+ *
132
+ * This option applies only if the endpoint returns a stream of events.
133
+ *
134
+ * @param error The error that occurred.
135
+ */
136
+ onSseError?: (error: unknown) => void;
137
+ /**
138
+ * Callback invoked when an event is streamed from the server.
139
+ *
140
+ * This option applies only if the endpoint returns a stream of events.
141
+ *
142
+ * @param event Event streamed from the server.
143
+ * @returns Nothing (void).
144
+ */
145
+ onSseEvent?: (event: StreamEvent<TData>) => void;
146
+ serializedBody?: RequestInit['body'];
147
+ /**
148
+ * Default retry delay in milliseconds.
149
+ *
150
+ * This option applies only if the endpoint returns a stream of events.
151
+ *
152
+ * @default 3000
153
+ */
154
+ sseDefaultRetryDelay?: number;
155
+ /**
156
+ * Maximum number of retry attempts before giving up.
157
+ */
158
+ sseMaxRetryAttempts?: number;
159
+ /**
160
+ * Maximum retry delay in milliseconds.
161
+ *
162
+ * Applies only when exponential backoff is used.
163
+ *
164
+ * This option applies only if the endpoint returns a stream of events.
165
+ *
166
+ * @default 30000
167
+ */
168
+ sseMaxRetryDelay?: number;
169
+ /**
170
+ * Optional sleep function for retry backoff.
171
+ *
172
+ * Defaults to using `setTimeout`.
173
+ */
174
+ sseSleepFn?: (ms: number) => Promise<void>;
175
+ url: string;
176
+ };
177
+ interface StreamEvent<TData = unknown> {
178
+ data: TData;
179
+ event?: string;
180
+ id?: string;
181
+ retry?: number;
182
+ }
183
+ type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
184
+ stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
185
+ };
186
+ //#endregion
187
+ //#region src/client/utils.gen.d.ts
188
+ type ErrInterceptor<Err, Res, Req, Options> = (error: Err, response: Res, request: Req, options: Options) => Err | Promise<Err>;
189
+ type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
190
+ type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
191
+ declare class Interceptors<Interceptor> {
192
+ fns: Array<Interceptor | null>;
193
+ clear(): void;
194
+ eject(id: number | Interceptor): void;
195
+ exists(id: number | Interceptor): boolean;
196
+ getInterceptorIndex(id: number | Interceptor): number;
197
+ update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
198
+ use(fn: Interceptor): number;
199
+ }
200
+ interface Middleware<Req, Res, Err, Options> {
201
+ error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;
202
+ request: Interceptors<ReqInterceptor<Req, Options>>;
203
+ response: Interceptors<ResInterceptor<Res, Req, Options>>;
204
+ }
205
+ //#endregion
206
+ //#region src/client/types.gen.d.ts
207
+ type ResponseStyle = 'data' | 'fields';
208
+ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
209
+ /**
210
+ * Base URL for all requests made by this client.
211
+ */
212
+ baseUrl?: T['baseUrl'];
213
+ /**
214
+ * Fetch API implementation. You can use this option to provide a custom
215
+ * fetch instance.
216
+ *
217
+ * @default globalThis.fetch
218
+ */
219
+ fetch?: typeof fetch;
220
+ /**
221
+ * Please don't use the Fetch client for Next.js applications. The `next`
222
+ * options won't have any effect.
223
+ *
224
+ * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
225
+ */
226
+ next?: never;
227
+ /**
228
+ * Return the response data parsed in a specified format. By default, `auto`
229
+ * will infer the appropriate method from the `Content-Type` response header.
230
+ * You can override this behavior with any of the {@link Body} methods.
231
+ * Select `stream` if you don't want to parse response data at all.
232
+ *
233
+ * @default 'auto'
234
+ */
235
+ parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
236
+ /**
237
+ * Should we return only data or multiple fields (data, error, response, etc.)?
238
+ *
239
+ * @default 'fields'
240
+ */
241
+ responseStyle?: ResponseStyle;
242
+ /**
243
+ * Throw an error instead of returning it in the response?
244
+ *
245
+ * @default false
246
+ */
247
+ throwOnError?: T['throwOnError'];
248
+ }
249
+ interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
250
+ responseStyle: TResponseStyle;
251
+ throwOnError: ThrowOnError;
252
+ }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
253
+ /**
254
+ * Any body that you want to add to your request.
255
+ *
256
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
257
+ */
258
+ body?: unknown;
259
+ path?: Record<string, unknown>;
260
+ query?: Record<string, unknown>;
261
+ /**
262
+ * Security mechanism(s) to use for the request.
263
+ */
264
+ security?: ReadonlyArray<Auth>;
265
+ url: Url;
266
+ }
267
+ interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
268
+ serializedBody?: string;
269
+ }
270
+ type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
271
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
272
+ request: Request;
273
+ response: Response;
274
+ }> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
275
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
276
+ error: undefined;
277
+ } | {
278
+ data: undefined;
279
+ error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
280
+ }) & {
281
+ request: Request;
282
+ response: Response;
283
+ }>;
284
+ interface ClientOptions$1 {
285
+ baseUrl?: string;
286
+ responseStyle?: ResponseStyle;
287
+ throwOnError?: boolean;
288
+ }
289
+ type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
290
+ type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
291
+ type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
292
+ type BuildUrlFn = <TData extends {
293
+ body?: unknown;
294
+ path?: Record<string, unknown>;
295
+ query?: Record<string, unknown>;
296
+ url: string;
297
+ }>(options: TData & Options$1<TData>) => string;
298
+ type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
299
+ interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
300
+ };
301
+ interface TDataShape {
302
+ body?: unknown;
303
+ headers?: unknown;
304
+ path?: unknown;
305
+ query?: unknown;
306
+ url: string;
307
+ }
308
+ type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
309
+ type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
310
+ //#endregion
311
+ //#region src/types.gen.d.ts
312
+ type ClientOptions = {
313
+ baseUrl: 'https://api.mesa.dev/v1' | (string & {});
314
+ };
315
+ type GetWhoamiData = {
316
+ body?: never;
317
+ path?: never;
318
+ query?: never;
319
+ url: '/whoami';
320
+ };
321
+ type GetWhoamiErrors = {
322
+ /**
323
+ * Invalid request
324
+ */
325
+ 400: {
326
+ error: {
327
+ code: string;
328
+ message: string;
329
+ details?: {
330
+ [key: string]: unknown;
331
+ };
332
+ };
333
+ };
334
+ /**
335
+ * Unauthorized
336
+ */
337
+ 401: {
338
+ error: {
339
+ code: string;
340
+ message: string;
341
+ details?: {
342
+ [key: string]: unknown;
343
+ };
344
+ };
345
+ };
346
+ /**
347
+ * Forbidden
348
+ */
349
+ 403: {
350
+ error: {
351
+ code: string;
352
+ message: string;
353
+ details?: {
354
+ [key: string]: unknown;
355
+ };
356
+ };
357
+ };
358
+ /**
359
+ * Not found
360
+ */
361
+ 404: {
362
+ error: {
363
+ code: string;
364
+ message: string;
365
+ details?: {
366
+ [key: string]: unknown;
367
+ };
368
+ };
369
+ };
370
+ /**
371
+ * Not acceptable
372
+ */
373
+ 406: {
374
+ error: {
375
+ code: string;
376
+ message: string;
377
+ details?: {
378
+ [key: string]: unknown;
379
+ };
380
+ };
381
+ };
382
+ /**
383
+ * Conflict
384
+ */
385
+ 409: {
386
+ error: {
387
+ code: string;
388
+ message: string;
389
+ details?: {
390
+ [key: string]: unknown;
391
+ };
392
+ };
393
+ };
394
+ /**
395
+ * Internal error
396
+ */
397
+ 500: {
398
+ error: {
399
+ code: string;
400
+ message: string;
401
+ details?: {
402
+ [key: string]: unknown;
403
+ };
404
+ };
405
+ };
406
+ };
407
+ type GetWhoamiError = GetWhoamiErrors[keyof GetWhoamiErrors];
408
+ type GetWhoamiResponses = {
409
+ /**
410
+ * Caller identity
411
+ */
412
+ 200: {
413
+ org: {
414
+ id: string;
415
+ slug: string;
416
+ name: string;
417
+ };
418
+ key_id: string | null;
419
+ key_name: string | null;
420
+ scopes: Array<string>;
421
+ };
422
+ };
423
+ type GetWhoamiResponse = GetWhoamiResponses[keyof GetWhoamiResponses];
424
+ type GetByOrgApiKeyData = {
425
+ body?: never;
426
+ path: {
427
+ org: string;
428
+ };
429
+ query?: never;
430
+ url: '/{org}/api-key';
431
+ };
432
+ type GetByOrgApiKeyErrors = {
433
+ /**
434
+ * Invalid request
435
+ */
436
+ 400: {
437
+ error: {
438
+ code: string;
439
+ message: string;
440
+ details?: {
441
+ [key: string]: unknown;
442
+ };
443
+ };
444
+ };
445
+ /**
446
+ * Unauthorized
447
+ */
448
+ 401: {
449
+ error: {
450
+ code: string;
451
+ message: string;
452
+ details?: {
453
+ [key: string]: unknown;
454
+ };
455
+ };
456
+ };
457
+ /**
458
+ * Forbidden
459
+ */
460
+ 403: {
461
+ error: {
462
+ code: string;
463
+ message: string;
464
+ details?: {
465
+ [key: string]: unknown;
466
+ };
467
+ };
468
+ };
469
+ /**
470
+ * Not found
471
+ */
472
+ 404: {
473
+ error: {
474
+ code: string;
475
+ message: string;
476
+ details?: {
477
+ [key: string]: unknown;
478
+ };
479
+ };
480
+ };
481
+ /**
482
+ * Not acceptable
483
+ */
484
+ 406: {
485
+ error: {
486
+ code: string;
487
+ message: string;
488
+ details?: {
489
+ [key: string]: unknown;
490
+ };
491
+ };
492
+ };
493
+ /**
494
+ * Conflict
495
+ */
496
+ 409: {
497
+ error: {
498
+ code: string;
499
+ message: string;
500
+ details?: {
501
+ [key: string]: unknown;
502
+ };
503
+ };
504
+ };
505
+ /**
506
+ * Internal error
507
+ */
508
+ 500: {
509
+ error: {
510
+ code: string;
511
+ message: string;
512
+ details?: {
513
+ [key: string]: unknown;
514
+ };
515
+ };
516
+ };
517
+ };
518
+ type GetByOrgApiKeyError = GetByOrgApiKeyErrors[keyof GetByOrgApiKeyErrors];
519
+ type GetByOrgApiKeyResponses = {
520
+ /**
521
+ * API keys list
522
+ */
523
+ 200: {
524
+ api_keys: Array<{
525
+ id: string;
526
+ name: string | null;
527
+ scopes: Array<string>;
528
+ repo_ids: Array<string> | null;
529
+ last_used_at: string | null;
530
+ expires_at: string | null;
531
+ revoked_at: string | null;
532
+ created_at: string;
533
+ }>;
534
+ };
535
+ };
536
+ type GetByOrgApiKeyResponse = GetByOrgApiKeyResponses[keyof GetByOrgApiKeyResponses];
537
+ type PostByOrgApiKeyData = {
538
+ body: {
539
+ name?: string;
540
+ scopes?: Array<'git:read' | 'git:write' | 'repo:read' | 'repo:create' | 'repo:delete' | 'webhook:read' | 'webhook:write' | 'admin'>;
541
+ repo_ids?: Array<string>;
542
+ };
543
+ path: {
544
+ org: string;
545
+ };
546
+ query?: never;
547
+ url: '/{org}/api-key';
548
+ };
549
+ type PostByOrgApiKeyErrors = {
550
+ /**
551
+ * Invalid request
552
+ */
553
+ 400: {
554
+ error: {
555
+ code: string;
556
+ message: string;
557
+ details?: {
558
+ [key: string]: unknown;
559
+ };
560
+ };
561
+ };
562
+ /**
563
+ * Unauthorized
564
+ */
565
+ 401: {
566
+ error: {
567
+ code: string;
568
+ message: string;
569
+ details?: {
570
+ [key: string]: unknown;
571
+ };
572
+ };
573
+ };
574
+ /**
575
+ * Forbidden
576
+ */
577
+ 403: {
578
+ error: {
579
+ code: string;
580
+ message: string;
581
+ details?: {
582
+ [key: string]: unknown;
583
+ };
584
+ };
585
+ };
586
+ /**
587
+ * Not found
588
+ */
589
+ 404: {
590
+ error: {
591
+ code: string;
592
+ message: string;
593
+ details?: {
594
+ [key: string]: unknown;
595
+ };
596
+ };
597
+ };
598
+ /**
599
+ * Not acceptable
600
+ */
601
+ 406: {
602
+ error: {
603
+ code: string;
604
+ message: string;
605
+ details?: {
606
+ [key: string]: unknown;
607
+ };
608
+ };
609
+ };
610
+ /**
611
+ * Conflict
612
+ */
613
+ 409: {
614
+ error: {
615
+ code: string;
616
+ message: string;
617
+ details?: {
618
+ [key: string]: unknown;
619
+ };
620
+ };
621
+ };
622
+ /**
623
+ * Internal error
624
+ */
625
+ 500: {
626
+ error: {
627
+ code: string;
628
+ message: string;
629
+ details?: {
630
+ [key: string]: unknown;
631
+ };
632
+ };
633
+ };
634
+ };
635
+ type PostByOrgApiKeyError = PostByOrgApiKeyErrors[keyof PostByOrgApiKeyErrors];
636
+ type PostByOrgApiKeyResponses = {
637
+ /**
638
+ * API key created
639
+ */
640
+ 201: {
641
+ id: string;
642
+ key: string;
643
+ name: string | null;
644
+ scopes: Array<string>;
645
+ repo_ids: Array<string> | null;
646
+ created_at: string;
647
+ };
648
+ };
649
+ type PostByOrgApiKeyResponse = PostByOrgApiKeyResponses[keyof PostByOrgApiKeyResponses];
650
+ type DeleteByOrgApiKeyByIdData = {
651
+ body?: never;
652
+ path: {
653
+ id: string;
654
+ org: string;
655
+ };
656
+ query?: never;
657
+ url: '/{org}/api-key/{id}';
658
+ };
659
+ type DeleteByOrgApiKeyByIdErrors = {
660
+ /**
661
+ * Invalid request
662
+ */
663
+ 400: {
664
+ error: {
665
+ code: string;
666
+ message: string;
667
+ details?: {
668
+ [key: string]: unknown;
669
+ };
670
+ };
671
+ };
672
+ /**
673
+ * Unauthorized
674
+ */
675
+ 401: {
676
+ error: {
677
+ code: string;
678
+ message: string;
679
+ details?: {
680
+ [key: string]: unknown;
681
+ };
682
+ };
683
+ };
684
+ /**
685
+ * Forbidden
686
+ */
687
+ 403: {
688
+ error: {
689
+ code: string;
690
+ message: string;
691
+ details?: {
692
+ [key: string]: unknown;
693
+ };
694
+ };
695
+ };
696
+ /**
697
+ * Not found
698
+ */
699
+ 404: {
700
+ error: {
701
+ code: string;
702
+ message: string;
703
+ details?: {
704
+ [key: string]: unknown;
705
+ };
706
+ };
707
+ };
708
+ /**
709
+ * Not acceptable
710
+ */
711
+ 406: {
712
+ error: {
713
+ code: string;
714
+ message: string;
715
+ details?: {
716
+ [key: string]: unknown;
717
+ };
718
+ };
719
+ };
720
+ /**
721
+ * Conflict
722
+ */
723
+ 409: {
724
+ error: {
725
+ code: string;
726
+ message: string;
727
+ details?: {
728
+ [key: string]: unknown;
729
+ };
730
+ };
731
+ };
732
+ /**
733
+ * Internal error
734
+ */
735
+ 500: {
736
+ error: {
737
+ code: string;
738
+ message: string;
739
+ details?: {
740
+ [key: string]: unknown;
741
+ };
742
+ };
743
+ };
744
+ };
745
+ type DeleteByOrgApiKeyByIdError = DeleteByOrgApiKeyByIdErrors[keyof DeleteByOrgApiKeyByIdErrors];
746
+ type DeleteByOrgApiKeyByIdResponses = {
747
+ /**
748
+ * API key revoked
749
+ */
750
+ 200: {
751
+ success: true;
752
+ };
753
+ };
754
+ type DeleteByOrgApiKeyByIdResponse = DeleteByOrgApiKeyByIdResponses[keyof DeleteByOrgApiKeyByIdResponses];
755
+ type GetByOrgRepoData = {
756
+ body?: never;
757
+ path: {
758
+ org: string;
759
+ };
760
+ query?: {
761
+ cursor?: string;
762
+ limit?: number;
763
+ tags?: string;
764
+ };
765
+ url: '/{org}/repo';
766
+ };
767
+ type GetByOrgRepoErrors = {
768
+ /**
769
+ * Invalid request
770
+ */
771
+ 400: {
772
+ error: {
773
+ code: string;
774
+ message: string;
775
+ details?: {
776
+ [key: string]: unknown;
777
+ };
778
+ };
779
+ };
780
+ /**
781
+ * Unauthorized
782
+ */
783
+ 401: {
784
+ error: {
785
+ code: string;
786
+ message: string;
787
+ details?: {
788
+ [key: string]: unknown;
789
+ };
790
+ };
791
+ };
792
+ /**
793
+ * Forbidden
794
+ */
795
+ 403: {
796
+ error: {
797
+ code: string;
798
+ message: string;
799
+ details?: {
800
+ [key: string]: unknown;
801
+ };
802
+ };
803
+ };
804
+ /**
805
+ * Not found
806
+ */
807
+ 404: {
808
+ error: {
809
+ code: string;
810
+ message: string;
811
+ details?: {
812
+ [key: string]: unknown;
813
+ };
814
+ };
815
+ };
816
+ /**
817
+ * Not acceptable
818
+ */
819
+ 406: {
820
+ error: {
821
+ code: string;
822
+ message: string;
823
+ details?: {
824
+ [key: string]: unknown;
825
+ };
826
+ };
827
+ };
828
+ /**
829
+ * Conflict
830
+ */
831
+ 409: {
832
+ error: {
833
+ code: string;
834
+ message: string;
835
+ details?: {
836
+ [key: string]: unknown;
837
+ };
838
+ };
839
+ };
840
+ /**
841
+ * Internal error
842
+ */
843
+ 500: {
844
+ error: {
845
+ code: string;
846
+ message: string;
847
+ details?: {
848
+ [key: string]: unknown;
849
+ };
850
+ };
851
+ };
852
+ };
853
+ type GetByOrgRepoError = GetByOrgRepoErrors[keyof GetByOrgRepoErrors];
854
+ type GetByOrgRepoResponses = {
855
+ /**
856
+ * Repository list
857
+ */
858
+ 200: {
859
+ next_cursor: string | null;
860
+ has_more: boolean;
861
+ repos: Array<{
862
+ id: string;
863
+ org: string;
864
+ name: string;
865
+ default_bookmark: string;
866
+ head_oid: string | null;
867
+ created_at: string;
868
+ tags: {
869
+ [key: string]: string;
870
+ };
871
+ /**
872
+ * Optionally add an upstream repository. You can configure automatic syncing from the upstream repository.
873
+ */
874
+ upstream: {
875
+ /**
876
+ * URL of the upstream repository
877
+ */
878
+ uri: string;
879
+ /**
880
+ * Automatic sync configuration, if enabled
881
+ */
882
+ autosync: {
883
+ type: 'poll';
884
+ /**
885
+ * Polling period in seconds
886
+ */
887
+ period: number;
888
+ /**
889
+ * Conflict resolution strategy. "none" means sync will fail on conflicts.
890
+ */
891
+ resolution_strategy: 'none';
892
+ } | null;
893
+ /**
894
+ * Timestamp of the last sync attempt
895
+ */
896
+ last_sync_attempt: string | null;
897
+ /**
898
+ * Timestamp of the last successful sync
899
+ */
900
+ last_sync_success: string | null;
901
+ /**
902
+ * Error message from the last failed sync attempt
903
+ */
904
+ last_sync_error: string | null;
905
+ /**
906
+ * Whether this upstream has an authentication credential configured
907
+ */
908
+ has_credential: boolean;
909
+ /**
910
+ * The host the credential is scoped to (e.g. "github.com")
911
+ */
912
+ credential_host: string | null;
913
+ } | null;
914
+ }>;
915
+ };
916
+ };
917
+ type GetByOrgRepoResponse = GetByOrgRepoResponses[keyof GetByOrgRepoResponses];
918
+ type PostByOrgRepoData = {
919
+ body: {
920
+ name: string;
921
+ default_bookmark?: string;
922
+ tags?: {
923
+ [key: string]: string;
924
+ };
925
+ upstream?: {
926
+ /**
927
+ * URL of the upstream repository
928
+ */
929
+ uri: string;
930
+ /**
931
+ * Optionally enable automatic sync from the upstream repository
932
+ */
933
+ autosync?: {
934
+ type: 'poll';
935
+ /**
936
+ * Polling period in seconds (60s to 24.8d)
937
+ */
938
+ period: number;
939
+ /**
940
+ * Conflict resolution strategy. "none" means sync will fail on conflicts.
941
+ */
942
+ resolution_strategy?: 'none';
943
+ };
944
+ /**
945
+ * Personal access token for private upstream repos. Set to null to unlink credential.
946
+ */
947
+ token?: string | null;
948
+ /**
949
+ * Username for git credential auth. Defaults to "x-access-token". Use actual username for Bitbucket app passwords.
950
+ */
951
+ token_username?: string;
952
+ };
953
+ };
954
+ path: {
955
+ org: string;
956
+ };
957
+ query?: never;
958
+ url: '/{org}/repo';
959
+ };
960
+ type PostByOrgRepoErrors = {
961
+ /**
962
+ * Invalid request
963
+ */
964
+ 400: {
965
+ error: {
966
+ code: string;
967
+ message: string;
968
+ details?: {
969
+ [key: string]: unknown;
970
+ };
971
+ };
972
+ };
973
+ /**
974
+ * Unauthorized
975
+ */
976
+ 401: {
977
+ error: {
978
+ code: string;
979
+ message: string;
980
+ details?: {
981
+ [key: string]: unknown;
982
+ };
983
+ };
984
+ };
985
+ /**
986
+ * Forbidden
987
+ */
988
+ 403: {
989
+ error: {
990
+ code: string;
991
+ message: string;
992
+ details?: {
993
+ [key: string]: unknown;
994
+ };
995
+ };
996
+ };
997
+ /**
998
+ * Not found
999
+ */
1000
+ 404: {
1001
+ error: {
1002
+ code: string;
1003
+ message: string;
1004
+ details?: {
1005
+ [key: string]: unknown;
1006
+ };
1007
+ };
1008
+ };
1009
+ /**
1010
+ * Not acceptable
1011
+ */
1012
+ 406: {
1013
+ error: {
1014
+ code: string;
1015
+ message: string;
1016
+ details?: {
1017
+ [key: string]: unknown;
1018
+ };
1019
+ };
1020
+ };
1021
+ /**
1022
+ * Conflict
1023
+ */
1024
+ 409: {
1025
+ error: {
1026
+ code: string;
1027
+ message: string;
1028
+ details?: {
1029
+ [key: string]: unknown;
1030
+ };
1031
+ };
1032
+ };
1033
+ /**
1034
+ * Internal error
1035
+ */
1036
+ 500: {
1037
+ error: {
1038
+ code: string;
1039
+ message: string;
1040
+ details?: {
1041
+ [key: string]: unknown;
1042
+ };
1043
+ };
1044
+ };
1045
+ };
1046
+ type PostByOrgRepoError = PostByOrgRepoErrors[keyof PostByOrgRepoErrors];
1047
+ type PostByOrgRepoResponses = {
1048
+ /**
1049
+ * Repository created
1050
+ */
1051
+ 201: {
1052
+ id: string;
1053
+ org: string;
1054
+ name: string;
1055
+ default_bookmark: string;
1056
+ head_oid: string | null;
1057
+ created_at: string;
1058
+ tags: {
1059
+ [key: string]: string;
1060
+ };
1061
+ /**
1062
+ * Optionally add an upstream repository. You can configure automatic syncing from the upstream repository.
1063
+ */
1064
+ upstream: {
1065
+ /**
1066
+ * URL of the upstream repository
1067
+ */
1068
+ uri: string;
1069
+ /**
1070
+ * Automatic sync configuration, if enabled
1071
+ */
1072
+ autosync: {
1073
+ type: 'poll';
1074
+ /**
1075
+ * Polling period in seconds
1076
+ */
1077
+ period: number;
1078
+ /**
1079
+ * Conflict resolution strategy. "none" means sync will fail on conflicts.
1080
+ */
1081
+ resolution_strategy: 'none';
1082
+ } | null;
1083
+ /**
1084
+ * Timestamp of the last sync attempt
1085
+ */
1086
+ last_sync_attempt: string | null;
1087
+ /**
1088
+ * Timestamp of the last successful sync
1089
+ */
1090
+ last_sync_success: string | null;
1091
+ /**
1092
+ * Error message from the last failed sync attempt
1093
+ */
1094
+ last_sync_error: string | null;
1095
+ /**
1096
+ * Whether this upstream has an authentication credential configured
1097
+ */
1098
+ has_credential: boolean;
1099
+ /**
1100
+ * The host the credential is scoped to (e.g. "github.com")
1101
+ */
1102
+ credential_host: string | null;
1103
+ } | null;
1104
+ };
1105
+ };
1106
+ type PostByOrgRepoResponse = PostByOrgRepoResponses[keyof PostByOrgRepoResponses];
1107
+ type DeleteByOrgByRepoData = {
1108
+ body?: never;
1109
+ path: {
1110
+ org: string;
1111
+ repo: string;
1112
+ };
1113
+ query?: never;
1114
+ url: '/{org}/{repo}';
1115
+ };
1116
+ type DeleteByOrgByRepoErrors = {
1117
+ /**
1118
+ * Invalid request
1119
+ */
1120
+ 400: {
1121
+ error: {
1122
+ code: string;
1123
+ message: string;
1124
+ details?: {
1125
+ [key: string]: unknown;
1126
+ };
1127
+ };
1128
+ };
1129
+ /**
1130
+ * Unauthorized
1131
+ */
1132
+ 401: {
1133
+ error: {
1134
+ code: string;
1135
+ message: string;
1136
+ details?: {
1137
+ [key: string]: unknown;
1138
+ };
1139
+ };
1140
+ };
1141
+ /**
1142
+ * Forbidden
1143
+ */
1144
+ 403: {
1145
+ error: {
1146
+ code: string;
1147
+ message: string;
1148
+ details?: {
1149
+ [key: string]: unknown;
1150
+ };
1151
+ };
1152
+ };
1153
+ /**
1154
+ * Not found
1155
+ */
1156
+ 404: {
1157
+ error: {
1158
+ code: string;
1159
+ message: string;
1160
+ details?: {
1161
+ [key: string]: unknown;
1162
+ };
1163
+ };
1164
+ };
1165
+ /**
1166
+ * Not acceptable
1167
+ */
1168
+ 406: {
1169
+ error: {
1170
+ code: string;
1171
+ message: string;
1172
+ details?: {
1173
+ [key: string]: unknown;
1174
+ };
1175
+ };
1176
+ };
1177
+ /**
1178
+ * Conflict
1179
+ */
1180
+ 409: {
1181
+ error: {
1182
+ code: string;
1183
+ message: string;
1184
+ details?: {
1185
+ [key: string]: unknown;
1186
+ };
1187
+ };
1188
+ };
1189
+ /**
1190
+ * Internal error
1191
+ */
1192
+ 500: {
1193
+ error: {
1194
+ code: string;
1195
+ message: string;
1196
+ details?: {
1197
+ [key: string]: unknown;
1198
+ };
1199
+ };
1200
+ };
1201
+ };
1202
+ type DeleteByOrgByRepoError = DeleteByOrgByRepoErrors[keyof DeleteByOrgByRepoErrors];
1203
+ type DeleteByOrgByRepoResponses = {
1204
+ /**
1205
+ * Repository deleted
1206
+ */
1207
+ 200: {
1208
+ success: true;
1209
+ };
1210
+ };
1211
+ type DeleteByOrgByRepoResponse = DeleteByOrgByRepoResponses[keyof DeleteByOrgByRepoResponses];
1212
+ type GetByOrgByRepoData = {
1213
+ body?: never;
1214
+ path: {
1215
+ org: string;
1216
+ repo: string;
1217
+ };
1218
+ query?: never;
1219
+ url: '/{org}/{repo}';
1220
+ };
1221
+ type GetByOrgByRepoErrors = {
1222
+ /**
1223
+ * Invalid request
1224
+ */
1225
+ 400: {
1226
+ error: {
1227
+ code: string;
1228
+ message: string;
1229
+ details?: {
1230
+ [key: string]: unknown;
1231
+ };
1232
+ };
1233
+ };
1234
+ /**
1235
+ * Unauthorized
1236
+ */
1237
+ 401: {
1238
+ error: {
1239
+ code: string;
1240
+ message: string;
1241
+ details?: {
1242
+ [key: string]: unknown;
1243
+ };
1244
+ };
1245
+ };
1246
+ /**
1247
+ * Forbidden
1248
+ */
1249
+ 403: {
1250
+ error: {
1251
+ code: string;
1252
+ message: string;
1253
+ details?: {
1254
+ [key: string]: unknown;
1255
+ };
1256
+ };
1257
+ };
1258
+ /**
1259
+ * Not found
1260
+ */
1261
+ 404: {
1262
+ error: {
1263
+ code: string;
1264
+ message: string;
1265
+ details?: {
1266
+ [key: string]: unknown;
1267
+ };
1268
+ };
1269
+ };
1270
+ /**
1271
+ * Not acceptable
1272
+ */
1273
+ 406: {
1274
+ error: {
1275
+ code: string;
1276
+ message: string;
1277
+ details?: {
1278
+ [key: string]: unknown;
1279
+ };
1280
+ };
1281
+ };
1282
+ /**
1283
+ * Conflict
1284
+ */
1285
+ 409: {
1286
+ error: {
1287
+ code: string;
1288
+ message: string;
1289
+ details?: {
1290
+ [key: string]: unknown;
1291
+ };
1292
+ };
1293
+ };
1294
+ /**
1295
+ * Internal error
1296
+ */
1297
+ 500: {
1298
+ error: {
1299
+ code: string;
1300
+ message: string;
1301
+ details?: {
1302
+ [key: string]: unknown;
1303
+ };
1304
+ };
1305
+ };
1306
+ };
1307
+ type GetByOrgByRepoError = GetByOrgByRepoErrors[keyof GetByOrgByRepoErrors];
1308
+ type GetByOrgByRepoResponses = {
1309
+ /**
1310
+ * Repository
1311
+ */
1312
+ 200: {
1313
+ id: string;
1314
+ org: string;
1315
+ name: string;
1316
+ default_bookmark: string;
1317
+ head_oid: string | null;
1318
+ created_at: string;
1319
+ tags: {
1320
+ [key: string]: string;
1321
+ };
1322
+ /**
1323
+ * Optionally add an upstream repository. You can configure automatic syncing from the upstream repository.
1324
+ */
1325
+ upstream: {
1326
+ /**
1327
+ * URL of the upstream repository
1328
+ */
1329
+ uri: string;
1330
+ /**
1331
+ * Automatic sync configuration, if enabled
1332
+ */
1333
+ autosync: {
1334
+ type: 'poll';
1335
+ /**
1336
+ * Polling period in seconds
1337
+ */
1338
+ period: number;
1339
+ /**
1340
+ * Conflict resolution strategy. "none" means sync will fail on conflicts.
1341
+ */
1342
+ resolution_strategy: 'none';
1343
+ } | null;
1344
+ /**
1345
+ * Timestamp of the last sync attempt
1346
+ */
1347
+ last_sync_attempt: string | null;
1348
+ /**
1349
+ * Timestamp of the last successful sync
1350
+ */
1351
+ last_sync_success: string | null;
1352
+ /**
1353
+ * Error message from the last failed sync attempt
1354
+ */
1355
+ last_sync_error: string | null;
1356
+ /**
1357
+ * Whether this upstream has an authentication credential configured
1358
+ */
1359
+ has_credential: boolean;
1360
+ /**
1361
+ * The host the credential is scoped to (e.g. "github.com")
1362
+ */
1363
+ credential_host: string | null;
1364
+ } | null;
1365
+ };
1366
+ };
1367
+ type GetByOrgByRepoResponse = GetByOrgByRepoResponses[keyof GetByOrgByRepoResponses];
1368
+ type PatchByOrgByRepoData = {
1369
+ body: {
1370
+ name?: string;
1371
+ default_bookmark?: string;
1372
+ tags?: {
1373
+ [key: string]: string | null;
1374
+ };
1375
+ upstream?: {
1376
+ /**
1377
+ * URL of the upstream repository
1378
+ */
1379
+ uri: string;
1380
+ /**
1381
+ * Optionally enable automatic sync from the upstream repository
1382
+ */
1383
+ autosync?: {
1384
+ type: 'poll';
1385
+ /**
1386
+ * Polling period in seconds (60s to 24.8d)
1387
+ */
1388
+ period: number;
1389
+ /**
1390
+ * Conflict resolution strategy. "none" means sync will fail on conflicts.
1391
+ */
1392
+ resolution_strategy?: 'none';
1393
+ };
1394
+ /**
1395
+ * Personal access token for private upstream repos. Set to null to unlink credential.
1396
+ */
1397
+ token?: string | null;
1398
+ /**
1399
+ * Username for git credential auth. Defaults to "x-access-token". Use actual username for Bitbucket app passwords.
1400
+ */
1401
+ token_username?: string;
1402
+ } | null;
1403
+ };
1404
+ path: {
1405
+ org: string;
1406
+ repo: string;
1407
+ };
1408
+ query?: never;
1409
+ url: '/{org}/{repo}';
1410
+ };
1411
+ type PatchByOrgByRepoErrors = {
1412
+ /**
1413
+ * Invalid request
1414
+ */
1415
+ 400: {
1416
+ error: {
1417
+ code: string;
1418
+ message: string;
1419
+ details?: {
1420
+ [key: string]: unknown;
1421
+ };
1422
+ };
1423
+ };
1424
+ /**
1425
+ * Unauthorized
1426
+ */
1427
+ 401: {
1428
+ error: {
1429
+ code: string;
1430
+ message: string;
1431
+ details?: {
1432
+ [key: string]: unknown;
1433
+ };
1434
+ };
1435
+ };
1436
+ /**
1437
+ * Forbidden
1438
+ */
1439
+ 403: {
1440
+ error: {
1441
+ code: string;
1442
+ message: string;
1443
+ details?: {
1444
+ [key: string]: unknown;
1445
+ };
1446
+ };
1447
+ };
1448
+ /**
1449
+ * Not found
1450
+ */
1451
+ 404: {
1452
+ error: {
1453
+ code: string;
1454
+ message: string;
1455
+ details?: {
1456
+ [key: string]: unknown;
1457
+ };
1458
+ };
1459
+ };
1460
+ /**
1461
+ * Not acceptable
1462
+ */
1463
+ 406: {
1464
+ error: {
1465
+ code: string;
1466
+ message: string;
1467
+ details?: {
1468
+ [key: string]: unknown;
1469
+ };
1470
+ };
1471
+ };
1472
+ /**
1473
+ * Conflict
1474
+ */
1475
+ 409: {
1476
+ error: {
1477
+ code: string;
1478
+ message: string;
1479
+ details?: {
1480
+ [key: string]: unknown;
1481
+ };
1482
+ };
1483
+ };
1484
+ /**
1485
+ * Internal error
1486
+ */
1487
+ 500: {
1488
+ error: {
1489
+ code: string;
1490
+ message: string;
1491
+ details?: {
1492
+ [key: string]: unknown;
1493
+ };
1494
+ };
1495
+ };
1496
+ };
1497
+ type PatchByOrgByRepoError = PatchByOrgByRepoErrors[keyof PatchByOrgByRepoErrors];
1498
+ type PatchByOrgByRepoResponses = {
1499
+ /**
1500
+ * Repository updated
1501
+ */
1502
+ 200: {
1503
+ id: string;
1504
+ org: string;
1505
+ name: string;
1506
+ default_bookmark: string;
1507
+ head_oid: string | null;
1508
+ created_at: string;
1509
+ tags: {
1510
+ [key: string]: string;
1511
+ };
1512
+ /**
1513
+ * Optionally add an upstream repository. You can configure automatic syncing from the upstream repository.
1514
+ */
1515
+ upstream: {
1516
+ /**
1517
+ * URL of the upstream repository
1518
+ */
1519
+ uri: string;
1520
+ /**
1521
+ * Automatic sync configuration, if enabled
1522
+ */
1523
+ autosync: {
1524
+ type: 'poll';
1525
+ /**
1526
+ * Polling period in seconds
1527
+ */
1528
+ period: number;
1529
+ /**
1530
+ * Conflict resolution strategy. "none" means sync will fail on conflicts.
1531
+ */
1532
+ resolution_strategy: 'none';
1533
+ } | null;
1534
+ /**
1535
+ * Timestamp of the last sync attempt
1536
+ */
1537
+ last_sync_attempt: string | null;
1538
+ /**
1539
+ * Timestamp of the last successful sync
1540
+ */
1541
+ last_sync_success: string | null;
1542
+ /**
1543
+ * Error message from the last failed sync attempt
1544
+ */
1545
+ last_sync_error: string | null;
1546
+ /**
1547
+ * Whether this upstream has an authentication credential configured
1548
+ */
1549
+ has_credential: boolean;
1550
+ /**
1551
+ * The host the credential is scoped to (e.g. "github.com")
1552
+ */
1553
+ credential_host: string | null;
1554
+ } | null;
1555
+ };
1556
+ };
1557
+ type PatchByOrgByRepoResponse = PatchByOrgByRepoResponses[keyof PatchByOrgByRepoResponses];
1558
+ type GetByOrgRepoTagsData = {
1559
+ body?: never;
1560
+ path: {
1561
+ org: string;
1562
+ };
1563
+ query?: never;
1564
+ url: '/{org}/repo/tags';
1565
+ };
1566
+ type GetByOrgRepoTagsErrors = {
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
+ type GetByOrgRepoTagsError = GetByOrgRepoTagsErrors[keyof GetByOrgRepoTagsErrors];
1653
+ type GetByOrgRepoTagsResponses = {
1654
+ /**
1655
+ * Repo tags
1656
+ */
1657
+ 200: {
1658
+ tags: {
1659
+ [key: string]: Array<{
1660
+ value: string;
1661
+ count: number;
1662
+ }>;
1663
+ };
1664
+ };
1665
+ };
1666
+ type GetByOrgRepoTagsResponse = GetByOrgRepoTagsResponses[keyof GetByOrgRepoTagsResponses];
1667
+ type PostByOrgRepoBulkTagsData = {
1668
+ body: {
1669
+ repo_ids: Array<string>;
1670
+ action: 'set' | 'remove';
1671
+ key: string;
1672
+ value?: string;
1673
+ };
1674
+ path: {
1675
+ org: string;
1676
+ };
1677
+ query?: never;
1678
+ url: '/{org}/repo/bulk/tags';
1679
+ };
1680
+ type PostByOrgRepoBulkTagsErrors = {
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
+ type PostByOrgRepoBulkTagsError = PostByOrgRepoBulkTagsErrors[keyof PostByOrgRepoBulkTagsErrors];
1767
+ type PostByOrgRepoBulkTagsResponses = {
1768
+ /**
1769
+ * Updated count
1770
+ */
1771
+ 200: {
1772
+ updated: number;
1773
+ };
1774
+ };
1775
+ type PostByOrgRepoBulkTagsResponse = PostByOrgRepoBulkTagsResponses[keyof PostByOrgRepoBulkTagsResponses];
1776
+ type GetByOrgByRepoContentData = {
1777
+ body?: never;
1778
+ path: {
1779
+ org: string;
1780
+ repo: string;
1781
+ };
1782
+ query?: {
1783
+ oid?: string;
1784
+ path?: string;
1785
+ depth?: number;
1786
+ };
1787
+ url: '/{org}/{repo}/content';
1788
+ };
1789
+ type GetByOrgByRepoContentErrors = {
1790
+ /**
1791
+ * Invalid request
1792
+ */
1793
+ 400: {
1794
+ error: {
1795
+ code: string;
1796
+ message: string;
1797
+ details?: {
1798
+ [key: string]: unknown;
1799
+ };
1800
+ };
1801
+ };
1802
+ /**
1803
+ * Unauthorized
1804
+ */
1805
+ 401: {
1806
+ error: {
1807
+ code: string;
1808
+ message: string;
1809
+ details?: {
1810
+ [key: string]: unknown;
1811
+ };
1812
+ };
1813
+ };
1814
+ /**
1815
+ * Forbidden
1816
+ */
1817
+ 403: {
1818
+ error: {
1819
+ code: string;
1820
+ message: string;
1821
+ details?: {
1822
+ [key: string]: unknown;
1823
+ };
1824
+ };
1825
+ };
1826
+ /**
1827
+ * Not found
1828
+ */
1829
+ 404: {
1830
+ error: {
1831
+ code: string;
1832
+ message: string;
1833
+ details?: {
1834
+ [key: string]: unknown;
1835
+ };
1836
+ };
1837
+ };
1838
+ /**
1839
+ * Not acceptable
1840
+ */
1841
+ 406: {
1842
+ error: {
1843
+ code: string;
1844
+ message: string;
1845
+ details?: {
1846
+ [key: string]: unknown;
1847
+ };
1848
+ };
1849
+ };
1850
+ /**
1851
+ * Conflict
1852
+ */
1853
+ 409: {
1854
+ error: {
1855
+ code: string;
1856
+ message: string;
1857
+ details?: {
1858
+ [key: string]: unknown;
1859
+ };
1860
+ };
1861
+ };
1862
+ /**
1863
+ * Internal error
1864
+ */
1865
+ 500: {
1866
+ error: {
1867
+ code: string;
1868
+ message: string;
1869
+ details?: {
1870
+ [key: string]: unknown;
1871
+ };
1872
+ };
1873
+ };
1874
+ };
1875
+ type GetByOrgByRepoContentError = GetByOrgByRepoContentErrors[keyof GetByOrgByRepoContentErrors];
1876
+ type GetByOrgByRepoContentResponses = {
1877
+ /**
1878
+ * Content response
1879
+ */
1880
+ 200: {
1881
+ type: 'file';
1882
+ name: string;
1883
+ path: string;
1884
+ sha: string;
1885
+ size: number;
1886
+ encoding: 'base64';
1887
+ content: string;
1888
+ mode: number;
1889
+ } | {
1890
+ type: 'symlink';
1891
+ name: string;
1892
+ path: string;
1893
+ sha: string;
1894
+ size: number;
1895
+ encoding: 'base64';
1896
+ content: string;
1897
+ mode: number;
1898
+ } | {
1899
+ type: 'dir';
1900
+ name: string;
1901
+ path: string;
1902
+ sha: string;
1903
+ child_count: number;
1904
+ entries: Array<{
1905
+ type: 'file';
1906
+ name: string;
1907
+ path: string;
1908
+ sha: string;
1909
+ size: number;
1910
+ mode: number;
1911
+ } | {
1912
+ type: 'symlink';
1913
+ name: string;
1914
+ path: string;
1915
+ sha: string;
1916
+ size: number;
1917
+ mode: number;
1918
+ } | {
1919
+ type: 'dir';
1920
+ name: string;
1921
+ path: string;
1922
+ sha: string;
1923
+ }>;
1924
+ next_cursor: string | null;
1925
+ has_more: boolean;
1926
+ };
1927
+ };
1928
+ type GetByOrgByRepoContentResponse = GetByOrgByRepoContentResponses[keyof GetByOrgByRepoContentResponses];
1929
+ type GetByOrgByRepoBookmarkData = {
1930
+ body?: never;
1931
+ path: {
1932
+ org: string;
1933
+ repo: string;
1934
+ };
1935
+ query?: {
1936
+ cursor?: string;
1937
+ limit?: number;
1938
+ };
1939
+ url: '/{org}/{repo}/bookmark';
1940
+ };
1941
+ type GetByOrgByRepoBookmarkErrors = {
1942
+ /**
1943
+ * Invalid request
1944
+ */
1945
+ 400: {
1946
+ error: {
1947
+ code: string;
1948
+ message: string;
1949
+ details?: {
1950
+ [key: string]: unknown;
1951
+ };
1952
+ };
1953
+ };
1954
+ /**
1955
+ * Unauthorized
1956
+ */
1957
+ 401: {
1958
+ error: {
1959
+ code: string;
1960
+ message: string;
1961
+ details?: {
1962
+ [key: string]: unknown;
1963
+ };
1964
+ };
1965
+ };
1966
+ /**
1967
+ * Forbidden
1968
+ */
1969
+ 403: {
1970
+ error: {
1971
+ code: string;
1972
+ message: string;
1973
+ details?: {
1974
+ [key: string]: unknown;
1975
+ };
1976
+ };
1977
+ };
1978
+ /**
1979
+ * Not found
1980
+ */
1981
+ 404: {
1982
+ error: {
1983
+ code: string;
1984
+ message: string;
1985
+ details?: {
1986
+ [key: string]: unknown;
1987
+ };
1988
+ };
1989
+ };
1990
+ /**
1991
+ * Not acceptable
1992
+ */
1993
+ 406: {
1994
+ error: {
1995
+ code: string;
1996
+ message: string;
1997
+ details?: {
1998
+ [key: string]: unknown;
1999
+ };
2000
+ };
2001
+ };
2002
+ /**
2003
+ * Conflict
2004
+ */
2005
+ 409: {
2006
+ error: {
2007
+ code: string;
2008
+ message: string;
2009
+ details?: {
2010
+ [key: string]: unknown;
2011
+ };
2012
+ };
2013
+ };
2014
+ /**
2015
+ * Internal error
2016
+ */
2017
+ 500: {
2018
+ error: {
2019
+ code: string;
2020
+ message: string;
2021
+ details?: {
2022
+ [key: string]: unknown;
2023
+ };
2024
+ };
2025
+ };
2026
+ };
2027
+ type GetByOrgByRepoBookmarkError = GetByOrgByRepoBookmarkErrors[keyof GetByOrgByRepoBookmarkErrors];
2028
+ type GetByOrgByRepoBookmarkResponses = {
2029
+ /**
2030
+ * Bookmark list
2031
+ */
2032
+ 200: {
2033
+ next_cursor: string | null;
2034
+ has_more: boolean;
2035
+ bookmarks: Array<{
2036
+ name: string;
2037
+ commit_oid: string;
2038
+ is_default: boolean;
2039
+ }>;
2040
+ };
2041
+ };
2042
+ type GetByOrgByRepoBookmarkResponse = GetByOrgByRepoBookmarkResponses[keyof GetByOrgByRepoBookmarkResponses];
2043
+ type PostByOrgByRepoBookmarkData = {
2044
+ body: {
2045
+ name: string;
2046
+ from_commit_oid: string;
2047
+ };
2048
+ path: {
2049
+ org: string;
2050
+ repo: string;
2051
+ };
2052
+ query?: never;
2053
+ url: '/{org}/{repo}/bookmark';
2054
+ };
2055
+ type PostByOrgByRepoBookmarkErrors = {
2056
+ /**
2057
+ * Invalid request
2058
+ */
2059
+ 400: {
2060
+ error: {
2061
+ code: string;
2062
+ message: string;
2063
+ details?: {
2064
+ [key: string]: unknown;
2065
+ };
2066
+ };
2067
+ };
2068
+ /**
2069
+ * Unauthorized
2070
+ */
2071
+ 401: {
2072
+ error: {
2073
+ code: string;
2074
+ message: string;
2075
+ details?: {
2076
+ [key: string]: unknown;
2077
+ };
2078
+ };
2079
+ };
2080
+ /**
2081
+ * Forbidden
2082
+ */
2083
+ 403: {
2084
+ error: {
2085
+ code: string;
2086
+ message: string;
2087
+ details?: {
2088
+ [key: string]: unknown;
2089
+ };
2090
+ };
2091
+ };
2092
+ /**
2093
+ * Not found
2094
+ */
2095
+ 404: {
2096
+ error: {
2097
+ code: string;
2098
+ message: string;
2099
+ details?: {
2100
+ [key: string]: unknown;
2101
+ };
2102
+ };
2103
+ };
2104
+ /**
2105
+ * Not acceptable
2106
+ */
2107
+ 406: {
2108
+ error: {
2109
+ code: string;
2110
+ message: string;
2111
+ details?: {
2112
+ [key: string]: unknown;
2113
+ };
2114
+ };
2115
+ };
2116
+ /**
2117
+ * Conflict
2118
+ */
2119
+ 409: {
2120
+ error: {
2121
+ code: string;
2122
+ message: string;
2123
+ details?: {
2124
+ [key: string]: unknown;
2125
+ };
2126
+ };
2127
+ };
2128
+ /**
2129
+ * Internal error
2130
+ */
2131
+ 500: {
2132
+ error: {
2133
+ code: string;
2134
+ message: string;
2135
+ details?: {
2136
+ [key: string]: unknown;
2137
+ };
2138
+ };
2139
+ };
2140
+ };
2141
+ type PostByOrgByRepoBookmarkError = PostByOrgByRepoBookmarkErrors[keyof PostByOrgByRepoBookmarkErrors];
2142
+ type PostByOrgByRepoBookmarkResponses = {
2143
+ /**
2144
+ * Bookmark created
2145
+ */
2146
+ 201: {
2147
+ name: string;
2148
+ commit_oid: string;
2149
+ is_default: boolean;
2150
+ };
2151
+ };
2152
+ type PostByOrgByRepoBookmarkResponse = PostByOrgByRepoBookmarkResponses[keyof PostByOrgByRepoBookmarkResponses];
2153
+ type DeleteByOrgByRepoBookmarkByBookmarkData = {
2154
+ body?: never;
2155
+ path: {
2156
+ org: string;
2157
+ repo: string;
2158
+ bookmark: string;
2159
+ };
2160
+ query?: never;
2161
+ url: '/{org}/{repo}/bookmark/{bookmark}';
2162
+ };
2163
+ type DeleteByOrgByRepoBookmarkByBookmarkErrors = {
2164
+ /**
2165
+ * Invalid request
2166
+ */
2167
+ 400: {
2168
+ error: {
2169
+ code: string;
2170
+ message: string;
2171
+ details?: {
2172
+ [key: string]: unknown;
2173
+ };
2174
+ };
2175
+ };
2176
+ /**
2177
+ * Unauthorized
2178
+ */
2179
+ 401: {
2180
+ error: {
2181
+ code: string;
2182
+ message: string;
2183
+ details?: {
2184
+ [key: string]: unknown;
2185
+ };
2186
+ };
2187
+ };
2188
+ /**
2189
+ * Forbidden
2190
+ */
2191
+ 403: {
2192
+ error: {
2193
+ code: string;
2194
+ message: string;
2195
+ details?: {
2196
+ [key: string]: unknown;
2197
+ };
2198
+ };
2199
+ };
2200
+ /**
2201
+ * Not found
2202
+ */
2203
+ 404: {
2204
+ error: {
2205
+ code: string;
2206
+ message: string;
2207
+ details?: {
2208
+ [key: string]: unknown;
2209
+ };
2210
+ };
2211
+ };
2212
+ /**
2213
+ * Not acceptable
2214
+ */
2215
+ 406: {
2216
+ error: {
2217
+ code: string;
2218
+ message: string;
2219
+ details?: {
2220
+ [key: string]: unknown;
2221
+ };
2222
+ };
2223
+ };
2224
+ /**
2225
+ * Conflict
2226
+ */
2227
+ 409: {
2228
+ error: {
2229
+ code: string;
2230
+ message: string;
2231
+ details?: {
2232
+ [key: string]: unknown;
2233
+ };
2234
+ };
2235
+ };
2236
+ /**
2237
+ * Internal error
2238
+ */
2239
+ 500: {
2240
+ error: {
2241
+ code: string;
2242
+ message: string;
2243
+ details?: {
2244
+ [key: string]: unknown;
2245
+ };
2246
+ };
2247
+ };
2248
+ };
2249
+ type DeleteByOrgByRepoBookmarkByBookmarkError = DeleteByOrgByRepoBookmarkByBookmarkErrors[keyof DeleteByOrgByRepoBookmarkByBookmarkErrors];
2250
+ type DeleteByOrgByRepoBookmarkByBookmarkResponses = {
2251
+ /**
2252
+ * Bookmark deleted
2253
+ */
2254
+ 200: {
2255
+ success: true;
2256
+ };
2257
+ };
2258
+ type DeleteByOrgByRepoBookmarkByBookmarkResponse = DeleteByOrgByRepoBookmarkByBookmarkResponses[keyof DeleteByOrgByRepoBookmarkByBookmarkResponses];
2259
+ type GetByOrgByRepoCommitData = {
2260
+ body?: never;
2261
+ path: {
2262
+ org: string;
2263
+ repo: string;
2264
+ };
2265
+ query?: {
2266
+ cursor?: string;
2267
+ limit?: number;
2268
+ ref?: string;
2269
+ };
2270
+ url: '/{org}/{repo}/commit';
2271
+ };
2272
+ type GetByOrgByRepoCommitErrors = {
2273
+ /**
2274
+ * Invalid request
2275
+ */
2276
+ 400: {
2277
+ error: {
2278
+ code: string;
2279
+ message: string;
2280
+ details?: {
2281
+ [key: string]: unknown;
2282
+ };
2283
+ };
2284
+ };
2285
+ /**
2286
+ * Unauthorized
2287
+ */
2288
+ 401: {
2289
+ error: {
2290
+ code: string;
2291
+ message: string;
2292
+ details?: {
2293
+ [key: string]: unknown;
2294
+ };
2295
+ };
2296
+ };
2297
+ /**
2298
+ * Forbidden
2299
+ */
2300
+ 403: {
2301
+ error: {
2302
+ code: string;
2303
+ message: string;
2304
+ details?: {
2305
+ [key: string]: unknown;
2306
+ };
2307
+ };
2308
+ };
2309
+ /**
2310
+ * Not found
2311
+ */
2312
+ 404: {
2313
+ error: {
2314
+ code: string;
2315
+ message: string;
2316
+ details?: {
2317
+ [key: string]: unknown;
2318
+ };
2319
+ };
2320
+ };
2321
+ /**
2322
+ * Not acceptable
2323
+ */
2324
+ 406: {
2325
+ error: {
2326
+ code: string;
2327
+ message: string;
2328
+ details?: {
2329
+ [key: string]: unknown;
2330
+ };
2331
+ };
2332
+ };
2333
+ /**
2334
+ * Conflict
2335
+ */
2336
+ 409: {
2337
+ error: {
2338
+ code: string;
2339
+ message: string;
2340
+ details?: {
2341
+ [key: string]: unknown;
2342
+ };
2343
+ };
2344
+ };
2345
+ /**
2346
+ * Internal error
2347
+ */
2348
+ 500: {
2349
+ error: {
2350
+ code: string;
2351
+ message: string;
2352
+ details?: {
2353
+ [key: string]: unknown;
2354
+ };
2355
+ };
2356
+ };
2357
+ };
2358
+ type GetByOrgByRepoCommitError = GetByOrgByRepoCommitErrors[keyof GetByOrgByRepoCommitErrors];
2359
+ type GetByOrgByRepoCommitResponses = {
2360
+ /**
2361
+ * Commit list
2362
+ */
2363
+ 200: {
2364
+ next_cursor: string | null;
2365
+ has_more: boolean;
2366
+ commits: Array<{
2367
+ sha: string;
2368
+ message: string;
2369
+ author: {
2370
+ name: string;
2371
+ email: string;
2372
+ date?: string;
2373
+ };
2374
+ committer: {
2375
+ name: string;
2376
+ email: string;
2377
+ date?: string;
2378
+ };
2379
+ parents?: Array<string>;
2380
+ }>;
2381
+ };
2382
+ };
2383
+ type GetByOrgByRepoCommitResponse = GetByOrgByRepoCommitResponses[keyof GetByOrgByRepoCommitResponses];
2384
+ type PostByOrgByRepoCommitData = {
2385
+ body: {
2386
+ branch: string;
2387
+ message: string;
2388
+ author: {
2389
+ name: string;
2390
+ email: string;
2391
+ date?: string;
2392
+ };
2393
+ committer?: {
2394
+ name: string;
2395
+ email: string;
2396
+ date?: string;
2397
+ };
2398
+ base_sha?: string;
2399
+ files: Array<{
2400
+ path: string;
2401
+ content: string;
2402
+ encoding?: 'utf-8' | 'base64';
2403
+ action?: 'upsert';
2404
+ mode?: '100644' | '100755';
2405
+ } | {
2406
+ path: string;
2407
+ action: 'delete';
2408
+ }>;
2409
+ };
2410
+ path: {
2411
+ org: string;
2412
+ repo: string;
2413
+ };
2414
+ query?: never;
2415
+ url: '/{org}/{repo}/commit';
2416
+ };
2417
+ type PostByOrgByRepoCommitErrors = {
2418
+ /**
2419
+ * Invalid request
2420
+ */
2421
+ 400: {
2422
+ error: {
2423
+ code: string;
2424
+ message: string;
2425
+ details?: {
2426
+ [key: string]: unknown;
2427
+ };
2428
+ };
2429
+ };
2430
+ /**
2431
+ * Unauthorized
2432
+ */
2433
+ 401: {
2434
+ error: {
2435
+ code: string;
2436
+ message: string;
2437
+ details?: {
2438
+ [key: string]: unknown;
2439
+ };
2440
+ };
2441
+ };
2442
+ /**
2443
+ * Forbidden
2444
+ */
2445
+ 403: {
2446
+ error: {
2447
+ code: string;
2448
+ message: string;
2449
+ details?: {
2450
+ [key: string]: unknown;
2451
+ };
2452
+ };
2453
+ };
2454
+ /**
2455
+ * Not found
2456
+ */
2457
+ 404: {
2458
+ error: {
2459
+ code: string;
2460
+ message: string;
2461
+ details?: {
2462
+ [key: string]: unknown;
2463
+ };
2464
+ };
2465
+ };
2466
+ /**
2467
+ * Not acceptable
2468
+ */
2469
+ 406: {
2470
+ error: {
2471
+ code: string;
2472
+ message: string;
2473
+ details?: {
2474
+ [key: string]: unknown;
2475
+ };
2476
+ };
2477
+ };
2478
+ /**
2479
+ * Conflict
2480
+ */
2481
+ 409: {
2482
+ error: {
2483
+ code: string;
2484
+ message: string;
2485
+ details?: {
2486
+ [key: string]: unknown;
2487
+ };
2488
+ };
2489
+ };
2490
+ /**
2491
+ * Internal error
2492
+ */
2493
+ 500: {
2494
+ error: {
2495
+ code: string;
2496
+ message: string;
2497
+ details?: {
2498
+ [key: string]: unknown;
2499
+ };
2500
+ };
2501
+ };
2502
+ };
2503
+ type PostByOrgByRepoCommitError = PostByOrgByRepoCommitErrors[keyof PostByOrgByRepoCommitErrors];
2504
+ type PostByOrgByRepoCommitResponses = {
2505
+ /**
2506
+ * Commit created
2507
+ */
2508
+ 201: {
2509
+ sha: string;
2510
+ branch: string;
2511
+ message: string;
2512
+ };
2513
+ };
2514
+ type PostByOrgByRepoCommitResponse = PostByOrgByRepoCommitResponses[keyof PostByOrgByRepoCommitResponses];
2515
+ type GetByOrgByRepoCommitByShaData = {
2516
+ body?: never;
2517
+ path: {
2518
+ org: string;
2519
+ repo: string;
2520
+ sha: string;
2521
+ };
2522
+ query?: never;
2523
+ url: '/{org}/{repo}/commit/{sha}';
2524
+ };
2525
+ type GetByOrgByRepoCommitByShaErrors = {
2526
+ /**
2527
+ * Invalid request
2528
+ */
2529
+ 400: {
2530
+ error: {
2531
+ code: string;
2532
+ message: string;
2533
+ details?: {
2534
+ [key: string]: unknown;
2535
+ };
2536
+ };
2537
+ };
2538
+ /**
2539
+ * Unauthorized
2540
+ */
2541
+ 401: {
2542
+ error: {
2543
+ code: string;
2544
+ message: string;
2545
+ details?: {
2546
+ [key: string]: unknown;
2547
+ };
2548
+ };
2549
+ };
2550
+ /**
2551
+ * Forbidden
2552
+ */
2553
+ 403: {
2554
+ error: {
2555
+ code: string;
2556
+ message: string;
2557
+ details?: {
2558
+ [key: string]: unknown;
2559
+ };
2560
+ };
2561
+ };
2562
+ /**
2563
+ * Not found
2564
+ */
2565
+ 404: {
2566
+ error: {
2567
+ code: string;
2568
+ message: string;
2569
+ details?: {
2570
+ [key: string]: unknown;
2571
+ };
2572
+ };
2573
+ };
2574
+ /**
2575
+ * Not acceptable
2576
+ */
2577
+ 406: {
2578
+ error: {
2579
+ code: string;
2580
+ message: string;
2581
+ details?: {
2582
+ [key: string]: unknown;
2583
+ };
2584
+ };
2585
+ };
2586
+ /**
2587
+ * Conflict
2588
+ */
2589
+ 409: {
2590
+ error: {
2591
+ code: string;
2592
+ message: string;
2593
+ details?: {
2594
+ [key: string]: unknown;
2595
+ };
2596
+ };
2597
+ };
2598
+ /**
2599
+ * Internal error
2600
+ */
2601
+ 500: {
2602
+ error: {
2603
+ code: string;
2604
+ message: string;
2605
+ details?: {
2606
+ [key: string]: unknown;
2607
+ };
2608
+ };
2609
+ };
2610
+ };
2611
+ type GetByOrgByRepoCommitByShaError = GetByOrgByRepoCommitByShaErrors[keyof GetByOrgByRepoCommitByShaErrors];
2612
+ type GetByOrgByRepoCommitByShaResponses = {
2613
+ /**
2614
+ * Commit
2615
+ */
2616
+ 200: {
2617
+ sha: string;
2618
+ message: string;
2619
+ author: {
2620
+ name: string;
2621
+ email: string;
2622
+ date?: string;
2623
+ };
2624
+ committer: {
2625
+ name: string;
2626
+ email: string;
2627
+ date?: string;
2628
+ };
2629
+ parents?: Array<string>;
2630
+ };
2631
+ };
2632
+ type GetByOrgByRepoCommitByShaResponse = GetByOrgByRepoCommitByShaResponses[keyof GetByOrgByRepoCommitByShaResponses];
2633
+ type GetByOrgByRepoDiffData = {
2634
+ body?: never;
2635
+ path: {
2636
+ org: string;
2637
+ repo: string;
2638
+ };
2639
+ query: {
2640
+ base: string;
2641
+ head: string;
2642
+ };
2643
+ url: '/{org}/{repo}/diff';
2644
+ };
2645
+ type GetByOrgByRepoDiffErrors = {
2646
+ /**
2647
+ * Invalid request
2648
+ */
2649
+ 400: {
2650
+ error: {
2651
+ code: string;
2652
+ message: string;
2653
+ details?: {
2654
+ [key: string]: unknown;
2655
+ };
2656
+ };
2657
+ };
2658
+ /**
2659
+ * Unauthorized
2660
+ */
2661
+ 401: {
2662
+ error: {
2663
+ code: string;
2664
+ message: string;
2665
+ details?: {
2666
+ [key: string]: unknown;
2667
+ };
2668
+ };
2669
+ };
2670
+ /**
2671
+ * Forbidden
2672
+ */
2673
+ 403: {
2674
+ error: {
2675
+ code: string;
2676
+ message: string;
2677
+ details?: {
2678
+ [key: string]: unknown;
2679
+ };
2680
+ };
2681
+ };
2682
+ /**
2683
+ * Not found
2684
+ */
2685
+ 404: {
2686
+ error: {
2687
+ code: string;
2688
+ message: string;
2689
+ details?: {
2690
+ [key: string]: unknown;
2691
+ };
2692
+ };
2693
+ };
2694
+ /**
2695
+ * Not acceptable
2696
+ */
2697
+ 406: {
2698
+ error: {
2699
+ code: string;
2700
+ message: string;
2701
+ details?: {
2702
+ [key: string]: unknown;
2703
+ };
2704
+ };
2705
+ };
2706
+ /**
2707
+ * Conflict
2708
+ */
2709
+ 409: {
2710
+ error: {
2711
+ code: string;
2712
+ message: string;
2713
+ details?: {
2714
+ [key: string]: unknown;
2715
+ };
2716
+ };
2717
+ };
2718
+ /**
2719
+ * Internal error
2720
+ */
2721
+ 500: {
2722
+ error: {
2723
+ code: string;
2724
+ message: string;
2725
+ details?: {
2726
+ [key: string]: unknown;
2727
+ };
2728
+ };
2729
+ };
2730
+ };
2731
+ type GetByOrgByRepoDiffError = GetByOrgByRepoDiffErrors[keyof GetByOrgByRepoDiffErrors];
2732
+ type GetByOrgByRepoDiffResponses = {
2733
+ /**
2734
+ * Diff response
2735
+ */
2736
+ 200: {
2737
+ base: string;
2738
+ head: string;
2739
+ truncated: boolean;
2740
+ stats: {
2741
+ files: number;
2742
+ additions: number;
2743
+ deletions: number;
2744
+ changes: number;
2745
+ };
2746
+ files: Array<{
2747
+ path: string;
2748
+ status: 'A' | 'M' | 'D' | 'R' | 'C' | 'T';
2749
+ old_path?: string;
2750
+ bytes?: number;
2751
+ is_eof?: boolean;
2752
+ raw?: string;
2753
+ }>;
2754
+ filtered_files: Array<{
2755
+ path: string;
2756
+ status: 'A' | 'M' | 'D' | 'R' | 'C' | 'T';
2757
+ old_path?: string;
2758
+ bytes?: number;
2759
+ is_eof?: boolean;
2760
+ }>;
2761
+ };
2762
+ };
2763
+ type GetByOrgByRepoDiffResponse = GetByOrgByRepoDiffResponses[keyof GetByOrgByRepoDiffResponses];
2764
+ type GetByOrgByRepoWebhookData = {
2765
+ body?: never;
2766
+ path: {
2767
+ org: string;
2768
+ repo: string;
2769
+ };
2770
+ query?: never;
2771
+ url: '/{org}/{repo}/webhook';
2772
+ };
2773
+ type GetByOrgByRepoWebhookErrors = {
2774
+ /**
2775
+ * Invalid request
2776
+ */
2777
+ 400: {
2778
+ error: {
2779
+ code: string;
2780
+ message: string;
2781
+ details?: {
2782
+ [key: string]: unknown;
2783
+ };
2784
+ };
2785
+ };
2786
+ /**
2787
+ * Unauthorized
2788
+ */
2789
+ 401: {
2790
+ error: {
2791
+ code: string;
2792
+ message: string;
2793
+ details?: {
2794
+ [key: string]: unknown;
2795
+ };
2796
+ };
2797
+ };
2798
+ /**
2799
+ * Forbidden
2800
+ */
2801
+ 403: {
2802
+ error: {
2803
+ code: string;
2804
+ message: string;
2805
+ details?: {
2806
+ [key: string]: unknown;
2807
+ };
2808
+ };
2809
+ };
2810
+ /**
2811
+ * Not found
2812
+ */
2813
+ 404: {
2814
+ error: {
2815
+ code: string;
2816
+ message: string;
2817
+ details?: {
2818
+ [key: string]: unknown;
2819
+ };
2820
+ };
2821
+ };
2822
+ /**
2823
+ * Not acceptable
2824
+ */
2825
+ 406: {
2826
+ error: {
2827
+ code: string;
2828
+ message: string;
2829
+ details?: {
2830
+ [key: string]: unknown;
2831
+ };
2832
+ };
2833
+ };
2834
+ /**
2835
+ * Conflict
2836
+ */
2837
+ 409: {
2838
+ error: {
2839
+ code: string;
2840
+ message: string;
2841
+ details?: {
2842
+ [key: string]: unknown;
2843
+ };
2844
+ };
2845
+ };
2846
+ /**
2847
+ * Internal error
2848
+ */
2849
+ 500: {
2850
+ error: {
2851
+ code: string;
2852
+ message: string;
2853
+ details?: {
2854
+ [key: string]: unknown;
2855
+ };
2856
+ };
2857
+ };
2858
+ };
2859
+ type GetByOrgByRepoWebhookError = GetByOrgByRepoWebhookErrors[keyof GetByOrgByRepoWebhookErrors];
2860
+ type GetByOrgByRepoWebhookResponses = {
2861
+ /**
2862
+ * Webhook list
2863
+ */
2864
+ 200: {
2865
+ webhooks: Array<{
2866
+ id: string;
2867
+ url: string;
2868
+ events: Array<'push'>;
2869
+ branches: Array<string> | null;
2870
+ globs: Array<string> | null;
2871
+ created_at: string;
2872
+ updated_at: string;
2873
+ }>;
2874
+ };
2875
+ };
2876
+ type GetByOrgByRepoWebhookResponse = GetByOrgByRepoWebhookResponses[keyof GetByOrgByRepoWebhookResponses];
2877
+ type PostByOrgByRepoWebhookData = {
2878
+ body: {
2879
+ url: string;
2880
+ events?: Array<'push'>;
2881
+ branches?: Array<string>;
2882
+ globs?: Array<string>;
2883
+ secret?: string;
2884
+ };
2885
+ path: {
2886
+ org: string;
2887
+ repo: string;
2888
+ };
2889
+ query?: never;
2890
+ url: '/{org}/{repo}/webhook';
2891
+ };
2892
+ type PostByOrgByRepoWebhookErrors = {
2893
+ /**
2894
+ * Invalid request
2895
+ */
2896
+ 400: {
2897
+ error: {
2898
+ code: string;
2899
+ message: string;
2900
+ details?: {
2901
+ [key: string]: unknown;
2902
+ };
2903
+ };
2904
+ };
2905
+ /**
2906
+ * Unauthorized
2907
+ */
2908
+ 401: {
2909
+ error: {
2910
+ code: string;
2911
+ message: string;
2912
+ details?: {
2913
+ [key: string]: unknown;
2914
+ };
2915
+ };
2916
+ };
2917
+ /**
2918
+ * Forbidden
2919
+ */
2920
+ 403: {
2921
+ error: {
2922
+ code: string;
2923
+ message: string;
2924
+ details?: {
2925
+ [key: string]: unknown;
2926
+ };
2927
+ };
2928
+ };
2929
+ /**
2930
+ * Not found
2931
+ */
2932
+ 404: {
2933
+ error: {
2934
+ code: string;
2935
+ message: string;
2936
+ details?: {
2937
+ [key: string]: unknown;
2938
+ };
2939
+ };
2940
+ };
2941
+ /**
2942
+ * Not acceptable
2943
+ */
2944
+ 406: {
2945
+ error: {
2946
+ code: string;
2947
+ message: string;
2948
+ details?: {
2949
+ [key: string]: unknown;
2950
+ };
2951
+ };
2952
+ };
2953
+ /**
2954
+ * Conflict
2955
+ */
2956
+ 409: {
2957
+ error: {
2958
+ code: string;
2959
+ message: string;
2960
+ details?: {
2961
+ [key: string]: unknown;
2962
+ };
2963
+ };
2964
+ };
2965
+ /**
2966
+ * Internal error
2967
+ */
2968
+ 500: {
2969
+ error: {
2970
+ code: string;
2971
+ message: string;
2972
+ details?: {
2973
+ [key: string]: unknown;
2974
+ };
2975
+ };
2976
+ };
2977
+ };
2978
+ type PostByOrgByRepoWebhookError = PostByOrgByRepoWebhookErrors[keyof PostByOrgByRepoWebhookErrors];
2979
+ type PostByOrgByRepoWebhookResponses = {
2980
+ /**
2981
+ * Webhook created
2982
+ */
2983
+ 201: {
2984
+ id: string;
2985
+ url: string;
2986
+ events: Array<'push'>;
2987
+ branches: Array<string> | null;
2988
+ globs: Array<string> | null;
2989
+ created_at: string;
2990
+ updated_at: string;
2991
+ secret: string;
2992
+ };
2993
+ };
2994
+ type PostByOrgByRepoWebhookResponse = PostByOrgByRepoWebhookResponses[keyof PostByOrgByRepoWebhookResponses];
2995
+ type DeleteByOrgByRepoWebhookByWebhookIdData = {
2996
+ body?: never;
2997
+ path: {
2998
+ org: string;
2999
+ repo: string;
3000
+ webhookId: string;
3001
+ };
3002
+ query?: never;
3003
+ url: '/{org}/{repo}/webhook/{webhookId}';
3004
+ };
3005
+ type DeleteByOrgByRepoWebhookByWebhookIdErrors = {
3006
+ /**
3007
+ * Invalid request
3008
+ */
3009
+ 400: {
3010
+ error: {
3011
+ code: string;
3012
+ message: string;
3013
+ details?: {
3014
+ [key: string]: unknown;
3015
+ };
3016
+ };
3017
+ };
3018
+ /**
3019
+ * Unauthorized
3020
+ */
3021
+ 401: {
3022
+ error: {
3023
+ code: string;
3024
+ message: string;
3025
+ details?: {
3026
+ [key: string]: unknown;
3027
+ };
3028
+ };
3029
+ };
3030
+ /**
3031
+ * Forbidden
3032
+ */
3033
+ 403: {
3034
+ error: {
3035
+ code: string;
3036
+ message: string;
3037
+ details?: {
3038
+ [key: string]: unknown;
3039
+ };
3040
+ };
3041
+ };
3042
+ /**
3043
+ * Not found
3044
+ */
3045
+ 404: {
3046
+ error: {
3047
+ code: string;
3048
+ message: string;
3049
+ details?: {
3050
+ [key: string]: unknown;
3051
+ };
3052
+ };
3053
+ };
3054
+ /**
3055
+ * Not acceptable
3056
+ */
3057
+ 406: {
3058
+ error: {
3059
+ code: string;
3060
+ message: string;
3061
+ details?: {
3062
+ [key: string]: unknown;
3063
+ };
3064
+ };
3065
+ };
3066
+ /**
3067
+ * Conflict
3068
+ */
3069
+ 409: {
3070
+ error: {
3071
+ code: string;
3072
+ message: string;
3073
+ details?: {
3074
+ [key: string]: unknown;
3075
+ };
3076
+ };
3077
+ };
3078
+ /**
3079
+ * Internal error
3080
+ */
3081
+ 500: {
3082
+ error: {
3083
+ code: string;
3084
+ message: string;
3085
+ details?: {
3086
+ [key: string]: unknown;
3087
+ };
3088
+ };
3089
+ };
3090
+ };
3091
+ type DeleteByOrgByRepoWebhookByWebhookIdError = DeleteByOrgByRepoWebhookByWebhookIdErrors[keyof DeleteByOrgByRepoWebhookByWebhookIdErrors];
3092
+ type DeleteByOrgByRepoWebhookByWebhookIdResponses = {
3093
+ /**
3094
+ * Webhook deleted
3095
+ */
3096
+ 200: {
3097
+ success: true;
3098
+ };
3099
+ };
3100
+ type DeleteByOrgByRepoWebhookByWebhookIdResponse = DeleteByOrgByRepoWebhookByWebhookIdResponses[keyof DeleteByOrgByRepoWebhookByWebhookIdResponses];
3101
+ type GetByOrgData = {
3102
+ body?: never;
3103
+ path: {
3104
+ org: string;
3105
+ };
3106
+ query?: never;
3107
+ url: '/{org}';
3108
+ };
3109
+ type GetByOrgErrors = {
3110
+ /**
3111
+ * Invalid request
3112
+ */
3113
+ 400: {
3114
+ error: {
3115
+ code: string;
3116
+ message: string;
3117
+ details?: {
3118
+ [key: string]: unknown;
3119
+ };
3120
+ };
3121
+ };
3122
+ /**
3123
+ * Unauthorized
3124
+ */
3125
+ 401: {
3126
+ error: {
3127
+ code: string;
3128
+ message: string;
3129
+ details?: {
3130
+ [key: string]: unknown;
3131
+ };
3132
+ };
3133
+ };
3134
+ /**
3135
+ * Forbidden
3136
+ */
3137
+ 403: {
3138
+ error: {
3139
+ code: string;
3140
+ message: string;
3141
+ details?: {
3142
+ [key: string]: unknown;
3143
+ };
3144
+ };
3145
+ };
3146
+ /**
3147
+ * Not found
3148
+ */
3149
+ 404: {
3150
+ error: {
3151
+ code: string;
3152
+ message: string;
3153
+ details?: {
3154
+ [key: string]: unknown;
3155
+ };
3156
+ };
3157
+ };
3158
+ /**
3159
+ * Not acceptable
3160
+ */
3161
+ 406: {
3162
+ error: {
3163
+ code: string;
3164
+ message: string;
3165
+ details?: {
3166
+ [key: string]: unknown;
3167
+ };
3168
+ };
3169
+ };
3170
+ /**
3171
+ * Conflict
3172
+ */
3173
+ 409: {
3174
+ error: {
3175
+ code: string;
3176
+ message: string;
3177
+ details?: {
3178
+ [key: string]: unknown;
3179
+ };
3180
+ };
3181
+ };
3182
+ /**
3183
+ * Internal error
3184
+ */
3185
+ 500: {
3186
+ error: {
3187
+ code: string;
3188
+ message: string;
3189
+ details?: {
3190
+ [key: string]: unknown;
3191
+ };
3192
+ };
3193
+ };
3194
+ };
3195
+ type GetByOrgError = GetByOrgErrors[keyof GetByOrgErrors];
3196
+ type GetByOrgResponses = {
3197
+ /**
3198
+ * Organization summary
3199
+ */
3200
+ 200: {
3201
+ created_at: string;
3202
+ num_repos: number;
3203
+ };
3204
+ };
3205
+ type GetByOrgResponse = GetByOrgResponses[keyof GetByOrgResponses];
3206
+ //#endregion
3207
+ //#region src/sdk.gen.d.ts
3208
+ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
3209
+ /**
3210
+ * You can provide a client instance returned by `createClient()` instead of
3211
+ * individual options. This might be also useful if you want to implement a
3212
+ * custom client.
3213
+ */
3214
+ client?: Client;
3215
+ /**
3216
+ * You can pass arbitrary values through the `meta` object. This can be
3217
+ * used to access values that aren't defined as part of the SDK function.
3218
+ */
3219
+ meta?: Record<string, unknown>;
3220
+ };
3221
+ /**
3222
+ * Get caller identity
3223
+ *
3224
+ * Get the authenticated organization, effective scopes, and API key metadata
3225
+ */
3226
+ declare const getWhoami: <ThrowOnError extends boolean = false>(options?: Options<GetWhoamiData, ThrowOnError>) => RequestResult<GetWhoamiResponses, GetWhoamiErrors, ThrowOnError, "fields">;
3227
+ /**
3228
+ * List API keys
3229
+ *
3230
+ * List all API keys for the organization (key values are not returned)
3231
+ */
3232
+ declare const getByOrgApiKey: <ThrowOnError extends boolean = false>(options: Options<GetByOrgApiKeyData, ThrowOnError>) => RequestResult<GetByOrgApiKeyResponses, GetByOrgApiKeyErrors, ThrowOnError, "fields">;
3233
+ /**
3234
+ * Create API key
3235
+ *
3236
+ * Create a new API key for programmatic access
3237
+ */
3238
+ declare const postByOrgApiKey: <ThrowOnError extends boolean = false>(options: Options<PostByOrgApiKeyData, ThrowOnError>) => RequestResult<PostByOrgApiKeyResponses, PostByOrgApiKeyErrors, ThrowOnError, "fields">;
3239
+ /**
3240
+ * Revoke API key
3241
+ *
3242
+ * Revoke an API key by its ID
3243
+ */
3244
+ declare const deleteByOrgApiKeyById: <ThrowOnError extends boolean = false>(options: Options<DeleteByOrgApiKeyByIdData, ThrowOnError>) => RequestResult<DeleteByOrgApiKeyByIdResponses, DeleteByOrgApiKeyByIdErrors, ThrowOnError, "fields">;
3245
+ /**
3246
+ * List repositories
3247
+ *
3248
+ * List repositories in the organization using cursor pagination
3249
+ */
3250
+ declare const getByOrgRepo: <ThrowOnError extends boolean = false>(options: Options<GetByOrgRepoData, ThrowOnError>) => RequestResult<GetByOrgRepoResponses, GetByOrgRepoErrors, ThrowOnError, "fields">;
3251
+ /**
3252
+ * Create repository
3253
+ *
3254
+ * Create a new repository in the organization
3255
+ */
3256
+ declare const postByOrgRepo: <ThrowOnError extends boolean = false>(options: Options<PostByOrgRepoData, ThrowOnError>) => RequestResult<PostByOrgRepoResponses, PostByOrgRepoErrors, ThrowOnError, "fields">;
3257
+ /**
3258
+ * Delete repository
3259
+ *
3260
+ * Permanently delete a repository and all its data
3261
+ */
3262
+ declare const deleteByOrgByRepo: <ThrowOnError extends boolean = false>(options: Options<DeleteByOrgByRepoData, ThrowOnError>) => RequestResult<DeleteByOrgByRepoResponses, DeleteByOrgByRepoErrors, ThrowOnError, "fields">;
3263
+ /**
3264
+ * Get repository
3265
+ *
3266
+ * Get metadata for a specific repository
3267
+ */
3268
+ declare const getByOrgByRepo: <ThrowOnError extends boolean = false>(options: Options<GetByOrgByRepoData, ThrowOnError>) => RequestResult<GetByOrgByRepoResponses, GetByOrgByRepoErrors, ThrowOnError, "fields">;
3269
+ /**
3270
+ * Update repository
3271
+ *
3272
+ * Update repository name, default branch, tags, or upstream configuration. Tags are patched: set values to add/update and null values to remove.
3273
+ */
3274
+ declare const patchByOrgByRepo: <ThrowOnError extends boolean = false>(options: Options<PatchByOrgByRepoData, ThrowOnError>) => RequestResult<PatchByOrgByRepoResponses, PatchByOrgByRepoErrors, ThrowOnError, "fields">;
3275
+ /**
3276
+ * Get repo Tags
3277
+ *
3278
+ * Get repository tag values and counts
3279
+ */
3280
+ declare const getByOrgRepoTags: <ThrowOnError extends boolean = false>(options: Options<GetByOrgRepoTagsData, ThrowOnError>) => RequestResult<GetByOrgRepoTagsResponses, GetByOrgRepoTagsErrors, ThrowOnError, "fields">;
3281
+ /**
3282
+ * Bulk update Tags
3283
+ *
3284
+ * Bulk set or remove repo tags
3285
+ */
3286
+ declare const postByOrgRepoBulkTags: <ThrowOnError extends boolean = false>(options: Options<PostByOrgRepoBulkTagsData, ThrowOnError>) => RequestResult<PostByOrgRepoBulkTagsResponses, PostByOrgRepoBulkTagsErrors, ThrowOnError, "fields">;
3287
+ /**
3288
+ * Get content
3289
+ *
3290
+ * Get file content or directory listing at a path. Use Accept: application/json for the JSON union response, or Accept: application/octet-stream for raw file bytes. Directory + octet-stream requests return 406 Not Acceptable.
3291
+ */
3292
+ declare const getByOrgByRepoContent: <ThrowOnError extends boolean = false>(options: Options<GetByOrgByRepoContentData, ThrowOnError>) => RequestResult<GetByOrgByRepoContentResponses, GetByOrgByRepoContentErrors, ThrowOnError, "fields">;
3293
+ /**
3294
+ * List bookmarks
3295
+ *
3296
+ * List all bookmarks in a repository
3297
+ */
3298
+ declare const getByOrgByRepoBookmark: <ThrowOnError extends boolean = false>(options: Options<GetByOrgByRepoBookmarkData, ThrowOnError>) => RequestResult<GetByOrgByRepoBookmarkResponses, GetByOrgByRepoBookmarkErrors, ThrowOnError, "fields">;
3299
+ /**
3300
+ * Create bookmark
3301
+ *
3302
+ * Create a new bookmark from an existing commit
3303
+ */
3304
+ declare const postByOrgByRepoBookmark: <ThrowOnError extends boolean = false>(options: Options<PostByOrgByRepoBookmarkData, ThrowOnError>) => RequestResult<PostByOrgByRepoBookmarkResponses, PostByOrgByRepoBookmarkErrors, ThrowOnError, "fields">;
3305
+ /**
3306
+ * Delete bookmark
3307
+ *
3308
+ * Delete a bookmark from a repository
3309
+ */
3310
+ declare const deleteByOrgByRepoBookmarkByBookmark: <ThrowOnError extends boolean = false>(options: Options<DeleteByOrgByRepoBookmarkByBookmarkData, ThrowOnError>) => RequestResult<DeleteByOrgByRepoBookmarkByBookmarkResponses, DeleteByOrgByRepoBookmarkByBookmarkErrors, ThrowOnError, "fields">;
3311
+ /**
3312
+ * List commits
3313
+ *
3314
+ * List commits for a repository from a specific ref
3315
+ */
3316
+ declare const getByOrgByRepoCommit: <ThrowOnError extends boolean = false>(options: Options<GetByOrgByRepoCommitData, ThrowOnError>) => RequestResult<GetByOrgByRepoCommitResponses, GetByOrgByRepoCommitErrors, ThrowOnError, "fields">;
3317
+ /**
3318
+ * Create commit
3319
+ *
3320
+ * Create a new commit on a branch with file changes
3321
+ */
3322
+ declare const postByOrgByRepoCommit: <ThrowOnError extends boolean = false>(options: Options<PostByOrgByRepoCommitData, ThrowOnError>) => RequestResult<PostByOrgByRepoCommitResponses, PostByOrgByRepoCommitErrors, ThrowOnError, "fields">;
3323
+ /**
3324
+ * Get commit
3325
+ *
3326
+ * Retrieve a specific commit by its SHA
3327
+ */
3328
+ declare const getByOrgByRepoCommitBySha: <ThrowOnError extends boolean = false>(options: Options<GetByOrgByRepoCommitByShaData, ThrowOnError>) => RequestResult<GetByOrgByRepoCommitByShaResponses, GetByOrgByRepoCommitByShaErrors, ThrowOnError, "fields">;
3329
+ /**
3330
+ * Get diff
3331
+ *
3332
+ * Retrieve the diff between two commit OIDs
3333
+ */
3334
+ declare const getByOrgByRepoDiff: <ThrowOnError extends boolean = false>(options: Options<GetByOrgByRepoDiffData, ThrowOnError>) => RequestResult<GetByOrgByRepoDiffResponses, GetByOrgByRepoDiffErrors, ThrowOnError, "fields">;
3335
+ /**
3336
+ * List webhooks
3337
+ *
3338
+ * List webhooks for a repository
3339
+ */
3340
+ declare const getByOrgByRepoWebhook: <ThrowOnError extends boolean = false>(options: Options<GetByOrgByRepoWebhookData, ThrowOnError>) => RequestResult<GetByOrgByRepoWebhookResponses, GetByOrgByRepoWebhookErrors, ThrowOnError, "fields">;
3341
+ /**
3342
+ * Create webhook
3343
+ *
3344
+ * Create a webhook for a repository
3345
+ */
3346
+ declare const postByOrgByRepoWebhook: <ThrowOnError extends boolean = false>(options: Options<PostByOrgByRepoWebhookData, ThrowOnError>) => RequestResult<PostByOrgByRepoWebhookResponses, PostByOrgByRepoWebhookErrors, ThrowOnError, "fields">;
3347
+ /**
3348
+ * Delete webhook
3349
+ *
3350
+ * Delete a webhook from a repository
3351
+ */
3352
+ declare const deleteByOrgByRepoWebhookByWebhookId: <ThrowOnError extends boolean = false>(options: Options<DeleteByOrgByRepoWebhookByWebhookIdData, ThrowOnError>) => RequestResult<DeleteByOrgByRepoWebhookByWebhookIdResponses, DeleteByOrgByRepoWebhookByWebhookIdErrors, ThrowOnError, "fields">;
3353
+ /**
3354
+ * Get organization
3355
+ *
3356
+ * Get organization metadata and repository counts
3357
+ */
3358
+ declare const getByOrg: <ThrowOnError extends boolean = false>(options: Options<GetByOrgData, ThrowOnError>) => RequestResult<GetByOrgResponses, GetByOrgErrors, ThrowOnError, "fields">;
3359
+ //#endregion
3360
+ export { type ClientOptions, type DeleteByOrgApiKeyByIdData, type DeleteByOrgApiKeyByIdError, type DeleteByOrgApiKeyByIdErrors, type DeleteByOrgApiKeyByIdResponse, type DeleteByOrgApiKeyByIdResponses, type DeleteByOrgByRepoBookmarkByBookmarkData, type DeleteByOrgByRepoBookmarkByBookmarkError, type DeleteByOrgByRepoBookmarkByBookmarkErrors, type DeleteByOrgByRepoBookmarkByBookmarkResponse, type DeleteByOrgByRepoBookmarkByBookmarkResponses, type DeleteByOrgByRepoData, type DeleteByOrgByRepoError, type DeleteByOrgByRepoErrors, type DeleteByOrgByRepoResponse, type DeleteByOrgByRepoResponses, type DeleteByOrgByRepoWebhookByWebhookIdData, type DeleteByOrgByRepoWebhookByWebhookIdError, type DeleteByOrgByRepoWebhookByWebhookIdErrors, type DeleteByOrgByRepoWebhookByWebhookIdResponse, type DeleteByOrgByRepoWebhookByWebhookIdResponses, type GetByOrgApiKeyData, type GetByOrgApiKeyError, type GetByOrgApiKeyErrors, type GetByOrgApiKeyResponse, type GetByOrgApiKeyResponses, type GetByOrgByRepoBookmarkData, type GetByOrgByRepoBookmarkError, type GetByOrgByRepoBookmarkErrors, type GetByOrgByRepoBookmarkResponse, type GetByOrgByRepoBookmarkResponses, type GetByOrgByRepoCommitByShaData, type GetByOrgByRepoCommitByShaError, type GetByOrgByRepoCommitByShaErrors, type GetByOrgByRepoCommitByShaResponse, type GetByOrgByRepoCommitByShaResponses, type GetByOrgByRepoCommitData, type GetByOrgByRepoCommitError, type GetByOrgByRepoCommitErrors, type GetByOrgByRepoCommitResponse, type GetByOrgByRepoCommitResponses, type GetByOrgByRepoContentData, type GetByOrgByRepoContentError, type GetByOrgByRepoContentErrors, type GetByOrgByRepoContentResponse, type GetByOrgByRepoContentResponses, type GetByOrgByRepoData, type GetByOrgByRepoDiffData, type GetByOrgByRepoDiffError, type GetByOrgByRepoDiffErrors, type GetByOrgByRepoDiffResponse, type GetByOrgByRepoDiffResponses, type GetByOrgByRepoError, type GetByOrgByRepoErrors, type GetByOrgByRepoResponse, type GetByOrgByRepoResponses, type GetByOrgByRepoWebhookData, type GetByOrgByRepoWebhookError, type GetByOrgByRepoWebhookErrors, type GetByOrgByRepoWebhookResponse, type GetByOrgByRepoWebhookResponses, type GetByOrgData, type GetByOrgError, type GetByOrgErrors, type GetByOrgRepoData, type GetByOrgRepoError, type GetByOrgRepoErrors, type GetByOrgRepoResponse, type GetByOrgRepoResponses, type GetByOrgRepoTagsData, type GetByOrgRepoTagsError, type GetByOrgRepoTagsErrors, type GetByOrgRepoTagsResponse, type GetByOrgRepoTagsResponses, type GetByOrgResponse, type GetByOrgResponses, type GetWhoamiData, type GetWhoamiError, type GetWhoamiErrors, type GetWhoamiResponse, type GetWhoamiResponses, type Options, type PatchByOrgByRepoData, type PatchByOrgByRepoError, type PatchByOrgByRepoErrors, type PatchByOrgByRepoResponse, type PatchByOrgByRepoResponses, type PostByOrgApiKeyData, type PostByOrgApiKeyError, type PostByOrgApiKeyErrors, type PostByOrgApiKeyResponse, type PostByOrgApiKeyResponses, type PostByOrgByRepoBookmarkData, type PostByOrgByRepoBookmarkError, type PostByOrgByRepoBookmarkErrors, type PostByOrgByRepoBookmarkResponse, type PostByOrgByRepoBookmarkResponses, type PostByOrgByRepoCommitData, type PostByOrgByRepoCommitError, type PostByOrgByRepoCommitErrors, type PostByOrgByRepoCommitResponse, type PostByOrgByRepoCommitResponses, type PostByOrgByRepoWebhookData, type PostByOrgByRepoWebhookError, type PostByOrgByRepoWebhookErrors, type PostByOrgByRepoWebhookResponse, type PostByOrgByRepoWebhookResponses, type PostByOrgRepoBulkTagsData, type PostByOrgRepoBulkTagsError, type PostByOrgRepoBulkTagsErrors, type PostByOrgRepoBulkTagsResponse, type PostByOrgRepoBulkTagsResponses, type PostByOrgRepoData, type PostByOrgRepoError, type PostByOrgRepoErrors, type PostByOrgRepoResponse, type PostByOrgRepoResponses, deleteByOrgApiKeyById, deleteByOrgByRepo, deleteByOrgByRepoBookmarkByBookmark, deleteByOrgByRepoWebhookByWebhookId, getByOrg, getByOrgApiKey, getByOrgByRepo, getByOrgByRepoBookmark, getByOrgByRepoCommit, getByOrgByRepoCommitBySha, getByOrgByRepoContent, getByOrgByRepoDiff, getByOrgByRepoWebhook, getByOrgRepo, getByOrgRepoTags, getWhoami, patchByOrgByRepo, postByOrgApiKey, postByOrgByRepoBookmark, postByOrgByRepoCommit, postByOrgByRepoWebhook, postByOrgRepo, postByOrgRepoBulkTags };
3361
+ //# sourceMappingURL=index.d.mts.map