@arizeai/phoenix-client 5.5.0 → 5.5.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arizeai/phoenix-client",
3
- "version": "5.5.0",
3
+ "version": "5.5.4",
4
4
  "description": "A client for the Phoenix API",
5
5
  "main": "dist/src/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -56,6 +56,14 @@
56
56
  ],
57
57
  "author": "oss@arize.com",
58
58
  "license": "Apache-2.0",
59
+ "homepage": "https://github.com/Arize-ai/phoenix/tree/main/js/packages/phoenix-client",
60
+ "repository": {
61
+ "type": "git",
62
+ "url": "git+https://github.com/Arize-ai/phoenix.git"
63
+ },
64
+ "bugs": {
65
+ "url": "https://github.com/Arize-ai/phoenix/issues"
66
+ },
59
67
  "devDependencies": {
60
68
  "@ai-sdk/openai": "^2.0.27",
61
69
  "@anthropic-ai/sdk": "^0.35.0",
@@ -67,7 +75,7 @@
67
75
  "tsx": "^4.19.3",
68
76
  "typescript": "^5.8.2",
69
77
  "vitest": "^4.0.10",
70
- "@arizeai/phoenix-evals": "0.6.0"
78
+ "@arizeai/phoenix-evals": "0.6.5"
71
79
  },
72
80
  "dependencies": {
73
81
  "@arizeai/openinference-semantic-conventions": "^1.1.0",
@@ -77,7 +85,7 @@
77
85
  "tiny-invariant": "^1.3.3",
78
86
  "zod": "^3.24.3",
79
87
  "zod-to-json-schema": "^3.24.3",
80
- "@arizeai/phoenix-otel": "0.3.0"
88
+ "@arizeai/phoenix-otel": "0.3.4"
81
89
  },
