@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.
@@ -3665,6 +3665,172 @@ export type RecentCommentListResponse = {
3665
3665
  */
3666
3666
  total_count: number;
3667
3667
  };
3668
+ /**
3669
+ * A directed, typed edge between two resources within a project.
3670
+ */
3671
+ export type Relation = {
3672
+ /**
3673
+ * Unique relation identifier
3674
+ */
3675
+ id: string;
3676
+ /**
3677
+ * Owning team
3678
+ */
3679
+ team_id: string;
3680
+ /**
3681
+ * Project both endpoints belong to
3682
+ */
3683
+ project_id: string;
3684
+ /**
3685
+ * Subject resource type (artifact, memory, prompt, or blueprint)
3686
+ */
3687
+ from_type: string;
3688
+ /**
3689
+ * Subject resource identifier
3690
+ */
3691
+ from_id: string;
3692
+ /**
3693
+ * Object resource type (artifact, memory, prompt, or blueprint)
3694
+ */
3695
+ to_type: string;
3696
+ /**
3697
+ * Object resource identifier
3698
+ */
3699
+ to_id: string;
3700
+ /**
3701
+ * The edge's intent
3702
+ */
3703
+ relation_type: 'governed-by' | 'supersedes' | 'built-from' | 'explained-by';
3704
+ /**
3705
+ * Whether a human or the AI proposed the edge
3706
+ */
3707
+ origin: 'ai' | 'human';
3708
+ /**
3709
+ * Tiered-trust lifecycle state
3710
+ */
3711
+ status: 'suggested' | 'confirmed';
3712
+ /**
3713
+ * User who created the edge (absent if that user was deleted)
3714
+ */
3715
+ created_by?: string;
3716
+ /**
3717
+ * User who confirmed the edge (absent while suggested or if that user was deleted)
3718
+ */
3719
+ confirmed_by?: string;
3720
+ /**
3721
+ * When the edge was created
3722
+ */
3723
+ created_at: string;
3724
+ /**
3725
+ * When the edge was last updated (e.g. confirmed)
3726
+ */
3727
+ updated_at: string;
3728
+ };
3729
+ /**
3730
+ * Request body for creating a typed relation between two resources.
3731
+ */
3732
+ export type CreateRelationRequest = {
3733
+ /**
3734
+ * Subject resource type (artifact, memory, prompt, or blueprint)
3735
+ */
3736
+ from_type: 'artifact' | 'memory' | 'prompt' | 'blueprint';
3737
+ /**
3738
+ * Subject resource identifier
3739
+ */
3740
+ from_id: string;
3741
+ /**
3742
+ * Object resource type (artifact, memory, prompt, or blueprint)
3743
+ */
3744
+ to_type: 'artifact' | 'memory' | 'prompt' | 'blueprint';
3745
+ /**
3746
+ * Object resource identifier
3747
+ */
3748
+ to_id: string;
3749
+ /**
3750
+ * 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.
3751
+ *
3752
+ */
3753
+ relation_type: 'governed-by' | 'supersedes' | 'built-from' | 'explained-by';
3754
+ /**
3755
+ * Whether a human or the AI proposed the edge
3756
+ */
3757
+ origin: 'ai' | 'human';
3758
+ };
3759
+ /**
3760
+ * 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.
3761
+ *
3762
+ */
3763
+ export type RelatedResource = {
3764
+ /**
3765
+ * The relation this entry came from
3766
+ */
3767
+ relation_id: string;
3768
+ /**
3769
+ * The edge's intent
3770
+ */
3771
+ relation_type: 'governed-by' | 'supersedes' | 'built-from' | 'explained-by';
3772
+ /**
3773
+ * Whether the queried resource is the subject (outgoing) or object (incoming) of the edge
3774
+ */
3775
+ direction: 'outgoing' | 'incoming';
3776
+ /**
3777
+ * Whether a human or the AI proposed the edge
3778
+ */
3779
+ origin: 'ai' | 'human';
3780
+ /**
3781
+ * Tiered-trust lifecycle state
3782
+ */
3783
+ status: 'suggested' | 'confirmed';
3784
+ /**
3785
+ * Type of the related (other) resource
3786
+ */
3787
+ resource_type: string;
3788
+ /**
3789
+ * Identifier of the related (other) resource
3790
+ */
3791
+ resource_id: string;
3792
+ /**
3793
+ * Resolved display title of the related resource
3794
+ */
3795
+ title: string;
3796
+ /**
3797
+ * Project the related resource belongs to
3798
+ */
3799
+ project_id?: string;
3800
+ /**
3801
+ * Related resource slug for the detail link (absent for memories)
3802
+ */
3803
+ slug?: string;
3804
+ /**
3805
+ * When the edge was created
3806
+ */
3807
+ created_at: string;
3808
+ };
3809
+ /**
3810
+ * A page of the relations touching a resource (both directions), newest first.
3811
+ */
3812
+ export type RelationListResponse = {
3813
+ /**
3814
+ * Relations touching the resource, newest first
3815
+ */
3816
+ relations: Array<RelatedResource>;
3817
+ /**
3818
+ * Total number of relations touching the resource
3819
+ */
3820
+ total_count: number;
3821
+ /**
3822
+ * Current page number
3823
+ */
3824
+ page: number;
3825
+ /**
3826
+ * Number of items per page
3827
+ */
3828
+ per_page: number;
3829
+ /**
3830
+ * Total number of pages
3831
+ */
3832
+ total_pages: number;
3833
+ };
3668
3834
  /**
3669
3835
  * Instance-wide totals for the top-level entities (unscoped counts).
3670
3836
  */
