@breign/client 1.0.49 → 1.0.50

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.
@@ -38,6 +38,9 @@ export interface UpdateProviderRequest {
38
38
  export interface ValidateProviderRequest {
39
39
  providerValiationRequestUio: ProviderValiationRequestUio;
40
40
  }
41
+ export interface ValidateStoredProviderRequest {
42
+ providerId: string;
43
+ }
41
44
  /**
42
45
  *
43
46
  */
@@ -122,4 +125,14 @@ export declare class EngineApi extends runtime.BaseAPI {
122
125
  * Validate a provider
123
126
  */
124
127
  validateProvider(providerValiationRequestUio: ProviderValiationRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ModelUio>>;
128
+ /**
129
+ * Validate a provider by id using the API key stored server-side and fetch available models
130
+ * Validate a stored provider
131
+ */
132
+ validateStoredProviderRaw(requestParameters: ValidateStoredProviderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ModelUio>>>;
133
+ /**
134
+ * Validate a provider by id using the API key stored server-side and fetch available models
135
+ * Validate a stored provider
136
+ */
137
+ validateStoredProvider(providerId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ModelUio>>;
125
138
  }
@@ -305,5 +305,34 @@ class EngineApi extends runtime.BaseAPI {
305
305
  const response = await this.validateProviderRaw({ providerValiationRequestUio: providerValiationRequestUio }, initOverrides);
306
306
  return await response.value();
307
307
  }
308
+ /**
309
+ * Validate a provider by id using the API key stored server-side and fetch available models
310
+ * Validate a stored provider
311
+ */
312
+ async validateStoredProviderRaw(requestParameters, initOverrides) {
313
+ if (requestParameters['providerId'] == null) {
314
+ throw new runtime.RequiredError('providerId', 'Required parameter "providerId" was null or undefined when calling validateStoredProvider().');
315
+ }
316
+ const queryParameters = {};
317
+ const headerParameters = {};
318
+ if (this.configuration && this.configuration.apiKey) {
319
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
320
+ }
321
+ const response = await this.request({
322
+ path: `/engines/providers/{providerId}/validate`.replace(`{${"providerId"}}`, encodeURIComponent(String(requestParameters['providerId']))),
323
+ method: 'POST',
324
+ headers: headerParameters,
325
+ query: queryParameters,
326
+ }, initOverrides);
327
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.ModelUioFromJSON));
328
+ }
329
+ /**
330
+ * Validate a provider by id using the API key stored server-side and fetch available models
331
+ * Validate a stored provider
332
+ */
333
+ async validateStoredProvider(providerId, initOverrides) {
334
+ const response = await this.validateStoredProviderRaw({ providerId: providerId }, initOverrides);
335
+ return await response.value();
336
+ }
308
337
  }
309
338
  exports.EngineApi = EngineApi;
package/dist/openapi.json CHANGED
@@ -3462,6 +3462,88 @@
3462
3462
  "tags" : [ "engine" ]
3463
3463
  }
3464
3464
  },
3465
+ "/engines/providers/{providerId}/validate" : {
3466
+ "post" : {
3467
+ "description" : "Validate a provider by id using the API key stored server-side and fetch available models",
3468
+ "operationId" : "validateStoredProvider",
3469
+ "parameters" : [ {
3470
+ "description" : "ID of the provider",
3471
+ "in" : "path",
3472
+ "name" : "providerId",
3473
+ "required" : true,
3474
+ "schema" : {
3475
+ "type" : "string"
3476
+ }
3477
+ } ],
3478
+ "responses" : {
3479
+ "200" : {
3480
+ "content" : {
3481
+ "application/json" : {
3482
+ "schema" : {
3483
+ "items" : {
3484
+ "$ref" : "#/components/schemas/Model"
3485
+ },
3486
+ "type" : "array"
3487
+ }
3488
+ }
3489
+ },
3490
+ "description" : "Provider validated successfully"
3491
+ },
3492
+ "400" : {
3493
+ "content" : {
3494
+ "application/json" : {
3495
+ "schema" : {
3496
+ "$ref" : "#/components/schemas/BodyWithMessage"
3497
+ }
3498
+ }
3499
+ },
3500
+ "description" : "Provider has no stored API key or provider type not supported"
3501
+ },
3502
+ "401" : {
3503
+ "content" : {
3504
+ "application/json" : {
3505
+ "schema" : {
3506
+ "$ref" : "#/components/schemas/BodyWithMessage"
3507
+ }
3508
+ }
3509
+ },
3510
+ "description" : "Not authenticated"
3511
+ },
3512
+ "403" : {
3513
+ "content" : {
3514
+ "application/json" : {
3515
+ "schema" : {
3516
+ "$ref" : "#/components/schemas/BodyWithMessage"
3517
+ }
3518
+ }
3519
+ },
3520
+ "description" : "Forbidden"
3521
+ },
3522
+ "404" : {
3523
+ "content" : {
3524
+ "application/json" : {
3525
+ "schema" : {
3526
+ "$ref" : "#/components/schemas/BodyWithMessage"
3527
+ }
3528
+ }
3529
+ },
3530
+ "description" : "Provider not found"
3531
+ },
3532
+ "500" : {
3533
+ "content" : {
3534
+ "application/json" : {
3535
+ "schema" : {
3536
+ "$ref" : "#/components/schemas/BodyWithMessage"
3537
+ }
3538
+ }
3539
+ },
3540
+ "description" : "Error while fetching models"
3541
+ }
3542
+ },
3543
+ "summary" : "Validate a stored provider",
3544
+ "tags" : [ "engine" ]
3545
+ }
3546
+ },
3465
3547
  "/files" : {
3466
3548
  "get" : {
3467
3549
  "description" : "Retrieves a list of all files (admin only)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.49",
3
+ "version": "1.0.50",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",