@arizeai/phoenix-client 7.6.0 → 7.7.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 (82) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +27 -3
  3. package/dist/esm/__generated__/api/v1.d.ts +1 -1
  4. package/dist/esm/__generated__/api/v1.d.ts.map +1 -1
  5. package/dist/esm/constants/serverRequirements.d.ts +1 -0
  6. package/dist/esm/constants/serverRequirements.d.ts.map +1 -1
  7. package/dist/esm/constants/serverRequirements.js +7 -0
  8. package/dist/esm/constants/serverRequirements.js.map +1 -1
  9. package/dist/esm/projects/index.d.ts +1 -0
  10. package/dist/esm/projects/index.d.ts.map +1 -1
  11. package/dist/esm/projects/index.js +1 -0
  12. package/dist/esm/projects/index.js.map +1 -1
  13. package/dist/esm/projects/setProjectRetentionPolicy.d.ts +49 -0
  14. package/dist/esm/projects/setProjectRetentionPolicy.d.ts.map +1 -0
  15. package/dist/esm/projects/setProjectRetentionPolicy.js +52 -0
  16. package/dist/esm/projects/setProjectRetentionPolicy.js.map +1 -0
  17. package/dist/esm/traces/getTraces.d.ts +1 -1
  18. package/dist/esm/traces/getTraces.d.ts.map +1 -1
  19. package/dist/esm/traces/index.d.ts +1 -0
  20. package/dist/esm/traces/index.d.ts.map +1 -1
  21. package/dist/esm/traces/index.js +1 -0
  22. package/dist/esm/traces/index.js.map +1 -1
  23. package/dist/esm/traces/transferTraces.d.ts +56 -0
  24. package/dist/esm/traces/transferTraces.d.ts.map +1 -0
  25. package/dist/esm/traces/transferTraces.js +56 -0
  26. package/dist/esm/traces/transferTraces.js.map +1 -0
  27. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  28. package/dist/esm/users/getCurrentUser.d.ts +25 -0
  29. package/dist/esm/users/getCurrentUser.d.ts.map +1 -0
  30. package/dist/esm/users/getCurrentUser.js +30 -0
  31. package/dist/esm/users/getCurrentUser.js.map +1 -0
  32. package/dist/esm/users/index.d.ts +2 -0
  33. package/dist/esm/users/index.d.ts.map +1 -0
  34. package/dist/esm/users/index.js +2 -0
  35. package/dist/esm/users/index.js.map +1 -0
  36. package/dist/src/__generated__/api/v1.d.ts +1 -1
  37. package/dist/src/__generated__/api/v1.d.ts.map +1 -1
  38. package/dist/src/constants/serverRequirements.d.ts +1 -0
  39. package/dist/src/constants/serverRequirements.d.ts.map +1 -1
  40. package/dist/src/constants/serverRequirements.js +8 -1
  41. package/dist/src/constants/serverRequirements.js.map +1 -1
  42. package/dist/src/projects/index.d.ts +1 -0
  43. package/dist/src/projects/index.d.ts.map +1 -1
  44. package/dist/src/projects/index.js +1 -0
  45. package/dist/src/projects/index.js.map +1 -1
  46. package/dist/src/projects/setProjectRetentionPolicy.d.ts +49 -0
  47. package/dist/src/projects/setProjectRetentionPolicy.d.ts.map +1 -0
  48. package/dist/src/projects/setProjectRetentionPolicy.js +59 -0
  49. package/dist/src/projects/setProjectRetentionPolicy.js.map +1 -0
  50. package/dist/src/traces/getTraces.d.ts +1 -1
  51. package/dist/src/traces/getTraces.d.ts.map +1 -1
  52. package/dist/src/traces/index.d.ts +1 -0
  53. package/dist/src/traces/index.d.ts.map +1 -1
  54. package/dist/src/traces/index.js +1 -0
  55. package/dist/src/traces/index.js.map +1 -1
  56. package/dist/src/traces/transferTraces.d.ts +56 -0
  57. package/dist/src/traces/transferTraces.d.ts.map +1 -0
  58. package/dist/src/traces/transferTraces.js +59 -0
  59. package/dist/src/traces/transferTraces.js.map +1 -0
  60. package/dist/src/users/getCurrentUser.d.ts +25 -0
  61. package/dist/src/users/getCurrentUser.d.ts.map +1 -0
  62. package/dist/src/users/getCurrentUser.js +36 -0
  63. package/dist/src/users/getCurrentUser.js.map +1 -0
  64. package/dist/src/users/index.d.ts +2 -0
  65. package/dist/src/users/index.d.ts.map +1 -0
  66. package/dist/src/users/index.js +18 -0
  67. package/dist/src/users/index.js.map +1 -0
  68. package/dist/tsconfig.tsbuildinfo +1 -1
  69. package/docs/overview.mdx +8 -4
  70. package/docs/projects.mdx +71 -0
  71. package/docs/traces.mdx +28 -2
  72. package/docs/users.mdx +44 -0
  73. package/package.json +6 -2
  74. package/src/__generated__/api/v1.ts +1 -1
  75. package/src/constants/serverRequirements.ts +8 -0
  76. package/src/projects/index.ts +1 -0
  77. package/src/projects/setProjectRetentionPolicy.ts +80 -0
  78. package/src/traces/getTraces.ts +1 -1
  79. package/src/traces/index.ts +1 -0
  80. package/src/traces/transferTraces.ts +89 -0
  81. package/src/users/getCurrentUser.ts +39 -0
  82. package/src/users/index.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @arizeai/phoenix-client