@@ -11107,6 +11273,199 @@ export type UpdateCommentResponses = {
11107
11273
  200: Comment;
11108
11274
  };
11109
11275
  export type UpdateCommentResponse = UpdateCommentResponses[keyof UpdateCommentResponses];
11276
+ export type ListRelationsData = {
11277
+ body?: never;
11278
+ path: {
11279
+ /**
11280
+ * Team identifier
11281
+ */
11282
+ team_id: string;
11283
+ };
11284
+ query: {
11285
+ /**
11286
+ * Type of the resource whose relations to list (artifact, memory, prompt, or blueprint)
11287
+ */
11288
+ resource_type: string;
11289
+ /**
11290
+ * Identifier of the resource whose relations to list
11291
+ */
11292
+ resource_id: string;
11293
+ /**
11294
+ * Page number (1-based)
11295
+ */
11296
+ page?: number;
11297
+ /**
11298
+ * Items per page
11299
+ */
11300
+ limit?: number;
11301
+ };
11302
+ url: '/api/v1/{team_id}/relations';
11303
+ };
11304
+ export type ListRelationsErrors = {
11305
+ /**
11306
+ * Invalid resource_type or query parameters
11307
+ */
11308
+ 400: ErrorResponse;
11309
+ /**
11310
+ * Unauthorized
11311
+ */
11312
+ 401: ErrorResponse;
11313
+ /**
11314
+ * Caller is not a member of the team
11315
+ */
11316
+ 403: ErrorResponse;
11317
+ /**
11318
+ * Failed to list relations
11319
+ */
11320
+ 500: ErrorResponse;
11321
+ };
11322
+ export type ListRelationsError = ListRelationsErrors[keyof ListRelationsErrors];
11323
+ export type ListRelationsResponses = {
11324
+ /**
11325
+ * Relations retrieved successfully
11326
+ */
11327
+ 200: RelationListResponse;
11328
+ };
11329
+ export type ListRelationsResponse = ListRelationsResponses[keyof ListRelationsResponses];
11330
+ export type CreateRelationData = {
11331
+ body: CreateRelationRequest;
11332
+ path: {
11333
+ /**
11334
+ * Team identifier
11335
+ */
11336
+ team_id: string;
11337
+ };
11338
+ query?: never;
11339
+ url: '/api/v1/{team_id}/relations';
11340
+ };
11341
+ export type CreateRelationErrors = {
11342
+ /**
11343
+ * Invalid types, self-link, cross-project link, or matrix violation
11344
+ */
11345
+ 400: ErrorResponse;
11346
+ /**
11347
+ * Unauthorized
11348
+ */
11349
+ 401: ErrorResponse;
11350
+ /**
11351
+ * Caller may not create relations in the team
11352
+ */
11353
+ 403: ErrorResponse;
11354
+ /**
11355
+ * One of the endpoints does not exist in the team
11356
+ */
11357
+ 404: ErrorResponse;
11358
+ /**
11359
+ * Failed to create relation
11360
+ */
11361
+ 500: ErrorResponse;
11362
+ };
11363
+ export type CreateRelationError = CreateRelationErrors[keyof CreateRelationErrors];
11364
+ export type CreateRelationResponses = {
11365
+ /**
11366
+ * Relation already existed; the existing edge is returned (idempotent create)
11367
+ */
11368
+ 200: Relation;
11369
+ /**
11370
+ * Relation created successfully
11371
+ */
11372
+ 201: Relation;
11373
+ };
11374
+ export type CreateRelationResponse = CreateRelationResponses[keyof CreateRelationResponses];
11375
+ export type ConfirmRelationData = {
11376
+ body?: never;
11377
+ path: {
11378
+ /**
11379
+ * Team identifier
11380
+ */
11381
+ team_id: string;
11382
+ /**
11383
+ * Relation identifier
11384
+ */
11385
+ relation_id: string;
11386
+ };
11387
+ query?: never;
11388
+ url: '/api/v1/{team_id}/relations/{relation_id}/confirm';
11389
+ };
11390
+ export type ConfirmRelationErrors = {
11391
+ /**
11392
+ * relation_id is not a valid UUID
11393
+ */
11394
+ 400: ErrorResponse;
11395
+ /**
11396
+ * Unauthorized
11397
+ */
11398
+ 401: ErrorResponse;
11399
+ /**
11400
+ * Caller may not confirm relations in the team
11401
+ */
11402
+ 403: ErrorResponse;
11403
+ /**
11404
+ * Relation not found in the team
11405
+ */
11406
+ 404: ErrorResponse;
11407
+ /**
11408
+ * Relation is already confirmed
11409
+ */
11410
+ 409: ErrorResponse;
11411
+ /**
11412
+ * Failed to confirm relation
11413
+ */
11414
+ 500: ErrorResponse;
11415
+ };
11416
+ export type ConfirmRelationError = ConfirmRelationErrors[keyof ConfirmRelationErrors];
11417
+ export type ConfirmRelationResponses = {
11418
+ /**
11419
+ * Relation confirmed successfully
11420
+ */
11421
+ 200: Relation;
11422
+ };
11423
+ export type ConfirmRelationResponse = ConfirmRelationResponses[keyof ConfirmRelationResponses];
11424
+ export type DeleteRelationData = {
11425
+ body?: never;
11426
+ path: {
11427
+ /**
11428
+ * Team identifier
11429
+ */
11430
+ team_id: string;
11431
+ /**
11432
+ * Relation identifier
11433
+ */
11434
+ relation_id: string;
11435
+ };
11436
+ query?: never;
11437
+ url: '/api/v1/{team_id}/relations/{relation_id}';
11438
+ };
11439
+ export type DeleteRelationErrors = {
11440
+ /**
11441
+ * relation_id is not a valid UUID
11442
+ */
11443
+ 400: ErrorResponse;
11444
+ /**
11445
+ * Unauthorized
11446
+ */
11447
+ 401: ErrorResponse;
11448
+ /**
11449
+ * Caller may not delete this relation
11450
+ */
11451
+ 403: ErrorResponse;
11452
+ /**
11453
+ * Relation not found in the team
11454
+ */
11455
+ 404: ErrorResponse;
11456
+ /**
11457
+ * Failed to delete relation
11458
+ */
11459
+ 500: ErrorResponse;
11460
+ };
11461
+ export type DeleteRelationError = DeleteRelationErrors[keyof DeleteRelationErrors];
11462
+ export type DeleteRelationResponses = {
11463
+ /**
11464
+ * Relation deleted (no content)
11465
+ */
11466
+ 204: void;
11467
+ };
11468
+ export type DeleteRelationResponse = DeleteRelationResponses[keyof DeleteRelationResponses];
11110
11469
  export type ListEmbeddingProvidersData = {
11111
11470
  body?: never;
11112
11471
  path: {