@vibexp/api-client 0.26.0 → 0.27.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;
@@ -8300,6 +8364,221 @@ export interface components {
8300
8364
  */
8301
8365
  total_count: number;
8302
8366
  };
8367
+ /** @description A directed, typed edge between two resources within a project. */
8368
+ Relation: {
8369
+ /**
8370
+ * Format: uuid
8371
+ * @description Unique relation identifier
8372
+ * @example 550e8400-e29b-41d4-a716-446655440000
8373
+ */
8374
+ id: string;
8375
+ /**
8376
+ * Format: uuid
8377
+ * @description Owning team
8378
+ * @example 660e8400-e29b-41d4-a716-446655440001
8379
+ */
8380
+ team_id: string;
8381
+ /**
8382
+ * Format: uuid
8383
+ * @description Project both endpoints belong to
8384
+ * @example 990e8400-e29b-41d4-a716-446655440004
8385
+ */
8386
+ project_id: string;
8387
+ /**
8388
+ * @description Subject resource type (artifact, memory, prompt, or blueprint)
8389
+ * @example artifact
8390
+ */
8391
+ from_type: string;
8392
+ /**
8393
+ * Format: uuid
8394
+ * @description Subject resource identifier
8395
+ * @example 770e8400-e29b-41d4-a716-446655440002
8396
+ */
8397
+ from_id: string;
8398
+ /**
8399
+ * @description Object resource type (artifact, memory, prompt, or blueprint)
8400
+ * @example blueprint
8401
+ */
8402
+ to_type: string;
8403
+ /**
8404
+ * Format: uuid
8405
+ * @description Object resource identifier
8406
+ * @example 880e8400-e29b-41d4-a716-446655440003
8407
+ */
8408
+ to_id: string;
8409
+ /**
8410
+ * @description The edge's intent
8411
+ * @example governed-by
8412
+ * @enum {string}
8413
+ */
8414
+ relation_type: "governed-by" | "supersedes" | "built-from" | "explained-by";
8415
+ /**
8416
+ * @description Whether a human or the AI proposed the edge
8417
+ * @example human
8418
+ * @enum {string}
8419
+ */
8420
+ origin: "ai" | "human";
8421
+ /**
8422
+ * @description Tiered-trust lifecycle state
8423
+ * @example confirmed
8424
+ * @enum {string}
8425
+ */
8426
+ status: "suggested" | "confirmed";
8427
+ /**
8428
+ * Format: uuid
8429
+ * @description User who created the edge (absent if that user was deleted)
8430
+ * @example aa0e8400-e29b-41d4-a716-446655440005
8431
+ */
8432
+ created_by?: string;
8433
+ /**
8434
+ * Format: uuid
8435
+ * @description User who confirmed the edge (absent while suggested or if that user was deleted)
8436
+ * @example bb0e8400-e29b-41d4-a716-446655440006
8437
+ */
8438
+ confirmed_by?: string;
8439
+ /**
8440
+ * Format: date-time
8441
+ * @description When the edge was created
8442
+ * @example 2026-07-21T09:00:00Z
8443
+ */
8444
+ created_at: string;
8445
+ /**
8446
+ * Format: date-time
8447
+ * @description When the edge was last updated (e.g. confirmed)
8448
+ * @example 2026-07-21T09:00:00Z
8449
+ */
8450
+ updated_at: string;
8451
+ };
8452
+ /** @description Request body for creating a typed relation between two resources. */
8453
+ CreateRelationRequest: {
8454
+ /**
8455
+ * @description Subject resource type (artifact, memory, prompt, or blueprint)
8456
+ * @example artifact
8457
+ * @enum {string}
8458
+ */
8459
+ from_type: "artifact" | "memory" | "prompt" | "blueprint";
8460
+ /**
8461
+ * Format: uuid
8462
+ * @description Subject resource identifier
8463
+ * @example 770e8400-e29b-41d4-a716-446655440002
8464
+ */
8465
+ from_id: string;
8466
+ /**
8467
+ * @description Object resource type (artifact, memory, prompt, or blueprint)
8468
+ * @example blueprint
8469
+ * @enum {string}
8470
+ */
8471
+ to_type: "artifact" | "memory" | "prompt" | "blueprint";
8472
+ /**
8473
+ * Format: uuid
8474
+ * @description Object resource identifier
8475
+ * @example 880e8400-e29b-41d4-a716-446655440003
8476
+ */
8477
+ to_id: string;
8478
+ /**
8479
+ * @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.
8480
+ * @example governed-by
8481
+ * @enum {string}
8482
+ */
8483
+ relation_type: "governed-by" | "supersedes" | "built-from" | "explained-by";
8484
+ /**
8485
+ * @description Whether a human or the AI proposed the edge
8486
+ * @example human
8487
+ * @enum {string}
8488
+ */
8489
+ origin: "ai" | "human";
8490
+ };
8491
+ /** @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. */
8492
+ RelatedResource: {
8493
+ /**
8494
+ * Format: uuid
8495
+ * @description The relation this entry came from
8496
+ * @example 550e8400-e29b-41d4-a716-446655440000
8497
+ */
8498
+ relation_id: string;
8499
+ /**
8500
+ * @description The edge's intent
8501
+ * @example governed-by
8502
+ * @enum {string}
8503
+ */
8504
+ relation_type: "governed-by" | "supersedes" | "built-from" | "explained-by";
8505
+ /**
8506
+ * @description Whether the queried resource is the subject (outgoing) or object (incoming) of the edge
8507
+ * @example outgoing
8508
+ * @enum {string}
8509
+ */
8510
+ direction: "outgoing" | "incoming";
8511
+ /**
8512
+ * @description Whether a human or the AI proposed the edge
8513
+ * @example human
8514
+ * @enum {string}
8515
+ */
8516
+ origin: "ai" | "human";
8517
+ /**
8518
+ * @description Tiered-trust lifecycle state
8519
+ * @example confirmed
8520
+ * @enum {string}
8521
+ */
8522
+ status: "suggested" | "confirmed";
8523
+ /**
8524
+ * @description Type of the related (other) resource
8525
+ * @example blueprint
8526
+ */
8527
+ resource_type: string;
8528
+ /**
8529
+ * Format: uuid
8530
+ * @description Identifier of the related (other) resource
8531
+ * @example 880e8400-e29b-41d4-a716-446655440003
8532
+ */
8533
+ resource_id: string;
8534
+ /**
8535
+ * @description Resolved display title of the related resource
8536
+ * @example Go coding standards
8537
+ */
8538
+ title: string;
8539
+ /**
8540
+ * Format: uuid
8541
+ * @description Project the related resource belongs to
8542
+ * @example 990e8400-e29b-41d4-a716-446655440004
8543
+ */
8544
+ project_id?: string;
8545
+ /**
8546
+ * @description Related resource slug for the detail link (absent for memories)
8547
+ * @example go-coding-standards
8548
+ */
8549
+ slug?: string;
8550
+ /**
8551
+ * Format: date-time
8552
+ * @description When the edge was created
8553
+ * @example 2026-07-21T09:00:00Z
8554
+ */
8555
+ created_at: string;
8556
+ };
8557
+ /** @description A page of the relations touching a resource (both directions), newest first. */
8558
+ RelationListResponse: {
8559
+ /** @description Relations touching the resource, newest first */
8560
+ relations: components["schemas"]["RelatedResource"][];
8561
+ /**
8562
+ * @description Total number of relations touching the resource
8563
+ * @example 3
8564
+ */
8565
+ total_count: number;
8566
+ /**
8567
+ * @description Current page number
8568
+ * @example 1
8569
+ */
8570
+ page: number;
8571
+ /**
8572
+ * @description Number of items per page
8573
+ * @example 20
8574
+ */
8575
+ per_page: number;
8576
+ /**
8577
+ * @description Total number of pages
8578
+ * @example 1
8579
+ */
8580
+ total_pages: number;
8581
+ };
8303
8582
  /** @description Instance-wide totals for the top-level entities (unscoped counts). */
