UNPKG

@arizeai/phoenix-client

Version:
83 lines 2.7 kB
"use strict"; /** * Known server capability requirements. * * Each constant below describes a single Phoenix server capability — an HTTP * route or query parameter — together with the minimum server version that * supports it. These constants are passed to * {@link ensureServerCapability} at call time to produce a clear error when * the connected server is too old. * * When a new version-gated capability is added to the Phoenix REST API, add a * corresponding requirement constant here and reference it from the client * function that uses it. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ALL_REQUIREMENTS = exports.LIST_PROJECT_TRACES = exports.GET_SPANS_FILTERS = exports.GET_SPANS_TRACE_IDS = exports.ANNOTATE_SESSIONS = exports.LIST_PROJECT_SESSIONS = exports.DELETE_SESSIONS = exports.DELETE_SESSION = exports.GET_SESSION = void 0; exports.GET_SESSION = { kind: "route", method: "GET", path: "/v1/sessions/{session_id}", minServerVersion: [13, 5, 0], }; exports.DELETE_SESSION = { kind: "route", method: "DELETE", path: "/v1/sessions/{session_id}", minServerVersion: [13, 13, 0], }; exports.DELETE_SESSIONS = { kind: "route", method: "POST", path: "/v1/sessions/delete", minServerVersion: [13, 13, 0], }; exports.LIST_PROJECT_SESSIONS = { kind: "route", method: "GET", path: "/v1/projects/{project_id}/sessions", minServerVersion: [13, 5, 0], }; exports.ANNOTATE_SESSIONS = { kind: "route", method: "POST", path: "/v1/session_annotations", minServerVersion: [12, 0, 0], }; exports.GET_SPANS_TRACE_IDS = { kind: "parameter", parameterName: "trace_id", parameterLocation: "query", route: "GET /v1/projects/{id}/spans", minServerVersion: [13, 9, 0], }; exports.GET_SPANS_FILTERS = { kind: "parameter", parameterName: "span_kind", parameterLocation: "query", route: "GET /v1/projects/{id}/spans", minServerVersion: [13, 15, 0], }; exports.LIST_PROJECT_TRACES = { kind: "route", method: "GET", path: "/v1/projects/{project_identifier}/traces", minServerVersion: [13, 15, 0], }; /** * Aggregate list of every known capability requirement. * * Useful for manifest scanning or startup diagnostics — iterate over this * array to check which capabilities the connected server supports. */ exports.ALL_REQUIREMENTS = [ exports.GET_SESSION, exports.DELETE_SESSION, exports.DELETE_SESSIONS, exports.LIST_PROJECT_SESSIONS, exports.ANNOTATE_SESSIONS, exports.GET_SPANS_TRACE_IDS, exports.GET_SPANS_FILTERS, exports.LIST_PROJECT_TRACES, ]; //# sourceMappingURL=serverRequirements.js.map