From e6ff65bd759c500a4da2e8c7443b6fbdc0a415c4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 10:00:49 +0000 Subject: [PATCH] feat: OpenAPI spec update via Stainless API (#76) --- api.md | 1 - src/resources/request-tracers/index.ts | 2 +- .../request-tracers/request-tracers.ts | 1 - src/resources/request-tracers/traces.ts | 83 +++++++++++++++---- 4 files changed, 68 insertions(+), 19 deletions(-) diff --git a/api.md b/api.md index 18c96b55c1..b7dc775847 100644 --- a/api.md +++ b/api.md @@ -3902,7 +3902,6 @@ Methods: Types: -- IT1w6UlbTrace - TraceCreateResponse Methods: diff --git a/src/resources/request-tracers/index.ts b/src/resources/request-tracers/index.ts index 44c43cd3f6..abc216df83 100644 --- a/src/resources/request-tracers/index.ts +++ b/src/resources/request-tracers/index.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec by Stainless. -export { IT1w6UlbTrace, TraceCreateResponse, TraceCreateParams, Traces } from './traces'; export { RequestTracers } from './request-tracers'; +export { TraceCreateResponse, TraceCreateParams, Traces } from './traces'; diff --git a/src/resources/request-tracers/request-tracers.ts b/src/resources/request-tracers/request-tracers.ts index 3ff1b5de07..2c2204a2c1 100644 --- a/src/resources/request-tracers/request-tracers.ts +++ b/src/resources/request-tracers/request-tracers.ts @@ -9,7 +9,6 @@ export class RequestTracers extends APIResource { export namespace RequestTracers { export import Traces = TracesAPI.Traces; - export import IT1w6UlbTrace = TracesAPI.IT1w6UlbTrace; export import TraceCreateResponse = TracesAPI.TraceCreateResponse; export import TraceCreateParams = TracesAPI.TraceCreateParams; } diff --git a/src/resources/request-tracers/traces.ts b/src/resources/request-tracers/traces.ts index 1465f003d2..06e250fd31 100644 --- a/src/resources/request-tracers/traces.ts +++ b/src/resources/request-tracers/traces.ts @@ -22,13 +22,23 @@ export class Traces extends APIResource { } } -export type IT1w6UlbTrace = Array; +/** + * Trace result with an origin status code + */ +export interface TraceCreateResponse { + /** + * HTTP Status code of zone response + */ + status_code?: number; + + trace?: Array; +} -export namespace IT1w6UlbTrace { +export namespace TraceCreateResponse { /** * List of steps acting on request/response */ - export interface It1w6UlbTraceItem { + export interface Trace { /** * If step type is rule, then action performed by this rule */ @@ -69,25 +79,67 @@ export namespace IT1w6UlbTrace { */ step_name?: string; - trace?: TracesAPI.IT1w6UlbTrace; + trace?: Array; /** * Tracing step type */ type?: string; } -} - -/** - * Trace result with an origin status code - */ -export interface TraceCreateResponse { - /** - * HTTP Status code of zone response - */ - status_code?: number; - trace?: IT1w6UlbTrace; + export namespace Trace { + /** + * List of steps acting on request/response + */ + export interface Trace { + /** + * If step type is rule, then action performed by this rule + */ + action?: string; + + /** + * If step type is rule, then action parameters of this rule as JSON + */ + action_parameters?: unknown; + + /** + * If step type is rule or ruleset, the description of this entity + */ + description?: string; + + /** + * If step type is rule, then expression used to match for this rule + */ + expression?: string; + + /** + * If step type is ruleset, then kind of this ruleset + */ + kind?: string; + + /** + * Whether tracing step affected tracing request/response + */ + matched?: boolean; + + /** + * If step type is ruleset, then name of this ruleset + */ + name?: string; + + /** + * Tracing step identifying name + */ + step_name?: string; + + trace?: unknown; + + /** + * Tracing step type + */ + type?: string; + } + } } export interface TraceCreateParams { @@ -201,7 +253,6 @@ export namespace TraceCreateParams { } export namespace Traces { - export import IT1w6UlbTrace = TracesAPI.IT1w6UlbTrace; export import TraceCreateResponse = TracesAPI.TraceCreateResponse; export import TraceCreateParams = TracesAPI.TraceCreateParams; }