import type { Config, CollectFn, RuleSeverity, LoggerInterface, BaseResolver, Oas3Example } from '@redocly/openapi-core'; import type { FromSchema } from 'json-schema-to-ts'; import type { parameter, operationMethod, sourceDescriptionSchema, infoObject, requestBody, replacement, criteriaObject, step, workflow, reusableObject, onSuccessObject, onFailureObject, extendedOperation, extendedSecurity } from './arazzo-schema.js'; import type { OperationDetails } from './modules/description-parser/index.js'; import type { Faker } from './modules/faker.js'; import type { RespectOptions } from './run.js'; import type { ApiFetcher } from './utils/api-fetcher.js'; export type OperationMethod = FromSchema; export type ResponseContext = { statusCode: number; body: any; header: Record; contentType?: string; time?: number; } & Record; export type SourceDescription = FromSchema; type ArazzoParameter = FromSchema; export type InfoObject = FromSchema; export type RequestBody = FromSchema; export type Replacement = FromSchema; export type CriterionObject = FromSchema; export type ReusableObject = FromSchema; export type OnSuccessObject = FromSchema; export type OnFailureObject = FromSchema; export type ExtendedOperation = FromSchema; export type ExtendedSecurity = FromSchema; type ArazzoStep = FromSchema; type ArazzoWorkflow = FromSchema & { steps: Step[]; }; export type AdditionalParameterProperties = { style?: string; target?: string; required?: boolean; schema?: Record; example?: unknown; examples?: Record; allowReserved?: boolean; }; type ExtendedParameter = T & AdditionalParameterProperties; export type Parameter = ExtendedParameter; export type ResolvedParameter = Parameter & { in?: 'header' | 'query' | 'path' | 'cookie'; name: string; }; export type VerboseLog = { method: OperationMethod; path: string; host: string; body?: any; headerParams?: Record; statusCode?: number; responseTime?: number; responseSize?: number; }; type AdditionalStepProps = { verboseLog?: VerboseLog; response: ResponseContext; request?: RequestContext; checks: Check[]; retriesLeft?: number; }; export type Step = ArazzoStep & AdditionalStepProps; export type Workflow = Omit & { steps: Step[]; time?: number; }; export type RunOptions = Omit & { file: string; testDescription?: TestDescription; input?: string | string[]; server?: string | string[]; severity?: string | string[]; noSecretsMasking?: boolean; }; export type CommandArgs = { argv: T; config: Config; version: string; collectSpecData?: CollectFn; }; export interface RequestContext { body: any; header: Record; path?: Record; method?: string; url?: string; query?: Record; } export type ParsedParameters = { queryParams: Record; pathParams: Record; headerParams: Record; }; export type AppOptions = { filePath: string; workflow?: string | string[]; skip?: string | string[]; verbose?: boolean; metadata?: Record; input?: string | string[]; server?: string | string[]; severity?: string | string[]; maxSteps: number; maxFetchTimeout: number; executionTimeout?: number; config: Config; requestFileLoader: { getFileBody: (filePath: string) => Promise; }; fetch: typeof fetch; envVariables?: Record; version?: string; logger: LoggerInterface; externalRefResolver?: BaseResolver; skipLint?: boolean; noSecretsMasking?: boolean; }; export type RegexpSuccessCriteria = { condition: string; context: string; type: 'regex'; }; export type JsonPathVerison = 'draft-goessner-dispatch-jsonpath-00'; export type JsonPathSuccessCriterionObject = { type: 'jsonpath'; version: JsonPathVerison; }; export type JsonPathSuccessCriteria = { condition: string; context: string; type: 'jsonpath' | JsonPathSuccessCriterionObject; }; export type Ref = { $ref: string; }; export type PublicWorkflow = { outputs?: Record; inputs?: Record; steps: Record; }; export type PublicStep = { outputs?: Record; }; export type PublicWorkflowStep = { outputs?: Record; request?: RequestContext; response?: ResponseContext; }; export interface InputSchema { type: string; properties?: { [key: string]: any; }; format?: string; } export type StepInnerContext = { $response: ResponseContext | undefined; $request: RequestContext | undefined; $outputs: Record; }; export type WorkflowInnerContext = { $steps: Record; $outputs: Record; }; export type RuntimeExpressionContext = { $workflows: Record; $sourceDescriptions: Record; $faker: Faker; $steps: Record; $response?: Partial; $request?: Partial; $outputs?: Record; $inputs?: Record; $components?: Record; $url?: string; $method?: string; $statusCode?: number; }; export type RunWorkflowInput = { workflowInput: Workflow | string | undefined; ctx: TestContext; fromStepId?: string; parentStepId?: string; skipLineSeparator?: boolean; invocationContext?: string; executedStepsCount: ExecutedStepsCount; retriesLeft?: number; }; export type ArrazoItemExecutionResult = StepExecutionResult | WorkflowExecutionResult; export type ExecutionStatus = 'success' | 'error' | 'warn'; export interface StepExecutionResult { type: 'step'; stepId: string; workflowId: string; totalTimeMs: number; retriesLeft?: number; status: ExecutionStatus; invocationContext?: string; request?: { method: string; url: string; headers: Record; body: any; }; response?: { statusCode: number; body: any; headers: Record; time: number; size: number | undefined; }; checks: (Check & { status: ExecutionStatus; })[]; } export type RunFileResult = { hasProblems: boolean; hasWarnings: boolean; file: string; executedWorkflows: WorkflowExecutionResult[]; options: RunOptions; ctx: TestContext; totalTimeMs: number; totalRequests: number; globalTimeoutError: boolean; secretValues?: string[]; }; export interface WorkflowExecutionResult { type: 'workflow'; workflowId: string; stepId?: string; sourceDescriptionName?: string; startTime: number; endTime: number; totalTimeMs: number; executedSteps: (Step | WorkflowExecutionResult)[]; invocationContext?: string; ctx: TestContext; globalTimeoutError: boolean; } export type WorkflowExecutionResultJson = Omit & { executedSteps: (StepExecutionResult | WorkflowExecutionResultJson)[]; status: ExecutionStatus; totalRequests: number; globalTimeoutError: boolean; }; export type TestContext = RuntimeExpressionContext & { executedSteps: (Step | WorkflowExecutionResult)[]; arazzo: string; info: InfoObject & Record; sourceDescriptions?: SourceDescription[]; workflows: Workflow[]; options: AppOptions; testDescription: TestDescription; components?: Record; secretsSet: Set; noSecretsMasking: boolean; severity: Record; apiClient: ApiFetcher; }; export type TestDescription = Partial>; export type Check = { severity: RuleSeverity; passed: boolean; name: string; message?: string; condition?: string; }; export interface ResultsOfTests { passed: number; failed: number; total: number; warnings: number; skipped: number; } export type CalculatedResults = { workflows: ResultsOfTests; steps: ResultsOfTests; checks: ResultsOfTests; totalRequests: number; }; export type StepCallContext = { $response?: ResponseContext; $request?: RequestContext; $inputs?: Record; }; export type JsonLogs = { files: Record; status: string; totalTime: number; globalTimeoutError: boolean; }; export type DescriptionChecks = { checks: Check[]; descriptionOperation: OperationDetails; $response: ResponseContext; }; export type ExecutedStepsCount = { value: number; }; export {}; //# sourceMappingURL=types.d.ts.map