@vibexp/api-client 0.72.0 → 0.74.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.
package/dist/schema.d.ts CHANGED
@@ -569,6 +569,26 @@ export interface paths {
569
569
  patch?: never;
570
570
  trace?: never;
571
571
  };
572
+ "/api/v1/{team_id}/search/summary": {
573
+ parameters: {
574
+ query?: never;
575
+ header?: never;
576
+ path?: never;
577
+ cookie?: never;
578
+ };
579
+ get?: never;
580
+ put?: never;
581
+ /**
582
+ * Answer a query from the team's top search results
583
+ * @description Runs the team's search for the query, gives the full text of the top-N matching documents to the team's model provider, and returns a markdown answer grounded in them, citing each document as `[n]`. Always uses the global top-N results (there is no paging), and works the same whether search ranked them semantically or by the keyword fallback. Each document is truncated to a per-document budget, and documents stop being added once the total context budget is used, so `sources` lists exactly what the model saw. Any team member may call it. Errors never carry the provider's raw response.
584
+ */
585
+ post: operations["summarizeSearchResults"];
586
+ delete?: never;
587
+ options?: never;
588
+ head?: never;
589
+ patch?: never;
590
+ trace?: never;
591
+ };
572
592
  "/api/v1/{team_id}/resource-access-metrics": {
573
593
  parameters: {
574
594
  query?: never;
@@ -4122,6 +4142,40 @@ export interface paths {
4122
4142
  patch?: never;
4123
4143
  trace?: never;
4124
4144
  };
4145
+ "/api/v1/{team_id}/model-providers/models": {
4146
+ parameters: {
4147
+ query?: never;
4148
+ header?: never;
4149
+ path: {
4150
+ /** @description Team that owns the model provider(s). */
4151
+ team_id: string;
4152
+ };
4153
+ cookie?: never;
4154
+ };
4155
+ get?: never;
4156
+ put?: never;
4157
+ /**
4158
+ * List a model provider's models
4159
+ * @description Lists the models an OpenAI-compatible provider exposes via
4160
+ * `GET {base_url}/models`, so a model can be picked instead of typed. It
4161
+ * takes inline connection details and persists nothing, so it works before
4162
+ * the provider is saved; a blank `api_key` together with `provider_id`
4163
+ * reuses that saved provider's stored key.
4164
+ *
4165
+ * The outcome is reported in the 200 body, like validate: a provider that
4166
+ * does not implement model listing, cannot be reached or rejects the key
4167
+ * answers `supported: false` with an empty `models` array, and `message`
4168
+ * carries a fixed failure category — never the provider's response or the
4169
+ * URL. The list is the provider's own, sorted by `id` and unfiltered. 500 is
4170
+ * returned only for internal service errors.
4171
+ */
4172
+ post: operations["listProviderModels"];
4173
+ delete?: never;
4174
+ options?: never;
4175
+ head?: never;
4176
+ patch?: never;
4177
+ trace?: never;
4178
+ };
4125
4179
  "/api/v1/{team_id}/settings/model-providers": {
4126
4180
  parameters: {
4127
4181
  query?: never;
@@ -4220,6 +4274,40 @@ export interface paths {
4220
4274
  patch?: never;
4221
4275
  trace?: never;
4222
4276
  };
4277
+ "/api/v1/{team_id}/settings/model-providers/models": {
4278
+ parameters: {
4279
+ query?: never;
4280
+ header?: never;
4281
+ path: {
4282
+ /** @description Team that owns the model provider(s). */
4283
+ team_id: string;
4284
+ };
4285
+ cookie?: never;
4286
+ };
4287
+ get?: never;
4288
+ put?: never;
4289
+ /**
4290
+ * List a model provider's models
4291
+ * @description Lists the models an OpenAI-compatible provider exposes via
4292
+ * `GET {base_url}/models`, so a model can be picked instead of typed. It
4293
+ * takes inline connection details and persists nothing, so it works before
4294
+ * the provider is saved; a blank `api_key` together with `provider_id`
4295
+ * reuses that saved provider's stored key.
4296
+ *
4297
+ * The outcome is reported in the 200 body, like validate: a provider that
4298
+ * does not implement model listing, cannot be reached or rejects the key
4299
+ * answers `supported: false` with an empty `models` array, and `message`
4300
+ * carries a fixed failure category — never the provider's response or the
4301
+ * URL. The list is the provider's own, sorted by `id` and unfiltered. 500 is
4302
+ * returned only for internal service errors.
4303
+ */
4304
+ post: operations["listProviderModelsSettings"];
4305
+ delete?: never;
4306
+ options?: never;
4307
+ head?: never;
4308
+ patch?: never;
4309
+ trace?: never;
4310
+ };
4223
4311
  "/api/v1/{team_id}/settings/model-providers/copy": {
4224
4312
  parameters: {
4225
4313
  query?: never;
@@ -6004,6 +6092,51 @@ export interface components {
6004
6092
  error_details?: string;
6005
6093
  };
6006
6094
  };
6095
+ /** @description Inline connection details for the provider whose models to list. The provider does not have to be saved yet: this is what lets a model be picked while the base URL and key are still being entered. */
6096
+ ListProviderModelsRequest: {
6097
+ /** @example openai_compatible */
6098
+ provider_type: string;
6099
+ /**
6100
+ * Format: uri
6101
+ * @example https://api.openai.com/v1
6102
+ */
6103
+ base_url: string;
6104
+ /** @description Bearer key for the provider. Leave it blank together with `provider_id` to reuse that saved provider's stored key — the same rule an update applies to a blank key. */
6105
+ api_key?: string | null;
6106
+ /**
6107
+ * Format: uuid
6108
+ * @description A saved provider in this team whose stored API key is used when `api_key` is blank. Ignored when `api_key` is supplied.
6109
+ * @example 550e8400-e29b-41d4-a716-446655440000
6110
+ */
6111
+ provider_id?: string;
6112
+ };
6113
+ ProviderModel: {
6114
+ /**
6115
+ * @description Model identifier, exactly as the provider reports it.
6116
+ * @example gpt-4o-mini
6117
+ */
6118
+ id: string;
6119
+ /**
6120
+ * @description Owner the provider reports for the model, when it reports one.
6121
+ * @example openai
6122
+ */
6123
+ owned_by?: string;
6124
+ };
6125
+ ProviderModelList: {
6126
+ /**
6127
+ * @description Whether the provider answered its model listing. `false` when it does not implement `GET {base_url}/models` (many gateways expose only `/chat/completions`) or could not be reached; a client falls back to free-text model entry.
6128
+ * @example true
6129
+ */
6130
+ supported: boolean;
6131
+ /** @description Every model the provider reported, sorted by `id` and unfiltered. Empty when `supported` is `false`. */
6132
+ models: components["schemas"]["ProviderModel"][];
6133
+ /**
6134
+ * @description Why the listing failed, as a fixed category — never the provider's raw response or the URL. Omitted on success and when the provider simply does not implement model listing.
6135
+ * @example unauthorized
6136
+ * @enum {string}
6137
+ */
6138
+ message?: "connection_failed" | "unauthorized" | "misconfigured_provider" | "destination_not_allowed";
6139
+ };
6007
6140
  /** @description A team's own GitHub App registration. Never carries secret values. */
6008
6141
  GitHubAppConfig: {
6009
6142
  /**
@@ -7467,6 +7600,108 @@ export interface components {
7467
7600
  */
7468
7601
  total_pages: number;
7469
7602
  };
7603
+ SearchSummaryRequest: {
7604
+ /**
7605
+ * @description The question to answer. It is run through the team's search, and the top matching documents are what the answer is grounded in.
7606
+ * @example how do we configure retries
7607
+ */
7608
+ query: string;
7609
+ /**
7610
+ * @description Resource types to draw documents from. Omit or leave empty to use all four types. Unknown values are rejected with a 400.
7611
+ * @example [
7612
+ * "memories",
7613
+ * "blueprints"
7614
+ * ]
7615
+ */
7616
+ types?: ("prompts" | "artifacts" | "blueprints" | "memories")[];
7617
+ /**
7618
+ * Format: uuid
7619
+ * @description Optional project UUID. When set, only documents in this project are used.
7620
+ * @example 7c9e6679-7425-40de-944b-e07fc1f90ae7
7621
+ */
7622
+ project_id?: string;
7623
+ };
7624
+ /** @description One document the summary was grounded in. Its `index` is the number the summary cites it by (`[1]`, `[2]`, ...). */
7625
+ SearchSummarySource: {
7626
+ /**
7627
+ * @description Citation number of this document in the summary, starting at 1
7628
+ * @example 1
7629
+ */
7630
+ index: number;
7631
+ /**
7632
+ * @description Singular resource type of the document
7633
+ * @example memory
7634
+ * @enum {string}
7635
+ */
7636
+ type: "prompt" | "artifact" | "blueprint" | "memory";
7637
+ /**
7638
+ * Format: uuid
7639
+ * @description ID of the document
7640
+ */
7641
+ id: string;
7642
+ /**
7643
+ * @description Title of the document
7644
+ * @example Retry configuration guide
7645
+ */
7646
+ title: string;
7647
+ /**
7648
+ * @description Slug of the document, used to build slug-based detail-page links. Empty for memories, which are routed by id.
7649
+ * @example retry-configuration-guide
7650
+ */
7651
+ slug: string;
7652
+ /**
7653
+ * Format: uuid
7654
+ * @description UUID of the document's project
7655
+ */
7656
+ project_id: string;
7657
+ /**
7658
+ * @description Human-readable name of the document's project
7659
+ * @example My Project
7660
+ */
7661
+ project_name: string;
7662
+ /**
7663
+ * Format: date-time
7664
+ * @description Last-updated timestamp of the document
7665
+ */
7666
+ updated_at: string;
7667
+ /** @description True when only the beginning of the document was given to the model, because it exceeded the per-document or total context budget. */
7668
+ truncated: boolean;
7669
+ };
7670
+ /** @description Token usage the model provider reported for the completion. */
7671
+ SearchSummaryUsage: {
7672
+ /**
7673
+ * @description Tokens in the prompt sent to the model
7674
+ * @example 2400
7675
+ */
7676
+ prompt_tokens: number;
7677
+ /**
7678
+ * @description Tokens in the generated summary
7679
+ * @example 310
7680
+ */
7681
+ completion_tokens: number;
7682
+ };
7683
+ SearchSummaryResponse: {
7684
+ /** @description Markdown answer to the query, grounded in `sources` and citing them as `[n]`. When the documents do not contain the answer, the summary says so. */
7685
+ summary: string;
7686
+ /** @description The documents given to the model, in citation order. Only documents that were actually included are listed. */
7687
+ sources: components["schemas"]["SearchSummarySource"][];
7688
+ /**
7689
+ * @description Model that generated the summary
7690
+ * @example gpt-4o-mini
7691
+ */
7692
+ model: string;
7693
+ /**
7694
+ * Format: uuid
7695
+ * @description ID of the team model provider that generated the summary
7696
+ */
7697
+ provider_id: string;
7698
+ /**
7699
+ * Format: date-time
7700
+ * @description When the summary was generated
7701
+ */
7702
+ generated_at: string;
7703
+ usage?: components["schemas"]["SearchSummaryUsage"];
7704
+ };
7470
7705
  Blueprint: {
7471
7706
  /**
7472
7707
  * @description Unique identifier for the spec library
@@ -12842,6 +13077,105 @@ export interface operations {
12842
13077
  };
12843
13078
  };
12844
13079
  };
13080
+ summarizeSearchResults: {
13081
+ parameters: {
13082
+ query?: never;
13083
+ header?: never;
13084
+ path: {
13085
+ /** @description Team ID */
13086
+ team_id: string;
13087
+ };
13088
+ cookie?: never;
13089
+ };
13090
+ requestBody: {
13091
+ content: {
13092
+ "application/json": components["schemas"]["SearchSummaryRequest"];
13093
+ };
13094
+ };
13095
+ responses: {
13096
+ /** @description Summary generated successfully */
13097
+ 200: {
13098
+ headers: {
13099
+ [name: string]: unknown;
13100
+ };
13101
+ content: {
13102
+ "application/json": components["schemas"]["SearchSummaryResponse"];
13103
+ };
13104
+ };
13105
+ /** @description Invalid request data or validation error */
13106
+ 400: {
13107
+ headers: {
13108
+ [name: string]: unknown;
13109
+ };
13110
+ content: {
13111
+ "application/problem+json": components["schemas"]["ErrorResponse"];
13112
+ };
13113
+ };
13114
+ /** @description Unauthorized */
13115
+ 401: {
13116
+ headers: {
13117
+ [name: string]: unknown;
13118
+ };
13119
+ content: {
13120
+ "application/problem+json": components["schemas"]["ErrorResponse"];
13121
+ };
13122
+ };
13123
+ /** @description User is not a member of the team */
13124
+ 403: {
13125
+ headers: {
13126
+ [name: string]: unknown;
13127
+ };
13128
+ content: {
13129
+ "application/problem+json": components["schemas"]["ErrorResponse"];
13130
+ };
13131
+ };
13132
+ /** @description AI summaries are disabled for the team (`AI_SUMMARY_DISABLED`), or the team has no model provider (`AI_SUMMARY_NO_PROVIDER`) */
13133
+ 409: {
13134
+ headers: {
13135
+ [name: string]: unknown;
13136
+ };
13137
+ content: {
13138
+ "application/problem+json": components["schemas"]["ErrorResponse"];
13139
+ };
13140
+ };
13141
+ /** @description The search returned no documents to summarize (`AI_SUMMARY_NO_RESULTS`) */
13142
+ 422: {
13143
+ headers: {
13144
+ [name: string]: unknown;
13145
+ };
13146
+ content: {
13147
+ "application/problem+json": components["schemas"]["ErrorResponse"];
13148
+ };
13149
+ };
13150
+ /** @description Failed to generate the summary */
13151
+ 500: {
13152
+ headers: {
13153
+ [name: string]: unknown;
13154
+ };
13155
+ content: {
13156
+ "application/problem+json": components["schemas"]["ErrorResponse"];
13157
+ };
13158
+ };
13159
+ /** @description The model provider could not produce a summary: it was unreachable (`AI_SUMMARY_PROVIDER_UNREACHABLE`), rejected the credentials (`AI_SUMMARY_UNAUTHORIZED`), or rejected the request (`AI_SUMMARY_MODEL_ERROR`) */
13160
+ 502: {
13161
+ headers: {
13162
+ [name: string]: unknown;
13163
+ };
13164
+ content: {
13165
+ "application/problem+json": components["schemas"]["ErrorResponse"];
13166
+ };
13167
+ };
13168
+ /** @description The model provider did not answer in time (`AI_SUMMARY_TIMEOUT`) */
13169
+ 504: {
13170
+ headers: {
13171
+ [name: string]: unknown;
13172
+ };
13173
+ content: {
13174
+ "application/problem+json": components["schemas"]["ErrorResponse"];
13175
+ };
13176
+ };
13177
+ };
13178
+ };
12845
13179
  getResourceAccessMetrics: {
12846
13180
  parameters: {
12847
13181
  query: {
@@ -24552,6 +24886,78 @@ export interface operations {
24552
24886
  };
24553
24887
  };
24554
24888
  };
24889
+ listProviderModels: {
24890
+ parameters: {
24891
+ query?: never;
24892
+ header?: never;
24893
+ path: {
24894
+ /** @description Team that owns the model provider(s). */
24895
+ team_id: string;
24896
+ };
24897
+ cookie?: never;
24898
+ };
24899
+ requestBody: {
24900
+ content: {
24901
+ "application/json": components["schemas"]["ListProviderModelsRequest"];
24902
+ };
24903
+ };
24904
+ responses: {
24905
+ /** @description Listing completed (check `supported` for the outcome) */
24906
+ 200: {
24907
+ headers: {
24908
+ [name: string]: unknown;
24909
+ };
24910
+ content: {
24911
+ "application/json": components["schemas"]["ProviderModelList"];
24912
+ };
24913
+ };
24914
+ /** @description Malformed JSON body (`BAD_REQUEST`) or missing required fields (`MODEL_PROVIDER_VALIDATION_FAILED` with `validation_errors`) */
24915
+ 400: {
24916
+ headers: {
24917
+ [name: string]: unknown;
24918
+ };
24919
+ content: {
24920
+ "application/problem+json": components["schemas"]["ErrorResponse"];
24921
+ };
24922
+ };
24923
+ /** @description Unauthorized */
24924
+ 401: {
24925
+ headers: {
24926
+ [name: string]: unknown;
24927
+ };
24928
+ content: {
24929
+ "application/problem+json": components["schemas"]["ErrorResponse"];
24930
+ };
24931
+ };
24932
+ /** @description Forbidden - managing provider settings requires team owner/admin (`FORBIDDEN`) */
24933
+ 403: {
24934
+ headers: {
24935
+ [name: string]: unknown;
24936
+ };
24937
+ content: {
24938
+ "application/problem+json": components["schemas"]["ErrorResponse"];
24939
+ };
24940
+ };
24941
+ /** @description `api_key` was blank and `provider_id` names no provider in this team (`MODEL_PROVIDER_NOT_FOUND`) */
24942
+ 404: {
24943
+ headers: {
24944
+ [name: string]: unknown;
24945
+ };
24946
+ content: {
24947
+ "application/problem+json": components["schemas"]["ErrorResponse"];
24948
+ };
24949
+ };
24950
+ /** @description Listing failed due to an internal service error (`INTERNAL_ERROR`) */
24951
+ 500: {
24952
+ headers: {
24953
+ [name: string]: unknown;
24954
+ };
24955
+ content: {
24956
+ "application/problem+json": components["schemas"]["ErrorResponse"];
24957
+ };
24958
+ };
24959
+ };
24960
+ };
24555
24961
  listModelProvidersSettings: {
24556
24962
  parameters: {
24557
24963
  query?: never;
@@ -24922,6 +25328,78 @@ export interface operations {
24922
25328
  };
24923
25329
  };
24924
25330
  };
25331
+ listProviderModelsSettings: {
25332
+ parameters: {
25333
+ query?: never;
25334
+ header?: never;
25335
+ path: {
25336
+ /** @description Team that owns the model provider(s). */
25337
+ team_id: string;
25338
+ };
25339
+ cookie?: never;
25340
+ };
25341
+ requestBody: {
25342
+ content: {
25343
+ "application/json": components["schemas"]["ListProviderModelsRequest"];
25344
+ };
25345
+ };
25346
+ responses: {
25347
+ /** @description Listing completed (check `supported` for the outcome) */
25348
+ 200: {
25349
+ headers: {
25350
+ [name: string]: unknown;
25351
+ };
25352
+ content: {
25353
+ "application/json": components["schemas"]["ProviderModelList"];
25354
+ };
25355
+ };
25356
+ /** @description Malformed JSON body (`BAD_REQUEST`) or missing required fields (`MODEL_PROVIDER_VALIDATION_FAILED` with `validation_errors`) */
25357
+ 400: {
25358
+ headers: {
25359
+ [name: string]: unknown;
25360
+ };
25361
+ content: {
25362
+ "application/problem+json": components["schemas"]["ErrorResponse"];
25363
+ };
25364
+ };
25365
+ /** @description Unauthorized */
25366
+ 401: {
25367
+ headers: {
25368
+ [name: string]: unknown;
25369
+ };
25370
+ content: {
25371
+ "application/problem+json": components["schemas"]["ErrorResponse"];
25372
+ };
25373
+ };
25374
+ /** @description Forbidden - managing provider settings requires team owner/admin (`FORBIDDEN`) */
25375
+ 403: {
25376
+ headers: {
25377
+ [name: string]: unknown;
25378
+ };
25379
+ content: {
25380
+ "application/problem+json": components["schemas"]["ErrorResponse"];
25381
+ };
25382
+ };
25383
+ /** @description `api_key` was blank and `provider_id` names no provider in this team (`MODEL_PROVIDER_NOT_FOUND`) */
25384
+ 404: {
25385
+ headers: {
25386
+ [name: string]: unknown;
25387
+ };
25388
+ content: {
25389
+ "application/problem+json": components["schemas"]["ErrorResponse"];
25390
+ };
25391
+ };
25392
+ /** @description Listing failed due to an internal service error (`INTERNAL_ERROR`) */
25393
+ 500: {
25394
+ headers: {
25395
+ [name: string]: unknown;
25396
+ };
25397
+ content: {
25398
+ "application/problem+json": components["schemas"]["ErrorResponse"];
25399
+ };
25400
+ };
25401
+ };
25402
+ };
24925
25403
  copyModelProviderFromTeam: {
24926
25404
  parameters: {
24927
25405
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibexp/api-client",
3
- "version": "0.72.0",
3
+ "version": "0.74.0",
4
4
  "description": "Typed VibeXP API client generated from the OpenAPI spec (openapi-fetch main entrypoint, axios SDK at ./axios)",
5
5
  "license": "MIT",
6
6
  "repository": {