@vibexp/api-client 0.26.0 → 0.28.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
@@ -2901,6 +2901,70 @@ export interface paths {
2901
2901
  patch: operations["updateComment"];
2902
2902
  trace?: never;
2903
2903
  };
2904
+ "/api/v1/{team_id}/relations": {
2905
+ parameters: {
2906
+ query?: never;
2907
+ header?: never;
2908
+ path?: never;
2909
+ cookie?: never;
2910
+ };
2911
+ /**
2912
+ * List a resource's relations
2913
+ * @description Returns a page of the relations touching the given resource — both directions (the resource as subject or as object) — newest first, each enriched with the other endpoint's resolved title. The caller must be a member of the team.
2914
+ */
2915
+ get: operations["listRelations"];
2916
+ put?: never;
2917
+ /**
2918
+ * Create a relation
2919
+ * @description Creates a typed edge between two resources. Any team member may create a relation; both endpoints must exist in the team and share a project, and the object type must satisfy the relation-type matrix. Creation is idempotent — a duplicate edge returns the existing row with 200 instead of 201.
2920
+ */
2921
+ post: operations["createRelation"];
2922
+ delete?: never;
2923
+ options?: never;
2924
+ head?: never;
2925
+ patch?: never;
2926
+ trace?: never;
2927
+ };
2928
+ "/api/v1/{team_id}/relations/{relation_id}/confirm": {
2929
+ parameters: {
2930
+ query?: never;
2931
+ header?: never;
2932
+ path?: never;
2933
+ cookie?: never;
2934
+ };
2935
+ get?: never;
2936
+ put?: never;
2937
+ /**
2938
+ * Confirm a suggested relation
2939
+ * @description Promotes a suggested relation to confirmed, recording the caller as the confirmer. Requires permission to update any resource in the team. Confirming an already-confirmed relation returns 409.
2940
+ */
2941
+ post: operations["confirmRelation"];
2942
+ delete?: never;
2943
+ options?: never;
2944
+ head?: never;
2945
+ patch?: never;
2946
+ trace?: never;
2947
+ };
2948
+ "/api/v1/{team_id}/relations/{relation_id}": {
2949
+ parameters: {
2950
+ query?: never;
2951
+ header?: never;
2952
+ path?: never;
2953
+ cookie?: never;
2954
+ };
2955
+ get?: never;
2956
+ put?: never;
2957
+ post?: never;
2958
+ /**
2959
+ * Delete a relation
2960
+ * @description Deletes a relation. The creator may delete their own; a team admin or owner may delete any relation.
2961
+ */
2962
+ delete: operations["deleteRelation"];
2963
+ options?: never;
2964
+ head?: never;
2965
+ patch?: never;
2966
+ trace?: never;
2967
+ };
2904
2968
  "/api/v1/{team_id}/embedding-providers": {
2905
2969
  parameters: {
2906
2970
  query?: never;
@@ -4140,6 +4204,8 @@ export interface components {
4140
4204
  * @example 1
4141
4205
  */
4142
4206
  version: number;
4207
+ /** @description Depth-1 typed neighborhood of this resource — the relations touching it in both directions, newest first, capped at 20. Typed summaries only, never bodies. Populated on the detail GET; empty in list responses. */
4208
+ related: components["schemas"]["RelatedResource"][];
4143
4209
  };
4144
4210
  CreatePromptRequest: {
4145
4211
  /** @example Code Review Template */
@@ -5395,6 +5461,8 @@ export interface components {
5395
5461
  metadata?: {
5396
5462
  [key: string]: unknown;
5397
5463
  };
5464
+ /** @description Depth-1 typed neighborhood of this resource — the relations touching it in both directions, newest first, capped at 20. Typed summaries only, never bodies. Populated on the detail GET; empty in list responses. */
5465
+ related: components["schemas"]["RelatedResource"][];
5398
5466
  };
5399
5467
  CreateArtifactRequest: {
5400
5468
  /**
@@ -6162,6 +6230,8 @@ export interface components {
6162
6230
  * @example 1
6163
6231
  */
6164
6232
  version: number;
6233
+ /** @description Depth-1 typed neighborhood of this resource — the relations touching it in both directions, newest first, capped at 20. Typed summaries only, never bodies. Populated on the detail GET; empty in list responses. */
6234
+ related: components["schemas"]["RelatedResource"][];
6165
6235
  };
6166
6236
  CreateMemoryRequest: {
6167
6237
  /**
@@ -6457,6 +6527,8 @@ export interface components {
6457
6527
  */
6458
6528
  content_sha?: string;
6459
6529
  source?: components["schemas"]["BlueprintSource"];
6530
+ /** @description Depth-1 typed neighborhood of this resource — the relations touching it in both directions, newest first, capped at 20. Typed summaries only, never bodies. Populated on the detail GET; empty in list responses. */
6531
+ related: components["schemas"]["RelatedResource"][];
6460
6532
  };
6461
6533
  /** @description Read-only import provenance; present only for imported blueprints. */
6462
6534
  BlueprintSource: {
@@ -8300,6 +8372,221 @@ export interface components {
8300
8372
  */
8301
8373
  total_count: number;
8302
8374
  };
8375
+ /** @description A directed, typed edge between two resources within a project. */
8376
+ Relation: {
8377
+ /**
8378
+ * Format: uuid
8379
+ * @description Unique relation identifier
8380
+ * @example 550e8400-e29b-41d4-a716-446655440000
8381
+ */
8382
+ id: string;
8383
+ /**
8384
+ * Format: uuid
8385
+ * @description Owning team
8386
+ * @example 660e8400-e29b-41d4-a716-446655440001
8387
+ */
8388
+ team_id: string;
8389
+ /**
8390
+ * Format: uuid
8391
+ * @description Project both endpoints belong to
8392
+ * @example 990e8400-e29b-41d4-a716-446655440004
8393
+ */
8394
+ project_id: string;
8395
+ /**
8396
+ * @description Subject resource type (artifact, memory, prompt, or blueprint)
8397
+ * @example artifact
8398
+ */
8399
+ from_type: string;
8400
+ /**
8401
+ * Format: uuid
8402
+ * @description Subject resource identifier
8403
+ * @example 770e8400-e29b-41d4-a716-446655440002
8404
+ */
8405
+ from_id: string;
8406
+ /**
8407
+ * @description Object resource type (artifact, memory, prompt, or blueprint)
8408
+ * @example blueprint
8409
+ */
8410
+ to_type: string;
8411
+ /**
8412
+ * Format: uuid
8413
+ * @description Object resource identifier
8414
+ * @example 880e8400-e29b-41d4-a716-446655440003
8415
+ */
8416
+ to_id: string;
8417
+ /**
8418
+ * @description The edge's intent
8419
+ * @example governed-by
8420
+ * @enum {string}
8421
+ */
8422
+ relation_type: "governed-by" | "supersedes" | "built-from" | "explained-by";
8423
+ /**
8424
+ * @description Whether a human or the AI proposed the edge
8425
+ * @example human
8426
+ * @enum {string}
8427
+ */
8428
+ origin: "ai" | "human";
8429
+ /**
8430
+ * @description Tiered-trust lifecycle state
8431
+ * @example confirmed
8432
+ * @enum {string}
8433
+ */
8434
+ status: "suggested" | "confirmed";
8435
+ /**
8436
+ * Format: uuid
8437
+ * @description User who created the edge (absent if that user was deleted)
8438
+ * @example aa0e8400-e29b-41d4-a716-446655440005
8439
+ */
8440
+ created_by?: string;
8441
+ /**
8442
+ * Format: uuid
8443
+ * @description User who confirmed the edge (absent while suggested or if that user was deleted)
8444
+ * @example bb0e8400-e29b-41d4-a716-446655440006
8445
+ */
8446
+ confirmed_by?: string;
8447
+ /**
8448
+ * Format: date-time
8449
+ * @description When the edge was created
8450
+ * @example 2026-07-21T09:00:00Z
8451
+ */
8452
+ created_at: string;
8453
+ /**
8454
+ * Format: date-time
8455
+ * @description When the edge was last updated (e.g. confirmed)
8456
+ * @example 2026-07-21T09:00:00Z
8457
+ */
8458
+ updated_at: string;
8459
+ };
8460
+ /** @description Request body for creating a typed relation between two resources. */
8461
+ CreateRelationRequest: {
8462
+ /**
8463
+ * @description Subject resource type (artifact, memory, prompt, or blueprint)
8464
+ * @example artifact
8465
+ * @enum {string}
8466
+ */
8467
+ from_type: "artifact" | "memory" | "prompt" | "blueprint";
8468
+ /**
8469
+ * Format: uuid
8470
+ * @description Subject resource identifier
8471
+ * @example 770e8400-e29b-41d4-a716-446655440002
8472
+ */
8473
+ from_id: string;
8474
+ /**
8475
+ * @description Object resource type (artifact, memory, prompt, or blueprint)
8476
+ * @example blueprint
8477
+ * @enum {string}
8478
+ */
8479
+ to_type: "artifact" | "memory" | "prompt" | "blueprint";
8480
+ /**
8481
+ * Format: uuid
8482
+ * @description Object resource identifier
8483
+ * @example 880e8400-e29b-41d4-a716-446655440003
8484
+ */
8485
+ to_id: string;
8486
+ /**
8487
+ * @description The edge's intent. The object type is constrained per relation type: governed-by -> blueprint, built-from -> prompt, explained-by -> memory, supersedes -> same type as the subject.
8488
+ * @example governed-by
8489
+ * @enum {string}
8490
+ */
8491
+ relation_type: "governed-by" | "supersedes" | "built-from" | "explained-by";
8492
+ /**
8493
+ * @description Whether a human or the AI proposed the edge
8494
+ * @example human
8495
+ * @enum {string}
8496
+ */
8497
+ origin: "ai" | "human";
8498
+ };
8499
+ /** @description One endpoint of a relation as seen from the other endpoint, enriched with the related resource's resolved title and link fields. project_id is present for every type; slug is present for artifact/blueprint/prompt and absent for memory. */
8500
+ RelatedResource: {
8501
+ /**
8502
+ * Format: uuid
8503
+ * @description The relation this entry came from
8504
+ * @example 550e8400-e29b-41d4-a716-446655440000
8505
+ */
8506
+ relation_id: string;
8507
+ /**
8508
+ * @description The edge's intent
8509
+ * @example governed-by
8510
+ * @enum {string}
8511
+ */
8512
+ relation_type: "governed-by" | "supersedes" | "built-from" | "explained-by";
8513
+ /**
8514
+ * @description Whether the queried resource is the subject (outgoing) or object (incoming) of the edge
8515
+ * @example outgoing
8516
+ * @enum {string}
8517
+ */
8518
+ direction: "outgoing" | "incoming";
8519
+ /**
8520
+ * @description Whether a human or the AI proposed the edge
8521
+ * @example human
8522
+ * @enum {string}
8523
+ */
8524
+ origin: "ai" | "human";
8525
+ /**
8526
+ * @description Tiered-trust lifecycle state
8527
+ * @example confirmed
8528
+ * @enum {string}
8529
+ */
8530
+ status: "suggested" | "confirmed";
8531
+ /**
8532
+ * @description Type of the related (other) resource
8533
+ * @example blueprint
8534
+ */
8535
+ resource_type: string;
8536
+ /**
8537
+ * Format: uuid
8538
+ * @description Identifier of the related (other) resource
8539
+ * @example 880e8400-e29b-41d4-a716-446655440003
8540
+ */
8541
+ resource_id: string;
8542
+ /**
8543
+ * @description Resolved display title of the related resource
8544
+ * @example Go coding standards
8545
+ */
8546
+ title: string;
8547
+ /**
8548
+ * Format: uuid
8549
+ * @description Project the related resource belongs to
8550
+ * @example 990e8400-e29b-41d4-a716-446655440004
8551
+ */
8552
+ project_id?: string;
8553
+ /**
8554
+ * @description Related resource slug for the detail link (absent for memories)
8555
+ * @example go-coding-standards
8556
+ */
8557
+ slug?: string;
8558
+ /**
8559
+ * Format: date-time
8560
+ * @description When the edge was created
8561
+ * @example 2026-07-21T09:00:00Z
8562
+ */
8563
+ created_at: string;
8564
+ };
8565
+ /** @description A page of the relations touching a resource (both directions), newest first. */
8566
+ RelationListResponse: {
8567
+ /** @description Relations touching the resource, newest first */
8568
+ relations: components["schemas"]["RelatedResource"][];
8569
+ /**
8570
+ * @description Total number of relations touching the resource
8571
+ * @example 3
8572
+ */
8573
+ total_count: number;
8574
+ /**
8575
+ * @description Current page number
8576
+ * @example 1
8577
+ */
8578
+ page: number;
8579
+ /**
8580
+ * @description Number of items per page
8581
+ * @example 20
8582
+ */
8583
+ per_page: number;
8584
+ /**
8585
+ * @description Total number of pages
8586
+ * @example 1
8587
+ */
8588
+ total_pages: number;
8589
+ };
8303
8590
  /** @description Instance-wide totals for the top-level entities (unscoped counts). */
8304
8591
  AdminInstanceCounts: {
8305
8592
  /**
@@ -18954,6 +19241,302 @@ export interface operations {
18954
19241
  };
18955
19242
  };
18956
19243
  };
19244
+ listRelations: {
19245
+ parameters: {
19246
+ query: {
19247
+ /** @description Type of the resource whose relations to list (artifact, memory, prompt, or blueprint) */
19248
+ resource_type: string;
19249
+ /** @description Identifier of the resource whose relations to list */
19250
+ resource_id: string;
19251
+ /** @description Page number (1-based) */
19252
+ page?: number;
19253
+ /** @description Items per page */
19254
+ limit?: number;
19255
+ };
19256
+ header?: never;
19257
+ path: {
19258
+ /** @description Team identifier */
19259
+ team_id: string;
19260
+ };
19261
+ cookie?: never;
19262
+ };
19263
+ requestBody?: never;
19264
+ responses: {
19265
+ /** @description Relations retrieved successfully */
19266
+ 200: {
19267
+ headers: {
19268
+ [name: string]: unknown;
19269
+ };
19270
+ content: {
19271
+ "application/json": components["schemas"]["RelationListResponse"];
19272
+ };
19273
+ };
19274
+ /** @description Invalid resource_type or query parameters */
19275
+ 400: {
19276
+ headers: {
19277
+ [name: string]: unknown;
19278
+ };
19279
+ content: {
19280
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19281
+ };
19282
+ };
19283
+ /** @description Unauthorized */
19284
+ 401: {
19285
+ headers: {
19286
+ [name: string]: unknown;
19287
+ };
19288
+ content: {
19289
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19290
+ };
19291
+ };
19292
+ /** @description Caller is not a member of the team */
19293
+ 403: {
19294
+ headers: {
19295
+ [name: string]: unknown;
19296
+ };
19297
+ content: {
19298
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19299
+ };
19300
+ };
19301
+ /** @description Failed to list relations */
19302
+ 500: {
19303
+ headers: {
19304
+ [name: string]: unknown;
19305
+ };
19306
+ content: {
19307
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19308
+ };
19309
+ };
19310
+ };
19311
+ };
19312
+ createRelation: {
19313
+ parameters: {
19314
+ query?: never;
19315
+ header?: never;
19316
+ path: {
19317
+ /** @description Team identifier */
19318
+ team_id: string;
19319
+ };
19320
+ cookie?: never;
19321
+ };
19322
+ requestBody: {
19323
+ content: {
19324
+ "application/json": components["schemas"]["CreateRelationRequest"];
19325
+ };
19326
+ };
19327
+ responses: {
19328
+ /** @description Relation already existed; the existing edge is returned (idempotent create) */
19329
+ 200: {
19330
+ headers: {
19331
+ [name: string]: unknown;
19332
+ };
19333
+ content: {
19334
+ "application/json": components["schemas"]["Relation"];
19335
+ };
19336
+ };
19337
+ /** @description Relation created successfully */
19338
+ 201: {
19339
+ headers: {
19340
+ [name: string]: unknown;
19341
+ };
19342
+ content: {
19343
+ "application/json": components["schemas"]["Relation"];
19344
+ };
19345
+ };
19346
+ /** @description Invalid types, self-link, cross-project link, or matrix violation */
19347
+ 400: {
19348
+ headers: {
19349
+ [name: string]: unknown;
19350
+ };
19351
+ content: {
19352
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19353
+ };
19354
+ };
19355
+ /** @description Unauthorized */
19356
+ 401: {
19357
+ headers: {
19358
+ [name: string]: unknown;
19359
+ };
19360
+ content: {
19361
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19362
+ };
19363
+ };
19364
+ /** @description Caller may not create relations in the team */
19365
+ 403: {
19366
+ headers: {
19367
+ [name: string]: unknown;
19368
+ };
19369
+ content: {
19370
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19371
+ };
19372
+ };
19373
+ /** @description One of the endpoints does not exist in the team */
19374
+ 404: {
19375
+ headers: {
19376
+ [name: string]: unknown;
19377
+ };
19378
+ content: {
19379
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19380
+ };
19381
+ };
19382
+ /** @description Failed to create relation */
19383
+ 500: {
19384
+ headers: {
19385
+ [name: string]: unknown;
19386
+ };
19387
+ content: {
19388
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19389
+ };
19390
+ };
19391
+ };
19392
+ };
19393
+ confirmRelation: {
19394
+ parameters: {
19395
+ query?: never;
19396
+ header?: never;
19397
+ path: {
19398
+ /** @description Team identifier */
19399
+ team_id: string;
19400
+ /** @description Relation identifier */
19401
+ relation_id: string;
19402
+ };
19403
+ cookie?: never;
19404
+ };
19405
+ requestBody?: never;
19406
+ responses: {
19407
+ /** @description Relation confirmed successfully */
19408
+ 200: {
19409
+ headers: {
19410
+ [name: string]: unknown;
19411
+ };
19412
+ content: {
19413
+ "application/json": components["schemas"]["Relation"];
19414
+ };
19415
+ };
19416
+ /** @description relation_id is not a valid UUID */
19417
+ 400: {
19418
+ headers: {
19419
+ [name: string]: unknown;
19420
+ };
19421
+ content: {
19422
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19423
+ };
19424
+ };
19425
+ /** @description Unauthorized */
19426
+ 401: {
19427
+ headers: {
19428
+ [name: string]: unknown;
19429
+ };
19430
+ content: {
19431
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19432
+ };
19433
+ };
19434
+ /** @description Caller may not confirm relations in the team */
19435
+ 403: {
19436
+ headers: {
19437
+ [name: string]: unknown;
19438
+ };
19439
+ content: {
19440
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19441
+ };
19442
+ };
19443
+ /** @description Relation not found in the team */
19444
+ 404: {
19445
+ headers: {
19446
+ [name: string]: unknown;
19447
+ };
19448
+ content: {
19449
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19450
+ };
19451
+ };
19452
+ /** @description Relation is already confirmed */
19453
+ 409: {
19454
+ headers: {
19455
+ [name: string]: unknown;
19456
+ };
19457
+ content: {
19458
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19459
+ };
19460
+ };
19461
+ /** @description Failed to confirm relation */
19462
+ 500: {
19463
+ headers: {
19464
+ [name: string]: unknown;
19465
+ };
19466
+ content: {
19467
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19468
+ };
19469
+ };
19470
+ };
19471
+ };
19472
+ deleteRelation: {
19473
+ parameters: {
19474
+ query?: never;
19475
+ header?: never;
19476
+ path: {
19477
+ /** @description Team identifier */
19478
+ team_id: string;
19479
+ /** @description Relation identifier */
19480
+ relation_id: string;
19481
+ };
19482
+ cookie?: never;
19483
+ };
19484
+ requestBody?: never;
19485
+ responses: {
19486
+ /** @description Relation deleted (no content) */
19487
+ 204: {
19488
+ headers: {
19489
+ [name: string]: unknown;
19490
+ };
19491
+ content?: never;
19492
+ };
19493
+ /** @description relation_id is not a valid UUID */
19494
+ 400: {
19495
+ headers: {
19496
+ [name: string]: unknown;
19497
+ };
19498
+ content: {
19499
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19500
+ };
19501
+ };
19502
+ /** @description Unauthorized */
19503
+ 401: {
19504
+ headers: {
19505
+ [name: string]: unknown;
19506
+ };
19507
+ content: {
19508
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19509
+ };
19510
+ };
19511
+ /** @description Caller may not delete this relation */
19512
+ 403: {
19513
+ headers: {
19514
+ [name: string]: unknown;
19515
+ };
19516
+ content: {
19517
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19518
+ };
19519
+ };
19520
+ /** @description Relation not found in the team */
19521
+ 404: {
19522
+ headers: {
19523
+ [name: string]: unknown;
19524
+ };
19525
+ content: {
19526
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19527
+ };
19528
+ };
19529
+ /** @description Failed to delete relation */
19530
+ 500: {
19531
+ headers: {
19532
+ [name: string]: unknown;
19533
+ };
19534
+ content: {
19535
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19536
+ };
19537
+ };
19538
+ };
19539
+ };
18957
19540
  listEmbeddingProviders: {
18958
19541
  parameters: {
18959
19542
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibexp/api-client",
3
- "version": "0.26.0",
3
+ "version": "0.28.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": {