@vibexp/api-client 0.86.0 → 0.87.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.
@@ -5413,7 +5413,8 @@ export type AdminUserAccessMetrics = {
5413
5413
  };
5414
5414
  /**
5415
5415
  * One opaque most-accessed resource: its type, where it lives and how often
5416
- * the user accessed it. Deliberately carries no title, slug or content — only
5416
+ * the user accessed it (or, for a project, how often it was accessed).
5417
+ * Deliberately carries no title, slug or content — only
5417
5418
  * the first 8 characters of the resource id. The identity fields share their
5418
5419
  * names with AdminUserTimelineEvent.
5419
5420
  *
@@ -5434,14 +5435,19 @@ export type AdminTopAccessedResource = {
5434
5435
  project_id: string | null;
5435
5436
  project_name: string | null;
5436
5437
  /**
5437
- * True when the resource no longer exists (access events outlive their resource until pruned).
5438
+ * True when the resource no longer exists (access events outlive their
5439
+ * resource until pruned). Always `false` for a project's top resources
5440
+ * (GET /api/v1/admin/projects/{id}/top-accessed-resources), where a
5441
+ * deleted resource has no current project and drops out.
5442
+ *
5438
5443
  */
5439
5444
  resource_deleted: boolean;
5440
5445
  access_count: number;
5441
5446
  };
5442
5447
  /**
5443
5448
  * The resources a user accessed most in a range
5444
- * (GET /api/v1/admin/users/{id}/top-accessed-resources).
5449
+ * (GET /api/v1/admin/users/{id}/top-accessed-resources), or a project's
5450
+ * most-accessed resources (GET /api/v1/admin/projects/{id}/top-accessed-resources).
5445
5451
  *
5446
5452
  */
