import { Assertion as CoreAssertion, NumericAssertionBuilder, GeneralAssertionBuilder } from './internal/assertion.js'; type GrpcAssertionSource = 'RESPONSE_TIME' | 'GRPC_STATUS_CODE' | 'GRPC_HEALTHCHECK_STATUS' | 'GRPC_RESPONSE' | 'TEXT_BODY' | 'GRPC_METADATA'; export type GrpcAssertion = CoreAssertion; /** * Health-check serving-status labels for use with * {@link GrpcAssertionBuilder.healthCheckStatus}. These are the labels of the * `grpc.health.v1.HealthCheckResponse.ServingStatus` enum. * * @example * ```typescript * GrpcAssertionBuilder.healthCheckStatus().equals('SERVING') * ``` */ export type GrpcHealthStatus = 'UNKNOWN' | 'SERVING' | 'NOT_SERVING' | 'SERVICE_UNKNOWN'; /** * Maps each {@link GrpcHealthStatus} label to the numeric wire target the gRPC * runner evaluates health-check status against (it parses `target` with `Atoi`). * These are the `grpc.health.v1.HealthCheckResponse.ServingStatus` enum values: * 0 = UNKNOWN, 1 = SERVING, 2 = NOT_SERVING, 3 = SERVICE_UNKNOWN. * * This is the single source of truth for the label↔number mapping — the codegen * reverse-maps through it rather than duplicating the literals. */ export declare const grpcHealthStatusTargetByLabel: Record; type GrpcHealthStatusTarget = GrpcHealthStatus | 0 | 1 | 2 | 3; /** * Assertion builder for the gRPC health-check serving status. The runner evaluates * the status numerically, so `.equals()`/`.notEquals()` accept a friendly label * (or the raw enum number) and emit the numeric wire target. Only EQUALS and * NOT_EQUALS are supported — the runner rejects other comparisons for this source. */ declare class HealthCheckStatusAssertionBuilder { equals(target: GrpcHealthStatusTarget): GrpcAssertion; notEquals(target: GrpcHealthStatusTarget): GrpcAssertion; } /** * Builder class for creating gRPC monitor assertions. * Provides methods to create assertions for gRPC call responses. * * @example * ```typescript * // Response time assertions * GrpcAssertionBuilder.responseTime().lessThan(1000) * * // gRPC status code assertions (e.g. 0 = OK) * GrpcAssertionBuilder.statusCode().equals(0) * * // Health-check status assertions (HEALTH mode) * GrpcAssertionBuilder.healthCheckStatus().equals('SERVING') * * // Response message assertions (BEHAVIOR mode) * GrpcAssertionBuilder.responseMessage('$.status').equals('ok') * * // Response metadata (header) assertions * GrpcAssertionBuilder.responseMetadata('content-type').contains('grpc') * ``` */ export declare class GrpcAssertionBuilder { /** * Creates an assertion builder for gRPC response time. * @returns A numeric assertion builder for response time in milliseconds. */ static responseTime(): NumericAssertionBuilder; /** * Creates an assertion builder for the gRPC status code. * @returns A numeric assertion builder for the gRPC status code. */ static statusCode(): NumericAssertionBuilder; /** * Creates an assertion builder for the gRPC health-check status (HEALTH mode). * `.equals()`/`.notEquals()` accept a friendly {@link GrpcHealthStatus} label * (e.g. `'SERVING'`) — or the raw enum number `0`–`3` — and emit the numeric * serving-status value the runner evaluates. * @returns An assertion builder for the health-check status. */ static healthCheckStatus(): HealthCheckStatusAssertionBuilder; /** * Creates an assertion builder for the gRPC response message (BEHAVIOR mode). * @param property Optional JSON path to a specific property (e.g., '$.status'). * @returns A general assertion builder for the response message. */ static responseMessage(property?: string): GeneralAssertionBuilder; /** * Creates an assertion builder for the raw gRPC response body as text (BEHAVIOR mode). * @param property Optional property path for text content. * @returns A general assertion builder for the text response body. */ static textBody(property?: string): GeneralAssertionBuilder; /** * Creates an assertion builder for gRPC response metadata (headers). * @param property Optional metadata key to assert against. * @returns A general assertion builder for the response metadata. */ static responseMetadata(property?: string): GeneralAssertionBuilder; } export {};