/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; /** * Current status of this alert */ export const CreateHTTPRequestBodyStatus = { Firing: "firing", Resolved: "resolved", } as const; /** * Current status of this alert */ export type CreateHTTPRequestBodyStatus = ClosedEnum< typeof CreateHTTPRequestBodyStatus >; export type CreateHTTPRequestBody = { /** * A deduplication key can be provided to uniquely reference this alert from your alert source. If you send an event with the same deduplication_key multiple times, only one alert will be created in incident.io for this alert source config. */ deduplicationKey?: string | undefined; /** * Description that optionally adds more detail to title. Supports markdown. */ description?: string | undefined; /** * Any additional metadata that you've configured your alert source to parse */ metadata?: { [k: string]: any } | undefined; /** * If applicable, a link to the alert in the upstream system */ sourceUrl?: string | undefined; /** * Current status of this alert */ status: CreateHTTPRequestBodyStatus; /** * Alert title which is used when summarising the alert */ title: string; }; /** @internal */ export const CreateHTTPRequestBodyStatus$inboundSchema: z.ZodNativeEnum< typeof CreateHTTPRequestBodyStatus > = z.nativeEnum(CreateHTTPRequestBodyStatus); /** @internal */ export const CreateHTTPRequestBodyStatus$outboundSchema: z.ZodNativeEnum< typeof CreateHTTPRequestBodyStatus > = CreateHTTPRequestBodyStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateHTTPRequestBodyStatus$ { /** @deprecated use `CreateHTTPRequestBodyStatus$inboundSchema` instead. */ export const inboundSchema = CreateHTTPRequestBodyStatus$inboundSchema; /** @deprecated use `CreateHTTPRequestBodyStatus$outboundSchema` instead. */ export const outboundSchema = CreateHTTPRequestBodyStatus$outboundSchema; } /** @internal */ export const CreateHTTPRequestBody$inboundSchema: z.ZodType< CreateHTTPRequestBody, z.ZodTypeDef, unknown > = z.object({ deduplication_key: z.string().optional(), description: z.string().optional(), metadata: z.record(z.any()).optional(), source_url: z.string().optional(), status: CreateHTTPRequestBodyStatus$inboundSchema, title: z.string(), }).transform((v) => { return remap$(v, { "deduplication_key": "deduplicationKey", "source_url": "sourceUrl", }); }); /** @internal */ export type CreateHTTPRequestBody$Outbound = { deduplication_key?: string | undefined; description?: string | undefined; metadata?: { [k: string]: any } | undefined; source_url?: string | undefined; status: string; title: string; }; /** @internal */ export const CreateHTTPRequestBody$outboundSchema: z.ZodType< CreateHTTPRequestBody$Outbound, z.ZodTypeDef, CreateHTTPRequestBody > = z.object({ deduplicationKey: z.string().optional(), description: z.string().optional(), metadata: z.record(z.any()).optional(), sourceUrl: z.string().optional(), status: CreateHTTPRequestBodyStatus$outboundSchema, title: z.string(), }).transform((v) => { return remap$(v, { deduplicationKey: "deduplication_key", sourceUrl: "source_url", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateHTTPRequestBody$ { /** @deprecated use `CreateHTTPRequestBody$inboundSchema` instead. */ export const inboundSchema = CreateHTTPRequestBody$inboundSchema; /** @deprecated use `CreateHTTPRequestBody$outboundSchema` instead. */ export const outboundSchema = CreateHTTPRequestBody$outboundSchema; /** @deprecated use `CreateHTTPRequestBody$Outbound` instead. */ export type Outbound = CreateHTTPRequestBody$Outbound; }