/* * 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"; /** * E.g. PagerDuty: the external system that holds the resource */ export const CreateRequestBody5ResourceType = { PagerDutyIncident: "pager_duty_incident", OpsgenieAlert: "opsgenie_alert", DatadogMonitorAlert: "datadog_monitor_alert", GithubPullRequest: "github_pull_request", GitlabMergeRequest: "gitlab_merge_request", SentryIssue: "sentry_issue", JiraIssue: "jira_issue", AtlassianStatuspageIncident: "atlassian_statuspage_incident", ZendeskTicket: "zendesk_ticket", GoogleCalendarEvent: "google_calendar_event", Scrubbed: "scrubbed", StatuspageIncident: "statuspage_incident", } as const; /** * E.g. PagerDuty: the external system that holds the resource */ export type CreateRequestBody5ResourceType = ClosedEnum< typeof CreateRequestBody5ResourceType >; export type Resource = { /** * ID of the resource in the external system */ externalId: string; /** * E.g. PagerDuty: the external system that holds the resource */ resourceType: CreateRequestBody5ResourceType; }; export type CreateRequestBody5 = { /** * ID of the incident to add an attachment to */ incidentId: string; resource: Resource; }; /** @internal */ export const CreateRequestBody5ResourceType$inboundSchema: z.ZodNativeEnum< typeof CreateRequestBody5ResourceType > = z.nativeEnum(CreateRequestBody5ResourceType); /** @internal */ export const CreateRequestBody5ResourceType$outboundSchema: z.ZodNativeEnum< typeof CreateRequestBody5ResourceType > = CreateRequestBody5ResourceType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateRequestBody5ResourceType$ { /** @deprecated use `CreateRequestBody5ResourceType$inboundSchema` instead. */ export const inboundSchema = CreateRequestBody5ResourceType$inboundSchema; /** @deprecated use `CreateRequestBody5ResourceType$outboundSchema` instead. */ export const outboundSchema = CreateRequestBody5ResourceType$outboundSchema; } /** @internal */ export const Resource$inboundSchema: z.ZodType< Resource, z.ZodTypeDef, unknown > = z.object({ external_id: z.string(), resource_type: CreateRequestBody5ResourceType$inboundSchema, }).transform((v) => { return remap$(v, { "external_id": "externalId", "resource_type": "resourceType", }); }); /** @internal */ export type Resource$Outbound = { external_id: string; resource_type: string; }; /** @internal */ export const Resource$outboundSchema: z.ZodType< Resource$Outbound, z.ZodTypeDef, Resource > = z.object({ externalId: z.string(), resourceType: CreateRequestBody5ResourceType$outboundSchema, }).transform((v) => { return remap$(v, { externalId: "external_id", resourceType: "resource_type", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Resource$ { /** @deprecated use `Resource$inboundSchema` instead. */ export const inboundSchema = Resource$inboundSchema; /** @deprecated use `Resource$outboundSchema` instead. */ export const outboundSchema = Resource$outboundSchema; /** @deprecated use `Resource$Outbound` instead. */ export type Outbound = Resource$Outbound; } /** @internal */ export const CreateRequestBody5$inboundSchema: z.ZodType< CreateRequestBody5, z.ZodTypeDef, unknown > = z.object({ incident_id: z.string(), resource: z.lazy(() => Resource$inboundSchema), }).transform((v) => { return remap$(v, { "incident_id": "incidentId", }); }); /** @internal */ export type CreateRequestBody5$Outbound = { incident_id: string; resource: Resource$Outbound; }; /** @internal */ export const CreateRequestBody5$outboundSchema: z.ZodType< CreateRequestBody5$Outbound, z.ZodTypeDef, CreateRequestBody5 > = z.object({ incidentId: z.string(), resource: z.lazy(() => Resource$outboundSchema), }).transform((v) => { return remap$(v, { incidentId: "incident_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateRequestBody5$ { /** @deprecated use `CreateRequestBody5$inboundSchema` instead. */ export const inboundSchema = CreateRequestBody5$inboundSchema; /** @deprecated use `CreateRequestBody5$outboundSchema` instead. */ export const outboundSchema = CreateRequestBody5$outboundSchema; /** @deprecated use `CreateRequestBody5$Outbound` instead. */ export type Outbound = CreateRequestBody5$Outbound; }