@vibexp/api-client 0.87.0 → 0.89.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.
@@ -3601,6 +3601,201 @@ export const getAdminProjectConfig = (options) => (options.client ?? client).get
3601
3601
  url: '/api/v1/admin/projects/{id}/config',
3602
3602
  ...options
3603
3603
  });
3604
+ /**
3605
+ * Get the caller's saved filter presets for an admin list
3606
+ *
3607
+ * Returns the calling instance admin's own named filter presets for one admin
3608
+ * list, plus the `version` to send back when replacing them. An admin with
3609
+ * nothing saved gets `presets: []` and `version: 0`. Presets are private to
3610
+ * the admin who saved them.
3611
+ * Instance-admin only; non-admin and unauthenticated requests receive 404.
3612
+ *
3613
+ */
3614
+ export const getAdminSavedFilters = (options) => (options.client ?? client).get({
3615
+ responseType: 'json',
3616
+ security: [{
3617
+ key: 'ApiKeyAuth',
3618
+ scheme: 'bearer',
3619
+ type: 'http'
3620
+ }, {
3621
+ in: 'cookie',
3622
+ name: 'vx_session',
3623
+ type: 'apiKey'
3624
+ }],
3625
+ url: '/api/v1/admin/saved-filters/{list}',
3626
+ ...options
3627
+ });
3628
+ /**
3629
+ * Replace the caller's saved filter presets for an admin list
3630
+ *
3631
+ * Atomically replaces the calling instance admin's presets for one admin
3632
+ * list. At most 20 presets; names are trimmed and must be 1–80 characters and
3633
+ * unique case-insensitively; ids must be unique (a missing id is assigned by
3634
+ * the server, a sent id is kept). The request's `version` must match the
3635
+ * stored one, otherwise nothing is saved and 409 is returned. A body carrying
3636
+ * an unknown field is rejected with 400.
3637
+ * Instance-admin only; non-admin and unauthenticated requests receive 404.
3638
+ *
3639
+ */
3640
+ export const replaceAdminSavedFilters = (options) => (options.client ?? client).put({
3641
+ responseType: 'json',
3642
+ security: [{
3643
+ key: 'ApiKeyAuth',
3644
+ scheme: 'bearer',
3645
+ type: 'http'
3646
+ }, {
3647
+ in: 'cookie',
3648
+ name: 'vx_session',
3649
+ type: 'apiKey'
3650
+ }],
3651
+ url: '/api/v1/admin/saved-filters/{list}',
3652
+ ...options,
3653
+ headers: {
3654
+ 'Content-Type': 'application/json',
3655
+ ...options.headers
3656
+ }
3657
+ });
3658
+ /**
3659
+ * Export instance users as CSV
3660
+ *
3661
+ * Streams the full filtered `users` listing as a CSV download.
3662
+ *
3663
+ * 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`.
3664
+ *
3665
+ * The export accepts exactly the filter and sort parameters of `listAdminUsers`
3666
+ * (no `page`/`limit`) and streams every matching row, in the list's order,
3667
+ * as RFC 4180 CSV (CRLF line endings, UTF-8, no BOM) with a header row.
3668
+ * Nested list fields are flattened; only counts are exported, never a
3669
+ * resource title or content.
3670
+ *
3671
+ * Output is capped at 50,000 data rows. `X-Export-Total-Count` is the size
3672
+ * of the filtered set and `X-Export-Truncated` is `true` when it exceeds the
3673
+ * cap; both come from a count taken just before streaming, so rows written
3674
+ * concurrently can make the streamed row count differ slightly. When the
3675
+ * export is truncated a final marker row is appended whose first cell reads
3676
+ * `# TRUNCATED: exported 50000 of <total> rows; narrow the filters` and whose
3677
+ * remaining cells are empty.
3678
+ *
3679
+ * Free-text cells (`email`, `name`, `idp_provider`) that begin with `=`, `+`, `-`, `@`, a tab or
3680
+ * a carriage return are prefixed with a single quote (`'`) to defuse
3681
+ * spreadsheet formula injection. Numeric, boolean, UUID and timestamp
3682
+ * (RFC 3339, UTC) cells are never altered.
3683
+ *
3684
+ * A failure after streaming has started aborts the connection, so a client
3685
+ * never receives a well-formed but silently short file. Each completed
3686
+ * export is recorded as an `admin_users_exported` activity of the acting admin.
3687
+ *
3688
+ * Instance-admin only; non-admin and unauthenticated requests receive 404.
3689
+ *
3690
+ */
3691
+ export const exportAdminUsers = (options) => (options?.client ?? client).get({
3692
+ responseType: 'text',
3693
+ security: [{
3694
+ key: 'ApiKeyAuth',
3695
+ scheme: 'bearer',
3696
+ type: 'http'
3697
+ }, {
3698
+ in: 'cookie',
3699
+ name: 'vx_session',
3700
+ type: 'apiKey'
3701
+ }],
3702
+ url: '/api/v1/admin/users/export',
3703
+ ...options
3704
+ });
3705
+ /**
3706
+ * Export instance teams as CSV
3707
+ *
3708
+ * Streams the full filtered `teams` listing as a CSV download.
3709
+ *
3710
+ * 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`.
3711
+ *
3712
+ * The export accepts exactly the filter and sort parameters of `listAdminTeams`
3713
+ * (no `page`/`limit`) and streams every matching row, in the list's order,
3714
+ * as RFC 4180 CSV (CRLF line endings, UTF-8, no BOM) with a header row.
3715
+ * Nested list fields are flattened; only counts are exported, never a
3716
+ * resource title or content.
3717
+ *
3718
+ * Output is capped at 50,000 data rows. `X-Export-Total-Count` is the size
3719
+ * of the filtered set and `X-Export-Truncated` is `true` when it exceeds the
3720
+ * cap; both come from a count taken just before streaming, so rows written
3721
+ * concurrently can make the streamed row count differ slightly. When the
3722
+ * export is truncated a final marker row is appended whose first cell reads
3723
+ * `# TRUNCATED: exported 50000 of <total> rows; narrow the filters` and whose
3724
+ * remaining cells are empty.
3725
+ *
3726
+ * Free-text cells (`name`, `slug`, `owner_email`, `owner_name`) that begin with `=`, `+`, `-`, `@`, a tab or
3727
+ * a carriage return are prefixed with a single quote (`'`) to defuse
3728
+ * spreadsheet formula injection. Numeric, boolean, UUID and timestamp
3729
+ * (RFC 3339, UTC) cells are never altered.
3730
+ *
3731
+ * A failure after streaming has started aborts the connection, so a client
3732
+ * never receives a well-formed but silently short file. Each completed
3733
+ * export is recorded as an `admin_teams_exported` activity of the acting admin.
3734
+ *
3735
+ * Instance-admin only; non-admin and unauthenticated requests receive 404.
3736
+ *
3737
+ */
3738
+ export const exportAdminTeams = (options) => (options?.client ?? client).get({
3739
+ responseType: 'text',
3740
+ security: [{
3741
+ key: 'ApiKeyAuth',
3742
+ scheme: 'bearer',
3743
+ type: 'http'
3744
+ }, {
3745
+ in: 'cookie',
3746
+ name: 'vx_session',
3747
+ type: 'apiKey'
3748
+ }],
3749
+ url: '/api/v1/admin/teams/export',
3750
+ ...options
3751
+ });
3752
+ /**
3753
+ * Export instance projects as CSV
3754
+ *
3755
+ * Streams the full filtered `projects` listing as a CSV download.
3756
+ *
3757
+ * 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`.
3758
+ *
3759
+ * The export accepts exactly the filter and sort parameters of `listAdminProjects`
3760
+ * (no `page`/`limit`) and streams every matching row, in the list's order,
3761
+ * as RFC 4180 CSV (CRLF line endings, UTF-8, no BOM) with a header row.
3762
+ * Nested list fields are flattened; only counts are exported, never a
3763
+ * resource title or content.
3764
+ *
3765
+ * Output is capped at 50,000 data rows. `X-Export-Total-Count` is the size
3766
+ * of the filtered set and `X-Export-Truncated` is `true` when it exceeds the
3767
+ * cap; both come from a count taken just before streaming, so rows written
3768
+ * concurrently can make the streamed row count differ slightly. When the
3769
+ * export is truncated a final marker row is appended whose first cell reads
3770
+ * `# TRUNCATED: exported 50000 of <total> rows; narrow the filters` and whose
3771
+ * remaining cells are empty.
3772
+ *
3773
+ * Free-text cells (`name`, `slug`, `team_name`, `team_slug`, `owner_email`, `owner_name`) that begin with `=`, `+`, `-`, `@`, a tab or
3774
+ * a carriage return are prefixed with a single quote (`'`) to defuse
3775
+ * spreadsheet formula injection. Numeric, boolean, UUID and timestamp
3776
+ * (RFC 3339, UTC) cells are never altered.
3777
+ *
3778
+ * A failure after streaming has started aborts the connection, so a client
3779
+ * never receives a well-formed but silently short file. Each completed
3780
+ * export is recorded as an `admin_projects_exported` activity of the acting admin.
3781
+ *
3782
+ * Instance-admin only; non-admin and unauthenticated requests receive 404.
3783
+ *
3784
+ */
3785
+ export const exportAdminProjects = (options) => (options?.client ?? client).get({
3786
+ responseType: 'text',
3787
+ security: [{
3788
+ key: 'ApiKeyAuth',
3789
+ scheme: 'bearer',
3790
+ type: 'http'
3791
+ }, {
3792
+ in: 'cookie',
3793
+ name: 'vx_session',
3794
+ type: 'apiKey'
3795
+ }],
3796
+ url: '/api/v1/admin/projects/export',
3797
+ ...options
3798
+ });
3604
3799
  /**
3605
3800
  * List a resource's comments
3606
3801
  *