@daocloud-proto/hydra 0.16.0-dev-24 → 0.16.0-dev-25

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.
@@ -150,6 +150,39 @@ export type QueryAIAuditLogResponse = {
150
150
  page?: HydraCommonCommon.Pagination
151
151
  }
152
152
 
153
+ export type QueryAIAuditLogStatisticsRequest = {
154
+ startTime?: GoogleProtobufTimestamp.Timestamp
155
+ endTime?: GoogleProtobufTimestamp.Timestamp
156
+ pluginId?: GuardrailsPlugin
157
+ level?: GuardrailsLevel
158
+ routeName?: string
159
+ }
160
+
161
+ export type AIAuditLogPolicyCount = {
162
+ pluginId?: GuardrailsPlugin
163
+ count?: string
164
+ }
165
+
166
+ export type AIAuditLogRouteNameCount = {
167
+ routeName?: string
168
+ count?: string
169
+ }
170
+
171
+ export type AIAuditLogRouteStatistics = {
172
+ routeName?: string
173
+ riskRequestCount?: string
174
+ logCount?: string
175
+ blockedCount?: string
176
+ policyCounts?: AIAuditLogPolicyCount[]
177
+ averageProcessingDurationMs?: number
178
+ }
179
+
180
+ export type QueryAIAuditLogStatisticsResponse = {
181
+ statisticsStartTime?: GoogleProtobufTimestamp.Timestamp
182
+ statisticsEndTime?: GoogleProtobufTimestamp.Timestamp
183
+ routeStatistics?: AIAuditLogRouteStatistics[]
184
+ }
185
+
153
186
  export type ExportAIAuditLogRequest = {
154
187
  startTime?: GoogleProtobufTimestamp.Timestamp
155
188
  endTime?: GoogleProtobufTimestamp.Timestamp
@@ -174,6 +207,9 @@ export class AIGuardrailsService {
174
207
  static QueryAIAuditLog(req: QueryAIAuditLogRequest, initReq?: fm.InitReq): Promise<QueryAIAuditLogResponse> {
175
208
  return fm.fetchReq<QueryAIAuditLogRequest, QueryAIAuditLogResponse>(`/apis/admin.hydra.io/v1alpha1/ai-guardrails-logs?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
176
209
  }
210
+ static QueryAIAuditLogStatistics(req: QueryAIAuditLogStatisticsRequest, initReq?: fm.InitReq): Promise<QueryAIAuditLogStatisticsResponse> {
211
+ return fm.fetchReq<QueryAIAuditLogStatisticsRequest, QueryAIAuditLogStatisticsResponse>(`/apis/admin.hydra.io/v1alpha1/ai-guardrails-logs/statistics?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
212
+ }
177
213
  static ExportAIAuditLog(req: ExportAIAuditLogRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
178
214
  return fm.fetchReq<ExportAIAuditLogRequest, GoogleApiHttpbody.HttpBody>(`/apis/admin.hydra.io/v1alpha1/ai-guardrails-logs/export?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
179
215
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.16.0-dev-24",
3
+ "version": "v0.16.0-dev-25",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"