@vibexp/api-client 0.9.0 → 0.10.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.
@@ -3221,6 +3221,303 @@ export const validateEmbeddingProviderSettings = (options) => (options.client ??
3221
3221
  ...options.headers
3222
3222
  }
3223
3223
  });
3224
+ /**
3225
+ * List model providers
3226
+ *
3227
+ * Retrieves all model providers belonging to the authenticated user.
3228
+ * Returns a bare JSON array (no pagination envelope). Encrypted API keys
3229
+ * are never included; each item carries a `has_api_key` boolean instead.
3230
+ *
3231
+ */
3232
+ export const listModelProviders = (options) => (options.client ?? client).get({
3233
+ responseType: 'json',
3234
+ security: [{
3235
+ key: 'ApiKeyAuth',
3236
+ scheme: 'bearer',
3237
+ type: 'http'
3238
+ }, {
3239
+ in: 'cookie',
3240
+ name: 'vx_session',
3241
+ type: 'apiKey'
3242
+ }],
3243
+ url: '/api/v1/{team_id}/model-providers',
3244
+ ...options
3245
+ });
3246
+ /**
3247
+ * Create model provider
3248
+ *
3249
+ * Creates a new model provider configuration for the authenticated user.
3250
+ * The `api_key` supplied in the request is encrypted at rest and is never
3251
+ * returned by the API — responses expose only a `has_api_key` boolean.
3252
+ * Returns 200 (not 201) on success.
3253
+ *
3254
+ */
3255
+ export const createModelProvider = (options) => (options.client ?? client).post({
3256
+ responseType: 'json',
3257
+ security: [{
3258
+ key: 'ApiKeyAuth',
3259
+ scheme: 'bearer',
3260
+ type: 'http'
3261
+ }, {
3262
+ in: 'cookie',
3263
+ name: 'vx_session',
3264
+ type: 'apiKey'
3265
+ }],
3266
+ url: '/api/v1/{team_id}/model-providers',
3267
+ ...options,
3268
+ headers: {
3269
+ 'Content-Type': 'application/json',
3270
+ ...options.headers
3271
+ }
3272
+ });
3273
+ /**
3274
+ * Delete model provider
3275
+ *
3276
+ * Deletes a model provider owned by the authenticated user. Deleting the
3277
+ * team's last remaining provider is blocked with a 400
3278
+ * `MODEL_PROVIDER_LAST_DELETE_BLOCKED` error.
3279
+ *
3280
+ */
3281
+ export const deleteModelProvider = (options) => (options.client ?? client).delete({
3282
+ security: [{
3283
+ key: 'ApiKeyAuth',
3284
+ scheme: 'bearer',
3285
+ type: 'http'
3286
+ }, {
3287
+ in: 'cookie',
3288
+ name: 'vx_session',
3289
+ type: 'apiKey'
3290
+ }],
3291
+ url: '/api/v1/{team_id}/model-providers/{id}',
3292
+ ...options
3293
+ });
3294
+ /**
3295
+ * Get model provider
3296
+ *
3297
+ * Retrieves a single model provider owned by the authenticated user.
3298
+ * The encrypted API key is never returned; `has_api_key` indicates whether
3299
+ * one is stored.
3300
+ *
3301
+ */
3302
+ export const getModelProvider = (options) => (options.client ?? client).get({
3303
+ responseType: 'json',
3304
+ security: [{
3305
+ key: 'ApiKeyAuth',
3306
+ scheme: 'bearer',
3307
+ type: 'http'
3308
+ }, {
3309
+ in: 'cookie',
3310
+ name: 'vx_session',
3311
+ type: 'apiKey'
3312
+ }],
3313
+ url: '/api/v1/{team_id}/model-providers/{id}',
3314
+ ...options
3315
+ });
3316
+ /**
3317
+ * Update model provider
3318
+ *
3319
+ * Updates an existing model provider. All fields are optional; only
3320
+ * provided fields are changed. A supplied `api_key` replaces the stored
3321
+ * (encrypted) key and is never echoed back in the response. A blank/omitted
3322
+ * `api_key` preserves the stored key.
3323
+ *
3324
+ */
3325
+ export const updateModelProvider = (options) => (options.client ?? client).put({
3326
+ responseType: 'json',
3327
+ security: [{
3328
+ key: 'ApiKeyAuth',
3329
+ scheme: 'bearer',
3330
+ type: 'http'
3331
+ }, {
3332
+ in: 'cookie',
3333
+ name: 'vx_session',
3334
+ type: 'apiKey'
3335
+ }],
3336
+ url: '/api/v1/{team_id}/model-providers/{id}',
3337
+ ...options,
3338
+ headers: {
3339
+ 'Content-Type': 'application/json',
3340
+ ...options.headers
3341
+ }
3342
+ });
3343
+ /**
3344
+ * Validate model provider configuration
3345
+ *
3346
+ * Validates a model provider configuration (connectivity/credentials)
3347
+ * without persisting anything. The probe attempts `GET {base_url}/models`
3348
+ * and falls back to `POST {base_url}/chat/completions`. Validation outcome —
3349
+ * including an invalid configuration — is reported in the 200 response body
3350
+ * (`is_valid`, `message`, `details`); 500 is returned only for internal
3351
+ * service errors.
3352
+ *
3353
+ */
3354
+ export const validateModelProvider = (options) => (options.client ?? client).post({
3355
+ responseType: 'json',
3356
+ security: [{
3357
+ key: 'ApiKeyAuth',
3358
+ scheme: 'bearer',
3359
+ type: 'http'
3360
+ }, {
3361
+ in: 'cookie',
3362
+ name: 'vx_session',
3363
+ type: 'apiKey'
3364
+ }],
3365
+ url: '/api/v1/{team_id}/model-providers/validate',
3366
+ ...options,
3367
+ headers: {
3368
+ 'Content-Type': 'application/json',
3369
+ ...options.headers
3370
+ }
3371
+ });
3372
+ /**
3373
+ * List model providers (Settings)
3374
+ *
3375
+ * Retrieves all model providers belonging to the authenticated user (settings route).
3376
+ * Returns a bare JSON array (no pagination envelope). Encrypted API keys
3377
+ * are never included; each item carries a `has_api_key` boolean instead.
3378
+ *
3379
+ */
3380
+ export const listModelProvidersSettings = (options) => (options.client ?? client).get({
3381
+ responseType: 'json',
3382
+ security: [{
3383
+ key: 'ApiKeyAuth',
3384
+ scheme: 'bearer',
3385
+ type: 'http'
3386
+ }, {
3387
+ in: 'cookie',
3388
+ name: 'vx_session',
3389
+ type: 'apiKey'
3390
+ }],
3391
+ url: '/api/v1/{team_id}/settings/model-providers',
3392
+ ...options
3393
+ });
3394
+ /**
3395
+ * Create model provider (Settings)
3396
+ *
3397
+ * Creates a new model provider configuration for the authenticated user (settings route).
3398
+ * The `api_key` supplied in the request is encrypted at rest and is never
3399
+ * returned by the API — responses expose only a `has_api_key` boolean.
3400
+ * Returns 200 (not 201) on success.
3401
+ *
3402
+ */
3403
+ export const createModelProviderSettings = (options) => (options.client ?? client).post({
3404
+ responseType: 'json',
3405
+ security: [{
3406
+ key: 'ApiKeyAuth',
3407
+ scheme: 'bearer',
3408
+ type: 'http'
3409
+ }, {
3410
+ in: 'cookie',
3411
+ name: 'vx_session',
3412
+ type: 'apiKey'
3413
+ }],
3414
+ url: '/api/v1/{team_id}/settings/model-providers',
3415
+ ...options,
3416
+ headers: {
3417
+ 'Content-Type': 'application/json',
3418
+ ...options.headers
3419
+ }
3420
+ });
3421
+ /**
3422
+ * Delete model provider (Settings)
3423
+ *
3424
+ * Deletes a model provider owned by the authenticated user (settings route).
3425
+ * Deleting the team's last remaining provider is blocked with a 400
3426
+ * `MODEL_PROVIDER_LAST_DELETE_BLOCKED` error.
3427
+ *
3428
+ */
3429
+ export const deleteModelProviderSettings = (options) => (options.client ?? client).delete({
3430
+ security: [{
3431
+ key: 'ApiKeyAuth',
3432
+ scheme: 'bearer',
3433
+ type: 'http'
3434
+ }, {
3435
+ in: 'cookie',
3436
+ name: 'vx_session',
3437
+ type: 'apiKey'
3438
+ }],
3439
+ url: '/api/v1/{team_id}/settings/model-providers/{id}',
3440
+ ...options
3441
+ });
3442
+ /**
3443
+ * Get model provider (Settings)
3444
+ *
3445
+ * Retrieves a single model provider owned by the authenticated user (settings route).
3446
+ * The encrypted API key is never returned; `has_api_key` indicates whether
3447
+ * one is stored.
3448
+ *
3449
+ */
3450
+ export const getModelProviderSettings = (options) => (options.client ?? client).get({
3451
+ responseType: 'json',
3452
+ security: [{
3453
+ key: 'ApiKeyAuth',
3454
+ scheme: 'bearer',
3455
+ type: 'http'
3456
+ }, {
3457
+ in: 'cookie',
3458
+ name: 'vx_session',
3459
+ type: 'apiKey'
3460
+ }],
3461
+ url: '/api/v1/{team_id}/settings/model-providers/{id}',
3462
+ ...options
3463
+ });
3464
+ /**
3465
+ * Update model provider (Settings)
3466
+ *
3467
+ * Updates an existing model provider (settings route). All fields are
3468
+ * optional; only provided fields are changed. A supplied `api_key`
3469
+ * replaces the stored (encrypted) key and is never echoed back in the
3470
+ * response. A blank/omitted `api_key` preserves the stored key.
3471
+ *
3472
+ */
3473
+ export const updateModelProviderSettings = (options) => (options.client ?? client).put({
3474
+ responseType: 'json',
3475
+ security: [{
3476
+ key: 'ApiKeyAuth',
3477
+ scheme: 'bearer',
3478
+ type: 'http'
3479
+ }, {
3480
+ in: 'cookie',
3481
+ name: 'vx_session',
3482
+ type: 'apiKey'
3483
+ }],
3484
+ url: '/api/v1/{team_id}/settings/model-providers/{id}',
3485
+ ...options,
3486
+ headers: {
3487
+ 'Content-Type': 'application/json',
3488
+ ...options.headers
3489
+ }
3490
+ });
3491
+ /**
3492
+ * Validate model provider configuration (Settings)
3493
+ *
3494
+ * Validates a model provider configuration (connectivity/credentials)
3495
+ * without persisting anything (settings route). The probe attempts
3496
+ * `GET {base_url}/models` and falls back to
3497
+ * `POST {base_url}/chat/completions`. Validation outcome — including an
3498
+ * invalid configuration — is reported in the 200 response body
3499
+ * (`is_valid`, `message`, `details`); 500 is returned only for internal
3500
+ * service errors.
3501
+ *
3502
+ */
3503
+ export const validateModelProviderSettings = (options) => (options.client ?? client).post({
3504
+ responseType: 'json',
3505
+ security: [{
3506
+ key: 'ApiKeyAuth',
3507
+ scheme: 'bearer',
3508
+ type: 'http'
3509
+ }, {
3510
+ in: 'cookie',
3511
+ name: 'vx_session',
3512
+ type: 'apiKey'
3513
+ }],
3514
+ url: '/api/v1/{team_id}/settings/model-providers/validate',
3515
+ ...options,
3516
+ headers: {
3517
+ 'Content-Type': 'application/json',
3518
+ ...options.headers
3519
+ }
3520
+ });
3224
3521
  /**
3225
3522
  * List projects
3226
3523
  *