5447
5453
  export type AdminTopAccessedResourcesResponse = {
@@ -5868,6 +5874,98 @@ export type AdminTeamGitHubConfig = {
5868
5874
  app_config: AdminGitHubAppConfig | null;
5869
5875
  installation: AdminGitHubInstallation;
5870
5876
  };
5877
+ /**
5878
+ * How many resources of each project-scoped type were created in the project within one time bucket.
5879
+ */
5880
+ export type AdminProjectCreationPoint = {
5881
+ /**
5882
+ * Start of the bucket, in UTC.
5883
+ */
5884
+ bucket: string;
5885
+ prompts: number;
5886
+ memories: number;
5887
+ artifacts: number;
5888
+ blueprints: number;
5889
+ feed_items: number;
5890
+ };
5891
+ /**
5892
+ * Resources created in the project per bucket, stacked by type
5893
+ * (GET /api/v1/admin/projects/{id}/resource-creation-metrics). Every bucket in
5894
+ * the range is present with an explicit 0 for every type.
5895
+ *
5896
+ */
5897
+ export type AdminProjectResourceCreationMetrics = {
5898
+ /**
5899
+ * Inclusive start of the range actually used, snapped DOWN to the start of
5900
+ * its bucket (same rule as AdminTimeseriesResponse.from).
5901
+ *
5902
+ */
5903
+ from: string;
5904
+ /**
5905
+ * Exclusive end of the range actually used (after defaulting); not snapped.
5906
+ */
5907
+ to: string;
5908
+ /**
5909
+ * Bucket size actually used.
5910
+ */
5911
+ granularity: 'day' | 'week' | 'month';
5912
+ /**
5913
+ * One point per bucket, ascending by bucket.
5914
+ */
5915
+ series: Array<AdminProjectCreationPoint>;
5916
+ };
5917
+ /**
5918
+ * Accesses to the project's resources and to the project itself per bucket and
5919
+ * source (GET /api/v1/admin/projects/{id}/resource-access-metrics). An event
5920
+ * is attributed to the project its resource belongs to now, so accesses to a
5921
+ * deleted resource drop out and a migrated resource brings its history with
5922
+ * it. Every bucket in the range is present with an explicit 0 for each source
5923
+ * that appears.
5924
+ *
5925
+ */
5926
+ export type AdminProjectAccessMetrics = {
5927
+ /**
5928
+ * Inclusive start of the range actually used, snapped DOWN to the start of
5929
+ * its bucket (same rule as AdminTimeseriesResponse.from).
5930
+ *
5931
+ */
5932
+ from: string;
5933
+ /**
5934
+ * Exclusive end of the range actually used (after defaulting); not snapped.
5935
+ */
5936
+ to: string;
5937
+ /**
5938
+ * Bucket size actually used.
5939
+ */
5940
+ granularity: 'day' | 'week' | 'month';
5941
+ /**
5942
+ * One point per (bucket, source), ascending by bucket then source.
5943
+ */
5944
+ access_by_source: Array<AdminSourcePoint>;
5945
+ /**
5946
+ * Oldest access event still retained (now minus
5947
+ * `retention.access_event_days`); buckets before it read as zeros.
5948
+ *
5949
+ */
5950
+ earliest_retained_at: string;
5951
+ };
5952
+ /**
5953
+ * The configuration that applies to a project
5954
+ * (GET /api/v1/admin/projects/{id}/config): the freshness rules scoped to it
5955
+ * and the team-wide rules that also apply. Both lists are oldest first and
5956
+ * include disabled rules.
5957
+ *
5958
+ */
5959
+ export type AdminProjectConfig = {
5960
+ /**
5961
+ * Rules scoped to this project. `[]` when there are none.
5962
+ */
5963
+ project_rules: Array<AdminFreshnessRule>;
5964
+ /**
5965
+ * Rules with no project scope, which apply to every project of the team. `[]` when there are none.
5966
+ */
5967
+ team_wide_rules: Array<AdminFreshnessRule>;
5968
+ };
5871
5969
  export type ProjectResponse = Project & {
5872
5970
  /**
5873
5971
  * Whether the project's git URL matches a repository accessible via the team's GitHub App installation
@@ -13674,6 +13772,183 @@ export type GetAdminUserNotificationPreferencesResponses = {
13674
13772
  200: AdminUserNotificationPreferences;
13675
13773
  };
13676
13774
  export type GetAdminUserNotificationPreferencesResponse = GetAdminUserNotificationPreferencesResponses[keyof GetAdminUserNotificationPreferencesResponses];
13775
+ export type GetAdminProjectResourceCreationMetricsData = {
13776
+ body?: never;
13777
+ path: {
13778
+ /**
13779
+ * Project id (UUID)
13780
+ */
13781
+ id: string;
13782
+ };
13783
+ query?: {
13784
+ /**
13785
+ * Inclusive start of the range. Defaults to 30 days before `to`.
13786
+ */
13787
+ from?: string;
13788
+ /**
13789
+ * Exclusive end of the range. Defaults to now.
13790
+ */
13791
+ to?: string;
13792
+ /**
13793
+ * Bucket size.
13794
+ */
13795
+ granularity?: 'day' | 'week' | 'month';
13796
+ };
13797
+ url: '/api/v1/admin/projects/{id}/resource-creation-metrics';
13798
+ };
13799
+ export type GetAdminProjectResourceCreationMetricsErrors = {
13800
+ /**
13801
+ * Bad request — malformed project id, `to` is not after `from`, the range
13802
+ * exceeds the maximum span, or `granularity` is outside its enum
13803
+ *
13804
+ */
13805
+ 400: ErrorResponse;
13806
+ /**
13807
+ * Not found — unknown project id, or the caller is not an instance admin
13808
+ */
13809
+ 404: ErrorResponse;
13810
+ /**
13811
+ * Internal server error
13812
+ */
13813
+ 500: ErrorResponse;
13814
+ };
13815
+ export type GetAdminProjectResourceCreationMetricsError = GetAdminProjectResourceCreationMetricsErrors[keyof GetAdminProjectResourceCreationMetricsErrors];
13816
+ export type GetAdminProjectResourceCreationMetricsResponses = {
13817
+ /**
13818
+ * Bucketed creation counts per type
13819
+ */
13820
+ 200: AdminProjectResourceCreationMetrics;
13821
+ };
13822
+ export type GetAdminProjectResourceCreationMetricsResponse = GetAdminProjectResourceCreationMetricsResponses[keyof GetAdminProjectResourceCreationMetricsResponses];
13823
+ export type GetAdminProjectResourceAccessMetricsData = {
13824
+ body?: never;
13825
+ path: {
13826
+ /**
13827
+ * Project id (UUID)
13828
+ */
13829
+ id: string;
13830
+ };
13831
+ query?: {
13832
+ /**
13833
+ * Inclusive start of the range. Defaults to 30 days before `to`.
13834
+ */
13835
+ from?: string;
13836
+ /**
13837
+ * Exclusive end of the range. Defaults to now.
13838
+ */
13839
+ to?: string;
13840
+ /**
13841
+ * Bucket size.
13842
+ */
13843
+ granularity?: 'day' | 'week' | 'month';
13844
+ };
13845
+ url: '/api/v1/admin/projects/{id}/resource-access-metrics';
13846
+ };
13847
+ export type GetAdminProjectResourceAccessMetricsErrors = {
13848
+ /**
13849
+ * Bad request — malformed project id, `to` is not after `from`, the range
13850
+ * exceeds the maximum span, or `granularity` is outside its enum
13851
+ *
13852
+ */
13853
+ 400: ErrorResponse;
13854
+ /**
13855
+ * Not found — unknown project id, or the caller is not an instance admin
13856
+ */
13857
+ 404: ErrorResponse;
13858
+ /**
13859
+ * Internal server error
13860
+ */
13861
+ 500: ErrorResponse;
13862
+ };
13863
+ export type GetAdminProjectResourceAccessMetricsError = GetAdminProjectResourceAccessMetricsErrors[keyof GetAdminProjectResourceAccessMetricsErrors];
13864
+ export type GetAdminProjectResourceAccessMetricsResponses = {
13865
+ /**
13866
+ * Bucketed access counts per source
13867
+ */
13868
+ 200: AdminProjectAccessMetrics;
13869
+ };
13870
+ export type GetAdminProjectResourceAccessMetricsResponse = GetAdminProjectResourceAccessMetricsResponses[keyof GetAdminProjectResourceAccessMetricsResponses];
13871
+ export type GetAdminProjectTopAccessedResourcesData = {
13872
+ body?: never;
13873
+ path: {
13874
+ /**
13875
+ * Project id (UUID)
13876
+ */
13877
+ id: string;
13878
+ };
13879
+ query?: {
13880
+ /**
13881
+ * Inclusive start of the range. Defaults to 30 days before `to`.
13882
+ */
13883
+ from?: string;
13884
+ /**
13885
+ * Exclusive end of the range. Defaults to now.
13886
+ */
13887
+ to?: string;
13888
+ /**
13889
+ * Maximum number of rows.
13890
+ */
13891
+ limit?: number;
13892
+ };
13893
+ url: '/api/v1/admin/projects/{id}/top-accessed-resources';
13894
+ };
13895
+ export type GetAdminProjectTopAccessedResourcesErrors = {
13896
+ /**
13897
+ * Bad request — malformed project id, `to` is not after `from`, the range
13898
+ * exceeds the maximum span, or `limit` is out of range
13899
+ *
13900
+ */
13901
+ 400: ErrorResponse;
13902
+ /**
13903
+ * Not found — unknown project id, or the caller is not an instance admin
13904
+ */
13905
+ 404: ErrorResponse;
13906
+ /**
13907
+ * Internal server error
13908
+ */
13909
+ 500: ErrorResponse;
13910
+ };
13911
+ export type GetAdminProjectTopAccessedResourcesError = GetAdminProjectTopAccessedResourcesErrors[keyof GetAdminProjectTopAccessedResourcesErrors];
13912
+ export type GetAdminProjectTopAccessedResourcesResponses = {
13913
+ /**
13914
+ * The most-accessed resources, most accessed first
13915
+ */
13916
+ 200: AdminTopAccessedResourcesResponse;
13917
+ };
13918
+ export type GetAdminProjectTopAccessedResourcesResponse = GetAdminProjectTopAccessedResourcesResponses[keyof GetAdminProjectTopAccessedResourcesResponses];
13919
+ export type GetAdminProjectConfigData = {
13920
+ body?: never;
13921
+ path: {
13922
+ /**
13923
+ * Project id (UUID)
13924
+ */
13925
+ id: string;
13926
+ };
13927
+ query?: never;
13928
+ url: '/api/v1/admin/projects/{id}/config';
13929
+ };
13930
+ export type GetAdminProjectConfigErrors = {
13931
+ /**
13932
+ * Bad request — malformed project id
13933
+ */
13934
+ 400: ErrorResponse;
13935
+ /**
13936
+ * Not found — unknown project id, or the caller is not an instance admin
13937
+ */
13938
+ 404: ErrorResponse;
13939
+ /**
13940
+ * Internal server error
13941
+ */
13942
+ 500: ErrorResponse;
13943
+ };
13944
+ export type GetAdminProjectConfigError = GetAdminProjectConfigErrors[keyof GetAdminProjectConfigErrors];
13945
+ export type GetAdminProjectConfigResponses = {
13946
+ /**
13947
+ * The project's and the team-wide freshness rules
13948
+ */
13949
+ 200: AdminProjectConfig;
13950
+ };
13951
+ export type GetAdminProjectConfigResponse = GetAdminProjectConfigResponses[keyof GetAdminProjectConfigResponses];
13677
13952
  export type ListCommentsData = {
13678
13953
  body?: never;
13679
13954
  path: {