default: "\n enum ServiceAccountScope {\n DATASOURCE_MINT\n DATASOURCE_DIAGNOSTICS_READ\n OPS_READ\n }\n\n type ServiceAccount {\n _id: ID!\n name: String!\n description: String!\n active: Boolean!\n scopes: [ServiceAccountScope!]!\n tokenCount: Int!\n createdAt: String\n updatedAt: String\n lastUsedAt: String\n }\n\n type ServiceAccountTokenRecord {\n _id: ID!\n serviceAccountId: ID!\n label: String\n scopes: [ServiceAccountScope!]!\n tokenPreview: String!\n expiresAt: String\n revokedAt: String\n createdAt: String\n updatedAt: String\n lastUsedAt: String\n }\n\n type IssuedServiceAccountToken {\n tokenRecord: ServiceAccountTokenRecord!\n token: String!\n }\n\n type AuditEventRecord {\n _id: ID!\n actorUserId: ID\n action: String!\n targetType: String\n targetId: ID\n metadata: Object\n createdAt: String\n updatedAt: String\n }\n\n type ApiRuntimeMetrics {\n startedAt: String!\n collectedAt: String!\n uptimeSeconds: Int!\n requestCount: Int!\n errorCount: Int!\n avgLatencyMs: Float!\n p95LatencyMs: Float!\n maxLatencyMs: Float!\n authFailureCount: Int!\n datasourceMintSuccessCount: Int!\n datasourceMintFailureCount: Int!\n auditWriteFailureCount: Int!\n }\n\n type GatewayRuntimeMetrics {\n startedAt: String!\n collectedAt: String!\n uptimeSeconds: Int!\n httpRequestCount: Int!\n httpErrorCount: Int!\n httpAvgLatencyMs: Float!\n realtimeConnectionAttempts: Int!\n realtimeConnectionsAccepted: Int!\n realtimeConnectionsRejected: Int!\n realtimeActiveConnections: Int!\n realtimeMessagesIn: Int!\n realtimeMessagesOut: Int!\n realtimeErrorCount: Int!\n }\n\n type AdminRuntimeMetrics {\n collectedAt: String!\n api: ApiRuntimeMetrics!\n gateway: GatewayRuntimeMetrics\n }\n\n extend type Query {\n adminServiceAccounts: [ServiceAccount!]!\n adminServiceAccountTokens(serviceAccountId: ID!): [ServiceAccountTokenRecord!]!\n adminAuditEvents(limit: Int, actionPrefix: String): [AuditEventRecord!]!\n adminRuntimeMetrics: AdminRuntimeMetrics!\n }\n\n input ServiceAccountInput {\n name: String!\n description: String\n active: Boolean\n scopes: [ServiceAccountScope!]\n }\n\n input UpdateServiceAccountInput {\n name: String\n description: String\n active: Boolean\n scopes: [ServiceAccountScope!]\n }\n\n type Mutation {\n adminCreateServiceAccount(input: ServiceAccountInput!): ServiceAccount!\n adminUpdateServiceAccount(_id: ID!, input: UpdateServiceAccountInput!): ServiceAccount!\n adminDeleteServiceAccount(_id: ID!): ServiceAccount!\n adminIssueServiceAccountToken(\n serviceAccountId: ID!\n label: String\n scopes: [ServiceAccountScope!]\n expiresInHours: Int\n ): IssuedServiceAccountToken!\n adminRotateServiceAccountToken(_id: ID!, expiresInHours: Int): IssuedServiceAccountToken!\n adminRevokeServiceAccountToken(_id: ID!): Boolean!\n }\n"