@vibexp/api-client 0.88.0 → 0.90.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.
@@ -1040,7 +1040,17 @@ export const getPromptDependencies = (options) => (options.client ?? client).get
1040
1040
  /**
1041
1041
  * Render a prompt
1042
1042
  *
1043
- * Renders a prompt by resolving @references and substituting placeholders with provided values.
1043
+ * Renders a prompt by resolving references and substituting placeholders with provided values.
1044
+ *
1045
+ * A reference is written `@prompt:<slug>` and resolves to a prompt in the
1046
+ * prompt's own team; `@@` escapes a literal `@`. A bare `@slug` is the
1047
+ * deprecated legacy form: it expands only when it resolves to a prompt and is
1048
+ * otherwise left as plain text without a warning, so emails, handles and
1049
+ * `git@host` remotes are safe. References are resolved on the authored body
1050
+ * only; placeholder values are inserted verbatim.
1051
+ *
1052
+ * With `strict: true`, bare `@slug` is never resolved and an unresolved
1053
+ * `@prompt:<slug>` fails the render with 422.
1044
1054
  *
1045
1055
  */
1046
1056
  export const renderPrompt = (options) => (options.client ?? client).post({
@@ -3655,6 +3665,147 @@ export const replaceAdminSavedFilters = (options) => (options.client ?? client).
3655
3665
  ...options.headers
3656
3666
  }
3657
3667
  });
