/* * 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 ResourceType = { 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 ResourceType = ClosedEnum; export type ExternalResourceV1 = { /** * ID of the resource in the external system */ externalId: string; /** * URL of the resource */ permalink: string; /** * E.g. PagerDuty: the external system that holds the resource */ resourceType: ResourceType; /** * Title of resource */ title: string; }; /** @internal */ export const ResourceType$inboundSchema: z.ZodNativeEnum = z.nativeEnum(ResourceType); /** @internal */ export const ResourceType$outboundSchema: z.ZodNativeEnum = ResourceType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ResourceType$ { /** @deprecated use `ResourceType$inboundSchema` instead. */ export const inboundSchema = ResourceType$inboundSchema; /** @deprecated use `ResourceType$outboundSchema` instead. */ export const outboundSchema = ResourceType$outboundSchema; } /** @internal */ export const ExternalResourceV1$inboundSchema: z.ZodType< ExternalResourceV1, z.ZodTypeDef, unknown > = z.object({ external_id: z.string(), permalink: z.string(), resource_type: ResourceType$inboundSchema, title: z.string(), }).transform((v) => { return remap$(v, { "external_id": "externalId", "resource_type": "resourceType", }); }); /** @internal */ export type ExternalResourceV1$Outbound = { external_id: string; permalink: string; resource_type: string; title: string; }; /** @internal */ export const ExternalResourceV1$outboundSchema: z.ZodType< ExternalResourceV1$Outbound, z.ZodTypeDef, ExternalResourceV1 > = z.object({ externalId: z.string(), permalink: z.string(), resourceType: ResourceType$outboundSchema, title: z.string(), }).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 ExternalResourceV1$ { /** @deprecated use `ExternalResourceV1$inboundSchema` instead. */ export const inboundSchema = ExternalResourceV1$inboundSchema; /** @deprecated use `ExternalResourceV1$outboundSchema` instead. */ export const outboundSchema = ExternalResourceV1$outboundSchema; /** @deprecated use `ExternalResourceV1$Outbound` instead. */ export type Outbound = ExternalResourceV1$Outbound; }