82
90
  "engines": {
83
91
  "node": ">=18"
@@ -526,6 +526,26 @@ export interface paths {
526
526
  patch?: never;
527
527
  trace?: never;
528
528
  };
529
+ "/v1/span_notes": {
530
+ parameters: {
531
+ query?: never;
532
+ header?: never;
533
+ path?: never;
534
+ cookie?: never;
535
+ };
536
+ get?: never;
537
+ put?: never;
538
+ /**
539
+ * Create a span note
540
+ * @description Add a note annotation to a span. Notes are special annotations that allow multiple entries per span (unlike regular annotations which are unique by name and identifier). Each note gets a unique timestamp-based identifier.
541
+ */
542
+ post: operations["createSpanNote"];
543
+ delete?: never;
544
+ options?: never;
545
+ head?: never;
546
+ patch?: never;
547
+ trace?: never;
548
+ };
529
549
  "/v1/spans/{span_identifier}": {
530
550
  parameters: {
531
551
  query?: never;
@@ -1096,6 +1116,14 @@ export interface components {
1096
1116
  CreatePromptResponseBody: {
1097
1117
  data: components["schemas"]["PromptVersion"];
1098
1118
  };
1119
+ /** CreateSpanNoteRequestBody */
1120
+ CreateSpanNoteRequestBody: {
1121
+ data: components["schemas"]["SpanNoteData"];
1122
+ };
1123
+ /** CreateSpanNoteResponseBody */
1124
+ CreateSpanNoteResponseBody: {
1125
+ data: components["schemas"]["InsertedSpanAnnotation"];
1126
+ };
1099
1127
  /** CreateSpansRequestBody */
1100
1128
  CreateSpansRequestBody: {
1101
1129
  /** Data */
@@ -1117,7 +1145,7 @@ export interface components {
1117
1145
  /** CreateUserRequestBody */
1118
1146
  CreateUserRequestBody: {
1119
1147
  /** User */
1120
- user: components["schemas"]["LocalUserData"] | components["schemas"]["OAuth2UserData"];
1148
+ user: components["schemas"]["LocalUserData"] | components["schemas"]["OAuth2UserData"] | components["schemas"]["LDAPUserData"];
1121
1149
  /**
1122
1150
  * Send Welcome Email
1123
1151
  * @default true
@@ -1127,7 +1155,7 @@ export interface components {
1127
1155
  /** CreateUserResponseBody */
1128
1156
  CreateUserResponseBody: {
1129
1157
  /** Data */
1130
- data: components["schemas"]["LocalUser"] | components["schemas"]["OAuth2User"];
1158
+ data: components["schemas"]["LocalUser"] | components["schemas"]["OAuth2User"] | components["schemas"]["LDAPUser"];
1131
1159
  };
1132
1160
  /** Dataset */
1133
1161
  Dataset: {
@@ -1456,7 +1484,7 @@ export interface components {
1456
1484
  /** GetUsersResponseBody */
1457
1485
  GetUsersResponseBody: {
1458
1486
  /** Data */
1459
- data: (components["schemas"]["LocalUser"] | components["schemas"]["OAuth2User"])[];
1487
+ data: (components["schemas"]["LocalUser"] | components["schemas"]["OAuth2User"] | components["schemas"]["LDAPUser"])[];
1460
1488
  /** Next Cursor */
1461
1489
  next_cursor: string | null;
1462
1490
  };
@@ -1527,6 +1555,52 @@ export interface components {
1527
1555
  */
1528
1556
  id: string;
1529
1557
  };
1558
+ /** LDAPUser */
1559
+ LDAPUser: {
1560
+ /** Id */
1561
+ id: string;
1562
+ /**
1563
+ * Created At
1564
+ * Format: date-time
1565
+ */
1566
+ created_at: string;
1567
+ /**
1568
+ * Updated At
1569
+ * Format: date-time
1570
+ */
1571
+ updated_at: string;
1572
+ /** Email */
1573
+ email: string;
1574
+ /** Username */
1575
+ username: string;
1576
+ /**
1577
+ * Role
1578
+ * @enum {string}
1579
+ */
1580
+ role: "SYSTEM" | "ADMIN" | "MEMBER" | "VIEWER";
1581
+ /**
1582
+ * @description discriminator enum property added by openapi-typescript
1583
+ * @enum {string}
1584
+ */
1585
+ auth_method: "LDAP";
1586
+ };
1587
+ /** LDAPUserData */
1588
+ LDAPUserData: {
1589
+ /** Email */
1590
+ email: string;
1591
+ /** Username */
1592
+ username: string;
1593
+ /**
1594
+ * Role
1595
+ * @enum {string}
1596
+ */
1597
+ role: "SYSTEM" | "ADMIN" | "MEMBER" | "VIEWER";
1598
+ /**
1599
+ * @description discriminator enum property added by openapi-typescript
1600
+ * @enum {string}
1601
+ */
1602
+ auth_method: "LDAP";
1603
+ };
1530
1604
  /** ListDatasetExamplesData */
1531
1605
  ListDatasetExamplesData: {
1532
1606
  /** Dataset Id */
@@ -2669,6 +2743,19 @@ export interface components {
2669
2743
  [key: string]: unknown;
2670
2744
  };
2671
2745
  };
2746
+ /** SpanNoteData */
2747
+ SpanNoteData: {
2748
+ /**
2749
+ * Span Id
2750
+ * @description OpenTelemetry Span ID (hex format w/o 0x prefix)
2751
+ */
2752
+ span_id: string;
2753
+ /**
2754
+ * Note
2755
+ * @description The note text to add to the span
2756
+ */
2757
+ note: string;
2758
+ };
2672
2759
  /** SpansResponseBody */
2673
2760
  SpansResponseBody: {
2674
2761
  /** Data */
@@ -4678,6 +4765,57 @@ export interface operations {
4678
4765
  };
4679
4766
  };
4680
4767
  };
4768
+ createSpanNote: {
4769
+ parameters: {
4770
+ query?: never;
4771
+ header?: never;
4772
+ path?: never;
4773
+ cookie?: never;
4774
+ };
4775
+ requestBody: {
4776
+ content: {
4777
+ "application/json": components["schemas"]["CreateSpanNoteRequestBody"];
4778
+ };
4779
+ };
4780
+ responses: {
4781
+ /** @description Span note created successfully */
4782
+ 200: {
4783
+ headers: {
4784
+ [name: string]: unknown;
4785
+ };
4786
+ content: {
4787
+ "application/json": components["schemas"]["CreateSpanNoteResponseBody"];
4788
+ };
4789
+ };
4790
+ /** @description Forbidden */
4791
+ 403: {
4792
+ headers: {
4793
+ [name: string]: unknown;
4794
+ };
4795
+ content: {
4796
+ "text/plain": string;
4797
+ };
4798
+ };
4799
+ /** @description Span not found */
4800
+ 404: {
4801
+ headers: {
4802
+ [name: string]: unknown;
4803
+ };
4804
+ content: {
4805
+ "text/plain": string;
4806
+ };
4807
+ };
4808
+ /** @description Validation Error */
4809
+ 422: {
4810
+ headers: {
4811
+ [name: string]: unknown;
4812
+ };
4813
+ content: {
4814
+ "application/json": components["schemas"]["HTTPValidationError"];
4815
+ };
4816
+ };
4817
+ };
4818
+ };
4681
4819
  deleteSpan: {
4682
4820
  parameters: {
4683
4821
  query?: never;
@@ -0,0 +1,69 @@
1
+ import { createClient } from "../client";
2
+ import { ClientFn } from "../types/core";
3
+
4
+ /**
5
+ * Parameters for a single span note
6
+ */
7
+ export interface SpanNote {
8
+ /**
9
+ * The OpenTelemetry Span ID (hex format without 0x prefix)
10
+ */
11
+ spanId: string;
12
+ /**
13
+ * The note text to add to the span
14
+ */
15
+ note: string;
16
+ }
17
+
18
+ /**
19
+ * Parameters to add a span note
20
+ */
21
+ export interface AddSpanNoteParams extends ClientFn {
22
+ spanNote: SpanNote;
23
+ }
24
+
25
+ /**
26
+ * Add a note to a span.
27
+ *
28
+ * Notes are a special type of annotation that allow multiple entries per span
29
+ * (unlike regular annotations which are unique by name and identifier).
30
+ * Each note gets a unique timestamp-based identifier.
31
+ *
32
+ * @param params - The parameters to add a span note
33
+ * @returns The ID of the created note annotation
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * const result = await addSpanNote({
38
+ * spanNote: {
39
+ * spanId: "123abc",
40
+ * note: "This span looks suspicious, needs review"
41
+ * }
42
+ * });
43
+ * ```
44
+ */
45
+ export async function addSpanNote({
46
+ client: _client,
47
+ spanNote,
48
+ }: AddSpanNoteParams): Promise<{ id: string }> {
49
+ const client = _client ?? createClient();
50
+
51
+ const { data, error } = await client.POST("/v1/span_notes", {
52
+ body: {
53
+ data: {
54
+ span_id: spanNote.spanId.trim(),
55
+ note: spanNote.note,
56
+ },
57
+ },
58
+ });
59
+
60
+ if (error) {
61
+ throw new Error(`Failed to add span note: ${error}`);
62
+ }
63
+
64
+ if (!data?.data) {
65
+ throw new Error("Failed to add span note: no data returned");
66
+ }
67
+
68
+ return data.data;
69
+ }
@@ -1,4 +1,5 @@
1
1
  export * from "./addSpanAnnotation";
2
+ export * from "./addSpanNote";
2
3
  export * from "./logSpanAnnotations";
3
4
  export * from "./addDocumentAnnotation";
4
5
  export * from "./logDocumentAnnotations";