@vibexp/api-client 0.100.0 → 0.101.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.
@@ -3740,6 +3740,103 @@ export type CopyTypesResponse = {
3740
3740
  */
3741
3741
  skipped_count: number;
3742
3742
  };
3743
+ /**
3744
+ * A resource type that carries a status. Singular, as in the comment and relation APIs.
3745
+ *
3746
+ */
3747
+ export type StatusResourceType = 'prompt' | 'artifact' | 'blueprint' | 'memory';
3748
+ /**
3749
+ * One status a team may give a resource of `resource_type`. A system status (`is_system: true`) is built in, identical for every team and cannot be renamed or deleted; it has no `id` and no timestamps. A custom status belongs to the team.
3750
+ *
3751
+ */
3752
+ export type StatusDefinition = {
3753
+ /**
3754
+ * Identifier of a custom status. Absent for a system status.
3755
+ */
3756
+ id?: string;
3757
+ resource_type: StatusResourceType;
3758
+ /**
3759
+ * The value stored on the resource. Unique per team and resource type, and immutable once created.
3760
+ *
3761
+ */
3762
+ slug: string;
3763
+ /**
3764
+ * Human-readable display name
3765
+ */
3766
+ name: string;
3767
+ /**
3768
+ * True for a built-in status, which cannot be renamed or deleted
3769
+ */
3770
+ is_system: boolean;
3771
+ /**
3772
+ * Whether a resource carrying this status counts as live, usable content. False only for the built-in work-in-progress and retired statuses (`draft`, `archived`, `expired`); always true for a custom status.
3773
+ *
3774
+ */
3775
+ is_live: boolean;
3776
+ /**
3777
+ * How many of the team's resources of this type currently carry the status. For a custom status this is the number of resources a delete would move to the default status.
3778
+ *
3779
+ */
3780
+ usage_count: number;
3781
+ /**
3782
+ * When the custom status was created. Absent for a system status.
3783
+ */
3784
+ created_at?: string;
3785
+ /**
3786
+ * When the custom status was last renamed. Absent for a system status.
3787
+ */
3788
+ updated_at?: string;
3789
+ };
3790
+ /**
3791
+ * The system statuses of a resource type followed by the team's custom ones
3792
+ */
3793
+ export type StatusListResponse = {
3794
+ /**
3795
+ * System statuses first, in their built-in order, then custom statuses by name
3796
+ */
3797
+ statuses: Array<StatusDefinition>;
3798
+ };
3799
+ /**
3800
+ * Request body for creating a custom status
3801
+ */
3802
+ export type CreateStatusRequest = {
3803
+ resource_type: StatusResourceType;
3804
+ /**
3805
+ * Lowercase letters and numbers in hyphen-separated groups, at most 50 characters. It cannot be one of the built-in statuses (`active`, `draft`, `archived`, `published`, `expired`), whichever resource type the status is for, and it cannot be changed later.
3806
+ *
3807
+ */
3808
+ slug: string;
3809
+ /**
3810
+ * Display name. Surrounding whitespace is trimmed, and what remains must be 1 to 50 characters.
3811
+ *
3812
+ */
3813
+ name: string;
3814
+ };
3815
+ /**
3816
+ * Request body for renaming a custom status. Only the display name can change; any other field, including `slug`, is rejected.
3817
+ *
3818
+ */
3819
+ export type UpdateStatusRequest = {
3820
+ /**
3821
+ * New display name. Surrounding whitespace is trimmed, and what remains must be 1 to 50 characters.
3822
+ *
3823
+ */
3824
+ name: string;
3825
+ };
3826
+ /**
3827
+ * The outcome of deleting a custom status
3828
+ */
3829
+ export type DeleteStatusResponse = {
3830
+ /**
3831
+ * How many resources carried the status and were moved to `reassigned_to`
3832
+ */
3833
+ reassigned_count: number;
3834
+ /**
3835
+ * The system status those resources now carry: `draft` for prompts, `active` for every other resource type.
3836
+ *
3837
+ */
3838
+ reassigned_to: string;
3839
+ };
3743
3840
  /**
3744
3841
  * A team-visible comment on a resource.
3745
3842
  */