8304
8583
  AdminInstanceCounts: {
8305
8584
  /**
@@ -18954,6 +19233,302 @@ export interface operations {
18954
19233
  };
18955
19234
  };
18956
19235
  };
19236
+ listRelations: {
19237
+ parameters: {
19238
+ query: {
19239
+ /** @description Type of the resource whose relations to list (artifact, memory, prompt, or blueprint) */
19240
+ resource_type: string;
19241
+ /** @description Identifier of the resource whose relations to list */
19242
+ resource_id: string;
19243
+ /** @description Page number (1-based) */
19244
+ page?: number;
19245
+ /** @description Items per page */
19246
+ limit?: number;
19247
+ };
19248
+ header?: never;
19249
+ path: {
19250
+ /** @description Team identifier */
19251
+ team_id: string;
19252
+ };
19253
+ cookie?: never;
19254
+ };
19255
+ requestBody?: never;
19256
+ responses: {
19257
+ /** @description Relations retrieved successfully */
19258
+ 200: {
19259
+ headers: {
19260
+ [name: string]: unknown;
19261
+ };
19262
+ content: {
19263
+ "application/json": components["schemas"]["RelationListResponse"];
19264
+ };
19265
+ };
19266
+ /** @description Invalid resource_type or query parameters */
19267
+ 400: {
19268
+ headers: {
19269
+ [name: string]: unknown;
19270
+ };
19271
+ content: {
19272
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19273
+ };
19274
+ };
19275
+ /** @description Unauthorized */
19276
+ 401: {
19277
+ headers: {
19278
+ [name: string]: unknown;
19279
+ };
19280
+ content: {
19281
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19282
+ };
19283
+ };
19284
+ /** @description Caller is not a member of the team */
19285
+ 403: {
19286
+ headers: {
19287
+ [name: string]: unknown;
19288
+ };
19289
+ content: {
19290
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19291
+ };
19292
+ };
19293
+ /** @description Failed to list relations */
19294
+ 500: {
19295
+ headers: {
19296
+ [name: string]: unknown;
19297
+ };
19298
+ content: {
19299
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19300
+ };
19301
+ };
19302
+ };
19303
+ };
19304
+ createRelation: {
19305
+ parameters: {
19306
+ query?: never;
19307
+ header?: never;
19308
+ path: {
19309
+ /** @description Team identifier */
19310
+ team_id: string;
19311
+ };
19312
+ cookie?: never;
19313
+ };
19314
+ requestBody: {
19315
+ content: {
19316
+ "application/json": components["schemas"]["CreateRelationRequest"];
19317
+ };
19318
+ };
19319
+ responses: {
19320
+ /** @description Relation already existed; the existing edge is returned (idempotent create) */
19321
+ 200: {
19322
+ headers: {
19323
+ [name: string]: unknown;
19324
+ };
19325
+ content: {
19326
+ "application/json": components["schemas"]["Relation"];
19327
+ };
19328
+ };
19329
+ /** @description Relation created successfully */
19330
+ 201: {
19331
+ headers: {
19332
+ [name: string]: unknown;
19333
+ };
19334
+ content: {
19335
+ "application/json": components["schemas"]["Relation"];
19336
+ };
19337
+ };
19338
+ /** @description Invalid types, self-link, cross-project link, or matrix violation */
19339
+ 400: {
19340
+ headers: {
19341
+ [name: string]: unknown;
19342
+ };
19343
+ content: {
19344
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19345
+ };
19346
+ };
19347
+ /** @description Unauthorized */
19348
+ 401: {
19349
+ headers: {
19350
+ [name: string]: unknown;
19351
+ };
19352
+ content: {
19353
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19354
+ };
19355
+ };
19356
+ /** @description Caller may not create relations in the team */
19357
+ 403: {
19358
+ headers: {
19359
+ [name: string]: unknown;
19360
+ };
19361
+ content: {
19362
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19363
+ };
19364
+ };
19365
+ /** @description One of the endpoints does not exist in the team */
19366
+ 404: {
19367
+ headers: {
19368
+ [name: string]: unknown;
19369
+ };
19370
+ content: {
19371
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19372
+ };
19373
+ };
19374
+ /** @description Failed to create relation */
19375
+ 500: {
19376
+ headers: {
19377
+ [name: string]: unknown;
19378
+ };
19379
+ content: {
19380
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19381
+ };
19382
+ };
19383
+ };
19384
+ };
19385
+ confirmRelation: {
19386
+ parameters: {
19387
+ query?: never;
19388
+ header?: never;
19389
+ path: {
19390
+ /** @description Team identifier */
19391
+ team_id: string;
19392
+ /** @description Relation identifier */
19393
+ relation_id: string;
19394
+ };
19395
+ cookie?: never;
19396
+ };
19397
+ requestBody?: never;
19398
+ responses: {
19399
+ /** @description Relation confirmed successfully */
19400
+ 200: {
19401
+ headers: {
19402
+ [name: string]: unknown;
19403
+ };
19404
+ content: {
19405
+ "application/json": components["schemas"]["Relation"];
19406
+ };
19407
+ };
19408
+ /** @description relation_id is not a valid UUID */
19409
+ 400: {
19410
+ headers: {
19411
+ [name: string]: unknown;
19412
+ };
19413
+ content: {
19414
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19415
+ };
19416
+ };
19417
+ /** @description Unauthorized */
19418
+ 401: {
19419
+ headers: {
19420
+ [name: string]: unknown;
19421
+ };
19422
+ content: {
19423
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19424
+ };
19425
+ };
19426
+ /** @description Caller may not confirm relations in the team */
19427
+ 403: {
19428
+ headers: {
19429
+ [name: string]: unknown;
19430
+ };
19431
+ content: {
19432
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19433
+ };
19434
+ };
19435
+ /** @description Relation not found in the team */
19436
+ 404: {
19437
+ headers: {
19438
+ [name: string]: unknown;
19439
+ };
19440
+ content: {
19441
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19442
+ };
19443
+ };
19444
+ /** @description Relation is already confirmed */
19445
+ 409: {
19446
+ headers: {
19447
+ [name: string]: unknown;
19448
+ };
19449
+ content: {
19450
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19451
+ };
19452
+ };
19453
+ /** @description Failed to confirm relation */
19454
+ 500: {
19455
+ headers: {
19456
+ [name: string]: unknown;
19457
+ };
19458
+ content: {
19459
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19460
+ };
19461
+ };
19462
+ };
19463
+ };
19464
+ deleteRelation: {
19465
+ parameters: {
19466
+ query?: never;
19467
+ header?: never;
19468
+ path: {
19469
+ /** @description Team identifier */
19470
+ team_id: string;
19471
+ /** @description Relation identifier */
19472
+ relation_id: string;
19473
+ };
19474
+ cookie?: never;
19475
+ };
19476
+ requestBody?: never;
19477
+ responses: {
19478
+ /** @description Relation deleted (no content) */
19479
+ 204: {
19480
+ headers: {
19481
+ [name: string]: unknown;
19482
+ };
19483
+ content?: never;
19484
+ };
19485
+ /** @description relation_id is not a valid UUID */
19486
+ 400: {
19487
+ headers: {
19488
+ [name: string]: unknown;
19489
+ };
19490
+ content: {
19491
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19492
+ };
19493
+ };
19494
+ /** @description Unauthorized */
19495
+ 401: {
19496
+ headers: {
19497
+ [name: string]: unknown;
19498
+ };
19499
+ content: {
19500
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19501
+ };
19502
+ };
19503
+ /** @description Caller may not delete this relation */
19504
+ 403: {
19505
+ headers: {
19506
+ [name: string]: unknown;
19507
+ };
19508
+ content: {
19509
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19510
+ };
19511
+ };
19512
+ /** @description Relation not found in the team */
19513
+ 404: {
19514
+ headers: {
19515
+ [name: string]: unknown;
19516
+ };
19517
+ content: {
19518
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19519
+ };
19520
+ };
19521
+ /** @description Failed to delete relation */
19522
+ 500: {
19523
+ headers: {
19524
+ [name: string]: unknown;
19525
+ };
19526
+ content: {
19527
+ "application/problem+json": components["schemas"]["ErrorResponse"];
19528
+ };
19529
+ };
19530
+ };
19531
+ };
18957
19532
  listEmbeddingProviders: {
18958
19533
  parameters: {
18959
19534
  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.27.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": {