2
2
 
3
+ ## 7.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 37916d7: Add `setProjectRetentionPolicy` to the projects entry point for assigning an existing retention policy by GlobalID or resetting a project to the default policy.
8
+ - c48e50e: Add `transferTraces` to the traces subpath for moving traces between Phoenix projects.
9
+ - 773c5e5: Add a typed `getCurrentUser` helper through the `@arizeai/phoenix-client/users` entrypoint.
10
+
11
+ ### Patch Changes
12
+
13
+ - b27561d: Widen the optional `openai` peer dependency range to `^6.10.0 || ^7.0.0` so apps already on the OpenAI SDK v7 can install the client without a peer conflict.
14
+
3
15
  ## 7.6.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -151,7 +151,7 @@ effort conversion to your LLM provider SDK of choice.
151
151
  The following LLM provider SDKs are supported:
152
152
 
153
153
  - Vercel AI SDK: `ai` [ai](https://www.npmjs.com/package/ai)
154
- - OpenAI: `openai` [openai](https://www.npmjs.com/package/openai)
154
+ - OpenAI: `openai` [openai](https://www.npmjs.com/package/openai) (v6 and v7)
155
155
  - Anthropic: `anthropic` [@anthropic-ai/sdk](https://www.npmjs.com/package/@anthropic-ai/sdk)
156
156
 
157
157
  > **Note:** These provider SDKs are optional peer dependencies — installing `@arizeai/phoenix-client` does not pull them in. Install the one you convert to yourself, e.g. `npm install ai`, `npm install openai`, or `npm install @anthropic-ai/sdk`. Calling `toSDK({ sdk: "ai" | "openai" | "anthropic" })` without the matching SDK installed fails at runtime.
@@ -431,7 +431,7 @@ const sessionTraces = await getTraces({
431
431
  | `sort` | `"start_time" \| "latency_ms"` | Sort field |
432
432
  | `order` | `"asc" \| "desc"` | Sort direction |
433
433
  | `limit` | `number` | Maximum number of traces to return |
434
- | `cursor` | `string \| null` | Pagination cursor (Trace GlobalID) |
434
+ | `cursor` | `string \| null` | Pagination cursor |
435
435
  | `includeSpans` | `boolean` | Include full span details for each trace |
436
436
  | `sessionId` | `string \| string[] \| null` | Filter traces by session identifier(s) |
437
437
 
@@ -732,7 +732,7 @@ await addSessionNote({
732
732
 
733
733
  ## Projects
734
734
 
735
- The `@arizeai/phoenix-client` package provides a `projects` export for listing projects.
735
+ The `@arizeai/phoenix-client` package provides a `projects` export for listing projects and managing their retention-policy assignments.
736
736
 
737
737
  ### Fetching Projects
738
738
 
@@ -755,6 +755,30 @@ Pass `nameContains` to filter by a case-insensitive substring of the project nam
755
755
  const agentProjects = await getProjects({ nameContains: "agent" });
756
756
  ```
757
757
 
758
+ ### Assigning a Retention Policy
759
+
760
+ Use `setProjectRetentionPolicy` to assign an existing trace retention policy by GlobalID. Select the project by name or GlobalID.
761
+
762
+ ```ts
763
+ import { setProjectRetentionPolicy } from "@arizeai/phoenix-client/projects";
764
+
765
+ await setProjectRetentionPolicy({
766
+ projectName: "support-bot",
767
+ policyId: "UHJvamVjdFRyYWNlUmV0ZW50aW9uUG9saWN5OjI=",
768
+ });
769
+ ```
770
+
771
+ Pass `policyId: null` to reset the project to Phoenix's default retention policy:
772
+
773
+ ```ts
774
+ await setProjectRetentionPolicy({
775
+ projectId: "UHJvamVjdDox",
776
+ policyId: null,
777
+ });
778
+ ```
779
+
780
+ 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.
781
+
758
782
  ## Examples
759
783
 
760
784
  To run examples, install dependencies using `pnpm` and run:
@@ -9986,7 +9986,7 @@ export interface operations {
9986
9986
  order?: "asc" | "desc";
9987
9987
  /** @description Maximum number of traces to return */
9988
9988
  limit?: number;
9989
- /** @description Pagination cursor (Trace GlobalID) */
9989
+ /** @description Pagination cursor returned by a previous request */
9990
9990
  cursor?: string | null;
9991
9991
  /** @description If true, include full span details for each trace. This significantly increases response size and query latency, especially with large page sizes. Prefer fetching spans lazily for individual traces when possible. */
9992
9992
  include_spans?: boolean;