@arizeai/phoenix-client 7.15.0 → 7.16.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.
Files changed (74) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +47 -1
  3. package/dist/esm/__generated__/api/v1.d.ts +0 -9
  4. package/dist/esm/__generated__/api/v1.d.ts.map +1 -1
  5. package/dist/esm/constants/serverRequirements.d.ts +4 -0
  6. package/dist/esm/constants/serverRequirements.d.ts.map +1 -1
  7. package/dist/esm/constants/serverRequirements.js +28 -0
  8. package/dist/esm/constants/serverRequirements.js.map +1 -1
  9. package/dist/esm/projects/assignProjectAnnotationConfig.d.ts +41 -0
  10. package/dist/esm/projects/assignProjectAnnotationConfig.d.ts.map +1 -0
  11. package/dist/esm/projects/assignProjectAnnotationConfig.js +58 -0
  12. package/dist/esm/projects/assignProjectAnnotationConfig.js.map +1 -0
  13. package/dist/esm/projects/index.d.ts +5 -0
  14. package/dist/esm/projects/index.d.ts.map +1 -1
  15. package/dist/esm/projects/index.js +4 -0
  16. package/dist/esm/projects/index.js.map +1 -1
  17. package/dist/esm/projects/listProjectAnnotationConfigs.d.ts +37 -0
  18. package/dist/esm/projects/listProjectAnnotationConfigs.d.ts.map +1 -0
  19. package/dist/esm/projects/listProjectAnnotationConfigs.js +59 -0
  20. package/dist/esm/projects/listProjectAnnotationConfigs.js.map +1 -0
  21. package/dist/esm/projects/setProjectAnnotationConfigs.d.ts +52 -0
  22. package/dist/esm/projects/setProjectAnnotationConfigs.d.ts.map +1 -0
  23. package/dist/esm/projects/setProjectAnnotationConfigs.js +63 -0
  24. package/dist/esm/projects/setProjectAnnotationConfigs.js.map +1 -0
  25. package/dist/esm/projects/unassignProjectAnnotationConfig.d.ts +41 -0
  26. package/dist/esm/projects/unassignProjectAnnotationConfig.d.ts.map +1 -0
  27. package/dist/esm/projects/unassignProjectAnnotationConfig.js +55 -0
  28. package/dist/esm/projects/unassignProjectAnnotationConfig.js.map +1 -0
  29. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  30. package/dist/esm/types/annotationConfigs.d.ts +35 -0
  31. package/dist/esm/types/annotationConfigs.d.ts.map +1 -0
  32. package/dist/esm/types/annotationConfigs.js +12 -0
  33. package/dist/esm/types/annotationConfigs.js.map +1 -0
  34. package/dist/src/__generated__/api/v1.d.ts +0 -9
  35. package/dist/src/__generated__/api/v1.d.ts.map +1 -1
  36. package/dist/src/constants/serverRequirements.d.ts +4 -0
  37. package/dist/src/constants/serverRequirements.d.ts.map +1 -1
  38. package/dist/src/constants/serverRequirements.js +29 -1
  39. package/dist/src/constants/serverRequirements.js.map +1 -1
  40. package/dist/src/projects/assignProjectAnnotationConfig.d.ts +41 -0
  41. package/dist/src/projects/assignProjectAnnotationConfig.d.ts.map +1 -0
  42. package/dist/src/projects/assignProjectAnnotationConfig.js +65 -0
  43. package/dist/src/projects/assignProjectAnnotationConfig.js.map +1 -0
  44. package/dist/src/projects/index.d.ts +5 -0
  45. package/dist/src/projects/index.d.ts.map +1 -1
  46. package/dist/src/projects/index.js +4 -0
  47. package/dist/src/projects/index.js.map +1 -1
  48. package/dist/src/projects/listProjectAnnotationConfigs.d.ts +37 -0
  49. package/dist/src/projects/listProjectAnnotationConfigs.d.ts.map +1 -0
  50. package/dist/src/projects/listProjectAnnotationConfigs.js +67 -0
  51. package/dist/src/projects/listProjectAnnotationConfigs.js.map +1 -0
  52. package/dist/src/projects/setProjectAnnotationConfigs.d.ts +52 -0
  53. package/dist/src/projects/setProjectAnnotationConfigs.d.ts.map +1 -0
  54. package/dist/src/projects/setProjectAnnotationConfigs.js +70 -0
  55. package/dist/src/projects/setProjectAnnotationConfigs.js.map +1 -0
  56. package/dist/src/projects/unassignProjectAnnotationConfig.d.ts +41 -0
  57. package/dist/src/projects/unassignProjectAnnotationConfig.d.ts.map +1 -0
  58. package/dist/src/projects/unassignProjectAnnotationConfig.js +59 -0
  59. package/dist/src/projects/unassignProjectAnnotationConfig.js.map +1 -0
  60. package/dist/src/types/annotationConfigs.d.ts +35 -0
  61. package/dist/src/types/annotationConfigs.d.ts.map +1 -0
  62. package/dist/src/types/annotationConfigs.js +15 -0
  63. package/dist/src/types/annotationConfigs.js.map +1 -0
  64. package/dist/tsconfig.tsbuildinfo +1 -1
  65. package/docs/projects.mdx +55 -2
  66. package/package.json +1 -1
  67. package/src/__generated__/api/v1.ts +0 -9
  68. package/src/constants/serverRequirements.ts +32 -0
  69. package/src/projects/assignProjectAnnotationConfig.ts +78 -0
  70. package/src/projects/index.ts +8 -0
  71. package/src/projects/listProjectAnnotationConfigs.ts +85 -0
  72. package/src/projects/setProjectAnnotationConfigs.ts +86 -0
  73. package/src/projects/unassignProjectAnnotationConfig.ts +71 -0
  74. package/src/types/annotationConfigs.ts +37 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @arizeai/phoenix-client
