@vibexp/api-client 0.59.0 → 0.60.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
@@ -3231,6 +3231,121 @@ export interface paths {
3231
3231
  patch?: never;
3232
3232
  trace?: never;
3233
3233
  };
3234
+ "/api/v1/{team_id}/freshness/metrics/over-time": {
3235
+ parameters: {
3236
+ query?: never;
3237
+ header?: never;
3238
+ path: {
3239
+ /** @description Team identifier */
3240
+ team_id: string;
3241
+ };
3242
+ cookie?: never;
3243
+ };
3244
+ /**
3245
+ * Freshness activity over time
3246
+ * @description Daily marked/cleared counts and the reconstructed stale level over the requested window, zero-filled so every day in the range is present.
3247
+ */
3248
+ get: operations["getFreshnessOverTimeMetrics"];
3249
+ put?: never;
3250
+ post?: never;
3251
+ delete?: never;
3252
+ options?: never;
3253
+ head?: never;
3254
+ patch?: never;
3255
+ trace?: never;
3256
+ };
3257
+ "/api/v1/{team_id}/freshness/metrics/by-type": {
3258
+ parameters: {
3259
+ query?: never;
3260
+ header?: never;
3261
+ path: {
3262
+ /** @description Team identifier */
3263
+ team_id: string;
3264
+ };
3265
+ cookie?: never;
3266
+ };
3267
+ /**
3268
+ * Stale resources by resource type
3269
+ * @description Current stale counts per resource type. All four types are always present; one with nothing stale reports 0.
3270
+ */
3271
+ get: operations["getFreshnessByTypeMetrics"];
3272
+ put?: never;
3273
+ post?: never;
3274
+ delete?: never;
3275
+ options?: never;
3276
+ head?: never;
3277
+ patch?: never;
3278
+ trace?: never;
3279
+ };
3280
+ "/api/v1/{team_id}/freshness/metrics/by-project": {
3281
+ parameters: {
3282
+ query?: never;
3283
+ header?: never;
3284
+ path: {
3285
+ /** @description Team identifier */
3286
+ team_id: string;
3287
+ };
3288
+ cookie?: never;
3289
+ };
3290
+ /**
3291
+ * Stale resources by project
3292
+ * @description Current stale counts per project in the team, including projects with nothing stale.
3293
+ */
3294
+ get: operations["getFreshnessByProjectMetrics"];
3295
+ put?: never;
3296
+ post?: never;
3297
+ delete?: never;
3298
+ options?: never;
3299
+ head?: never;
3300
+ patch?: never;
3301
+ trace?: never;
3302
+ };
3303
+ "/api/v1/{team_id}/freshness/metrics/by-rule": {
3304
+ parameters: {
3305
+ query?: never;
3306
+ header?: never;
3307
+ path: {
3308
+ /** @description Team identifier */
3309
+ team_id: string;
3310
+ };
3311
+ cookie?: never;
3312
+ };
3313
+ /**
3314
+ * Resources marked by each rule
3315
+ * @description How many resources each of the team's rules currently marks, including rules that match nothing. This is how an over-broad rule is spotted.
3316
+ */
3317
+ get: operations["getFreshnessByRuleMetrics"];
3318
+ put?: never;
3319
+ post?: never;
3320
+ delete?: never;
3321
+ options?: never;
3322
+ head?: never;
3323
+ patch?: never;
3324
+ trace?: never;
3325
+ };
3326
+ "/api/v1/{team_id}/freshness/audit": {
3327
+ parameters: {
3328
+ query?: never;
3329
+ header?: never;
3330
+ path: {
3331
+ /** @description Team identifier */
3332
+ team_id: string;
3333
+ };
3334
+ cookie?: never;
3335
+ };
3336
+ /**
3337
+ * List the team's freshness audit log
3338
+ * @description Every recorded mark and clear for the team, newest first and paginated. Readable by any member. The list is empty, never null, past the last page.
3339
+ */
3340
+ get: operations["listFreshnessAudit"];
3341
+ put?: never;
3342
+ post?: never;
3343
+ delete?: never;
3344
+ options?: never;
3345
+ head?: never;
3346
+ patch?: never;
3347
+ trace?: never;
3348
+ };
3234
3349
  "/api/v1/{team_id}/settings/embedding-providers": {
3235
3350
  parameters: {
3236
3351
  query?: never;
@@ -8924,6 +9039,189 @@ export interface components {
8924
9039
  interval_seconds: number;
8925
9040
  reversibility_enabled: boolean;
8926
9041
  };
9042
+ /**
9043
+ * @description The reporting window for a time-series metric. The options mirror the other analytics endpoints so one range selector drives every chart.
9044
+ * @example 30d
9045
+ * @enum {string}
9046
+ */
9047
+ FreshnessMetricsRange: "7d" | "14d" | "30d" | "60d" | "90d" | "180d";
9048
+ /** @description One calendar day (UTC) of freshness activity, zero-filled: every day in the window is present even when nothing happened. */
9049
+ FreshnessDailyStaleCount: {
9050
+ /**
9051
+ * Format: date
9052
+ * @example 2026-05-01
9053
+ */
9054
+ date: string;
9055
+ /**
9056
+ * Format: int32
9057
+ * @description Resources that became stale on this day.
9058
+ */
9059
+ marked: number;
9060
+ /**
9061
+ * Format: int32
9062
+ * @description Resources that stopped being stale on this day, for any reason.
9063
+ */
9064
+ cleared: number;
9065
+ /**
9066
+ * Format: int32
9067
+ * @description How many resources were stale at the END of this day — the level, not the flow. It is reconstructed by walking today's live count backwards through the recorded transitions, so it is exact only for the period the audit log covers; days before freshness evaluation first ran on this team read as the earliest known level rather than as zero. The most recent day reports the live count as of the request. The reconstruction is clamped at zero, so on a team whose rows were removed by a project or team deletion — which writes no audit entry — the series can flatten at 0 instead of satisfying stale_total[i] = stale_total[i-1] + marked[i] - cleared[i].
9068
+ */
9069
+ stale_total: number;
9070
+ /**
9071
+ * Format: int32
9072
+ * @description The day's total ACTIVITY, marked + cleared — the sum of the two series, not the level. It is the field the shared time-series chart reads for its per-day total, which is why it is a flow rather than stale_total.
9073
+ */
9074
+ total: number;
9075
+ };
9076
+ FreshnessOverTimeMetricsData: {
9077
+ range: components["schemas"]["FreshnessMetricsRange"];
9078
+ /**
9079
+ * Format: int32
9080
+ * @description Resources marked stale across the whole window.
9081
+ */
9082
+ total_marked: number;
9083
+ /**
9084
+ * Format: int32
9085
+ * @description Resources cleared across the whole window.
9086
+ */
9087
+ total_cleared: number;
9088
+ /** @description One entry per day in the window, oldest first. Serializes as `[]`, never `null`. */
9089
+ counts: components["schemas"]["FreshnessDailyStaleCount"][];
9090
+ };
9091
+ FreshnessOverTimeMetricsResponse: {
9092
+ /** @example success */
9093
+ status: string;
9094
+ /** @example Freshness over-time metrics retrieved successfully */
9095
+ message: string;
9096
+ data: components["schemas"]["FreshnessOverTimeMetricsData"];
9097
+ };
9098
+ /** @description How many of one resource type are stale right now. */
9099
+ FreshnessTypeCount: {
9100
+ resource_type: components["schemas"]["FreshnessRuleResourceType"];
9101
+ /** Format: int32 */
9102
+ count: number;
9103
+ };
9104
+ FreshnessByTypeMetricsData: {
9105
+ /**
9106
+ * Format: int32
9107
+ * @description Total stale resources in the team, across every type.
9108
+ */
9109
+ total_stale: number;
9110
+ /** @description One entry per resource type, always all four, in a stable order — a type with nothing stale reports 0 rather than being omitted, so the chart's bars never move. Serializes as `[]`, never `null`. */
9111
+ counts: components["schemas"]["FreshnessTypeCount"][];
9112
+ };
9113
+ FreshnessByTypeMetricsResponse: {
9114
+ /** @example success */
9115
+ status: string;
9116
+ /** @example Freshness by-type metrics retrieved successfully */
9117
+ message: string;
9118
+ data: components["schemas"]["FreshnessByTypeMetricsData"];
9119
+ };
9120
+ /** @description How many resources are stale right now in one project. `name` and `slug` are carried so the client can label and deep-link the bar without a second request. */
9121
+ FreshnessProjectCount: {
9122
+ /** Format: uuid */
9123
+ project_id: string;
9124
+ name: string;
9125
+ slug: string;
9126
+ /** Format: int32 */
9127
+ count: number;
9128
+ };
9129
+ FreshnessByProjectMetricsData: {
9130
+ /** Format: int32 */
9131
+ total_stale: number;
9132
+ /** @description One entry per project in the team, including projects with nothing stale (0), ordered by count descending then name. Serializes as `[]`, never `null`. */
9133
+ counts: components["schemas"]["FreshnessProjectCount"][];
9134
+ };
9135
+ FreshnessByProjectMetricsResponse: {
9136
+ /** @example success */
9137
+ status: string;
9138
+ /** @example Freshness by-project metrics retrieved successfully */
9139
+ message: string;
9140
+ data: components["schemas"]["FreshnessByProjectMetricsData"];
9141
+ };
9142
+ /** @description How many resources one rule currently marks. Rules have no name, so the defining fields travel with the count for the client to label the bar. */
9143
+ FreshnessRuleImpact: {
9144
+ /** Format: uuid */
9145
+ rule_id: string;
9146
+ /**
9147
+ * Format: uuid
9148
+ * @description The project the rule is scoped to, or null for every project in the team.
9149
+ */
9150
+ project_id: string | null;
9151
+ resource_types: components["schemas"]["FreshnessRuleResourceType"][];
9152
+ /** Format: int32 */
9153
+ threshold_days: number;
9154
+ /** @description A disabled rule reports 0 — it is listed so its absence from the chart is not mistaken for deletion. */
9155
+ enabled: boolean;
9156
+ /** Format: int32 */
9157
+ count: number;
9158
+ };
9159
+ FreshnessByRuleMetricsData: {
9160
+ /**
9161
+ * Format: int32
9162
+ * @description Distinct stale resources in the team. It is NOT the sum of the per-rule counts: a resource matched by two rules is counted once here and once under each rule, because staleness is a union across rules.
9163
+ */
9164
+ total_stale: number;
9165
+ /** @description One entry per rule the team has defined, including rules matching nothing, ordered by count descending then rule id. Serializes as `[]`, never `null`. */
9166
+ counts: components["schemas"]["FreshnessRuleImpact"][];
9167
+ };
9168
+ FreshnessByRuleMetricsResponse: {
9169
+ /** @example success */
9170
+ status: string;
9171
+ /** @example Freshness by-rule metrics retrieved successfully */
9172
+ message: string;
9173
+ data: components["schemas"]["FreshnessByRuleMetricsData"];
9174
+ };
9175
+ /** @description One recorded freshness transition. The log is append-only. */
9176
+ FreshnessAuditEntry: {
9177
+ /** Format: uuid */
9178
+ id: string;
9179
+ resource_type: components["schemas"]["FreshnessRuleResourceType"];
9180
+ /** Format: uuid */
9181
+ resource_id: string;
9182
+ /**
9183
+ * Format: uuid
9184
+ * @description The rule that caused the change, when exactly one did. Null for a reversal (caused by a read or an edit) and for a mark attributable to several rules at once — the resource's own state carries the full set.
9185
+ */
9186
+ rule_id: string | null;
9187
+ /**
9188
+ * @description Whether the resource became stale or stopped being stale.
9189
+ * @enum {string}
9190
+ */
9191
+ action: "marked" | "cleared";
9192
+ /**
9193
+ * @description What caused it — a scheduled evaluation, a read, or an edit.
9194
+ * @enum {string}
9195
+ */
9196
+ reason: "rule_run" | "accessed" | "edited";
9197
+ /** Format: date-time */
9198
+ created_at: string;
9199
+ };
9200
+ /** @description A page of the team's freshness audit log, newest first. */
9201
+ FreshnessAuditListResponse: {
9202
+ /** @description Serializes as `[]` when the page is empty, never `null`. */
9203
+ entries: components["schemas"]["FreshnessAuditEntry"][];
9204
+ /**
9205
+ * @description Total entries in the team's log, ignoring pagination.
9206
+ * @example 142
9207
+ */
9208
+ total_count: number;
9209
+ /**
9210
+ * @description Current page number (1-based)
9211
+ * @example 1
9212
+ */
9213
+ page: number;
9214
+ /**
9215
+ * @description Number of entries per page
9216
+ * @example 20
9217
+ */
9218
+ per_page: number;
9219
+ /**
9220
+ * @description Total number of pages
9221
+ * @example 8
9222
+ */
9223
+ total_pages: number;
9224
+ };
8927
9225
  /** @description The search ranking settings in effect for a team, with enough context for a client to render the whole settings surface from this one response: the effective values, where they came from, the instance defaults to preview a reset against, and the instance-owned candidate cap. */
8928
9226
  TeamSearchSettings: {
8929
9227
  /**
@@ -21255,6 +21553,309 @@ export interface operations {
21255
21553
  };
21256
21554
  };
21257
21555
  };
21556
+ getFreshnessOverTimeMetrics: {
21557
+ parameters: {
21558
+ query?: {
21559
+ /** @description The reporting window. Defaults to 30d. */
21560
+ range?: components["schemas"]["FreshnessMetricsRange"];
21561
+ };
21562
+ header?: never;
21563
+ path: {
21564
+ /** @description Team identifier */
21565
+ team_id: string;
21566
+ };
21567
+ cookie?: never;
21568
+ };
21569
+ requestBody?: never;
21570
+ responses: {
21571
+ /** @description Metrics retrieved successfully */
21572
+ 200: {
21573
+ headers: {
21574
+ [name: string]: unknown;
21575
+ };
21576
+ content: {
21577
+ "application/json": components["schemas"]["FreshnessOverTimeMetricsResponse"];
21578
+ };
21579
+ };
21580
+ /** @description Invalid team_id or query parameter */
21581
+ 400: {
21582
+ headers: {
21583
+ [name: string]: unknown;
21584
+ };
21585
+ content: {
21586
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21587
+ };
21588
+ };
21589
+ /** @description Authentication required */
21590
+ 401: {
21591
+ headers: {
21592
+ [name: string]: unknown;
21593
+ };
21594
+ content: {
21595
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21596
+ };
21597
+ };
21598
+ /** @description Caller is not a member of the team */
21599
+ 403: {
21600
+ headers: {
21601
+ [name: string]: unknown;
21602
+ };
21603
+ content: {
21604
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21605
+ };
21606
+ };
21607
+ /** @description Failed to build the team's freshness over-time metrics */
21608
+ 500: {
21609
+ headers: {
21610
+ [name: string]: unknown;
21611
+ };
21612
+ content: {
21613
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21614
+ };
21615
+ };
21616
+ };
21617
+ };
21618
+ getFreshnessByTypeMetrics: {
21619
+ parameters: {
21620
+ query?: never;
21621
+ header?: never;
21622
+ path: {
21623
+ /** @description Team identifier */
21624
+ team_id: string;
21625
+ };
21626
+ cookie?: never;
21627
+ };
21628
+ requestBody?: never;
21629
+ responses: {
21630
+ /** @description Metrics retrieved successfully */
21631
+ 200: {
21632
+ headers: {
21633
+ [name: string]: unknown;
21634
+ };
21635
+ content: {
21636
+ "application/json": components["schemas"]["FreshnessByTypeMetricsResponse"];
21637
+ };
21638
+ };
21639
+ /** @description Invalid team_id or query parameter */
21640
+ 400: {
21641
+ headers: {
21642
+ [name: string]: unknown;
21643
+ };
21644
+ content: {
21645
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21646
+ };
21647
+ };
21648
+ /** @description Authentication required */
21649
+ 401: {
21650
+ headers: {
21651
+ [name: string]: unknown;
21652
+ };
21653
+ content: {
21654
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21655
+ };
21656
+ };
21657
+ /** @description Caller is not a member of the team */
21658
+ 403: {
21659
+ headers: {
21660
+ [name: string]: unknown;
21661
+ };
21662
+ content: {
21663
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21664
+ };
21665
+ };
21666
+ /** @description Failed to build the team's freshness by-type metrics */
21667
+ 500: {
21668
+ headers: {
21669
+ [name: string]: unknown;
21670
+ };
21671
+ content: {
21672
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21673
+ };
21674
+ };
21675
+ };
21676
+ };
21677
+ getFreshnessByProjectMetrics: {
21678
+ parameters: {
21679
+ query?: never;
21680
+ header?: never;
21681
+ path: {
21682
+ /** @description Team identifier */
21683
+ team_id: string;
21684
+ };
21685
+ cookie?: never;
21686
+ };
21687
+ requestBody?: never;
21688
+ responses: {
21689
+ /** @description Metrics retrieved successfully */
21690
+ 200: {
21691
+ headers: {
21692
+ [name: string]: unknown;
21693
+ };
21694
+ content: {
21695
+ "application/json": components["schemas"]["FreshnessByProjectMetricsResponse"];
21696
+ };
21697
+ };
21698
+ /** @description Invalid team_id or query parameter */
21699
+ 400: {
21700
+ headers: {
21701
+ [name: string]: unknown;
21702
+ };
21703
+ content: {
21704
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21705
+ };
21706
+ };
21707
+ /** @description Authentication required */
21708
+ 401: {
21709
+ headers: {
21710
+ [name: string]: unknown;
21711
+ };
21712
+ content: {
21713
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21714
+ };
21715
+ };
21716
+ /** @description Caller is not a member of the team */
21717
+ 403: {
21718
+ headers: {
21719
+ [name: string]: unknown;
21720
+ };
21721
+ content: {
21722
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21723
+ };
21724
+ };
21725
+ /** @description Failed to build the team's freshness by-project metrics */
21726
+ 500: {
21727
+ headers: {
21728
+ [name: string]: unknown;
21729
+ };
21730
+ content: {
21731
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21732
+ };
21733
+ };
21734
+ };
21735
+ };
21736
+ getFreshnessByRuleMetrics: {
21737
+ parameters: {
21738
+ query?: never;
21739
+ header?: never;
21740
+ path: {
21741
+ /** @description Team identifier */
21742
+ team_id: string;
21743
+ };
21744
+ cookie?: never;
21745
+ };
21746
+ requestBody?: never;
21747
+ responses: {
21748
+ /** @description Metrics retrieved successfully */
21749
+ 200: {
21750
+ headers: {
21751
+ [name: string]: unknown;
21752
+ };
21753
+ content: {
21754
+ "application/json": components["schemas"]["FreshnessByRuleMetricsResponse"];
21755
+ };
21756
+ };
21757
+ /** @description Invalid team_id or query parameter */
21758
+ 400: {
21759
+ headers: {
21760
+ [name: string]: unknown;
21761
+ };
21762
+ content: {
21763
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21764
+ };
21765
+ };
21766
+ /** @description Authentication required */
21767
+ 401: {
21768
+ headers: {
21769
+ [name: string]: unknown;
21770
+ };
21771
+ content: {
21772
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21773
+ };
21774
+ };
21775
+ /** @description Caller is not a member of the team */
21776
+ 403: {
21777
+ headers: {
21778
+ [name: string]: unknown;
21779
+ };
21780
+ content: {
21781
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21782
+ };
21783
+ };
21784
+ /** @description Failed to build the team's freshness by-rule metrics */
21785
+ 500: {
21786
+ headers: {
21787
+ [name: string]: unknown;
21788
+ };
21789
+ content: {
21790
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21791
+ };
21792
+ };
21793
+ };
21794
+ };
21795
+ listFreshnessAudit: {
21796
+ parameters: {
21797
+ query?: {
21798
+ /** @description Page number (1-based). The upper bound is not a storage limit — it keeps page * limit inside the range the offset arithmetic can represent, so an absurd page is rejected rather than silently wrapping around to the first one. */
21799
+ page?: number;
21800
+ /** @description Entries per page */
21801
+ limit?: number;
21802
+ };
21803
+ header?: never;
21804
+ path: {
21805
+ /** @description Team identifier */
21806
+ team_id: string;
21807
+ };
21808
+ cookie?: never;
21809
+ };
21810
+ requestBody?: never;
21811
+ responses: {
21812
+ /** @description Audit log retrieved successfully */
21813
+ 200: {
21814
+ headers: {
21815
+ [name: string]: unknown;
21816
+ };
21817
+ content: {
21818
+ "application/json": components["schemas"]["FreshnessAuditListResponse"];
21819
+ };
21820
+ };
21821
+ /** @description Invalid team_id or query parameter */
21822
+ 400: {
21823
+ headers: {
21824
+ [name: string]: unknown;
21825
+ };
21826
+ content: {
21827
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21828
+ };
21829
+ };
21830
+ /** @description Authentication required */
21831
+ 401: {
21832
+ headers: {
21833
+ [name: string]: unknown;
21834
+ };
21835
+ content: {
21836
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21837
+ };
21838
+ };
21839
+ /** @description Caller is not a member of the team */
21840
+ 403: {
21841
+ headers: {
21842
+ [name: string]: unknown;
21843
+ };
21844
+ content: {
21845
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21846
+ };
21847
+ };
21848
+ /** @description Failed to list the team's freshness audit log */
21849
+ 500: {
21850
+ headers: {
21851
+ [name: string]: unknown;
21852
+ };
21853
+ content: {
21854
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21855
+ };
21856
+ };
21857
+ };
21858
+ };
21258
21859
  listEmbeddingProvidersSettings: {
21259
21860
  parameters: {
21260
21861
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibexp/api-client",
3
- "version": "0.59.0",
3
+ "version": "0.60.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": {