@christiandoxa/prodex-gateway-sdk 0.190.0 → 0.192.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.
package/README.md CHANGED
@@ -19,6 +19,9 @@ const ledger = await gateway.ledger();
19
19
  const summary = await gateway.billingSummary();
20
20
  const summaryCsv = await gateway.billingSummaryCsv();
21
21
  const metrics = await gateway.metrics();
22
+ const observability = await gateway.observability();
23
+ const guardrails = await gateway.guardrails();
24
+ const providers = await gateway.providers();
22
25
  ```
23
26
 
24
- The client covers the OpenAI-compatible `/v1/responses` gateway path plus Prodex admin endpoints for virtual keys, SCIM users, usage, billing ledger records and summaries, CSV exports, Prometheus metrics, and OpenAPI discovery.
27
+ The client covers the OpenAI-compatible `/v1/responses` gateway path plus Prodex admin endpoints for virtual keys, SCIM users, usage, billing ledger records and summaries, CSV exports, Prometheus metrics, provider contract discovery, observability and guardrail config, and OpenAPI discovery.
package/index.d.ts CHANGED
@@ -15,6 +15,10 @@ export interface GatewayKeyCreateRequest {
15
15
  name: string;
16
16
  token?: string;
17
17
  tenant_id?: string | null;
18
+ team_id?: string | null;
19
+ project_id?: string | null;
20
+ user_id?: string | null;
21
+ budget_id?: string | null;
18
22
  allowed_models?: string[];
19
23
  budget_microusd?: number | null;
20
24
  budget_usd?: number | null;
@@ -40,6 +44,10 @@ export interface GatewayUsage {
40
44
  export interface GatewayKey {
41
45
  name: string;
42
46
  tenant_id?: string | null;
47
+ team_id?: string | null;
48
+ project_id?: string | null;
49
+ user_id?: string | null;
50
+ budget_id?: string | null;
43
51
  source: "policy" | "admin" | string;
44
52
  disabled: boolean;
45
53
  editable: boolean;
@@ -95,6 +103,10 @@ export interface GatewayBillingLedger {
95
103
  export interface GatewayBillingSummaryBucket {
96
104
  key_name?: string | null;
97
105
  model?: string | null;
106
+ team_id?: string | null;
107
+ project_id?: string | null;
108
+ user_id?: string | null;
109
+ budget_id?: string | null;
98
110
  requests: number;
99
111
  successful_requests: number;
100
112
  failed_requests: number;
@@ -120,6 +132,54 @@ export interface GatewayBillingSummary {
120
132
  by_key: GatewayBillingSummaryBucket[];
121
133
  by_model: GatewayBillingSummaryBucket[];
122
134
  by_key_model: GatewayBillingSummaryBucket[];
135
+ by_team?: GatewayBillingSummaryBucket[];
136
+ by_project?: GatewayBillingSummaryBucket[];
137
+ by_user?: GatewayBillingSummaryBucket[];
138
+ by_budget?: GatewayBillingSummaryBucket[];
139
+ }
140
+
141
+ export interface GatewayObservability {
142
+ object: string;
143
+ call_id_header?: string | null;
144
+ sinks: string[];
145
+ jsonl_path?: string | null;
146
+ http_endpoint?: string | null;
147
+ http_schema: string;
148
+ http_bearer_token_configured: boolean;
149
+ }
150
+
151
+ export interface GatewayGuardrails {
152
+ object: string;
153
+ blocked_keywords_count: number;
154
+ blocked_output_keywords_count: number;
155
+ allowed_models: string[];
156
+ prompt_injection_detection: boolean;
157
+ pii_redaction: boolean;
158
+ webhook: {
159
+ configured: boolean;
160
+ phases: string[];
161
+ bearer_token_configured: boolean;
162
+ fail_closed: boolean;
163
+ };
164
+ }
165
+
166
+ export interface GatewayProviderContract {
167
+ provider: string;
168
+ client_request_format: string;
169
+ upstream_request_format: string;
170
+ response_format: string;
171
+ canonical_client_endpoint: string;
172
+ model_list_endpoint: string;
173
+ supports_streaming: boolean;
174
+ supports_model_fallback: boolean;
175
+ supported_endpoints: string[];
176
+ model_count: number;
177
+ replay_case_count: number;
178
+ }
179
+
180
+ export interface GatewayProviders {
181
+ object: string;
182
+ providers: GatewayProviderContract[];
123
183
  }
124
184
 
125
185
  export interface GatewayKeyResponse {
@@ -136,6 +196,10 @@ export interface GatewayKeyDeleted {
136
196
 
137
197
  export interface GatewayScimProdexUserExtension {
138
198
  tenant_id?: string | null;
199
+ team_id?: string | null;
200
+ project_id?: string | null;
201
+ user_id?: string | null;
202
+ budget_id?: string | null;
139
203
  role?: "admin" | "viewer" | string | null;
140
204
  allowed_key_prefixes?: string[];
141
205
  }
@@ -146,6 +210,10 @@ export interface GatewayScimUserWrite {
146
210
  displayName?: string | null;
147
211
  active?: boolean;
148
212
  tenant_id?: string | null;
213
+ team_id?: string | null;
214
+ project_id?: string | null;
215
+ user_id?: string | null;
216
+ budget_id?: string | null;
149
217
  role?: "admin" | "viewer" | string | null;
150
218
  allowed_key_prefixes?: string[];
151
219
  "urn:prodex:params:scim:schemas:gateway:2.0:User"?: GatewayScimProdexUserExtension;
@@ -172,6 +240,10 @@ export interface GatewayScimUser {
172
240
  displayName?: string | null;
173
241
  active: boolean;
174
242
  tenant_id?: string | null;
243
+ team_id?: string | null;
244
+ project_id?: string | null;
245
+ user_id?: string | null;
246
+ budget_id?: string | null;
175
247
  meta?: Record<string, unknown>;
176
248
  "urn:prodex:params:scim:schemas:gateway:2.0:User"?: GatewayScimProdexUserExtension;
177
249
  }
@@ -220,6 +292,9 @@ export class ProdexGatewayClient {
220
292
  billingSummaryCsv(options?: ProdexGatewayRequestOptions): Promise<string>;
221
293
  openapi<T = unknown>(options?: ProdexGatewayRequestOptions): Promise<T>;
222
294
  metrics(options?: ProdexGatewayRequestOptions): Promise<string>;
295
+ observability(options?: ProdexGatewayRequestOptions): Promise<GatewayObservability>;
296
+ guardrails(options?: ProdexGatewayRequestOptions): Promise<GatewayGuardrails>;
297
+ providers(options?: ProdexGatewayRequestOptions): Promise<GatewayProviders>;
223
298
  request<T = unknown>(
224
299
  path: string,
225
300
  options?: ProdexGatewayRequestOptions & {
package/index.mjs CHANGED
@@ -132,6 +132,18 @@ export class ProdexGatewayClient {
132
132
  });
133
133
  }
134
134
 
135
+ async observability(options = {}) {
136
+ return this.request("/v1/prodex/gateway/observability", { signal: options.signal });
137
+ }
138
+
139
+ async guardrails(options = {}) {
140
+ return this.request("/v1/prodex/gateway/guardrails", { signal: options.signal });
141
+ }
142
+
143
+ async providers(options = {}) {
144
+ return this.request("/v1/prodex/gateway/providers", { signal: options.signal });
145
+ }
146
+
135
147
  async request(path, options = {}) {
136
148
  const headers = new Headers(options.headers ?? {});
137
149
  if (this.token && !headers.has("authorization")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christiandoxa/prodex-gateway-sdk",
3
- "version": "0.190.0",
3
+ "version": "0.192.0",
4
4
  "description": "JavaScript client for the Prodex gateway admin and Responses API",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",