@vibexp/api-client 0.80.0 → 0.81.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
@@ -2806,6 +2806,123 @@ export interface paths {
2806
2806
  patch?: never;
2807
2807
  trace?: never;
2808
2808
  };
2809
+ "/api/v1/admin/users/{id}/insights": {
2810
+ parameters: {
2811
+ query?: never;
2812
+ header?: never;
2813
+ path?: never;
2814
+ cookie?: never;
2815
+ };
2816
+ /**
2817
+ * Get a user's resource counts
2818
+ * @description Returns how many resources of each of the nine counted types (prompts,
2819
+ * memories, artifacts, blueprints, agents, feeds, feed items, comments,
2820
+ * attachments) the user authored: instance-wide totals, per team, and per
2821
+ * project for the four project-scoped types. Counts only — no titles, slugs or
2822
+ * content.
2823
+ *
2824
+ * Instance-admin only; non-admin and unauthenticated requests receive 404, as
2825
+ * does an unknown user id.
2826
+ */
2827
+ get: operations["getAdminUserInsights"];
2828
+ put?: never;
2829
+ post?: never;
2830
+ delete?: never;
2831
+ options?: never;
2832
+ head?: never;
2833
+ patch?: never;
2834
+ trace?: never;
2835
+ };
2836
+ "/api/v1/admin/users/{id}/resource-creation-metrics": {
2837
+ parameters: {
2838
+ query?: never;
2839
+ header?: never;
2840
+ path?: never;
2841
+ cookie?: never;
2842
+ };
2843
+ /**
2844
+ * Get a user's resource creation series
2845
+ * @description Returns how many resources of each type the user created per bucket over a
2846
+ * time range. Omitting the parameters yields the last 30 days at `day`
2847
+ * granularity, and the range rules match getAdminDashboardTimeseries. Every
2848
+ * bucket is present with an explicit 0 for every type.
2849
+ *
2850
+ * Instance-admin only; non-admin and unauthenticated requests receive 404, as
2851
+ * does an unknown user id.
2852
+ */
2853
+ get: operations["getAdminUserResourceCreationMetrics"];
2854
+ put?: never;
2855
+ post?: never;
2856
+ delete?: never;
2857
+ options?: never;
2858
+ head?: never;
2859
+ patch?: never;
2860
+ trace?: never;
2861
+ };
2862
+ "/api/v1/admin/users/{id}/timeline": {
2863
+ parameters: {
2864
+ query?: never;
2865
+ header?: never;
2866
+ path?: never;
2867
+ cookie?: never;
2868
+ };
2869
+ /**
2870
+ * Get a user's resource timeline
2871
+ * @description Returns an opaque, newest-first timeline of the resources the user created
2872
+ * or updated: resource type, action, team, project and the first 8 characters
2873
+ * of the resource id — never a title, slug or content. Cursor-paginated: pass
2874
+ * the previous page's `next_cursor` to continue.
2875
+ *
2876
+ * `updated` events are APPROXIMATE, by construction of the data:
2877
+ *
2878
+ * - Only the latest `updated_at` is stored, so a resource edited many times
2879
+ * appears as ONE `updated` event, at its latest edit.
2880
+ * - There is no `updated_by` column. The event means "a resource authored by
2881
+ * this user was last modified", not "this user edited it" — a teammate's
2882
+ * edit, or a system write that bumps `updated_at` (for example a blueprint
2883
+ * GitHub re-sync or a team-wide artifact type rename), shows up here too.
2884
+ * - An update is only reported when `updated_at` is more than one second after
2885
+ * `created_at`, so a never-edited resource produces no `updated` event.
2886
+ * - Agents, feed items and attachments only ever produce `created` events.
2887
+ *
2888
+ * Deleted resources leave no trace (resources are hard-deleted).
2889
+ *
2890
+ * Instance-admin only; non-admin and unauthenticated requests receive 404, as
2891
+ * does an unknown user id.
2892
+ */
2893
+ get: operations["getAdminUserTimeline"];
2894
+ put?: never;
2895
+ post?: never;
2896
+ delete?: never;
2897
+ options?: never;
2898
+ head?: never;
2899
+ patch?: never;
2900
+ trace?: never;
2901
+ };
2902
+ "/api/v1/admin/users/{id}/notification-preferences": {
2903
+ parameters: {
2904
+ query?: never;
2905
+ header?: never;
2906
+ path?: never;
2907
+ cookie?: never;
2908
+ };
2909
+ /**
2910
+ * Get a user's notification preferences
2911
+ * @description Returns the user's notification preferences, read-only. A user who has never
2912
+ * saved preferences gets the defaults with `is_default: true`.
2913
+ *
2914
+ * Instance-admin only; non-admin and unauthenticated requests receive 404, as
2915
+ * does an unknown user id.
2916
+ */
2917
+ get: operations["getAdminUserNotificationPreferences"];
2918
+ put?: never;
2919
+ post?: never;
2920
+ delete?: never;
2921
+ options?: never;
2922
+ head?: never;
2923
+ patch?: never;
2924
+ trace?: never;
2925
+ };
2809
2926
  "/api/v1/{team_id}/comments": {
2810
2927
  parameters: {
2811
2928
  query?: never;
@@ -10950,6 +11067,147 @@ export interface components {
10950
11067
  /** Format: date-time */
10951
11068
  updated_at: string;
10952
11069
  };
11070
+ /**
11071
+ * @description How many PROJECT-SCOPED resources the user authored in one project. Only the
11072
+ * four types with a NOT NULL project_id are attributed to a project; every
11073
+ * other type is counted at the team level only.
11074
+ */
11075
+ AdminUserProjectResourceCounts: {
11076
+ /** Format: uuid */
11077
+ project_id: string;
11078
+ /** @example Platform */
11079
+ project_name: string;
11080
+ counts: components["schemas"]["AdminProjectResourceCounts"];
11081
+ };
11082
+ /** @description How many resources the user authored in one team, with the per-project breakdown. */
11083
+ AdminUserTeamResourceCounts: {
11084
+ /** Format: uuid */
11085
+ team_id: string;
11086
+ /** @example Acme */
11087
+ team_name: string;
11088
+ /**
11089
+ * @description Whether the user is still a member of the team. A former member's
11090
+ * authored resources stay in the team and are still counted here.
11091
+ */
11092
+ is_member: boolean;
11093
+ counts: components["schemas"]["AdminResourceCounts"];
11094
+ /** @description Per-project counts, ordered by project name. */
11095
+ projects: components["schemas"]["AdminUserProjectResourceCounts"][];
11096
+ };
11097
+ /**
11098
+ * @description Per-type counts of the resources one user authored, instance-wide, per team
11099
+ * and per project (GET /api/v1/admin/users/{id}/insights). For every type the
11100
+ * per-team counts sum to `totals`. An attachment whose author was deleted
11101
+ * (user_id set to NULL) counts for nobody.
11102
+ */
11103
+ AdminUserInsights: {
11104
+ /** Format: uuid */
11105
+ user_id: string;
11106
+ totals: components["schemas"]["AdminResourceCounts"];
11107
+ /** @description Teams the user authored at least one resource in, ordered by team name. */
11108
+ teams: components["schemas"]["AdminUserTeamResourceCounts"][];
11109
+ };
11110
+ /** @description How many resources of each type the user created within one time bucket. */
11111
+ AdminUserCreationPoint: {
11112
+ /**
11113
+ * Format: date-time
11114
+ * @description Start of the bucket, in UTC.
11115
+ */
11116
+ bucket: string;
11117
+ /** Format: int64 */
11118
+ prompts: number;
11119
+ /** Format: int64 */
11120
+ memories: number;
11121
+ /** Format: int64 */
11122
+ artifacts: number;
11123
+ /** Format: int64 */
11124
+ blueprints: number;
11125
+ /** Format: int64 */
11126
+ agents: number;
11127
+ /** Format: int64 */
11128
+ feeds: number;
11129
+ /** Format: int64 */
11130
+ feed_items: number;
11131
+ /** Format: int64 */
11132
+ comments: number;
11133
+ /** Format: int64 */
11134
+ attachments: number;
11135
+ };
11136
+ /**
11137
+ * @description Resources the user created per bucket, stacked by type
11138
+ * (GET /api/v1/admin/users/{id}/resource-creation-metrics). Every bucket in
11139
+ * the range is present with an explicit 0 for every type.
11140
+ */
11141
+ AdminUserResourceCreationMetrics: {
11142
+ /**
11143
+ * Format: date-time
11144
+ * @description Inclusive start of the range actually used, snapped DOWN to the start of
11145
+ * its bucket (same rule as AdminTimeseriesResponse.from).
11146
+ */
11147
+ from: string;
11148
+ /**
11149
+ * Format: date-time
11150
+ * @description Exclusive end of the range actually used (after defaulting); not snapped.
11151
+ */
11152
+ to: string;
11153
+ /**
11154
+ * @description Bucket size actually used.
11155
+ * @enum {string}
11156
+ */
11157
+ granularity: "day" | "week" | "month";
11158
+ /** @description One point per bucket, ascending by bucket. */
11159
+ series: components["schemas"]["AdminUserCreationPoint"][];
11160
+ };
11161
+ /**
11162
+ * @description One opaque timeline entry: which kind of resource the user created or last
11163
+ * updated, where, and when. Deliberately carries no title, slug or content —
11164
+ * only the first 8 characters of the resource id.
11165
+ */
11166
+ AdminUserTimelineEvent: {
11167
+ /** @enum {string} */
11168
+ resource_type: "prompt" | "memory" | "artifact" | "blueprint" | "agent" | "feed" | "feed_item" | "comment" | "attachment";
11169
+ /** @enum {string} */
11170
+ action: "created" | "updated";
11171
+ /** Format: uuid */
11172
+ team_id: string;
11173
+ team_name: string;
11174
+ /**
11175
+ * Format: uuid
11176
+ * @description Null for team-scoped resources and for feed items posted without a project.
11177
+ */
11178
+ project_id: string | null;
11179
+ project_name: string | null;
11180
+ /**
11181
+ * @description First 8 characters of the resource id.
11182
+ * @example 3f2a9c1e
11183
+ */
11184
+ resource_short_id: string;
11185
+ /** Format: date-time */
11186
+ occurred_at: string;
11187
+ };
11188
+ /** @description One page of a user's resource timeline, newest first. */
11189
+ AdminUserTimelinePage: {
11190
+ items: components["schemas"]["AdminUserTimelineEvent"][];
11191
+ /** @description Opaque cursor for the next page; null on the last page. */
11192
+ next_cursor: string | null;
11193
+ };
11194
+ /**
11195
+ * @description A user's notification preferences, read-only
11196
+ * (GET /api/v1/admin/users/{id}/notification-preferences). When the user has
11197
+ * never saved preferences, the defaults are returned with `is_default: true`
11198
+ * and `updated_at: null`.
11199
+ */
11200
+ AdminUserNotificationPreferences: {
11201
+ email_notification: components["schemas"]["EmailNotificationPreferences"];
11202
+ notifications: components["schemas"]["NotificationPreferences"];
11203
+ /**
11204
+ * Format: date-time
11205
+ * @description When the user last saved their preferences; null when defaults are returned.
11206
+ */
11207
+ updated_at: string | null;
11208
+ /** @description True when the user has no stored preferences and the defaults are shown. */
11209
+ is_default: boolean;
11210
+ };
10953
11211
  ProjectResponse: components["schemas"]["Project"] & {
10954
11212
  /**
10955
11213
  * @description Whether the project's git URL matches a repository accessible via the team's GitHub App installation
@@ -11089,6 +11347,35 @@ export interface components {
11089
11347
  */
11090
11348
  data: string[];
11091
11349
  };
11350
+ EmailNotificationPreferences: {
11351
+ /**
11352
+ * @description Receive platform announcement emails
11353
+ * @example true
11354
+ */
11355
+ platform_announcement: boolean;
11356
+ /**
11357
+ * @description Receive account security emails
11358
+ * @example true
11359
+ */
11360
+ account_security: boolean;
11361
+ /**
11362
+ * @description Receive new feature emails
11363
+ * @example true
11364
+ */
11365
+ new_feature: boolean;
11366
+ /**
11367
+ * @description Receive marketing and promotional emails
11368
+ * @example false
11369
+ */
11370
+ marketing_promotional: boolean;
11371
+ };
11372
+ NotificationPreferences: {
11373
+ channels: components["schemas"]["NotificationChannelPreferences"];
11374
+ /** @description Per-type delivery preferences keyed by notification type (e.g. "feed.item.created", "feed.reply.created") */
11375
+ types: {
11376
+ [key: string]: components["schemas"]["NotificationTypePreference"];
11377
+ };
11378
+ };
11092
11379
  PreferencesResponse: {
11093
11380
  preferences: components["schemas"]["Preferences"];
11094
11381
  /**
@@ -11398,28 +11685,6 @@ export interface components {
11398
11685
  range: "7d" | "14d" | "30d" | "60d" | "90d" | "180d";
11399
11686
  items: components["schemas"]["TopAccessedResourceItem"][];
11400
11687
  };
11401
- EmailNotificationPreferences: {
11402
- /**
11403
- * @description Receive platform announcement emails
11404
- * @example true
11405
- */
11406
- platform_announcement: boolean;
11407
- /**
11408
- * @description Receive account security emails
11409
- * @example true
11410
- */
11411
- account_security: boolean;
11412
- /**
11413
- * @description Receive new feature emails
11414
- * @example true
11415
- */
11416
- new_feature: boolean;
11417
- /**
11418
- * @description Receive marketing and promotional emails
11419
- * @example false
11420
- */
11421
- marketing_promotional: boolean;
11422
- };
11423
11688
  NotificationChannelPreferences: {
11424
11689
  /**
11425
11690
  * @description Enable in-app notifications globally
@@ -11445,13 +11710,6 @@ export interface components {
11445
11710
  */
11446
11711
  email: "instant" | "digest" | "none";
11447
11712
  };
11448
- NotificationPreferences: {
11449
- channels: components["schemas"]["NotificationChannelPreferences"];
11450
- /** @description Per-type delivery preferences keyed by notification type (e.g. "feed.item.created", "feed.reply.created") */
11451
- types: {
11452
- [key: string]: components["schemas"]["NotificationTypePreference"];
11453
- };
11454
- };
11455
11713
  Preferences: {
11456
11714
  email_notification: components["schemas"]["EmailNotificationPreferences"];
11457
11715
  notifications: components["schemas"]["NotificationPreferences"];
@@ -20903,6 +21161,221 @@ export interface operations {
20903
21161
  };
20904
21162
  };
20905
21163
  };
21164
+ getAdminUserInsights: {
21165
+ parameters: {
21166
+ query?: never;
21167
+ header?: never;
21168
+ path: {
21169
+ /** @description User id (UUID) */
21170
+ id: string;
21171
+ };
21172
+ cookie?: never;
21173
+ };
21174
+ requestBody?: never;
21175
+ responses: {
21176
+ /** @description The user's per-type resource counts */
21177
+ 200: {
21178
+ headers: {
21179
+ [name: string]: unknown;
21180
+ };
21181
+ content: {
21182
+ "application/json": components["schemas"]["AdminUserInsights"];
21183
+ };
21184
+ };
21185
+ /** @description Bad request — malformed user id */
21186
+ 400: {
21187
+ headers: {
21188
+ [name: string]: unknown;
21189
+ };
21190
+ content: {
21191
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21192
+ };
21193
+ };
21194
+ /** @description Not found — unknown user id, or the caller is not an instance admin */
21195
+ 404: {
21196
+ headers: {
21197
+ [name: string]: unknown;
21198
+ };
21199
+ content: {
21200
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21201
+ };
21202
+ };
21203
+ /** @description Internal server error */
21204
+ 500: {
21205
+ headers: {
21206
+ [name: string]: unknown;
21207
+ };
21208
+ content: {
21209
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21210
+ };
21211
+ };
21212
+ };
21213
+ };
21214
+ getAdminUserResourceCreationMetrics: {
21215
+ parameters: {
21216
+ query?: {
21217
+ /** @description Inclusive start of the range. Defaults to 30 days before `to`. */
21218
+ from?: string;
21219
+ /** @description Exclusive end of the range. Defaults to now. */
21220
+ to?: string;
21221
+ /** @description Bucket size. */
21222
+ granularity?: "day" | "week" | "month";
21223
+ };
21224
+ header?: never;
21225
+ path: {
21226
+ /** @description User id (UUID) */
21227
+ id: string;
21228
+ };
21229
+ cookie?: never;
21230
+ };
21231
+ requestBody?: never;
21232
+ responses: {
21233
+ /** @description Bucketed creation counts per type */
21234
+ 200: {
21235
+ headers: {
21236
+ [name: string]: unknown;
21237
+ };
21238
+ content: {
21239
+ "application/json": components["schemas"]["AdminUserResourceCreationMetrics"];
21240
+ };
21241
+ };
21242
+ /**
21243
+ * @description Bad request — malformed user id, `to` is not after `from`, the range
21244
+ * exceeds the maximum span, or `granularity` is outside its enum
21245
+ */
21246
+ 400: {
21247
+ headers: {
21248
+ [name: string]: unknown;
21249
+ };
21250
+ content: {
21251
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21252
+ };
21253
+ };
21254
+ /** @description Not found — unknown user id, or the caller is not an instance admin */
21255
+ 404: {
21256
+ headers: {
21257
+ [name: string]: unknown;
21258
+ };
21259
+ content: {
21260
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21261
+ };
21262
+ };
21263
+ /** @description Internal server error */
21264
+ 500: {
21265
+ headers: {
21266
+ [name: string]: unknown;
21267
+ };
21268
+ content: {
21269
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21270
+ };
21271
+ };
21272
+ };
21273
+ };
21274
+ getAdminUserTimeline: {
21275
+ parameters: {
21276
+ query?: {
21277
+ /** @description Opaque cursor from a previous page's `next_cursor`. */
21278
+ cursor?: string;
21279
+ /** @description Page size. */
21280
+ limit?: number;
21281
+ };
21282
+ header?: never;
21283
+ path: {
21284
+ /** @description User id (UUID) */
21285
+ id: string;
21286
+ };
21287
+ cookie?: never;
21288
+ };
21289
+ requestBody?: never;
21290
+ responses: {
21291
+ /** @description One page of timeline events, newest first */
21292
+ 200: {
21293
+ headers: {
21294
+ [name: string]: unknown;
21295
+ };
21296
+ content: {
21297
+ "application/json": components["schemas"]["AdminUserTimelinePage"];
21298
+ };
21299
+ };
21300
+ /** @description Bad request — malformed user id, malformed cursor, or `limit` out of range */
21301
+ 400: {
21302
+ headers: {
21303
+ [name: string]: unknown;
21304
+ };
21305
+ content: {
21306
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21307
+ };
21308
+ };
21309
+ /** @description Not found — unknown user id, or the caller is not an instance admin */
21310
+ 404: {
21311
+ headers: {
21312
+ [name: string]: unknown;
21313
+ };
21314
+ content: {
21315
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21316
+ };
21317
+ };
21318
+ /** @description Internal server error */
21319
+ 500: {
21320
+ headers: {
21321
+ [name: string]: unknown;
21322
+ };
21323
+ content: {
21324
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21325
+ };
21326
+ };
21327
+ };
21328
+ };
21329
+ getAdminUserNotificationPreferences: {
21330
+ parameters: {
21331
+ query?: never;
21332
+ header?: never;
21333
+ path: {
21334
+ /** @description User id (UUID) */
21335
+ id: string;
21336
+ };
21337
+ cookie?: never;
21338
+ };
21339
+ requestBody?: never;
21340
+ responses: {
21341
+ /** @description The user's notification preferences */
21342
+ 200: {
21343
+ headers: {
21344
+ [name: string]: unknown;
21345
+ };
21346
+ content: {
21347
+ "application/json": components["schemas"]["AdminUserNotificationPreferences"];
21348
+ };
21349
+ };
21350
+ /** @description Bad request — malformed user id */
21351
+ 400: {
21352
+ headers: {
21353
+ [name: string]: unknown;
21354
+ };
21355
+ content: {
21356
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21357
+ };
21358
+ };
21359
+ /** @description Not found — unknown user id, or the caller is not an instance admin */
21360
+ 404: {
21361
+ headers: {
21362
+ [name: string]: unknown;
21363
+ };
21364
+ content: {
21365
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21366
+ };
21367
+ };
21368
+ /** @description Internal server error */
21369
+ 500: {
21370
+ headers: {
21371
+ [name: string]: unknown;
21372
+ };
21373
+ content: {
21374
+ "application/problem+json": components["schemas"]["ErrorResponse"];
21375
+ };
21376
+ };
21377
+ };
21378
+ };
20906
21379
  listComments: {
20907
21380
  parameters: {
20908
21381
  query: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibexp/api-client",
3
- "version": "0.80.0",
3
+ "version": "0.81.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": {