3668
+ /**
3669
+ * Export instance users as CSV
3670
+ *
3671
+ * Streams the full filtered `users` listing as a CSV download.
3672
+ *
3673
+ * Columns, in order: `id`, `email`, `name`, `idp_provider`, `status`, `created_at`, `team_count`, `project_count`, `prompt_count`, `memory_count`, `artifact_count`, `blueprint_count`, `agent_count`, `feed_count`, `feed_item_count`, `comment_count`, `attachment_count`, `total_resource_count`, `last_resource_created_at`.
3674
+ *
3675
+ * The export accepts exactly the filter and sort parameters of `listAdminUsers`
3676
+ * (no `page`/`limit`) and streams every matching row, in the list's order,
3677
+ * as RFC 4180 CSV (CRLF line endings, UTF-8, no BOM) with a header row.
3678
+ * Nested list fields are flattened; only counts are exported, never a
3679
+ * resource title or content.
3680
+ *
3681
+ * Output is capped at 50,000 data rows. `X-Export-Total-Count` is the size
3682
+ * of the filtered set and `X-Export-Truncated` is `true` when it exceeds the
3683
+ * cap; both come from a count taken just before streaming, so rows written
3684
+ * concurrently can make the streamed row count differ slightly. When the
3685
+ * export is truncated a final marker row is appended whose first cell reads
3686
+ * `# TRUNCATED: exported 50000 of <total> rows; narrow the filters` and whose
3687
+ * remaining cells are empty.
3688
+ *
3689
+ * Free-text cells (`email`, `name`, `idp_provider`) that begin with `=`, `+`, `-`, `@`, a tab or
3690
+ * a carriage return are prefixed with a single quote (`'`) to defuse
3691
+ * spreadsheet formula injection. Numeric, boolean, UUID and timestamp
3692
+ * (RFC 3339, UTC) cells are never altered.
3693
+ *
3694
+ * A failure after streaming has started aborts the connection, so a client
3695
+ * never receives a well-formed but silently short file. Each completed
3696
+ * export is recorded as an `admin_users_exported` activity of the acting admin.
3697
+ *
3698
+ * Instance-admin only; non-admin and unauthenticated requests receive 404.
3699
+ *
3700
+ */
3701
+ export const exportAdminUsers = (options) => (options?.client ?? client).get({
3702
+ responseType: 'text',
3703
+ security: [{
3704
+ key: 'ApiKeyAuth',
3705
+ scheme: 'bearer',
3706
+ type: 'http'
3707
+ }, {
3708
+ in: 'cookie',
3709
+ name: 'vx_session',
3710
+ type: 'apiKey'
3711
+ }],
3712
+ url: '/api/v1/admin/users/export',
3713
+ ...options
3714
+ });
3715
+ /**
3716
+ * Export instance teams as CSV
3717
+ *
3718
+ * Streams the full filtered `teams` listing as a CSV download.
3719
+ *
3720
+ * Columns, in order: `id`, `name`, `slug`, `is_personal`, `owner_id`, `owner_email`, `owner_name`, `member_count`, `owner_count`, `admin_count`, `project_count`, `prompt_count`, `memory_count`, `artifact_count`, `blueprint_count`, `agent_count`, `feed_count`, `feed_item_count`, `comment_count`, `attachment_count`, `total_resource_count`, `embedding_configured`, `llm_configured`, `ai_summary_enabled`, `email_configured`, `github_configured`, `search_settings_customized`, `freshness_enabled`, `created_at`.
3721
+ *
3722
+ * The export accepts exactly the filter and sort parameters of `listAdminTeams`
3723
+ * (no `page`/`limit`) and streams every matching row, in the list's order,
3724
+ * as RFC 4180 CSV (CRLF line endings, UTF-8, no BOM) with a header row.
3725
+ * Nested list fields are flattened; only counts are exported, never a
3726
+ * resource title or content.
3727
+ *
3728
+ * Output is capped at 50,000 data rows. `X-Export-Total-Count` is the size
3729
+ * of the filtered set and `X-Export-Truncated` is `true` when it exceeds the
3730
+ * cap; both come from a count taken just before streaming, so rows written
3731
+ * concurrently can make the streamed row count differ slightly. When the
3732
+ * export is truncated a final marker row is appended whose first cell reads
3733
+ * `# TRUNCATED: exported 50000 of <total> rows; narrow the filters` and whose
3734
+ * remaining cells are empty.
3735
+ *
3736
+ * Free-text cells (`name`, `slug`, `owner_email`, `owner_name`) that begin with `=`, `+`, `-`, `@`, a tab or
3737
+ * a carriage return are prefixed with a single quote (`'`) to defuse
3738
+ * spreadsheet formula injection. Numeric, boolean, UUID and timestamp
3739
+ * (RFC 3339, UTC) cells are never altered.
3740
+ *
3741
+ * A failure after streaming has started aborts the connection, so a client
3742
+ * never receives a well-formed but silently short file. Each completed
3743
+ * export is recorded as an `admin_teams_exported` activity of the acting admin.
3744
+ *
3745
+ * Instance-admin only; non-admin and unauthenticated requests receive 404.
3746
+ *
3747
+ */
3748
+ export const exportAdminTeams = (options) => (options?.client ?? client).get({
3749
+ responseType: 'text',
3750
+ security: [{
3751
+ key: 'ApiKeyAuth',
3752
+ scheme: 'bearer',
3753
+ type: 'http'
3754
+ }, {
3755
+ in: 'cookie',
3756
+ name: 'vx_session',
3757
+ type: 'apiKey'
3758
+ }],
3759
+ url: '/api/v1/admin/teams/export',
3760
+ ...options
3761
+ });
3762
+ /**
3763
+ * Export instance projects as CSV
3764
+ *
3765
+ * Streams the full filtered `projects` listing as a CSV download.
3766
+ *
3767
+ * Columns, in order: `id`, `name`, `slug`, `team_id`, `team_name`, `team_slug`, `owner_id`, `owner_email`, `owner_name`, `prompt_count`, `memory_count`, `artifact_count`, `blueprint_count`, `feed_item_count`, `total_resource_count`, `last_resource_created_at`, `created_at`, `updated_at`.
3768
+ *
3769
+ * The export accepts exactly the filter and sort parameters of `listAdminProjects`
3770
+ * (no `page`/`limit`) and streams every matching row, in the list's order,
3771
+ * as RFC 4180 CSV (CRLF line endings, UTF-8, no BOM) with a header row.
3772
+ * Nested list fields are flattened; only counts are exported, never a
3773
+ * resource title or content.
3774
+ *
3775
+ * Output is capped at 50,000 data rows. `X-Export-Total-Count` is the size
3776
+ * of the filtered set and `X-Export-Truncated` is `true` when it exceeds the
3777
+ * cap; both come from a count taken just before streaming, so rows written
3778
+ * concurrently can make the streamed row count differ slightly. When the
3779
+ * export is truncated a final marker row is appended whose first cell reads
3780
+ * `# TRUNCATED: exported 50000 of <total> rows; narrow the filters` and whose
3781
+ * remaining cells are empty.
3782
+ *
3783
+ * Free-text cells (`name`, `slug`, `team_name`, `team_slug`, `owner_email`, `owner_name`) that begin with `=`, `+`, `-`, `@`, a tab or
3784
+ * a carriage return are prefixed with a single quote (`'`) to defuse
3785
+ * spreadsheet formula injection. Numeric, boolean, UUID and timestamp
3786
+ * (RFC 3339, UTC) cells are never altered.
3787
+ *
3788
+ * A failure after streaming has started aborts the connection, so a client
3789
+ * never receives a well-formed but silently short file. Each completed
3790
+ * export is recorded as an `admin_projects_exported` activity of the acting admin.
3791
+ *
3792
+ * Instance-admin only; non-admin and unauthenticated requests receive 404.
3793
+ *
3794
+ */
3795
+ export const exportAdminProjects = (options) => (options?.client ?? client).get({
3796
+ responseType: 'text',
3797
+ security: [{
3798
+ key: 'ApiKeyAuth',
3799
+ scheme: 'bearer',
3800
+ type: 'http'
3801
+ }, {
3802
+ in: 'cookie',
3803
+ name: 'vx_session',
3804
+ type: 'apiKey'
3805
+ }],
3806
+ url: '/api/v1/admin/projects/export',
3807
+ ...options
3808
+ });
3658
3809
  /**
3659
3810
  * List a resource's comments
3660
3811
  *
@@ -376,6 +376,10 @@ export type RenderPromptRequest = {
376
376
  placeholders: {
377
377
  [key: string]: string;
378
378
  };
379
+ /**
380
+ * When true, only explicit @prompt:slug references are resolved (a bare @word such as an email, handle or git@host remote stays literal text), and an unresolved @prompt:slug fails the render with 422 instead of a warning. Recommended for unattended agents.
381
+ */
382
+ strict?: boolean;
379
383
  };