@@ -4580,11 +4677,12 @@ export type UpdateTeamAiSummarySettingsRequest = {
4580
4677
  max_output_tokens: number;
4581
4678
  };
4582
4679
  /**
4583
- * Which settings surface was copied between teams.
4680
+ * Which settings surface the entry is about. `embedding_provider`, `model_provider` and `custom_types` record a copy from another team; `custom_statuses` records a custom status being created, renamed or deleted in this team.
4681
+ *
4584
4682
  */
4585
- export type TeamSettingsAuditSurface = 'embedding_provider' | 'model_provider' | 'custom_types';
4683
+ export type TeamSettingsAuditSurface = 'embedding_provider' | 'model_provider' | 'custom_types' | 'custom_statuses';
4586
4684
  /**
4587
- * One recorded settings copy into this team: which surface arrived, who brought it, and where it came from.
4685
+ * One recorded change to this team's settings: a configuration copied in from another team (which surface arrived, who brought it, and where it came from), or a custom status created, renamed or deleted here.
4588
4686
  *
4589
4687
  */
4590
4688
  export type TeamSettingsAuditEntry = {
@@ -4594,7 +4692,7 @@ export type TeamSettingsAuditEntry = {
4594
4692
  id: string;
4595
4693
  surface: TeamSettingsAuditSurface;
4596
4694
  /**
4597
- * Who performed the copy. `null` once that account is deleted — the entry outlives the actor on purpose, so that deletion cannot erase the record of what the account did.
4695
+ * Who made the change. `null` once that account is deleted — the entry outlives the actor on purpose, so that deletion cannot erase the record of what the account did.
4598
4696
  *
4599
4697
  */
4600
4698
  actor_user_id: string | null;
@@ -4604,33 +4702,34 @@ export type TeamSettingsAuditEntry = {
4604
4702
  */
4605
4703
  actor_name: string | null;
4606
4704
  /**
4607
- * The team the configuration was copied FROM.
4705
+ * The team the configuration was copied FROM. `null` for a `custom_statuses` entry, which has no source team.
4706
+ *
4608
4707
  */
4609
4708
  source_team_id: string | null;
4610
4709
  /**
4611
- * The source team's name, resolved server-side. `null` when that team has since been deleted — the id above is then the only remaining handle on it, and is deliberately still present rather than blanked.
4710
+ * The source team's name, resolved server-side. `null` when that team has since been deleted — the id above is then the only remaining handle on it, and is deliberately still present rather than blanked. Also `null` for a `custom_statuses` entry.
4612
4711
  *
4613
4712
  */
4614
4713
  source_team_name: string | null;
4615
4714
  /**
4616
- * The resource that was copied. `null` for a `custom_types` copy, where one action copies a whole set and the individual ids live in `detail`.
4715
+ * The resource that was copied. `null` for a `custom_types` copy, where one action copies a whole set and the individual ids live in `detail`, and for a `custom_statuses` entry, which copies nothing.
4617
4716
  *
4618
4717
  */
4619
4718
  source_resource_id: string | null;
4620
4719
  /**
4621
- * The resource created in this team. `null` for a `custom_types` copy, for the same reason as `source_resource_id`.
4720
+ * The resource created in this team. `null` for a `custom_types` copy, for the same reason as `source_resource_id`. For a `custom_statuses` entry it is the id of a newly created status, and `null` for a rename or a delete.
4622
4721
  *
4623
4722
  */
4624
4723
  created_resource_id: string | null;
4625
4724
  /**
4626
- * Surface-specific facts snapshotted at write time — resource names, and for a provider copy whether it carried a credential and whether it became the team's active provider. Always an object, never null.
4725
+ * Surface-specific facts snapshotted at write time — resource names, and for a provider copy whether it carried a credential and whether it became the team's active provider. A `custom_statuses` entry carries `action` (`created`, `renamed` or `deleted`), `resource_type`, `slug` and `name`, plus `previous_name` for a rename and `reassigned_count` and `reassigned_to` for a delete. Always an object, never null.
4627
4726
  *
4628
4727
  */
4629
4728
  detail: {
4630
4729
  [key: string]: unknown;
4631
4730
  };
4632
4731
  /**
4633
- * When the copy was recorded.
4732
+ * When the change was recorded.
4634
4733
  */
4635
4734
  created_at: string;
4636
4735
  };
@@ -5660,11 +5759,12 @@ export type AdminTeamArtifactTypes = {
5660
5759
  types: Array<AdminArtifactType>;
5661
5760
  };
5662
5761
  /**
5663
- * One recorded settings copy into the team.
5762
+ * One recorded change to the team's settings: a configuration copied in from another team, or (`custom_statuses`) a custom status created, renamed or deleted.
5763
+ *
5664
5764
  */
5665
5765
  export type AdminTeamSettingsAuditEntry = {
5666
5766
  id: string;
5667
- surface: 'embedding_provider' | 'model_provider' | 'custom_types';
5767
+ surface: 'embedding_provider' | 'model_provider' | 'custom_types' | 'custom_statuses';
5668
5768
  actor_user_id: string | null;
5669
5769
  actor_name: string | null;
5670
5770
  source_team_id: string | null;
@@ -5676,8 +5776,9 @@ export type AdminTeamSettingsAuditEntry = {
5676
5776
  * (model_provider: source_name, created_name, provider_type, model,
5677
5777
  * has_api_key; embedding_provider: the same plus becomes_active,
5678
5778
  * displaced_model, displaced_embedded_resources; custom_types: added_ids,
5679
- * added_slugs, skipped_slugs). Any other stored key is dropped. Always an
5680
- * object, never null.
5779
+ * added_slugs, skipped_slugs; custom_statuses: action, resource_type,
5780
+ * slug, name, previous_name, reassigned_count, reassigned_to). Any other
5781
+ * stored key is dropped. Always an object, never null.
5681
5782
  *
5682
5783
  */
5683
5784
  detail: {
@@ -13387,6 +13488,179 @@ export type CopyTypesFromTeamResponses = {
13387
13488
  200: CopyTypesResponse;
13388
13489
  };
13389
13490
  export type CopyTypesFromTeamResponse = CopyTypesFromTeamResponses[keyof CopyTypesFromTeamResponses];
13491
+ export type ListStatusesData = {
13492
+ body?: never;
13493
+ path: {
13494
+ /**
13495
+ * Team identifier
13496
+ */
13497
+ team_id: string;
13498
+ };
13499
+ query: {
13500
+ /**
13501
+ * Resource type whose statuses to list
13502
+ */
13503
+ resource_type: StatusResourceType;
13504
+ };
13505
+ url: '/api/v1/{team_id}/statuses';
13506
+ };
13507
+ export type ListStatusesErrors = {
13508
+ /**
13509
+ * Missing or unsupported resource_type, or malformed team id
13510
+ */
13511
+ 400: ErrorResponse;
13512
+ /**
13513
+ * Unauthorized
13514
+ */
13515
+ 401: ErrorResponse;
13516
+ /**
13517
+ * Caller is not a member of the team
13518
+ */
13519
+ 403: ErrorResponse;
13520
+ /**
13521
+ * Failed to list statuses
13522
+ */
13523
+ 500: ErrorResponse;
13524
+ };
13525
+ export type ListStatusesError = ListStatusesErrors[keyof ListStatusesErrors];
13526
+ export type ListStatusesResponses = {
13527
+ /**
13528
+ * Statuses retrieved successfully
13529
+ */
13530
+ 200: StatusListResponse;
13531
+ };
13532
+ export type ListStatusesResponse = ListStatusesResponses[keyof ListStatusesResponses];
13533
+ export type CreateStatusData = {
13534
+ body: CreateStatusRequest;
13535
+ path: {
13536
+ /**
13537
+ * Team identifier
13538
+ */
13539
+ team_id: string;
13540
+ };
13541
+ query?: never;
13542
+ url: '/api/v1/{team_id}/statuses';
13543
+ };
13544
+ export type CreateStatusErrors = {
13545
+ /**
13546
+ * Unknown body field, unsupported resource_type, invalid slug or name, or the team already has 20 custom statuses for this resource type
13547
+ */
13548
+ 400: ErrorResponse;
13549
+ /**
13550
+ * Unauthorized
13551
+ */
13552
+ 401: ErrorResponse;
13553
+ /**
13554
+ * Caller is not a member of the team, or is a member whose role may not change team settings
13555
+ */
13556
+ 403: ErrorResponse;
13557
+ /**
13558
+ * The slug is a built-in status, or the team already has a status with this slug for this resource type
13559
+ */
13560
+ 409: ErrorResponse;
13561
+ /**
13562
+ * Failed to create status
13563
+ */
13564
+ 500: ErrorResponse;
13565
+ };
13566
+ export type CreateStatusError = CreateStatusErrors[keyof CreateStatusErrors];
13567
+ export type CreateStatusResponses = {
13568
+ /**
13569
+ * Status created successfully
13570
+ */
13571
+ 201: StatusDefinition;
13572
+ };
13573
+ export type CreateStatusResponse = CreateStatusResponses[keyof CreateStatusResponses];
13574
+ export type DeleteStatusData = {
13575
+ body?: never;
13576
+ path: {
13577
+ /**
13578
+ * Team identifier
13579
+ */
13580
+ team_id: string;
13581
+ /**
13582
+ * Custom status identifier
13583
+ */
13584
+ id: string;
13585
+ };
13586
+ query?: never;
13587
+ url: '/api/v1/{team_id}/statuses/{id}';
13588
+ };
13589
+ export type DeleteStatusErrors = {
13590
+ /**
13591
+ * Status id or team id is not a valid UUID
13592
+ */
13593
+ 400: ErrorResponse;
13594
+ /**
13595
+ * Unauthorized
13596
+ */
13597
+ 401: ErrorResponse;
13598
+ /**
13599
+ * Caller is not a member of the team, or is a member whose role may not change team settings
13600
+ */
13601
+ 403: ErrorResponse;
13602
+ /**
13603
+ * No custom status with this id exists in the team
13604
+ */
13605
+ 404: ErrorResponse;
13606
+ /**
13607
+ * Failed to delete status
13608
+ */
13609
+ 500: ErrorResponse;
13610
+ };
13611
+ export type DeleteStatusError = DeleteStatusErrors[keyof DeleteStatusErrors];
13612
+ export type DeleteStatusResponses = {
13613
+ /**
13614
+ * Status deleted and its resources reassigned
13615
+ */
13616
+ 200: DeleteStatusResponse;
13617
+ };
13618
+ export type DeleteStatusResponse2 = DeleteStatusResponses[keyof DeleteStatusResponses];
13619
+ export type UpdateStatusData = {
13620
+ body: UpdateStatusRequest;
13621
+ path: {
13622
+ /**
13623
+ * Team identifier
13624
+ */
13625
+ team_id: string;
13626
+ /**
13627
+ * Custom status identifier
13628
+ */
13629
+ id: string;
13630
+ };
13631
+ query?: never;
13632
+ url: '/api/v1/{team_id}/statuses/{id}';
13633
+ };
13634
+ export type UpdateStatusErrors = {
13635
+ /**
13636
+ * Unknown body field (including slug), invalid name, or malformed id
13637
+ */
13638
+ 400: ErrorResponse;
13639
+ /**
13640
+ * Unauthorized
13641
+ */
13642
+ 401: ErrorResponse;
13643
+ /**
13644
+ * Caller is not a member of the team, or is a member whose role may not change team settings
13645
+ */
13646
+ 403: ErrorResponse;
13647
+ /**
13648
+ * No custom status with this id exists in the team
13649
+ */
13650
+ 404: ErrorResponse;
13651
+ /**
13652
+ * Failed to rename status
13653
+ */
13654
+ 500: ErrorResponse;
13655
+ };
13656
+ export type UpdateStatusError = UpdateStatusErrors[keyof UpdateStatusErrors];
13657
+ export type UpdateStatusResponses = {
13658
+ /**
13659
+ * Status renamed successfully
13660
+ */
13661
+ 200: StatusDefinition;
13662
+ };
13663
+ export type UpdateStatusResponse = UpdateStatusResponses[keyof UpdateStatusResponses];
13390
13664
  export type GetAdminStatsData = {
13391
13665
  body?: never;
13392
13666
  path?: never;