@vibexp/api-client 0.92.0 → 0.94.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.
@@ -6085,7 +6085,9 @@ export type AdminInstanceEmailSettingsRequest = {
6085
6085
  *
6086
6086
  * OMIT it to keep the stored credential, which is allowed only when the
6087
6087
  * provider type is unchanged; a new configuration or a change of provider
6088
- * type must carry its own. An explicitly empty string is rejected.
6088
+ * type must carry its own, except SMTP, where omitting it configures an
6089
+ * unauthenticated relay (no credential is stored and no AUTH is
6090
+ * attempted). An explicitly empty string is rejected.
6089
6091
  *
6090
6092
  */
6091
6093
  secret?: string;
@@ -6132,7 +6134,9 @@ export type AdminInstanceEmailTestRequest = {
6132
6134
  settings?: TeamEmailProviderSettings;
6133
6135
  /**
6134
6136
  * The candidate credential. Omit it to test with the stored credential
6135
- * (same destination only, see above). Never returned.
6137
+ * (same destination only, see above); an SMTP candidate with no
6138
+ * credential to reuse is tested as an unauthenticated relay. Never
6139
+ * returned.
6136
6140
  *
6137
6141
  */
6138
6142
  secret?: string;
@@ -6236,9 +6240,12 @@ export type AdminInstanceEmailSettings = {
6236
6240
  };
6237
6241
  /**
6238
6242
  * One append-only change to an instance setting. `before` and `after` are
6239
- * REDACTED snapshots: they never contain a credential, only
6240
- * `has_credential` and, on an upsert's `after`, a `secret` marker saying
6241
- * whether the credential was `changed` or `unchanged`.
6243
+ * snapshots of the setting's values, filtered to that setting's allowlisted
6244
+ * keys, and never contain a credential. For `email_provider` they report
6245
+ * only `has_credential` and, on an upsert's `after`, a `secret` marker
6246
+ * saying whether the credential was `changed` or `unchanged`; the `search`
6247
+ * and `ai_summary` snapshots are the settings' values, which hold no
6248
+ * credential.
6242
6249
  *
6243
6250
  */
6244
6251
  export type AdminInstanceSettingsAuditEntry = {
@@ -6249,7 +6256,7 @@ export type AdminInstanceSettingsAuditEntry = {
6249
6256
  /**
6250
6257
  * The instance setting the entry describes.
6251
6258
  */
6252
- setting: string;
6259
+ setting: 'email_provider' | 'search' | 'ai_summary';
6253
6260
  /**
6254
6261
  * `upsert` (created or replaced by an admin), `delete` (removed by an
6255
6262
  * admin) or `import` (the boot-time import from config.yaml, which has no
@@ -6294,6 +6301,222 @@ export type AdminInstanceSettingsAuditPage = {
6294
6301
  */
6295
6302
  next_cursor: string | null;
6296
6303
  };
6304
+ /**
6305
+ * Where the instance values come from: `instance` when an instance admin (or
6306
+ * the boot-time config import) stored them, `default` when nothing is stored
6307
+ * and the built-in defaults apply.
6308
+ *
6309
+ */
6310
+ export type AdminInstanceSettingsSource = 'instance' | 'default';
6311
+ /**
6312
+ * The instance search ranking defaults. Every team without its own search
6313
+ * settings ranks with these; `rank_candidate_cap` is instance-only and applies
6314
+ * to every team.
6315
+ *
6316
+ */
6317
+ export type AdminInstanceSearchValues = {
6318
+ /**
6319
+ * Whether search results are re-ranked by recency.
6320
+ */
6321
+ recency_ranking_enabled: boolean;
6322
+ /**
6323
+ * Weight of semantic relevance. The three weights must not all be zero.
6324
+ */
6325
+ rank_weight_relevance: number;
6326
+ /**
6327
+ * Weight of creation recency.
6328
+ */
6329
+ rank_weight_created: number;
6330
+ /**
6331
+ * Weight of update recency.
6332
+ */
6333
+ rank_weight_updated: number;
6334
+ /**
6335
+ * Recency half-life in days.
6336
+ */
6337
+ rank_half_life_days: number;
6338
+ /**
6339
+ * How many rows are pulled and re-ranked per search.
6340
+ */
6341
+ rank_candidate_cap: number;
6342
+ };
6343
+ /**
6344
+ * The hard bounds the search values are validated against, for form validation.
6345
+ */
6346
+ export type AdminInstanceSearchLimits = {
6347
+ /**
6348
+ * The smallest allowed weight. The three weights must also not all be zero.
6349
+ */
6350
+ rank_weight_min: number;
6351
+ /**
6352
+ * The largest allowed half-life, in days. The half-life must also be positive.
6353
+ */
6354
+ rank_half_life_days_max: number;
6355
+ rank_candidate_cap_min: number;
6356
+ rank_candidate_cap_max: number;
6357
+ };
6358
+ /**
6359
+ * The instance search ranking defaults in effect, where they come from and
6360
+ * how many teams ignore them because they store search settings of their own.
6361
+ *
6362
+ */
6363
+ export type AdminInstanceSearchSettings = {
6364
+ values: AdminInstanceSearchValues;
6365
+ source: AdminInstanceSettingsSource;
6366
+ built_in_defaults: AdminInstanceSearchValues;
6367
+ limits: AdminInstanceSearchLimits;
6368
+ /**
6369
+ * How many teams store search settings of their own, so a change here does not reach them.
6370
+ */
6371
+ teams_with_override: number;
6372
+ /**
6373
+ * When the values were last stored; null when `source` is `default`.
6374
+ */
6375
+ updated_at: string | null;
6376
+ /**
6377
+ * The admin who last stored the values. Null when `source` is `default`,
6378
+ * for the boot-time import, or once that user has been deleted.
6379
+ *
6380
+ */
6381
+ updated_by_user_id: string | null;
6382
+ /**
6383
+ * That admin's display name (or email), when it could be resolved.
6384
+ */
6385
+ updated_by_name: string | null;
6386
+ /**
6387
+ * The stored row's optimistic-lock version; null when nothing is stored.
6388
+ * Send it back as `expected_version` to reject a save that would
6389
+ * overwrite someone else's change.
6390
+ *
6391
+ */
6392
+ version: number | null;
6393
+ };
6394
+ /**
6395
+ * A whole replacement of the instance search ranking defaults. Every value is
6396
+ * required. `expected_version` is optional: when present, the save is
6397
+ * rejected with 409 unless it equals the stored version (and when nothing is
6398
+ * stored, any `expected_version` other than null is a conflict). Omit it for
6399
+ * last-write-wins.
6400
+ *
6401
+ */
6402
+ export type AdminInstanceSearchSettingsUpdate = {
6403
+ recency_ranking_enabled: boolean;
6404
+ rank_weight_relevance: number;
6405
+ rank_weight_created: number;
6406
+ rank_weight_updated: number;
6407
+ rank_half_life_days: number;
6408
+ rank_candidate_cap: number;
6409
+ /**
6410
+ * The `version` the caller last read; omit or null for last-write-wins.
6411
+ */
6412
+ expected_version?: number | null;
6413
+ };
6414
+ /**
6415
+ * How detailed a summary is.
6416
+ */
6417
+ export type AdminInstanceAiSummaryStyle = 'concise' | 'balanced' | 'detailed';
6418
+ /**
6419
+ * The instance AI summary defaults and budgets. `enabled`, `top_n`, `style`
6420
+ * and `max_output_tokens` are the defaults every team without its own AI
6421
+ * summary settings uses; the character budgets and the request timeout are
6422
+ * instance-only and apply to every team.
6423
+ *
6424
+ */
6425
+ export type AdminInstanceAiSummaryValues = {
6426
+ enabled: boolean;
6427
+ /**
6428
+ * How many search results a summary reads.
6429
+ */
6430
+ top_n: number;
6431
+ style: AdminInstanceAiSummaryStyle;
6432
+ max_output_tokens: number;
6433
+ /**
6434
+ * How many characters of each document a summary reads.
6435
+ */
6436
+ per_document_chars: number;
6437
+ /**
6438
+ * The total character budget of one summary's context; at least `per_document_chars`.
6439
+ */
6440
+ total_context_chars: number;
6441
+ /**
6442
+ * The summary request timeout, in milliseconds.
6443
+ */
6444
+ request_timeout_ms: number;
6445
+ };
6446
+ /**
6447
+ * The hard bounds the AI summary values are validated against, for form validation.
6448
+ */
6449
+ export type AdminInstanceAiSummaryLimits = {
6450
+ top_n_min: number;
6451
+ top_n_max: number;
6452
+ max_output_tokens_min: number;
6453
+ max_output_tokens_max: number;
6454
+ /**
6455
+ * The smallest allowed character budget. `total_context_chars` must also be at least `per_document_chars`.
6456
+ */
6457
+ chars_min: number;
6458
+ chars_max: number;
6459
+ request_timeout_ms_min: number;
6460
+ request_timeout_ms_max: number;
6461
+ };
6462
+ /**
6463
+ * The instance AI summary defaults in effect, where they come from and how
6464
+ * many teams ignore the defaults because they store AI summary settings of
6465
+ * their own. The instance-only budgets reach every team regardless.
6466
+ *
6467
+ */
6468
+ export type AdminInstanceAiSummarySettings = {
6469
+ values: AdminInstanceAiSummaryValues;
6470
+ source: AdminInstanceSettingsSource;
6471
+ built_in_defaults: AdminInstanceAiSummaryValues;
6472
+ limits: AdminInstanceAiSummaryLimits;
6473
+ /**
6474
+ * How many teams store AI summary settings of their own, so a change to the team defaults does not reach them.
6475
+ */
6476
+ teams_with_override: number;
6477
+ /**
6478
+ * When the values were last stored; null when `source` is `default`.
6479
+ */
6480
+ updated_at: string | null;
6481
+ /**
6482
+ * The admin who last stored the values. Null when `source` is `default`,
6483
+ * for the boot-time import, or once that user has been deleted.
6484
+ *
6485
+ */
6486
+ updated_by_user_id: string | null;
6487
+ /**
6488
+ * That admin's display name (or email), when it could be resolved.
6489
+ */
6490
+ updated_by_name: string | null;
6491
+ /**
6492
+ * The stored row's optimistic-lock version; null when nothing is stored.
6493
+ * Send it back as `expected_version` to reject a save that would
6494
+ * overwrite someone else's change.
6495
+ *
6496
+ */
6497
+ version: number | null;
6498
+ };
6499
+ /**
6500
+ * A whole replacement of the instance AI summary settings. Every value is
6501
+ * required. `expected_version` is optional: when present, the save is
6502
+ * rejected with 409 unless it equals the stored version (and when nothing is
6503
+ * stored, any `expected_version` other than null is a conflict). Omit it for
6504
+ * last-write-wins.
6505
+ *
6506
+ */
6507
+ export type AdminInstanceAiSummarySettingsUpdate = {
6508
+ enabled: boolean;
6509
+ top_n: number;
6510
+ style: AdminInstanceAiSummaryStyle;
6511
+ max_output_tokens: number;
6512
+ per_document_chars: number;
6513
+ total_context_chars: number;
6514
+ request_timeout_ms: number;
6515
+ /**
6516
+ * The `version` the caller last read; omit or null for last-write-wins.
6517
+ */
6518
+ expected_version?: number | null;
6519
+ };
6297
6520
  export type ProjectResponse = Project & {
6298
6521
  /**
6299
6522
  * Whether the project's git URL matches a repository accessible via the team's GitHub App installation
@@ -14991,6 +15214,248 @@ export type ListAdminInstanceEmailSettingsAuditResponses = {
14991
15214
  200: AdminInstanceSettingsAuditPage;
14992
15215
  };
14993
15216
  export type ListAdminInstanceEmailSettingsAuditResponse = ListAdminInstanceEmailSettingsAuditResponses[keyof ListAdminInstanceEmailSettingsAuditResponses];
15217
+ export type ResetAdminSearchSettingsData = {
15218
+ body?: never;
15219
+ path?: never;
15220
+ query?: never;
15221
+ url: '/api/v1/admin/settings/search';
15222
+ };
15223
+ export type ResetAdminSearchSettingsErrors = {
15224
+ /**
15225
+ * Not found — the caller is not an instance admin
15226
+ */
15227
+ 404: ErrorResponse;
15228
+ /**
15229
+ * Internal server error
15230
+ */
15231
+ 500: ErrorResponse;
15232
+ };
15233
+ export type ResetAdminSearchSettingsError = ResetAdminSearchSettingsErrors[keyof ResetAdminSearchSettingsErrors];
15234
+ export type ResetAdminSearchSettingsResponses = {
15235
+ /**
15236
+ * The built-in defaults now apply
15237
+ */
15238
+ 204: void;
15239
+ };
15240
+ export type ResetAdminSearchSettingsResponse = ResetAdminSearchSettingsResponses[keyof ResetAdminSearchSettingsResponses];
15241
+ export type GetAdminSearchSettingsData = {
15242
+ body?: never;
15243
+ path?: never;
15244
+ query?: never;
15245
+ url: '/api/v1/admin/settings/search';
15246
+ };
15247
+ export type GetAdminSearchSettingsErrors = {
15248
+ /**
15249
+ * Not found — the caller is not an instance admin
15250
+ */
15251
+ 404: ErrorResponse;
15252
+ /**
15253
+ * Internal server error
15254
+ */
15255
+ 500: ErrorResponse;
15256
+ };
15257
+ export type GetAdminSearchSettingsError = GetAdminSearchSettingsErrors[keyof GetAdminSearchSettingsErrors];
15258
+ export type GetAdminSearchSettingsResponses = {
15259
+ /**
15260
+ * The instance search ranking settings
15261
+ */
15262
+ 200: AdminInstanceSearchSettings;
15263
+ };
15264
+ export type GetAdminSearchSettingsResponse = GetAdminSearchSettingsResponses[keyof GetAdminSearchSettingsResponses];
15265
+ export type UpdateAdminSearchSettingsData = {
15266
+ body: AdminInstanceSearchSettingsUpdate;
15267
+ path?: never;
15268
+ query?: never;
15269
+ url: '/api/v1/admin/settings/search';
15270
+ };
15271
+ export type UpdateAdminSearchSettingsErrors = {
15272
+ /**
15273
+ * Bad request — a value is out of bounds (`INSTANCE_SETTINGS_VALIDATION_FAILED`,
15274
+ * with `validation_errors` naming each offending field), or the body is
15275
+ * malformed, omits or nulls a value field (every value is required), or
15276
+ * carries an unknown field
15277
+ *
15278
+ */
15279
+ 400: ErrorResponse;
15280
+ /**
15281
+ * Not found — the caller is not an instance admin
15282
+ */
15283
+ 404: ErrorResponse;
15284
+ /**
15285
+ * Conflict — `expected_version` does not match the stored version (`INSTANCE_SETTINGS_VERSION_CONFLICT`); nothing was changed
15286
+ */
15287
+ 409: ErrorResponse;
15288
+ /**
15289
+ * Internal server error
15290
+ */
15291
+ 500: ErrorResponse;
15292
+ };
15293
+ export type UpdateAdminSearchSettingsError = UpdateAdminSearchSettingsErrors[keyof UpdateAdminSearchSettingsErrors];
15294
+ export type UpdateAdminSearchSettingsResponses = {
15295
+ /**
15296
+ * The stored settings (`source` is `instance`)
15297
+ */
15298
+ 200: AdminInstanceSearchSettings;
15299
+ };
15300
+ export type UpdateAdminSearchSettingsResponse = UpdateAdminSearchSettingsResponses[keyof UpdateAdminSearchSettingsResponses];
15301
+ export type ListAdminSearchSettingsAuditData = {
15302
+ body?: never;
15303
+ path?: never;
15304
+ query?: {
15305
+ /**
15306
+ * Opaque cursor from a previous page's `next_cursor`.
15307
+ */
15308
+ cursor?: string;
15309
+ /**
15310
+ * Page size.
15311
+ */
15312
+ limit?: number;
15313
+ };
15314
+ url: '/api/v1/admin/settings/search/audit';
15315
+ };
15316
+ export type ListAdminSearchSettingsAuditErrors = {
15317
+ /**
15318
+ * Bad request — malformed cursor, or `limit` out of range
15319
+ */
15320
+ 400: ErrorResponse;
15321
+ /**
15322
+ * Not found — the caller is not an instance admin
15323
+ */
15324
+ 404: ErrorResponse;
15325
+ /**
15326
+ * Internal server error
15327
+ */
15328
+ 500: ErrorResponse;
15329
+ };
15330
+ export type ListAdminSearchSettingsAuditError = ListAdminSearchSettingsAuditErrors[keyof ListAdminSearchSettingsAuditErrors];
15331
+ export type ListAdminSearchSettingsAuditResponses = {
15332
+ /**
15333
+ * One page of audit entries, newest first
15334
+ */
15335
+ 200: AdminInstanceSettingsAuditPage;
15336
+ };
15337
+ export type ListAdminSearchSettingsAuditResponse = ListAdminSearchSettingsAuditResponses[keyof ListAdminSearchSettingsAuditResponses];
15338
+ export type ResetAdminAiSummarySettingsData = {
15339
+ body?: never;
15340
+ path?: never;
15341
+ query?: never;
15342
+ url: '/api/v1/admin/settings/ai-summary';
15343
+ };
15344
+ export type ResetAdminAiSummarySettingsErrors = {
15345
+ /**
15346
+ * Not found — the caller is not an instance admin
15347
+ */
15348
+ 404: ErrorResponse;
15349
+ /**
15350
+ * Internal server error
15351
+ */
15352
+ 500: ErrorResponse;
15353
+ };
15354
+ export type ResetAdminAiSummarySettingsError = ResetAdminAiSummarySettingsErrors[keyof ResetAdminAiSummarySettingsErrors];
15355
+ export type ResetAdminAiSummarySettingsResponses = {
15356
+ /**
15357
+ * The built-in defaults now apply
15358
+ */
15359
+ 204: void;
15360
+ };
15361
+ export type ResetAdminAiSummarySettingsResponse = ResetAdminAiSummarySettingsResponses[keyof ResetAdminAiSummarySettingsResponses];
15362
+ export type GetAdminAiSummarySettingsData = {
15363
+ body?: never;
15364
+ path?: never;
15365
+ query?: never;
15366
+ url: '/api/v1/admin/settings/ai-summary';
15367
+ };
15368
+ export type GetAdminAiSummarySettingsErrors = {
15369
+ /**
15370
+ * Not found — the caller is not an instance admin
15371
+ */
15372
+ 404: ErrorResponse;
15373
+ /**
15374
+ * Internal server error
15375
+ */
15376
+ 500: ErrorResponse;
15377
+ };
15378
+ export type GetAdminAiSummarySettingsError = GetAdminAiSummarySettingsErrors[keyof GetAdminAiSummarySettingsErrors];
15379
+ export type GetAdminAiSummarySettingsResponses = {
15380
+ /**
15381
+ * The instance AI summary settings
15382
+ */
15383
+ 200: AdminInstanceAiSummarySettings;
15384
+ };
15385
+ export type GetAdminAiSummarySettingsResponse = GetAdminAiSummarySettingsResponses[keyof GetAdminAiSummarySettingsResponses];
15386
+ export type UpdateAdminAiSummarySettingsData = {
15387
+ body: AdminInstanceAiSummarySettingsUpdate;
15388
+ path?: never;
15389
+ query?: never;
15390
+ url: '/api/v1/admin/settings/ai-summary';
15391
+ };
15392
+ export type UpdateAdminAiSummarySettingsErrors = {
15393
+ /**
15394
+ * Bad request — a value is out of bounds (`INSTANCE_SETTINGS_VALIDATION_FAILED`,
15395
+ * with `validation_errors` naming each offending field), or the body is
15396
+ * malformed, omits or nulls a value field (every value is required), or
15397
+ * carries an unknown field
15398
+ *
15399
+ */
15400
+ 400: ErrorResponse;
15401
+ /**
15402
+ * Not found — the caller is not an instance admin
15403
+ */
15404
+ 404: ErrorResponse;
15405
+ /**
15406
+ * Conflict — `expected_version` does not match the stored version (`INSTANCE_SETTINGS_VERSION_CONFLICT`); nothing was changed
15407
+ */
15408
+ 409: ErrorResponse;
15409
+ /**
15410
+ * Internal server error
15411
+ */
15412
+ 500: ErrorResponse;
15413
+ };
15414
+ export type UpdateAdminAiSummarySettingsError = UpdateAdminAiSummarySettingsErrors[keyof UpdateAdminAiSummarySettingsErrors];
15415
+ export type UpdateAdminAiSummarySettingsResponses = {
15416
+ /**
15417
+ * The stored settings (`source` is `instance`)
15418
+ */
15419
+ 200: AdminInstanceAiSummarySettings;
15420
+ };
15421
+ export type UpdateAdminAiSummarySettingsResponse = UpdateAdminAiSummarySettingsResponses[keyof UpdateAdminAiSummarySettingsResponses];
15422
+ export type ListAdminAiSummarySettingsAuditData = {
15423
+ body?: never;
15424
+ path?: never;
15425
+ query?: {
15426
+ /**
15427
+ * Opaque cursor from a previous page's `next_cursor`.
15428
+ */
15429
+ cursor?: string;
15430
+ /**
15431
+ * Page size.
15432
+ */
15433
+ limit?: number;
15434
+ };
15435
+ url: '/api/v1/admin/settings/ai-summary/audit';
15436
+ };
15437
+ export type ListAdminAiSummarySettingsAuditErrors = {
15438
+ /**
15439
+ * Bad request — malformed cursor, or `limit` out of range
15440
+ */
15441
+ 400: ErrorResponse;
15442
+ /**
15443
+ * Not found — the caller is not an instance admin
15444
+ */
15445
+ 404: ErrorResponse;
15446
+ /**
15447
+ * Internal server error
15448
+ */
15449
+ 500: ErrorResponse;
15450
+ };
15451
+ export type ListAdminAiSummarySettingsAuditError = ListAdminAiSummarySettingsAuditErrors[keyof ListAdminAiSummarySettingsAuditErrors];
15452
+ export type ListAdminAiSummarySettingsAuditResponses = {
15453
+ /**
15454
+ * One page of audit entries, newest first
15455
+ */
15456
+ 200: AdminInstanceSettingsAuditPage;
15457
+ };
15458
+ export type ListAdminAiSummarySettingsAuditResponse = ListAdminAiSummarySettingsAuditResponses[keyof ListAdminAiSummarySettingsAuditResponses];
14994
15459
  export type ListCommentsData = {
14995
15460
  body?: never;
14996
15461
  path: {