2
2
 
3
+ ## 7.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f8ae2fc: Add `listProjectAnnotationConfigs`, `assignProjectAnnotationConfig`, `unassignProjectAnnotationConfig`, and `setProjectAnnotationConfigs` helpers to the `projects` subpath for managing which annotation configs a project uses.
8
+
3
9
  ## 7.15.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -750,7 +750,7 @@ await addSessionNote({
750
750
 
751
751
  ## Projects
752
752
 
753
- The `@arizeai/phoenix-client` package provides a `projects` export for listing projects and managing their retention-policy assignments.
753
+ The `@arizeai/phoenix-client` package provides a `projects` export for listing projects and managing their retention-policy and annotation-config assignments.
754
754
 
755
755
  ### Fetching Projects
756
756
 
@@ -797,6 +797,52 @@ await setProjectRetentionPolicy({
797
797
 
798
798
  This helper only changes a project's assignment to an existing policy. Creating, reading, updating, and deleting retention policies is outside the scope of the TypeScript projects helper.
799
799
 
800
+ ### Assigning Annotation Configs
801
+
802
+ Use `assignProjectAnnotationConfig` and `unassignProjectAnnotationConfig` to add or remove a single annotation config. Select the project and the config by name or GlobalID. Both calls are idempotent. These helpers require Phoenix server `17.16.0` or newer.
803
+
804
+ ```ts
805
+ import {
806
+ assignProjectAnnotationConfig,
807
+ listProjectAnnotationConfigs,
808
+ setProjectAnnotationConfigs,
809
+ unassignProjectAnnotationConfig,
810
+ } from "@arizeai/phoenix-client/projects";
811
+
812
+ await assignProjectAnnotationConfig({
813
+ projectName: "support-bot",
814
+ configName: "correctness",
815
+ });
816
+
817
+ await unassignProjectAnnotationConfig({
818
+ projectName: "support-bot",
819
+ configName: "correctness",
820
+ });
821
+ ```
822
+
823
+ Use `setProjectAnnotationConfigs` to replace the whole set by config GlobalID. Pass an empty list to clear every assignment:
824
+
825
+ ```ts
826
+ const configs = await listProjectAnnotationConfigs({
827
+ projectName: "support-bot",
828
+ });
829
+
830
+ // Keep only the categorical configs
831
+ await setProjectAnnotationConfigs({
832
+ projectName: "support-bot",
833
+ configIds: configs
834
+ .filter((config) => config.type === "CATEGORICAL")
835
+ .map((config) => config.id),
836
+ });
837
+
838
+ await setProjectAnnotationConfigs({
839
+ projectName: "support-bot",
840
+ configIds: [],
841
+ });
842
+ ```
843
+
844
+ If a config name contains `/`, select it by `configId` instead. The server can't route a `/` in the URL path.
845
+
800
846
  ## Secrets
801
847
 
802
848
  Use the `secrets` entrypoint to atomically create, update, or delete encrypted
@@ -3333,11 +3333,6 @@ export interface components {
3333
3333
  * @description The description of the experiment
3334
3334
  */
3335
3335
  description: string | null;
3336
- /**
3337
- * Sequence Number
3338
- * @description The 1-based sequence number of the experiment within its dataset, in creation order.
3339
- */
3340
- sequence_number: number;
3341
3336
  /**
3342
3337
  * Repetitions
3343
3338
  * @description Number of times the experiment is repeated
@@ -9387,10 +9382,6 @@ export interface operations {
9387
9382
  cursor?: string | null;
9388
9383
  /** @description The max number of experiments to return at a time. */
9389
9384
  limit?: number;
9390
- /** @description Order by creation: 'desc' (default) returns newest experiments first, 'asc' returns oldest first so the lowest sequence numbers are on the first page. */
9391
- sort_dir?: "asc" | "desc";
9392
- /** @description When provided, return only the experiments with these 1-based per-dataset sequence numbers. */
9393
- sequence_numbers?: number[] | null;
9394
9385
  };
9395
9386
  header?: never;
9396
9387
  path: {