380
384
  export type RenderPromptResponse = {
381
385
  rendered_body: string;
@@ -385,7 +389,7 @@ export type RenderPromptResponse = {
385
389
  placeholders_missing?: Array<string>;
386
390
  references_used?: Array<string>;
387
391
  /**
388
- * Warnings about issues during rendering (e.g., missing references)
392
+ * Warnings about issues during rendering, such as an explicit @prompt:slug reference that does not resolve (kept as-is in rendered_body). A bare @word that does not resolve is plain text and never produces a warning.
389
393
  */
390
394
  warnings?: Array<string>;
391
395
  };
@@ -9127,6 +9131,10 @@ export type RenderPromptErrors = {
9127
9131
  * Prompt not found
9128
9132
  */
9129
9133
  404: ErrorResponse;
9134
+ /**
9135
+ * Strict render failed: one or more explicit @prompt:slug references do not resolve. The detail names the missing slugs.
9136
+ */
9137
+ 422: ErrorResponse;
9130
9138
  };
9131
9139
  export type RenderPromptError = RenderPromptErrors[keyof RenderPromptErrors];
9132
9140
  export type RenderPromptResponses = {
@@ -14106,6 +14114,493 @@ export type ReplaceAdminSavedFiltersResponses = {
14106
14114
  200: AdminSavedFilters;
14107
14115
  };
14108
14116
  export type ReplaceAdminSavedFiltersResponse = ReplaceAdminSavedFiltersResponses[keyof ReplaceAdminSavedFiltersResponses];
14117
+ export type ExportAdminUsersData = {
14118
+ body?: never;
14119
+ path?: never;
14120
+ query?: {
14121
+ /**
14122
+ * Case-insensitive substring match over the user's email and name.
14123
+ */
14124
+ search?: string;
14125
+ /**
14126
+ * Exact match on the user's identity-provider name (e.g. "google", "oidc").
14127
+ */
14128
+ idp_provider?: string;
14129
+ /**
14130
+ * Only users created at or after this instant (inclusive).
14131
+ */
14132
+ created_from?: string;
14133
+ /**
14134
+ * Only users created at or before this instant (inclusive).
14135
+ */
14136
+ created_to?: string;
14137
+ /**
14138
+ * Narrow to accounts in this lifecycle state.
14139
+ */
14140
+ status?: 'active' | 'suspended';
14141
+ /**
14142
+ * Only users with at least this many teams the user belongs to (inclusive).
14143
+ */
14144
+ team_count_min?: number;
14145
+ /**
14146
+ * Only users with at most this many teams the user belongs to (inclusive).
14147
+ */
14148
+ team_count_max?: number;
14149
+ /**
14150
+ * Only users with at least this many projects the user created (inclusive).
14151
+ */
14152
+ project_count_min?: number;
14153
+ /**
14154
+ * Only users with at most this many projects the user created (inclusive).
14155
+ */
14156
+ project_count_max?: number;
14157
+ /**
14158
+ * Only users with at least this many prompts the user authored (inclusive).
14159
+ */
14160
+ prompt_count_min?: number;
14161
+ /**
14162
+ * Only users with at most this many prompts the user authored (inclusive).
14163
+ */
14164
+ prompt_count_max?: number;
14165
+ /**
14166
+ * Only users with at least this many memories the user authored (inclusive).
14167
+ */
14168
+ memory_count_min?: number;
14169
+ /**
14170
+ * Only users with at most this many memories the user authored (inclusive).
14171
+ */
14172
+ memory_count_max?: number;
14173
+ /**
14174
+ * Only users with at least this many artifacts the user authored (inclusive).
14175
+ */
14176
+ artifact_count_min?: number;
14177
+ /**
14178
+ * Only users with at most this many artifacts the user authored (inclusive).
14179
+ */
14180
+ artifact_count_max?: number;
14181
+ /**
14182
+ * Only users with at least this many blueprints the user authored (inclusive).
14183
+ */
14184
+ blueprint_count_min?: number;
14185
+ /**
14186
+ * Only users with at most this many blueprints the user authored (inclusive).
14187
+ */
14188
+ blueprint_count_max?: number;
14189
+ /**
14190
+ * Only users with at least this many agents the user created (inclusive).
14191
+ */
14192
+ agent_count_min?: number;
14193
+ /**
14194
+ * Only users with at most this many agents the user created (inclusive).
14195
+ */
14196
+ agent_count_max?: number;
14197
+ /**
14198
+ * Only users with at least this many feeds the user created (inclusive).
14199
+ */
14200
+ feed_count_min?: number;
14201
+ /**
14202
+ * Only users with at most this many feeds the user created (inclusive).
14203
+ */
14204
+ feed_count_max?: number;
14205
+ /**
14206
+ * Only users with at least this many feed items the user posted (inclusive).
14207
+ */
14208
+ feed_item_count_min?: number;
14209
+ /**
14210
+ * Only users with at most this many feed items the user posted (inclusive).
14211
+ */
14212
+ feed_item_count_max?: number;
14213
+ /**
14214
+ * Only users with at least this many comments the user wrote (inclusive).
14215
+ */
14216
+ comment_count_min?: number;
14217
+ /**
14218
+ * Only users with at most this many comments the user wrote (inclusive).
14219
+ */
14220
+ comment_count_max?: number;
14221
+ /**
14222
+ * Only users with at least this many attachments the user uploaded (inclusive).
14223
+ */
14224
+ attachment_count_min?: number;
14225
+ /**
14226
+ * Only users with at most this many attachments the user uploaded (inclusive).
14227
+ */
14228
+ attachment_count_max?: number;
14229
+ /**
14230
+ * Only users with at least this many resources the user authored across all nine types (the sum of resource_counts) (inclusive).
14231
+ */
14232
+ total_resource_count_min?: number;
14233
+ /**
14234
+ * Only users with at most this many resources the user authored across all nine types (the sum of resource_counts) (inclusive).
14235
+ */
14236
+ total_resource_count_max?: number;
14237
+ /**
14238
+ * Only users whose most recent resource (any of the nine types) was created
14239
+ * at or after this instant (inclusive). Users with no resources never match.
14240
+ *
14241
+ */
14242
+ last_resource_created_from?: string;
14243
+ /**
14244
+ * Only users whose most recent resource (any of the nine types) was created
14245
+ * at or before this instant (inclusive). Users with no resources never match.
14246
+ *
14247
+ */
14248
+ last_resource_created_to?: string;
14249
+ /**
14250
+ * Column to sort by. Ties are always broken by user id so paging is stable.
14251
+ * Sorting by last_resource_created_at places users with no resources last
14252
+ * in both directions.
14253
+ *
14254
+ */
14255
+ sort_by?: 'created_at' | 'email' | 'name' | 'team_count' | 'project_count' | 'prompt_count' | 'memory_count' | 'artifact_count' | 'blueprint_count' | 'agent_count' | 'feed_count' | 'feed_item_count' | 'comment_count' | 'attachment_count' | 'total_resource_count' | 'last_resource_created_at';
14256
+ /**
14257
+ * Sort direction.
14258
+ */
14259
+ sort_order?: 'asc' | 'desc';
14260
+ };
14261
+ url: '/api/v1/admin/users/export';
14262
+ };
14263
+ export type ExportAdminUsersErrors = {
14264
+ /**
14265
+ * Bad request — a query parameter is malformed or outside its enum, a count bound is negative, or a min/max or from/to pair is inverted. Nothing is streamed.
14266
+ */
14267
+ 400: ErrorResponse;
14268
+ /**
14269
+ * Not found — the caller is not an instance admin (surface not advertised)
14270
+ */
14271
+ 404: ErrorResponse;
14272
+ /**
14273
+ * Internal server error (before streaming started)
14274
+ */
14275
+ 500: ErrorResponse;
14276
+ };
14277
+ export type ExportAdminUsersError = ExportAdminUsersErrors[keyof ExportAdminUsersErrors];
14278
+ export type ExportAdminUsersResponses = {
14279
+ /**
14280
+ * CSV of every matching row (capped at 50,000)
14281
+ */
14282
+ 200: string;
14283
+ };
14284
+ export type ExportAdminUsersResponse = ExportAdminUsersResponses[keyof ExportAdminUsersResponses];
14285
+ export type ExportAdminTeamsData = {
14286
+ body?: never;
14287
+ path?: never;
14288
+ query?: {
14289
+ /**
14290
+ * Case-insensitive substring match over the team name, team slug, and the owner's email.
14291
+ */
14292
+ search?: string;
14293
+ /**
14294
+ * Narrow to personal workspaces (true) or shared team workspaces (false).
14295
+ */
14296
+ is_personal?: boolean;
14297
+ /**
14298
+ * Only teams created at or after this instant (inclusive).
14299
+ */
14300
+ created_from?: string;
14301
+ /**
14302
+ * Only teams created at or before this instant (inclusive).
14303
+ */
14304
+ created_to?: string;
14305
+ /**
14306
+ * Only teams with at least this many members (inclusive).
14307
+ */
14308
+ member_count_min?: number;
14309
+ /**
14310
+ * Only teams with at most this many members (inclusive).
14311
+ */
14312
+ member_count_max?: number;
14313
+ /**
14314
+ * Only teams with at least this many members holding the owner role (always 1 by application invariant; any other value is integrity drift) (inclusive).
14315
+ */
14316
+ owner_count_min?: number;
14317
+ /**
14318
+ * Only teams with at most this many members holding the owner role (always 1 by application invariant; any other value is integrity drift) (inclusive).
14319
+ */
14320
+ owner_count_max?: number;
14321
+ /**
14322
+ * Only teams with at least this many members holding the admin role (inclusive).
14323
+ */
14324
+ admin_count_min?: number;
14325
+ /**
14326
+ * Only teams with at most this many members holding the admin role (inclusive).
14327
+ */
14328
+ admin_count_max?: number;
14329
+ /**
14330
+ * Only teams with at least this many projects in the team (inclusive).
14331
+ */
14332
+ project_count_min?: number;
14333
+ /**
14334
+ * Only teams with at most this many projects in the team (inclusive).
14335
+ */
14336
+ project_count_max?: number;
14337
+ /**
14338
+ * Only teams with at least this many prompts in the team (inclusive).
14339
+ */
14340
+ prompt_count_min?: number;
14341
+ /**
14342
+ * Only teams with at most this many prompts in the team (inclusive).
14343
+ */
14344
+ prompt_count_max?: number;
14345
+ /**
14346
+ * Only teams with at least this many memories in the team (inclusive).
14347
+ */
14348
+ memory_count_min?: number;
14349
+ /**
14350
+ * Only teams with at most this many memories in the team (inclusive).
14351
+ */
14352
+ memory_count_max?: number;
14353
+ /**
14354
+ * Only teams with at least this many artifacts in the team (inclusive).
14355
+ */
14356
+ artifact_count_min?: number;
14357
+ /**
14358
+ * Only teams with at most this many artifacts in the team (inclusive).
14359
+ */
14360
+ artifact_count_max?: number;
14361
+ /**
14362
+ * Only teams with at least this many blueprints in the team (inclusive).
14363
+ */
14364
+ blueprint_count_min?: number;
14365
+ /**
14366
+ * Only teams with at most this many blueprints in the team (inclusive).
14367
+ */
14368
+ blueprint_count_max?: number;
14369
+ /**
14370
+ * Only teams with at least this many agents in the team (inclusive).
14371
+ */
14372
+ agent_count_min?: number;
14373
+ /**
14374
+ * Only teams with at most this many agents in the team (inclusive).
14375
+ */
14376
+ agent_count_max?: number;
14377
+ /**
14378
+ * Only teams with at least this many feeds in the team (inclusive).
14379
+ */
14380
+ feed_count_min?: number;
14381
+ /**
14382
+ * Only teams with at most this many feeds in the team (inclusive).
14383
+ */
14384
+ feed_count_max?: number;
14385
+ /**
14386
+ * Only teams with at least this many feed items in the team (inclusive).
14387
+ */
14388
+ feed_item_count_min?: number;
14389
+ /**
14390
+ * Only teams with at most this many feed items in the team (inclusive).
14391
+ */
14392
+ feed_item_count_max?: number;
14393
+ /**
14394
+ * Only teams with at least this many comments in the team (inclusive).
14395
+ */
14396
+ comment_count_min?: number;
14397
+ /**
14398
+ * Only teams with at most this many comments in the team (inclusive).
14399
+ */
14400
+ comment_count_max?: number;
14401
+ /**
14402
+ * Only teams with at least this many attachments in the team (inclusive).
14403
+ */
14404
+ attachment_count_min?: number;
14405
+ /**
14406
+ * Only teams with at most this many attachments in the team (inclusive).
14407
+ */
14408
+ attachment_count_max?: number;
14409
+ /**
14410
+ * Only teams with at least this many resources in the team across all nine types (the sum of resource_counts) (inclusive).
14411
+ */
14412
+ total_resource_count_min?: number;
14413
+ /**
14414
+ * Only teams with at most this many resources in the team across all nine types (the sum of resource_counts) (inclusive).
14415
+ */
14416
+ total_resource_count_max?: number;
14417
+ /**
14418
+ * Case-insensitive exact match on the team owner's email (the user referenced by the team's owner). For substring matching use `search`.
14419
+ */
14420
+ owner_email?: string;
14421
+ /**
14422
+ * true = the team has at least one embedding provider of its own; false = it does not; omit = any. Instance-level fallback configuration never counts.
14423
+ */
14424
+ embedding_configured?: boolean;
14425
+ /**
14426
+ * true = the team has at least one LLM model provider of its own; false = it does not; omit = any. Instance-level fallback configuration never counts.
14427
+ */
14428
+ llm_configured?: boolean;
14429
+ /**
14430
+ * true = the team has its own AI summary settings with summaries enabled; false = it does not; omit = any. Instance-level fallback configuration never counts.
14431
+ */
14432
+ ai_summary_enabled?: boolean;
14433
+ /**
14434
+ * true = the team has its own email provider (regardless of its delivery health); false = it does not; omit = any. Instance-level fallback configuration never counts.
14435
+ */
14436
+ email_configured?: boolean;
14437
+ /**
14438
+ * true = the team has its own GitHub App configuration or at least one GitHub App installation (suspended installations included); false = it does not; omit = any. Instance-level fallback configuration never counts.
14439
+ */
14440
+ github_configured?: boolean;
14441
+ /**
14442
+ * true = the team has its own search settings; false = it does not; omit = any. Instance-level fallback configuration never counts.
14443
+ */
14444
+ search_settings_customized?: boolean;
14445
+ /**
14446
+ * true = the team has at least one enabled freshness rule; false = it does not; omit = any. Instance-level fallback configuration never counts.
14447
+ */
14448
+ freshness_enabled?: boolean;
14449
+ /**
14450
+ * Column to sort by. Ties are always broken by team id so paging is stable.
14451
+ */
14452
+ sort_by?: 'created_at' | 'name' | 'member_count' | 'owner_count' | 'admin_count' | 'project_count' | 'prompt_count' | 'memory_count' | 'artifact_count' | 'blueprint_count' | 'agent_count' | 'feed_count' | 'feed_item_count' | 'comment_count' | 'attachment_count' | 'total_resource_count';
14453
+ /**
14454
+ * Sort direction.
14455
+ */
14456
+ sort_order?: 'asc' | 'desc';
14457
+ };
14458
+ url: '/api/v1/admin/teams/export';
14459
+ };
14460
+ export type ExportAdminTeamsErrors = {
14461
+ /**
14462
+ * Bad request — a query parameter is malformed or outside its enum, a count bound is negative, or a min/max or from/to pair is inverted. Nothing is streamed.
14463
+ */
14464
+ 400: ErrorResponse;
14465
+ /**
14466
+ * Not found — the caller is not an instance admin (surface not advertised)
14467
+ */
14468
+ 404: ErrorResponse;
14469
+ /**
14470
+ * Internal server error (before streaming started)
14471
+ */
14472
+ 500: ErrorResponse;
14473
+ };
14474
+ export type ExportAdminTeamsError = ExportAdminTeamsErrors[keyof ExportAdminTeamsErrors];
14475
+ export type ExportAdminTeamsResponses = {
14476
+ /**
14477
+ * CSV of every matching row (capped at 50,000)
14478
+ */
14479
+ 200: string;
14480
+ };
14481
+ export type ExportAdminTeamsResponse = ExportAdminTeamsResponses[keyof ExportAdminTeamsResponses];
14482
+ export type ExportAdminProjectsData = {
14483
+ body?: never;
14484
+ path?: never;
14485
+ query?: {
14486
+ /**
14487
+ * Case-insensitive substring match over the project name and slug.
14488
+ */
14489
+ search?: string;
14490
+ /**
14491
+ * Narrow to projects belonging to one team.
14492
+ */
14493
+ team_id?: string;
14494
+ /**
14495
+ * Only projects created at or after this instant (inclusive).
14496
+ */
14497
+ created_from?: string;
14498
+ /**
14499
+ * Only projects created at or before this instant (inclusive).
14500
+ */
14501
+ created_to?: string;
14502
+ /**
14503
+ * Only projects with at least this many prompts in the project (inclusive).
14504
+ */
14505
+ prompt_count_min?: number;
14506
+ /**
14507
+ * Only projects with at most this many prompts in the project (inclusive).
14508
+ */
14509
+ prompt_count_max?: number;
14510
+ /**
14511
+ * Only projects with at least this many memories in the project (inclusive).
14512
+ */
14513
+ memory_count_min?: number;
14514
+ /**
14515
+ * Only projects with at most this many memories in the project (inclusive).
14516
+ */
14517
+ memory_count_max?: number;
14518
+ /**
14519
+ * Only projects with at least this many artifacts in the project (inclusive).
14520
+ */
14521
+ artifact_count_min?: number;
14522
+ /**
14523
+ * Only projects with at most this many artifacts in the project (inclusive).
14524
+ */
14525
+ artifact_count_max?: number;
14526
+ /**
14527
+ * Only projects with at least this many blueprints in the project (inclusive).
14528
+ */
14529
+ blueprint_count_min?: number;
14530
+ /**
14531
+ * Only projects with at most this many blueprints in the project (inclusive).
14532
+ */
14533
+ blueprint_count_max?: number;
14534
+ /**
14535
+ * Only projects with at least this many feed items in the project (inclusive).
14536
+ */
14537
+ feed_item_count_min?: number;
14538
+ /**
14539
+ * Only projects with at most this many feed items in the project (inclusive).
14540
+ */
14541
+ feed_item_count_max?: number;
14542
+ /**
14543
+ * Only projects with at least this many project-scoped resources in the project (inclusive). The total is the sum of the five project-scoped types.
14544
+ */
14545
+ total_resource_count_min?: number;
14546
+ /**
14547
+ * Only projects with at most this many project-scoped resources in the project (inclusive). The total is the sum of the five project-scoped types.
14548
+ */
14549
+ total_resource_count_max?: number;
14550
+ /**
14551
+ * Case-insensitive exact match on the email of the project's creator (`projects.user_id`, the `owner` field), not the owning team's owner. For substring matching on name/slug use `search`.
14552
+ */
14553
+ owner_email?: string;
14554
+ /**
14555
+ * Only projects whose most recent project-scoped resource (any of the five
14556
+ * types) was created at or after this instant (inclusive). Projects with
14557
+ * no resources never match.
14558
+ *
14559
+ */
14560
+ last_resource_created_from?: string;
14561
+ /**
14562
+ * Only projects whose most recent project-scoped resource (any of the five
14563
+ * types) was created at or before this instant (inclusive). Projects with
14564
+ * no resources never match.
14565
+ *
14566
+ */
14567
+ last_resource_created_to?: string;
14568
+ /**
14569
+ * Column to sort by. Ties are always broken by project id so paging is stable.
14570
+ * Sorting by last_resource_created_at places projects with no resources
14571
+ * last in both directions.
14572
+ *
14573
+ */
14574
+ sort_by?: 'created_at' | 'name' | 'prompt_count' | 'memory_count' | 'artifact_count' | 'blueprint_count' | 'feed_item_count' | 'total_resource_count' | 'last_resource_created_at';
14575
+ /**
14576
+ * Sort direction.
14577
+ */
14578
+ sort_order?: 'asc' | 'desc';
14579
+ };
14580
+ url: '/api/v1/admin/projects/export';
14581
+ };
14582
+ export type ExportAdminProjectsErrors = {
14583
+ /**
14584
+ * Bad request — a query parameter is malformed or outside its enum, a count bound is negative, or a min/max or from/to pair is inverted. Nothing is streamed.
14585
+ */
14586
+ 400: ErrorResponse;
14587
+ /**
14588
+ * Not found — the caller is not an instance admin (surface not advertised)
14589
+ */
14590
+ 404: ErrorResponse;
14591
+ /**
14592
+ * Internal server error (before streaming started)
14593
+ */
14594
+ 500: ErrorResponse;
14595
+ };
14596
+ export type ExportAdminProjectsError = ExportAdminProjectsErrors[keyof ExportAdminProjectsErrors];
14597
+ export type ExportAdminProjectsResponses = {
14598
+ /**
14599
+ * CSV of every matching row (capped at 50,000)
14600
+ */
14601
+ 200: string;
14602
+ };
14603
+ export type ExportAdminProjectsResponse = ExportAdminProjectsResponses[keyof ExportAdminProjectsResponses];
14109
14604
  export type ListCommentsData = {
14110
14605
  body?: never;
14111
14606
  path: {