@bodhiapp/ts-client 0.1.5 → 0.1.6

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.
@@ -1,12 +1,45 @@
1
- export type AliasResponse = {
2
- alias: string;
3
- context_params: GptContextParams;
4
- filename: string;
5
- model_params: {};
6
- repo: string;
7
- request_params: OaiRequestParams;
8
- snapshot: string;
9
- source: string;
1
+ /**
2
+ * Flat enum representing all types of model aliases
3
+ * Each variant is identified by the source field
4
+ */
5
+ export type Alias = (UserAlias & {
6
+ source: 'user';
7
+ }) | (ModelAlias & {
8
+ source: 'model';
9
+ }) | (ApiAlias & {
10
+ source: 'api';
11
+ });
12
+ export type ApiAlias = {
13
+ api_format: ApiFormat;
14
+ base_url: string;
15
+ created_at: string;
16
+ id: string;
17
+ models: Array<string>;
18
+ prefix?: string | null;
19
+ updated_at: string;
20
+ };
21
+ /**
22
+ * API format/protocol specification
23
+ */
24
+ export type ApiFormat = 'openai' | 'placeholder';
25
+ /**
26
+ * Response containing available API formats
27
+ */
28
+ export type ApiFormatsResponse = {
29
+ data: Array<ApiFormat>;
30
+ };
31
+ /**
32
+ * Response containing API model configuration
33
+ */
34
+ export type ApiModelResponse = {
35
+ api_format: ApiFormat;
36
+ api_key_masked: string;
37
+ base_url: string;
38
+ created_at: string;
39
+ id: string;
40
+ models: Array<string>;
41
+ prefix?: string | null;
42
+ updated_at: string;
10
43
  };
11
44
  export type ApiToken = {
12
45
  created_at: string;
@@ -20,43 +53,68 @@ export type ApiToken = {
20
53
  };
21
54
  export type ApiTokenResponse = {
22
55
  /**
23
- * Offline token that can be used as API Token
56
+ * API token with bapp_ prefix for programmatic access
24
57
  */
25
58
  offline_token: string;
26
59
  };
60
+ export type AppAccessRequest = {
61
+ app_client_id: string;
62
+ };
63
+ export type AppAccessResponse = {
64
+ scope: string;
65
+ };
27
66
  /**
28
67
  * Application information and status
29
68
  */
30
69
  export type AppInfo = {
31
70
  /**
32
- * Current application status
71
+ * Current application setup and operational status
33
72
  */
34
73
  status: AppStatus;
35
74
  /**
36
- * Application version
75
+ * Application version number (semantic versioning)
37
76
  */
38
77
  version: string;
39
78
  };
79
+ export type AppRole = Role | TokenScope | UserScope;
40
80
  export type AppStatus = 'setup' | 'ready' | 'resource-admin';
81
+ /**
82
+ * Request body for approving access with role assignment
83
+ */
84
+ export type ApproveUserAccessRequest = {
85
+ /**
86
+ * Role to assign to the user
87
+ */
88
+ role: Role;
89
+ };
41
90
  export type AuthCallbackRequest = {
42
91
  /**
43
- * OAuth authorization code from successful authentication
92
+ * OAuth authorization code from successful authentication (required for success flow)
44
93
  */
45
94
  code?: string | null;
46
95
  /**
47
- * OAuth error code if authentication failed
96
+ * OAuth error code if authentication failed (e.g., "access_denied")
48
97
  */
49
98
  error?: string | null;
50
99
  /**
51
- * OAuth error description if authentication failed
100
+ * Human-readable OAuth error description if authentication failed
52
101
  */
53
102
  error_description?: string | null;
54
103
  /**
55
- * OAuth state parameter for CSRF protection
104
+ * OAuth state parameter for CSRF protection (must match initiated request)
56
105
  */
57
106
  state?: string | null;
58
107
  [key: string]: string | (string | null) | (string | null) | (string | null) | (string | null) | undefined;
59
108
  };
109
+ /**
110
+ * Change user role request
111
+ */
112
+ export type ChangeRoleRequest = {
113
+ /**
114
+ * Role to assign to the user
115
+ */
116
+ role: string;
117
+ };
60
118
  export type ChatRequest = {
61
119
  format?: string | null;
62
120
  keep_alive?: null | Duration;
@@ -65,41 +123,107 @@ export type ChatRequest = {
65
123
  options?: null | Options;
66
124
  stream?: boolean | null;
67
125
  };
126
+ export type CreateAliasRequest = {
127
+ alias: string;
128
+ context_params?: Array<string> | null;
129
+ filename: string;
130
+ repo: string;
131
+ request_params?: null | OaiRequestParams;
132
+ snapshot?: string | null;
133
+ };
134
+ /**
135
+ * Request to create a new API model configuration
136
+ */
137
+ export type CreateApiModelRequest = {
138
+ /**
139
+ * API format/protocol (e.g., "openai")
140
+ */
141
+ api_format: ApiFormat;
142
+ /**
143
+ * API key for authentication
144
+ */
145
+ api_key: string;
146
+ /**
147
+ * API base URL
148
+ */
149
+ base_url: string;
150
+ /**
151
+ * List of available models
152
+ */
153
+ models: Array<string>;
154
+ /**
155
+ * Optional prefix for model namespacing (e.g., "azure/" for "azure/gpt-4", "openai:" for "openai:gpt-4")
156
+ */
157
+ prefix?: string | null;
158
+ };
68
159
  /**
69
160
  * Request to create a new API token
70
161
  */
71
162
  export type CreateApiTokenRequest = {
72
163
  /**
73
- * Optional name for the API token
164
+ * Descriptive name for the API token (minimum 3 characters)
74
165
  */
75
166
  name?: string | null;
76
167
  };
77
168
  export type DownloadRequest = {
78
169
  created_at: string;
170
+ downloaded_bytes?: number;
79
171
  error?: string | null;
80
172
  filename: string;
81
173
  id: string;
82
174
  repo: string;
175
+ started_at: string;
83
176
  status: DownloadStatus;
177
+ total_bytes?: number | null;
84
178
  updated_at: string;
85
179
  };
86
180
  export type DownloadStatus = 'pending' | 'completed' | 'error';
87
181
  export type Duration = string;
182
+ export type EmptyResponse = {
183
+ [key: string]: unknown;
184
+ };
88
185
  export type ErrorBody = {
186
+ /**
187
+ * Specific error code for programmatic error handling
188
+ */
89
189
  code?: string | null;
190
+ /**
191
+ * Human-readable error message describing what went wrong
192
+ */
90
193
  message: string;
194
+ /**
195
+ * Parameter name that caused the error (for validation errors)
196
+ */
91
197
  param?: string | null;
198
+ /**
199
+ * Error type categorizing the kind of error that occurred
200
+ */
92
201
  type: string;
93
202
  };
94
- export type GptContextParams = {
95
- n_ctx?: number | null;
96
- n_keep?: number | null;
97
- n_parallel?: number | null;
98
- n_predict?: number | null;
99
- n_seed?: number | null;
100
- n_threads?: number | null;
203
+ /**
204
+ * Request to fetch available models from provider
205
+ */
206
+ export type FetchModelsRequest = {
207
+ /**
208
+ * API key for authentication (provide either api_key OR id, api_key takes preference if both provided)
209
+ */
210
+ api_key?: string;
211
+ /**
212
+ * API base URL (optional when using id)
213
+ */
214
+ base_url: string;
215
+ /**
216
+ * API model ID to look up stored credentials (provide either api_key OR id, api_key takes preference if both provided)
217
+ */
218
+ id?: string;
219
+ };
220
+ /**
221
+ * Response containing available models from provider
222
+ */
223
+ export type FetchModelsResponse = {
224
+ models: Array<string>;
101
225
  };
102
- export type ListModelResponseWrapper = {
226
+ export type ListModelResponse = {
103
227
  data: Array<{
104
228
  /**
105
229
  * The Unix timestamp (in seconds) when the model was created.
@@ -120,6 +244,13 @@ export type ListModelResponseWrapper = {
120
244
  }>;
121
245
  object: string;
122
246
  };
247
+ /**
248
+ * List users query parameters
249
+ */
250
+ export type ListUsersParams = {
251
+ page?: number | null;
252
+ page_size?: number | null;
253
+ };
123
254
  export type LocalModelResponse = {
124
255
  filename: string;
125
256
  model_params: {};
@@ -139,6 +270,12 @@ export type Model = {
139
270
  modified_at: number;
140
271
  size: number;
141
272
  };
273
+ export type ModelAlias = {
274
+ alias: string;
275
+ filename: string;
276
+ repo: string;
277
+ snapshot: string;
278
+ };
142
279
  export type ModelDetails = {
143
280
  families?: Array<string> | null;
144
281
  family: string;
@@ -147,6 +284,27 @@ export type ModelDetails = {
147
284
  parent_model?: string | null;
148
285
  quantization_level: string;
149
286
  };
287
+ /**
288
+ * Describes an OpenAI model offering that can be used with the API.
289
+ */
290
+ export type ModelResponse = {
291
+ /**
292
+ * The Unix timestamp (in seconds) when the model was created.
293
+ */
294
+ created: number;
295
+ /**
296
+ * The model identifier, which can be referenced in the API endpoints.
297
+ */
298
+ id: string;
299
+ /**
300
+ * The object type, which is always "model".
301
+ */
302
+ object: string;
303
+ /**
304
+ * The organization that owns the model.
305
+ */
306
+ owned_by: string;
307
+ };
150
308
  export type ModelsResponse = {
151
309
  models: Array<Model>;
152
310
  };
@@ -155,11 +313,11 @@ export type ModelsResponse = {
155
313
  */
156
314
  export type NewDownloadRequest = {
157
315
  /**
158
- * Model file name to pull
316
+ * Model file name to download (typically .gguf format)
159
317
  */
160
318
  filename: string;
161
319
  /**
162
- * HuggingFace repository name
320
+ * HuggingFace repository name in format 'username/repository-name'
163
321
  */
164
322
  repo: string;
165
323
  };
@@ -177,6 +335,9 @@ export type OllamaError = {
177
335
  error: string;
178
336
  };
179
337
  export type OpenAiApiError = {
338
+ /**
339
+ * Error details following OpenAI API error format
340
+ */
180
341
  error: ErrorBody;
181
342
  };
182
343
  export type Options = {
@@ -210,81 +371,103 @@ export type Options = {
210
371
  use_mmap?: boolean | null;
211
372
  vocab_only?: boolean | null;
212
373
  };
213
- export type PaginatedResponseAliasResponse = {
214
- data: Array<{
215
- alias: string;
216
- context_params: GptContextParams;
217
- filename: string;
218
- model_params: {};
219
- repo: string;
220
- request_params: OaiRequestParams;
221
- snapshot: string;
222
- source: string;
223
- }>;
374
+ export type PaginatedAliasResponse = {
375
+ data: Array<Alias>;
224
376
  page: number;
225
377
  page_size: number;
226
378
  total: number;
227
379
  };
228
- export type PaginatedResponseApiToken = {
229
- data: Array<{
230
- created_at: string;
231
- id: string;
232
- name: string;
233
- status: TokenStatus;
234
- token_hash: string;
235
- token_id: string;
236
- updated_at: string;
237
- user_id: string;
238
- }>;
380
+ /**
381
+ * Paginated response for API model listings
382
+ */
383
+ export type PaginatedApiModelResponse = {
384
+ data: Array<ApiModelResponse>;
239
385
  page: number;
240
386
  page_size: number;
241
387
  total: number;
242
388
  };
243
- export type PaginatedResponseDownloadRequest = {
244
- data: Array<{
245
- created_at: string;
246
- error?: string | null;
247
- filename: string;
248
- id: string;
249
- repo: string;
250
- status: DownloadStatus;
251
- updated_at: string;
252
- }>;
389
+ export type PaginatedApiTokenResponse = {
390
+ data: Array<ApiToken>;
253
391
  page: number;
254
392
  page_size: number;
255
393
  total: number;
256
394
  };
257
- export type PaginatedResponseLocalModelResponse = {
258
- data: Array<{
259
- filename: string;
260
- model_params: {};
261
- repo: string;
262
- size?: number | null;
263
- snapshot: string;
264
- }>;
395
+ export type PaginatedDownloadResponse = {
396
+ data: Array<DownloadRequest>;
397
+ page: number;
398
+ page_size: number;
399
+ total: number;
400
+ };
401
+ export type PaginatedLocalModelResponse = {
402
+ data: Array<LocalModelResponse>;
403
+ page: number;
404
+ page_size: number;
405
+ total: number;
406
+ };
407
+ /**
408
+ * Paginated response for access requests
409
+ */
410
+ export type PaginatedUserAccessResponse = {
411
+ /**
412
+ * Current page number
413
+ */
414
+ page: number;
415
+ /**
416
+ * Number of items per page
417
+ */
418
+ page_size: number;
419
+ /**
420
+ * List of access requests
421
+ */
422
+ requests: Array<UserAccessRequest>;
423
+ /**
424
+ * Total number of requests
425
+ */
426
+ total: number;
427
+ };
428
+ export type PaginatedUserAliasResponse = {
429
+ data: Array<UserAliasResponse>;
265
430
  page: number;
266
431
  page_size: number;
267
432
  total: number;
268
433
  };
434
+ /**
435
+ * Query parameters for pagination and sorting
436
+ */
437
+ export type PaginationSortParams = {
438
+ /**
439
+ * Page number (1-based indexing)
440
+ */
441
+ page?: number;
442
+ /**
443
+ * Number of items to return per page (maximum 100)
444
+ */
445
+ page_size?: number;
446
+ /**
447
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
448
+ */
449
+ sort?: string | null;
450
+ /**
451
+ * Sort order: 'asc' for ascending, 'desc' for descending
452
+ */
453
+ sort_order?: string;
454
+ };
269
455
  /**
270
456
  * Response to the ping endpoint
271
457
  */
272
458
  export type PingResponse = {
273
459
  /**
274
- * always returns "pong"
460
+ * Simple ping response message
275
461
  */
276
462
  message: string;
277
463
  };
278
464
  export type RedirectResponse = {
279
465
  /**
280
- * The URL to redirect to for OAuth authentication
466
+ * The URL to redirect to (OAuth authorization URL or application home page)
281
467
  */
282
468
  location: string;
283
469
  };
284
- export type Repo = {
285
- name: string;
286
- user: string;
287
- };
470
+ export type Role = 'resource_user' | 'resource_power_user' | 'resource_manager' | 'resource_admin';
288
471
  export type SettingInfo = {
289
472
  current_value: unknown;
290
473
  default_value: unknown;
@@ -309,16 +492,21 @@ export type SettingSource = 'system' | 'command_line' | 'environment' | 'setting
309
492
  * Request to setup the application in authenticated mode
310
493
  */
311
494
  export type SetupRequest = {
312
- [key: string]: unknown;
495
+ /**
496
+ * Optional description of the server's purpose
497
+ */
498
+ description?: string | null;
499
+ /**
500
+ * Server name for identification (minimum 10 characters)
501
+ */
502
+ name: string;
313
503
  };
314
504
  /**
315
505
  * Response containing the updated application status after setup
316
506
  */
317
507
  export type SetupResponse = {
318
508
  /**
319
- * New application status after setup
320
- * - resource-admin: When setup in authenticated mode
321
- * - ready: When setup in non-authenticated mode
509
+ * New application status after successful setup
322
510
  */
323
511
  status: AppStatus;
324
512
  };
@@ -334,13 +522,79 @@ export type ShowResponse = {
334
522
  parameters: string;
335
523
  template: string;
336
524
  };
525
+ /**
526
+ * Request to test API connectivity with a prompt
527
+ */
528
+ export type TestPromptRequest = {
529
+ /**
530
+ * API key for authentication (provide either api_key OR id, api_key takes preference if both provided)
531
+ */
532
+ api_key?: string;
533
+ /**
534
+ * API base URL (optional when using id)
535
+ */
536
+ base_url: string;
537
+ /**
538
+ * API model ID to look up stored credentials (provide either api_key OR id, api_key takes preference if both provided)
539
+ */
540
+ id?: string;
541
+ /**
542
+ * Model to use for testing
543
+ */
544
+ model: string;
545
+ /**
546
+ * Test prompt (max 30 characters for cost control)
547
+ */
548
+ prompt: string;
549
+ };
550
+ /**
551
+ * Response from testing API connectivity
552
+ */
553
+ export type TestPromptResponse = {
554
+ error?: string | null;
555
+ response?: string | null;
556
+ success: boolean;
557
+ };
558
+ export type TokenScope = 'scope_token_user' | 'scope_token_power_user' | 'scope_token_manager' | 'scope_token_admin';
337
559
  export type TokenStatus = 'active' | 'inactive';
560
+ export type UpdateAliasRequest = {
561
+ context_params?: Array<string> | null;
562
+ filename: string;
563
+ repo: string;
564
+ request_params?: null | OaiRequestParams;
565
+ snapshot?: string | null;
566
+ };
567
+ /**
568
+ * Request to update an existing API model configuration
569
+ */
570
+ export type UpdateApiModelRequest = {
571
+ /**
572
+ * API format/protocol (required)
573
+ */
574
+ api_format: ApiFormat;
575
+ /**
576
+ * API key for authentication (optional, only update if provided for security)
577
+ */
578
+ api_key?: string | null;
579
+ /**
580
+ * API base URL (required)
581
+ */
582
+ base_url: string;
583
+ /**
584
+ * List of available models (required)
585
+ */
586
+ models: Array<string>;
587
+ /**
588
+ * Optional prefix for model namespacing
589
+ */
590
+ prefix?: string | null;
591
+ };
338
592
  /**
339
593
  * Request to update an existing API token
340
594
  */
341
595
  export type UpdateApiTokenRequest = {
342
596
  /**
343
- * New name for the token
597
+ * New descriptive name for the token (minimum 3 characters)
344
598
  */
345
599
  name: string;
346
600
  /**
@@ -352,25 +606,104 @@ export type UpdateApiTokenRequest = {
352
606
  * Request to update a setting value
353
607
  */
354
608
  export type UpdateSettingRequest = {
609
+ /**
610
+ * New value for the setting (type depends on setting metadata)
611
+ */
355
612
  value: unknown;
356
613
  };
614
+ export type UserAccessRequest = {
615
+ /**
616
+ * Creation timestamp
617
+ */
618
+ created_at: string;
619
+ /**
620
+ * Unique identifier for the request
621
+ */
622
+ id: number;
623
+ reviewer?: string | null;
624
+ /**
625
+ * Current status of the request
626
+ */
627
+ status: UserAccessRequestStatus;
628
+ /**
629
+ * Last update timestamp
630
+ */
631
+ updated_at: string;
632
+ /**
633
+ * User ID (UUID) of the requesting user
634
+ */
635
+ user_id: string;
636
+ /**
637
+ * Username of the requesting user
638
+ */
639
+ username: string;
640
+ };
641
+ export type UserAccessRequestStatus = 'pending' | 'approved' | 'rejected';
357
642
  /**
358
- * Information about the currently logged in user
643
+ * Response for checking access request status
359
644
  */
360
- export type UserInfo = {
645
+ export type UserAccessStatusResponse = {
361
646
  /**
362
- * User's email address
647
+ * Creation timestamp
363
648
  */
364
- email?: string | null;
649
+ created_at: string;
650
+ /**
651
+ * Current status of the request (pending, approved, rejected)
652
+ */
653
+ status: UserAccessRequestStatus;
365
654
  /**
366
- * If user is logged in
655
+ * Last update timestamp
367
656
  */
368
- logged_in: boolean;
657
+ updated_at: string;
369
658
  /**
370
- * List of roles assigned to the user
659
+ * Username of the requesting user
371
660
  */
372
- roles: Array<string>;
661
+ username: string;
662
+ };
663
+ export type UserAlias = {
664
+ alias: string;
665
+ context_params?: Array<string>;
666
+ filename: string;
667
+ repo: string;
668
+ request_params?: OaiRequestParams;
669
+ snapshot: string;
670
+ };
671
+ export type UserAliasResponse = {
672
+ alias: string;
673
+ context_params: Array<string>;
674
+ filename: string;
675
+ model_params: {};
676
+ repo: string;
677
+ request_params: OaiRequestParams;
678
+ snapshot: string;
679
+ source: string;
680
+ };
681
+ export type UserInfo = {
682
+ first_name?: string | null;
683
+ last_name?: string | null;
684
+ role?: null | AppRole;
685
+ user_id: string;
686
+ username: string;
687
+ };
688
+ export type UserListResponse = {
689
+ client_id: string;
690
+ has_next: boolean;
691
+ has_previous: boolean;
692
+ page: number;
693
+ page_size: number;
694
+ total_pages: number;
695
+ total_users: number;
696
+ users: Array<UserInfo>;
373
697
  };
698
+ /**
699
+ * User authentication response with discriminated union
700
+ */
701
+ export type UserResponse = {
702
+ auth_status: 'logged_out';
703
+ } | (UserInfo & {
704
+ auth_status: 'logged_in';
705
+ });
706
+ export type UserScope = 'scope_user_user' | 'scope_user_power_user' | 'scope_user_manager' | 'scope_user_admin';
374
707
  export type ChatOllamaModelData = {
375
708
  /**
376
709
  * Chat request in Ollama format
@@ -386,69 +719,472 @@ export type ChatOllamaModelErrors = {
386
719
  */
387
720
  400: OllamaError;
388
721
  /**
389
- * Model not found
722
+ * Model not found
723
+ */
724
+ 404: OllamaError;
725
+ /**
726
+ * Internal server error
727
+ */
728
+ 500: OllamaError;
729
+ };
730
+ export type ChatOllamaModelError = ChatOllamaModelErrors[keyof ChatOllamaModelErrors];
731
+ export type ChatOllamaModelResponses = {
732
+ /**
733
+ * Chat response
734
+ */
735
+ 200: unknown;
736
+ };
737
+ export type ShowOllamaModelData = {
738
+ /**
739
+ * Model name to get details for
740
+ */
741
+ body: ShowRequest;
742
+ path?: never;
743
+ query?: never;
744
+ url: '/api/show';
745
+ };
746
+ export type ShowOllamaModelErrors = {
747
+ /**
748
+ * Model not found
749
+ */
750
+ 404: OllamaError;
751
+ /**
752
+ * Internal server error
753
+ */
754
+ 500: OllamaError;
755
+ };
756
+ export type ShowOllamaModelError = ShowOllamaModelErrors[keyof ShowOllamaModelErrors];
757
+ export type ShowOllamaModelResponses = {
758
+ /**
759
+ * Model details
760
+ */
761
+ 200: ShowResponse;
762
+ };
763
+ export type ShowOllamaModelResponse = ShowOllamaModelResponses[keyof ShowOllamaModelResponses];
764
+ export type ListOllamaModelsData = {
765
+ body?: never;
766
+ path?: never;
767
+ query?: never;
768
+ url: '/api/tags';
769
+ };
770
+ export type ListOllamaModelsErrors = {
771
+ /**
772
+ * Internal server error
773
+ */
774
+ 500: OllamaError;
775
+ };
776
+ export type ListOllamaModelsError = ListOllamaModelsErrors[keyof ListOllamaModelsErrors];
777
+ export type ListOllamaModelsResponses = {
778
+ /**
779
+ * List of available models
780
+ */
781
+ 200: ModelsResponse;
782
+ };
783
+ export type ListOllamaModelsResponse = ListOllamaModelsResponses[keyof ListOllamaModelsResponses];
784
+ export type ListAllAccessRequestsData = {
785
+ body?: never;
786
+ path?: never;
787
+ query?: {
788
+ /**
789
+ * Page number (1-based indexing)
790
+ */
791
+ page?: number;
792
+ /**
793
+ * Number of items to return per page (maximum 100)
794
+ */
795
+ page_size?: number;
796
+ /**
797
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
798
+ */
799
+ sort?: string;
800
+ /**
801
+ * Sort order: 'asc' for ascending, 'desc' for descending
802
+ */
803
+ sort_order?: string;
804
+ };
805
+ url: '/bodhi/v1/access-requests';
806
+ };
807
+ export type ListAllAccessRequestsErrors = {
808
+ /**
809
+ * Not authenticated
810
+ */
811
+ 401: OpenAiApiError;
812
+ /**
813
+ * Insufficient permissions
814
+ */
815
+ 403: OpenAiApiError;
816
+ };
817
+ export type ListAllAccessRequestsError = ListAllAccessRequestsErrors[keyof ListAllAccessRequestsErrors];
818
+ export type ListAllAccessRequestsResponses = {
819
+ /**
820
+ * All requests retrieved
821
+ */
822
+ 200: PaginatedUserAccessResponse;
823
+ };
824
+ export type ListAllAccessRequestsResponse = ListAllAccessRequestsResponses[keyof ListAllAccessRequestsResponses];
825
+ export type ListPendingAccessRequestsData = {
826
+ body?: never;
827
+ path?: never;
828
+ query?: {
829
+ /**
830
+ * Page number (1-based indexing)
831
+ */
832
+ page?: number;
833
+ /**
834
+ * Number of items to return per page (maximum 100)
835
+ */
836
+ page_size?: number;
837
+ /**
838
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
839
+ */
840
+ sort?: string;
841
+ /**
842
+ * Sort order: 'asc' for ascending, 'desc' for descending
843
+ */
844
+ sort_order?: string;
845
+ };
846
+ url: '/bodhi/v1/access-requests/pending';
847
+ };
848
+ export type ListPendingAccessRequestsErrors = {
849
+ /**
850
+ * Not authenticated
851
+ */
852
+ 401: OpenAiApiError;
853
+ /**
854
+ * Insufficient permissions
855
+ */
856
+ 403: OpenAiApiError;
857
+ };
858
+ export type ListPendingAccessRequestsError = ListPendingAccessRequestsErrors[keyof ListPendingAccessRequestsErrors];
859
+ export type ListPendingAccessRequestsResponses = {
860
+ /**
861
+ * Pending requests retrieved
862
+ */
863
+ 200: PaginatedUserAccessResponse;
864
+ };
865
+ export type ListPendingAccessRequestsResponse = ListPendingAccessRequestsResponses[keyof ListPendingAccessRequestsResponses];
866
+ export type ApproveAccessRequestData = {
867
+ /**
868
+ * Role to assign to the user
869
+ */
870
+ body: ApproveUserAccessRequest;
871
+ path: {
872
+ /**
873
+ * Access request ID
874
+ */
875
+ id: number;
876
+ };
877
+ query?: never;
878
+ url: '/bodhi/v1/access-requests/{id}/approve';
879
+ };
880
+ export type ApproveAccessRequestErrors = {
881
+ /**
882
+ * Not authenticated
883
+ */
884
+ 401: OpenAiApiError;
885
+ /**
886
+ * Insufficient permissions
887
+ */
888
+ 403: OpenAiApiError;
889
+ /**
890
+ * Request not found
891
+ */
892
+ 404: OpenAiApiError;
893
+ };
894
+ export type ApproveAccessRequestError = ApproveAccessRequestErrors[keyof ApproveAccessRequestErrors];
895
+ export type ApproveAccessRequestResponses = {
896
+ /**
897
+ * Request approved successfully
898
+ */
899
+ 200: unknown;
900
+ };
901
+ export type RejectAccessRequestData = {
902
+ body?: never;
903
+ path: {
904
+ /**
905
+ * Access request ID
906
+ */
907
+ id: number;
908
+ };
909
+ query?: never;
910
+ url: '/bodhi/v1/access-requests/{id}/reject';
911
+ };
912
+ export type RejectAccessRequestErrors = {
913
+ /**
914
+ * Not authenticated
915
+ */
916
+ 401: OpenAiApiError;
917
+ /**
918
+ * Insufficient permissions
919
+ */
920
+ 403: OpenAiApiError;
921
+ /**
922
+ * Request not found
923
+ */
924
+ 404: OpenAiApiError;
925
+ };
926
+ export type RejectAccessRequestError = RejectAccessRequestErrors[keyof RejectAccessRequestErrors];
927
+ export type RejectAccessRequestResponses = {
928
+ /**
929
+ * Request rejected successfully
930
+ */
931
+ 200: unknown;
932
+ };
933
+ export type ListApiModelsData = {
934
+ body?: never;
935
+ path?: never;
936
+ query?: {
937
+ /**
938
+ * Page number (1-based indexing)
939
+ */
940
+ page?: number;
941
+ /**
942
+ * Number of items to return per page (maximum 100)
943
+ */
944
+ page_size?: number;
945
+ /**
946
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
947
+ */
948
+ sort?: string;
949
+ /**
950
+ * Sort order: 'asc' for ascending, 'desc' for descending
951
+ */
952
+ sort_order?: string;
953
+ };
954
+ url: '/bodhi/v1/api-models';
955
+ };
956
+ export type ListApiModelsErrors = {
957
+ /**
958
+ * Internal server error during API model retrieval
959
+ */
960
+ 500: OpenAiApiError;
961
+ };
962
+ export type ListApiModelsError = ListApiModelsErrors[keyof ListApiModelsErrors];
963
+ export type ListApiModelsResponses = {
964
+ /**
965
+ * API model configurations retrieved successfully
966
+ */
967
+ 200: PaginatedApiModelResponse;
968
+ };
969
+ export type ListApiModelsResponse = ListApiModelsResponses[keyof ListApiModelsResponses];
970
+ export type CreateApiModelData = {
971
+ body: CreateApiModelRequest;
972
+ path?: never;
973
+ query?: never;
974
+ url: '/bodhi/v1/api-models';
975
+ };
976
+ export type CreateApiModelErrors = {
977
+ /**
978
+ * Invalid request
979
+ */
980
+ 400: OpenAiApiError;
981
+ /**
982
+ * Alias already exists
983
+ */
984
+ 409: OpenAiApiError;
985
+ /**
986
+ * Internal server error
987
+ */
988
+ 500: OpenAiApiError;
989
+ };
990
+ export type CreateApiModelError = CreateApiModelErrors[keyof CreateApiModelErrors];
991
+ export type CreateApiModelResponses = {
992
+ /**
993
+ * API model created
994
+ */
995
+ 201: ApiModelResponse;
996
+ };
997
+ export type CreateApiModelResponse = CreateApiModelResponses[keyof CreateApiModelResponses];
998
+ export type GetApiFormatsData = {
999
+ body?: never;
1000
+ path?: never;
1001
+ query?: never;
1002
+ url: '/bodhi/v1/api-models/api-formats';
1003
+ };
1004
+ export type GetApiFormatsErrors = {
1005
+ /**
1006
+ * Internal server error during API format retrieval
1007
+ */
1008
+ 500: OpenAiApiError;
1009
+ };
1010
+ export type GetApiFormatsError = GetApiFormatsErrors[keyof GetApiFormatsErrors];
1011
+ export type GetApiFormatsResponses = {
1012
+ /**
1013
+ * API formats retrieved successfully
1014
+ */
1015
+ 200: ApiFormatsResponse;
1016
+ };
1017
+ export type GetApiFormatsResponse = GetApiFormatsResponses[keyof GetApiFormatsResponses];
1018
+ export type FetchApiModelsData = {
1019
+ body: FetchModelsRequest;
1020
+ path?: never;
1021
+ query?: never;
1022
+ url: '/bodhi/v1/api-models/fetch-models';
1023
+ };
1024
+ export type FetchApiModelsErrors = {
1025
+ /**
1026
+ * Invalid request
1027
+ */
1028
+ 400: OpenAiApiError;
1029
+ /**
1030
+ * Internal server error
1031
+ */
1032
+ 500: OpenAiApiError;
1033
+ };
1034
+ export type FetchApiModelsError = FetchApiModelsErrors[keyof FetchApiModelsErrors];
1035
+ export type FetchApiModelsResponses = {
1036
+ /**
1037
+ * Available models
1038
+ */
1039
+ 200: FetchModelsResponse;
1040
+ };
1041
+ export type FetchApiModelsResponse = FetchApiModelsResponses[keyof FetchApiModelsResponses];
1042
+ export type TestApiModelData = {
1043
+ body: TestPromptRequest;
1044
+ path?: never;
1045
+ query?: never;
1046
+ url: '/bodhi/v1/api-models/test';
1047
+ };
1048
+ export type TestApiModelErrors = {
1049
+ /**
1050
+ * Invalid request
1051
+ */
1052
+ 400: OpenAiApiError;
1053
+ /**
1054
+ * Internal server error
1055
+ */
1056
+ 500: OpenAiApiError;
1057
+ };
1058
+ export type TestApiModelError = TestApiModelErrors[keyof TestApiModelErrors];
1059
+ export type TestApiModelResponses = {
1060
+ /**
1061
+ * Test result
1062
+ */
1063
+ 200: TestPromptResponse;
1064
+ };
1065
+ export type TestApiModelResponse = TestApiModelResponses[keyof TestApiModelResponses];
1066
+ export type DeleteApiModelData = {
1067
+ body?: never;
1068
+ path: {
1069
+ /**
1070
+ * API model alias
1071
+ */
1072
+ alias: string;
1073
+ };
1074
+ query?: never;
1075
+ url: '/bodhi/v1/api-models/{alias}';
1076
+ };
1077
+ export type DeleteApiModelErrors = {
1078
+ /**
1079
+ * API model not found
1080
+ */
1081
+ 404: OpenAiApiError;
1082
+ /**
1083
+ * Internal server error
1084
+ */
1085
+ 500: OpenAiApiError;
1086
+ };
1087
+ export type DeleteApiModelError = DeleteApiModelErrors[keyof DeleteApiModelErrors];
1088
+ export type DeleteApiModelResponses = {
1089
+ /**
1090
+ * API model deleted
1091
+ */
1092
+ 204: void;
1093
+ };
1094
+ export type DeleteApiModelResponse = DeleteApiModelResponses[keyof DeleteApiModelResponses];
1095
+ export type UpdateApiModelData = {
1096
+ body: UpdateApiModelRequest;
1097
+ path: {
1098
+ /**
1099
+ * API model alias
1100
+ */
1101
+ alias: string;
1102
+ };
1103
+ query?: never;
1104
+ url: '/bodhi/v1/api-models/{alias}';
1105
+ };
1106
+ export type UpdateApiModelErrors = {
1107
+ /**
1108
+ * Invalid request
1109
+ */
1110
+ 400: OpenAiApiError;
1111
+ /**
1112
+ * API model not found
390
1113
  */
391
- 404: OllamaError;
1114
+ 404: OpenAiApiError;
392
1115
  /**
393
1116
  * Internal server error
394
1117
  */
395
- 500: OllamaError;
1118
+ 500: OpenAiApiError;
396
1119
  };
397
- export type ChatOllamaModelError = ChatOllamaModelErrors[keyof ChatOllamaModelErrors];
398
- export type ChatOllamaModelResponses = {
1120
+ export type UpdateApiModelError = UpdateApiModelErrors[keyof UpdateApiModelErrors];
1121
+ export type UpdateApiModelResponses = {
399
1122
  /**
400
- * Chat response
1123
+ * API model updated
401
1124
  */
402
- 200: unknown;
1125
+ 200: ApiModelResponse;
403
1126
  };
404
- export type ShowOllamaModelData = {
405
- /**
406
- * Model name to get details for
407
- */
408
- body: ShowRequest;
409
- path?: never;
1127
+ export type UpdateApiModelResponse = UpdateApiModelResponses[keyof UpdateApiModelResponses];
1128
+ export type GetApiModelData = {
1129
+ body?: never;
1130
+ path: {
1131
+ /**
1132
+ * Unique identifier for the API model alias
1133
+ */
1134
+ id: string;
1135
+ };
410
1136
  query?: never;
411
- url: '/api/show';
1137
+ url: '/bodhi/v1/api-models/{id}';
412
1138
  };
413
- export type ShowOllamaModelErrors = {
1139
+ export type GetApiModelErrors = {
414
1140
  /**
415
- * Model not found
1141
+ * API model with specified ID not found
416
1142
  */
417
- 404: OllamaError;
1143
+ 404: OpenAiApiError;
418
1144
  /**
419
- * Internal server error
1145
+ * Internal server error during model retrieval
420
1146
  */
421
- 500: OllamaError;
1147
+ 500: OpenAiApiError;
422
1148
  };
423
- export type ShowOllamaModelError = ShowOllamaModelErrors[keyof ShowOllamaModelErrors];
424
- export type ShowOllamaModelResponses = {
1149
+ export type GetApiModelError = GetApiModelErrors[keyof GetApiModelErrors];
1150
+ export type GetApiModelResponses = {
425
1151
  /**
426
- * Model details
1152
+ * API model configuration retrieved successfully
427
1153
  */
428
- 200: ShowResponse;
1154
+ 200: ApiModelResponse;
429
1155
  };
430
- export type ShowOllamaModelResponse = ShowOllamaModelResponses[keyof ShowOllamaModelResponses];
431
- export type ListOllamaModelsData = {
432
- body?: never;
1156
+ export type GetApiModelResponse = GetApiModelResponses[keyof GetApiModelResponses];
1157
+ export type RequestAccessData = {
1158
+ /**
1159
+ * Application client requesting access
1160
+ */
1161
+ body: AppAccessRequest;
433
1162
  path?: never;
434
1163
  query?: never;
435
- url: '/api/tags';
1164
+ url: '/bodhi/v1/apps/request-access';
436
1165
  };
437
- export type ListOllamaModelsErrors = {
1166
+ export type RequestAccessErrors = {
438
1167
  /**
439
- * Internal server error
1168
+ * Invalid request, application not registered, or incorrect app status
440
1169
  */
441
- 500: OllamaError;
1170
+ 400: OpenAiApiError;
1171
+ /**
1172
+ * Internal server error during access request
1173
+ */
1174
+ 500: OpenAiApiError;
442
1175
  };
443
- export type ListOllamaModelsError = ListOllamaModelsErrors[keyof ListOllamaModelsErrors];
444
- export type ListOllamaModelsResponses = {
1176
+ export type RequestAccessError = RequestAccessErrors[keyof RequestAccessErrors];
1177
+ export type RequestAccessResponses = {
445
1178
  /**
446
- * List of available models
1179
+ * Access granted successfully
447
1180
  */
448
- 200: ModelsResponse;
1181
+ 200: AppAccessResponse;
449
1182
  };
450
- export type ListOllamaModelsResponse = ListOllamaModelsResponses[keyof ListOllamaModelsResponses];
1183
+ export type RequestAccessResponse = RequestAccessResponses[keyof RequestAccessResponses];
451
1184
  export type CompleteOAuthFlowData = {
1185
+ /**
1186
+ * OAuth callback parameters from authorization server
1187
+ */
452
1188
  body: AuthCallbackRequest;
453
1189
  path?: never;
454
1190
  query?: never;
@@ -456,18 +1192,18 @@ export type CompleteOAuthFlowData = {
456
1192
  };
457
1193
  export type CompleteOAuthFlowErrors = {
458
1194
  /**
459
- * OAuth error or invalid request
1195
+ * OAuth error, invalid request parameters, or state mismatch
460
1196
  */
461
1197
  422: OpenAiApiError;
462
1198
  /**
463
- * Internal server error
1199
+ * Internal server error during token exchange
464
1200
  */
465
1201
  500: OpenAiApiError;
466
1202
  };
467
1203
  export type CompleteOAuthFlowError = CompleteOAuthFlowErrors[keyof CompleteOAuthFlowErrors];
468
1204
  export type CompleteOAuthFlowResponses = {
469
1205
  /**
470
- * OAuth flow completed successfully, return redirect URL
1206
+ * OAuth flow completed successfully, user authenticated
471
1207
  */
472
1208
  200: RedirectResponse;
473
1209
  };
@@ -480,18 +1216,18 @@ export type InitiateOAuthFlowData = {
480
1216
  };
481
1217
  export type InitiateOAuthFlowErrors = {
482
1218
  /**
483
- * Internal server error
1219
+ * Internal server error during OAuth initialization
484
1220
  */
485
1221
  500: OpenAiApiError;
486
1222
  };
487
1223
  export type InitiateOAuthFlowError = InitiateOAuthFlowErrors[keyof InitiateOAuthFlowErrors];
488
1224
  export type InitiateOAuthFlowResponses = {
489
1225
  /**
490
- * User already authenticated, return home page URL
1226
+ * User already authenticated, home page URL provided
491
1227
  */
492
1228
  200: RedirectResponse;
493
1229
  /**
494
- * User not authenticated, return OAuth authorization URL
1230
+ * User not authenticated, OAuth authorization URL provided
495
1231
  */
496
1232
  201: RedirectResponse;
497
1233
  };
@@ -511,7 +1247,7 @@ export type GetAppInfoErrors = {
511
1247
  export type GetAppInfoError = GetAppInfoErrors[keyof GetAppInfoErrors];
512
1248
  export type GetAppInfoResponses = {
513
1249
  /**
514
- * Returns the status information about the Application
1250
+ * Application information retrieved successfully
515
1251
  */
516
1252
  200: AppInfo;
517
1253
  };
@@ -531,7 +1267,7 @@ export type LogoutUserErrors = {
531
1267
  export type LogoutUserError = LogoutUserErrors[keyof LogoutUserErrors];
532
1268
  export type LogoutUserResponses = {
533
1269
  /**
534
- * Logout successful, return redirect URL
1270
+ * User logged out successfully
535
1271
  */
536
1272
  200: RedirectResponse;
537
1273
  };
@@ -541,19 +1277,19 @@ export type ListModelFilesData = {
541
1277
  path?: never;
542
1278
  query?: {
543
1279
  /**
544
- * Page number (1-based)
1280
+ * Page number (1-based indexing)
545
1281
  */
546
1282
  page?: number;
547
1283
  /**
548
- * Number of items per page (max 100)
1284
+ * Number of items to return per page (maximum 100)
549
1285
  */
550
1286
  page_size?: number;
551
1287
  /**
552
- * Field to sort by (repo, filename, size, updated_at, snapshot)
1288
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
553
1289
  */
554
- sort?: string | null;
1290
+ sort?: string;
555
1291
  /**
556
- * Sort order (asc or desc)
1292
+ * Sort order: 'asc' for ascending, 'desc' for descending
557
1293
  */
558
1294
  sort_order?: string;
559
1295
  };
@@ -568,9 +1304,9 @@ export type ListModelFilesErrors = {
568
1304
  export type ListModelFilesError = ListModelFilesErrors[keyof ListModelFilesErrors];
569
1305
  export type ListModelFilesResponses = {
570
1306
  /**
571
- * List of supported model files from local HuggingFace cache folder
1307
+ * Local model files retrieved successfully from cache
572
1308
  */
573
- 200: PaginatedResponseLocalModelResponse;
1309
+ 200: PaginatedLocalModelResponse;
574
1310
  };
575
1311
  export type ListModelFilesResponse = ListModelFilesResponses[keyof ListModelFilesResponses];
576
1312
  export type ListDownloadsData = {
@@ -578,19 +1314,19 @@ export type ListDownloadsData = {
578
1314
  path?: never;
579
1315
  query?: {
580
1316
  /**
581
- * Page number (1-based)
1317
+ * Page number (1-based indexing)
582
1318
  */
583
1319
  page?: number;
584
1320
  /**
585
- * Number of items per page (max 100)
1321
+ * Number of items to return per page (maximum 100)
586
1322
  */
587
1323
  page_size?: number;
588
1324
  /**
589
- * Field to sort by (repo, filename, size, updated_at, snapshot)
1325
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
590
1326
  */
591
- sort?: string | null;
1327
+ sort?: string;
592
1328
  /**
593
- * Sort order (asc or desc)
1329
+ * Sort order: 'asc' for ascending, 'desc' for descending
594
1330
  */
595
1331
  sort_order?: string;
596
1332
  };
@@ -598,21 +1334,21 @@ export type ListDownloadsData = {
598
1334
  };
599
1335
  export type ListDownloadsErrors = {
600
1336
  /**
601
- * Internal server error
1337
+ * Internal server error during download list retrieval
602
1338
  */
603
1339
  500: OpenAiApiError;
604
1340
  };
605
1341
  export type ListDownloadsError = ListDownloadsErrors[keyof ListDownloadsErrors];
606
1342
  export type ListDownloadsResponses = {
607
1343
  /**
608
- * List of download requests
1344
+ * Model download requests retrieved successfully
609
1345
  */
610
- 200: PaginatedResponseDownloadRequest;
1346
+ 200: PaginatedDownloadResponse;
611
1347
  };
612
1348
  export type ListDownloadsResponse = ListDownloadsResponses[keyof ListDownloadsResponses];
613
1349
  export type PullModelFileData = {
614
1350
  /**
615
- * Model file download request
1351
+ * Model file download specification with repository and filename
616
1352
  */
617
1353
  body: NewDownloadRequest;
618
1354
  path?: never;
@@ -645,17 +1381,7 @@ export type PullModelByAliasData = {
645
1381
  body?: never;
646
1382
  path: {
647
1383
  /**
648
- * Available model aliases:
649
- * - llama3:instruct - Meta Llama 3 8B Instruct
650
- * - llama3:70b-instruct - Meta Llama 3 70B Instruct
651
- * - llama2:chat - Llama 2 7B Chat
652
- * - llama2:13b-chat - Llama 2 13B Chat
653
- * - llama2:70b-chat - Llama 2 70B Chat
654
- * - phi3:mini - Phi 3 Mini
655
- * - mistral:instruct - Mistral 7B Instruct
656
- * - mixtral:instruct - Mixtral 8x7B Instruct
657
- * - gemma:instruct - Gemma 7B Instruct
658
- * - gemma:7b-instruct-v1.1-q8_0 - Gemma 1.1 7B Instruct
1384
+ * Predefined model alias. Available aliases include popular models like llama2:chat, mistral:instruct, phi3:mini, etc. Use the /models endpoint to see all available aliases.
659
1385
  */
660
1386
  alias: string;
661
1387
  };
@@ -692,7 +1418,7 @@ export type GetDownloadStatusData = {
692
1418
  body?: never;
693
1419
  path: {
694
1420
  /**
695
- * Download request identifier
1421
+ * Unique identifier of the download request (UUID format)
696
1422
  */
697
1423
  id: string;
698
1424
  };
@@ -717,43 +1443,67 @@ export type GetDownloadStatusResponses = {
717
1443
  200: DownloadRequest;
718
1444
  };
719
1445
  export type GetDownloadStatusResponse = GetDownloadStatusResponses[keyof GetDownloadStatusResponses];
720
- export type ListModelAliasesData = {
1446
+ export type ListAllModelsData = {
721
1447
  body?: never;
722
1448
  path?: never;
723
1449
  query?: {
724
1450
  /**
725
- * Page number (1-based)
1451
+ * Page number (1-based indexing)
726
1452
  */
727
1453
  page?: number;
728
1454
  /**
729
- * Number of items per page (max 100)
1455
+ * Number of items to return per page (maximum 100)
730
1456
  */
731
1457
  page_size?: number;
732
1458
  /**
733
- * Field to sort by (repo, filename, size, updated_at, snapshot)
1459
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
734
1460
  */
735
- sort?: string | null;
1461
+ sort?: string;
736
1462
  /**
737
- * Sort order (asc or desc)
1463
+ * Sort order: 'asc' for ascending, 'desc' for descending
738
1464
  */
739
1465
  sort_order?: string;
740
1466
  };
741
1467
  url: '/bodhi/v1/models';
742
1468
  };
743
- export type ListModelAliasesErrors = {
1469
+ export type ListAllModelsErrors = {
1470
+ /**
1471
+ * Internal server error
1472
+ */
1473
+ 500: OpenAiApiError;
1474
+ };
1475
+ export type ListAllModelsError = ListAllModelsErrors[keyof ListAllModelsErrors];
1476
+ export type ListAllModelsResponses = {
1477
+ /**
1478
+ * Paginated list of model aliases retrieved successfully
1479
+ */
1480
+ 200: PaginatedAliasResponse;
1481
+ };
1482
+ export type ListAllModelsResponse = ListAllModelsResponses[keyof ListAllModelsResponses];
1483
+ export type CreateAliasData = {
1484
+ body: CreateAliasRequest;
1485
+ path?: never;
1486
+ query?: never;
1487
+ url: '/bodhi/v1/models';
1488
+ };
1489
+ export type CreateAliasErrors = {
1490
+ /**
1491
+ * Invalid request
1492
+ */
1493
+ 400: OpenAiApiError;
744
1494
  /**
745
1495
  * Internal server error
746
1496
  */
747
1497
  500: OpenAiApiError;
748
1498
  };
749
- export type ListModelAliasesError = ListModelAliasesErrors[keyof ListModelAliasesErrors];
750
- export type ListModelAliasesResponses = {
1499
+ export type CreateAliasError = CreateAliasErrors[keyof CreateAliasErrors];
1500
+ export type CreateAliasResponses = {
751
1501
  /**
752
- * List of configured model aliases
1502
+ * Alias created succesfully
753
1503
  */
754
- 200: PaginatedResponseAliasResponse;
1504
+ 201: UserAliasResponse;
755
1505
  };
756
- export type ListModelAliasesResponse = ListModelAliasesResponses[keyof ListModelAliasesResponses];
1506
+ export type CreateAliasResponse = CreateAliasResponses[keyof CreateAliasResponses];
757
1507
  export type GetAliasData = {
758
1508
  body?: never;
759
1509
  path: {
@@ -780,9 +1530,38 @@ export type GetAliasResponses = {
780
1530
  /**
781
1531
  * Model alias details
782
1532
  */
783
- 200: AliasResponse;
1533
+ 200: UserAliasResponse;
784
1534
  };
785
1535
  export type GetAliasResponse = GetAliasResponses[keyof GetAliasResponses];
1536
+ export type UpdateAliasData = {
1537
+ body: UpdateAliasRequest;
1538
+ path: {
1539
+ /**
1540
+ * Alias identifier
1541
+ */
1542
+ id: string;
1543
+ };
1544
+ query?: never;
1545
+ url: '/bodhi/v1/models/{id}';
1546
+ };
1547
+ export type UpdateAliasErrors = {
1548
+ /**
1549
+ * Invalid request
1550
+ */
1551
+ 400: OpenAiApiError;
1552
+ /**
1553
+ * Internal server error
1554
+ */
1555
+ 500: OpenAiApiError;
1556
+ };
1557
+ export type UpdateAliasError = UpdateAliasErrors[keyof UpdateAliasErrors];
1558
+ export type UpdateAliasResponses = {
1559
+ /**
1560
+ * Alias created succesfully
1561
+ */
1562
+ 201: UserAliasResponse;
1563
+ };
1564
+ export type UpdateAliasResponse = UpdateAliasResponses[keyof UpdateAliasResponses];
786
1565
  export type ListSettingsData = {
787
1566
  body?: never;
788
1567
  path?: never;
@@ -802,7 +1581,7 @@ export type ListSettingsErrors = {
802
1581
  export type ListSettingsError = ListSettingsErrors[keyof ListSettingsErrors];
803
1582
  export type ListSettingsResponses = {
804
1583
  /**
805
- * List of application settings
1584
+ * Application settings retrieved successfully
806
1585
  */
807
1586
  200: Array<SettingInfo>;
808
1587
  };
@@ -811,7 +1590,7 @@ export type DeleteSettingData = {
811
1590
  body?: never;
812
1591
  path: {
813
1592
  /**
814
- * Setting key to reset
1593
+ * Setting key identifier to reset to default value
815
1594
  */
816
1595
  key: string;
817
1596
  };
@@ -837,11 +1616,14 @@ export type UpdateSettingData = {
837
1616
  * Request to update a setting value
838
1617
  */
839
1618
  body: {
1619
+ /**
1620
+ * New value for the setting (type depends on setting metadata)
1621
+ */
840
1622
  value: unknown;
841
1623
  };
842
1624
  path: {
843
1625
  /**
844
- * Setting key to update
1626
+ * Setting key identifier (e.g., BODHI_LOG_LEVEL, BODHI_PORT)
845
1627
  */
846
1628
  key: string;
847
1629
  };
@@ -867,6 +1649,9 @@ export type UpdateSettingResponses = {
867
1649
  };
868
1650
  export type UpdateSettingResponse = UpdateSettingResponses[keyof UpdateSettingResponses];
869
1651
  export type SetupAppData = {
1652
+ /**
1653
+ * Application setup configuration
1654
+ */
870
1655
  body: SetupRequest;
871
1656
  path?: never;
872
1657
  query?: never;
@@ -874,18 +1659,18 @@ export type SetupAppData = {
874
1659
  };
875
1660
  export type SetupAppErrors = {
876
1661
  /**
877
- * Application is already setup
1662
+ * Invalid request or application already setup
878
1663
  */
879
1664
  400: OpenAiApiError;
880
1665
  /**
881
- * Internal server error
1666
+ * Internal server error during setup
882
1667
  */
883
1668
  500: OpenAiApiError;
884
1669
  };
885
1670
  export type SetupAppError = SetupAppErrors[keyof SetupAppErrors];
886
1671
  export type SetupAppResponses = {
887
1672
  /**
888
- * Application setup successful
1673
+ * Application setup completed successfully
889
1674
  */
890
1675
  200: SetupResponse;
891
1676
  };
@@ -895,19 +1680,19 @@ export type ListApiTokensData = {
895
1680
  path?: never;
896
1681
  query?: {
897
1682
  /**
898
- * Page number (1-based)
1683
+ * Page number (1-based indexing)
899
1684
  */
900
1685
  page?: number;
901
1686
  /**
902
- * Number of items per page (max 100)
1687
+ * Number of items to return per page (maximum 100)
903
1688
  */
904
1689
  page_size?: number;
905
1690
  /**
906
- * Field to sort by (repo, filename, size, updated_at, snapshot)
1691
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
907
1692
  */
908
- sort?: string | null;
1693
+ sort?: string;
909
1694
  /**
910
- * Sort order (asc or desc)
1695
+ * Sort order: 'asc' for ascending, 'desc' for descending
911
1696
  */
912
1697
  sort_order?: string;
913
1698
  };
@@ -928,10 +1713,13 @@ export type ListApiTokensResponses = {
928
1713
  /**
929
1714
  * List of API tokens
930
1715
  */
931
- 200: PaginatedResponseApiToken;
1716
+ 200: PaginatedApiTokenResponse;
932
1717
  };
933
1718
  export type ListApiTokensResponse = ListApiTokensResponses[keyof ListApiTokensResponses];
934
1719
  export type CreateApiTokenData = {
1720
+ /**
1721
+ * API token creation parameters
1722
+ */
935
1723
  body: CreateApiTokenRequest;
936
1724
  path?: never;
937
1725
  query?: never;
@@ -939,11 +1727,11 @@ export type CreateApiTokenData = {
939
1727
  };
940
1728
  export type CreateApiTokenErrors = {
941
1729
  /**
942
- * Invalid request
1730
+ * Invalid request parameters or token name already exists
943
1731
  */
944
1732
  400: OpenAiApiError;
945
1733
  /**
946
- * Internal server error
1734
+ * Internal server error during token creation
947
1735
  */
948
1736
  500: OpenAiApiError;
949
1737
  };
@@ -962,7 +1750,7 @@ export type UpdateApiTokenData = {
962
1750
  body: UpdateApiTokenRequest;
963
1751
  path: {
964
1752
  /**
965
- * Token identifier
1753
+ * Unique identifier of the API token to update
966
1754
  */
967
1755
  id: string;
968
1756
  };
@@ -999,18 +1787,208 @@ export type GetCurrentUserData = {
999
1787
  };
1000
1788
  export type GetCurrentUserErrors = {
1001
1789
  /**
1002
- * Error in extracting user info from token
1790
+ * Authentication error or invalid token
1003
1791
  */
1004
1792
  500: OpenAiApiError;
1005
1793
  };
1006
1794
  export type GetCurrentUserError = GetCurrentUserErrors[keyof GetCurrentUserErrors];
1007
1795
  export type GetCurrentUserResponses = {
1008
1796
  /**
1009
- * Returns current user information
1797
+ * Current user information retrieved successfully
1010
1798
  */
1011
- 200: UserInfo;
1799
+ 200: UserResponse;
1012
1800
  };
1013
1801
  export type GetCurrentUserResponse = GetCurrentUserResponses[keyof GetCurrentUserResponses];
1802
+ export type RequestUserAccessData = {
1803
+ body?: never;
1804
+ path?: never;
1805
+ query?: never;
1806
+ url: '/bodhi/v1/user/request-access';
1807
+ };
1808
+ export type RequestUserAccessErrors = {
1809
+ /**
1810
+ * Not authenticated
1811
+ */
1812
+ 401: OpenAiApiError;
1813
+ /**
1814
+ * Pending request already exists
1815
+ */
1816
+ 409: OpenAiApiError;
1817
+ /**
1818
+ * User already has role
1819
+ */
1820
+ 422: OpenAiApiError;
1821
+ };
1822
+ export type RequestUserAccessError = RequestUserAccessErrors[keyof RequestUserAccessErrors];
1823
+ export type RequestUserAccessResponses = {
1824
+ /**
1825
+ * Access request created successfully
1826
+ */
1827
+ 201: EmptyResponse;
1828
+ };
1829
+ export type RequestUserAccessResponse = RequestUserAccessResponses[keyof RequestUserAccessResponses];
1830
+ export type GetUserAccessStatusData = {
1831
+ body?: never;
1832
+ path?: never;
1833
+ query?: never;
1834
+ url: '/bodhi/v1/user/request-status';
1835
+ };
1836
+ export type GetUserAccessStatusErrors = {
1837
+ /**
1838
+ * Bad Request
1839
+ */
1840
+ 400: OpenAiApiError;
1841
+ /**
1842
+ * Not authenticated
1843
+ */
1844
+ 401: OpenAiApiError;
1845
+ /**
1846
+ * Request not found
1847
+ */
1848
+ 404: OpenAiApiError;
1849
+ };
1850
+ export type GetUserAccessStatusError = GetUserAccessStatusErrors[keyof GetUserAccessStatusErrors];
1851
+ export type GetUserAccessStatusResponses = {
1852
+ /**
1853
+ * Request status retrieved
1854
+ */
1855
+ 200: UserAccessStatusResponse;
1856
+ };
1857
+ export type GetUserAccessStatusResponse = GetUserAccessStatusResponses[keyof GetUserAccessStatusResponses];
1858
+ export type ListUsersData = {
1859
+ body?: never;
1860
+ path?: never;
1861
+ query?: {
1862
+ /**
1863
+ * Page number (1-based)
1864
+ */
1865
+ page?: number;
1866
+ /**
1867
+ * Number of users per page
1868
+ */
1869
+ page_size?: number;
1870
+ };
1871
+ url: '/bodhi/v1/users';
1872
+ };
1873
+ export type ListUsersErrors = {
1874
+ /**
1875
+ * Invalid request parameters
1876
+ */
1877
+ 400: OpenAiApiError;
1878
+ /**
1879
+ * Not authenticated
1880
+ */
1881
+ 401: OpenAiApiError;
1882
+ /**
1883
+ * Insufficient permissions
1884
+ */
1885
+ 403: OpenAiApiError;
1886
+ /**
1887
+ * Internal server error
1888
+ */
1889
+ 500: OpenAiApiError;
1890
+ };
1891
+ export type ListUsersError = ListUsersErrors[keyof ListUsersErrors];
1892
+ export type ListUsersResponses = {
1893
+ /**
1894
+ * Users retrieved successfully
1895
+ */
1896
+ 200: UserListResponse;
1897
+ };
1898
+ export type ListUsersResponse = ListUsersResponses[keyof ListUsersResponses];
1899
+ export type RemoveUserData = {
1900
+ body?: never;
1901
+ path: {
1902
+ /**
1903
+ * User ID to remove
1904
+ */
1905
+ user_id: string;
1906
+ };
1907
+ query?: never;
1908
+ url: '/bodhi/v1/users/{user_id}';
1909
+ };
1910
+ export type RemoveUserErrors = {
1911
+ /**
1912
+ * Invalid request
1913
+ */
1914
+ 400: OpenAiApiError;
1915
+ /**
1916
+ * Not authenticated
1917
+ */
1918
+ 401: OpenAiApiError;
1919
+ /**
1920
+ * Insufficient permissions
1921
+ */
1922
+ 403: OpenAiApiError;
1923
+ /**
1924
+ * User not found
1925
+ */
1926
+ 404: OpenAiApiError;
1927
+ /**
1928
+ * Internal server error
1929
+ */
1930
+ 500: OpenAiApiError;
1931
+ };
1932
+ export type RemoveUserError = RemoveUserErrors[keyof RemoveUserErrors];
1933
+ export type RemoveUserResponses = {
1934
+ /**
1935
+ * User removed successfully
1936
+ */
1937
+ 200: unknown;
1938
+ };
1939
+ export type ChangeUserRoleData = {
1940
+ body: ChangeRoleRequest;
1941
+ path: {
1942
+ /**
1943
+ * User ID to change role for
1944
+ */
1945
+ user_id: string;
1946
+ };
1947
+ query?: never;
1948
+ url: '/bodhi/v1/users/{user_id}/role';
1949
+ };
1950
+ export type ChangeUserRoleErrors = {
1951
+ /**
1952
+ * Invalid request
1953
+ */
1954
+ 400: OpenAiApiError;
1955
+ /**
1956
+ * Not authenticated
1957
+ */
1958
+ 401: OpenAiApiError;
1959
+ /**
1960
+ * Insufficient permissions
1961
+ */
1962
+ 403: OpenAiApiError;
1963
+ /**
1964
+ * User not found
1965
+ */
1966
+ 404: OpenAiApiError;
1967
+ /**
1968
+ * Internal server error
1969
+ */
1970
+ 500: OpenAiApiError;
1971
+ };
1972
+ export type ChangeUserRoleError = ChangeUserRoleErrors[keyof ChangeUserRoleErrors];
1973
+ export type ChangeUserRoleResponses = {
1974
+ /**
1975
+ * Role changed successfully
1976
+ */
1977
+ 200: unknown;
1978
+ };
1979
+ export type HealthCheckData = {
1980
+ body?: never;
1981
+ path?: never;
1982
+ query?: never;
1983
+ url: '/health';
1984
+ };
1985
+ export type HealthCheckResponses = {
1986
+ /**
1987
+ * Application is healthy and fully operational
1988
+ */
1989
+ 200: PingResponse;
1990
+ };
1991
+ export type HealthCheckResponse = HealthCheckResponses[keyof HealthCheckResponses];
1014
1992
  export type PingServerData = {
1015
1993
  body?: never;
1016
1994
  path?: never;
@@ -1019,7 +1997,7 @@ export type PingServerData = {
1019
1997
  };
1020
1998
  export type PingServerResponses = {
1021
1999
  /**
1022
- * Server is healthy
2000
+ * Server is responding normally
1023
2001
  */
1024
2002
  200: PingResponse;
1025
2003
  };
@@ -1076,9 +2054,42 @@ export type ListModelsResponses = {
1076
2054
  /**
1077
2055
  * List of available models
1078
2056
  */
1079
- 200: ListModelResponseWrapper;
2057
+ 200: ListModelResponse;
1080
2058
  };
1081
2059
  export type ListModelsResponse = ListModelsResponses[keyof ListModelsResponses];
2060
+ export type GetModelData = {
2061
+ body?: never;
2062
+ path: {
2063
+ /**
2064
+ * Model identifier - can be user alias (e.g., 'llama2:chat'), model alias, or API provider alias
2065
+ */
2066
+ id: string;
2067
+ };
2068
+ query?: never;
2069
+ url: '/v1/models/{id}';
2070
+ };
2071
+ export type GetModelErrors = {
2072
+ /**
2073
+ * Invalid authentication
2074
+ */
2075
+ 401: OpenAiApiError;
2076
+ /**
2077
+ * Model not found
2078
+ */
2079
+ 404: OpenAiApiError;
2080
+ /**
2081
+ * Internal server error
2082
+ */
2083
+ 500: OpenAiApiError;
2084
+ };
2085
+ export type GetModelError = GetModelErrors[keyof GetModelErrors];
2086
+ export type GetModelResponses = {
2087
+ /**
2088
+ * Model details
2089
+ */
2090
+ 200: ModelResponse;
2091
+ };
2092
+ export type GetModelResponse = GetModelResponses[keyof GetModelResponses];
1082
2093
  export type ClientOptions = {
1083
2094
  baseUrl: 'http://localhost:1135' | (string & {});
1084
2095
  };