/* * 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"; /** * Only set for schedule targets, and either currently_on_call, all_users or all_users_for_rota and specifies which users to fetch from the schedule */ export const ScheduleMode = { CurrentlyOnCall: "currently_on_call", AllUsersForRota: "all_users_for_rota", AllUsers: "all_users", Unknown: "", } as const; /** * Only set for schedule targets, and either currently_on_call, all_users or all_users_for_rota and specifies which users to fetch from the schedule */ export type ScheduleMode = ClosedEnum; /** * Controls what type of entity this target identifies, such as EscalationPolicy or User */ export const Type = { Schedule: "schedule", User: "user", SlackChannel: "slack_channel", } as const; /** * Controls what type of entity this target identifies, such as EscalationPolicy or User */ export type Type = ClosedEnum; /** * The urgency of this escalation path target */ export const Urgency = { High: "high", Low: "low", } as const; /** * The urgency of this escalation path target */ export type Urgency = ClosedEnum; export type EscalationPathTargetV2 = { /** * Uniquely identifies an entity of this type */ id: string; /** * Only set for schedule targets, and either currently_on_call, all_users or all_users_for_rota and specifies which users to fetch from the schedule */ scheduleMode?: ScheduleMode | undefined; /** * Controls what type of entity this target identifies, such as EscalationPolicy or User */ type: Type; /** * The urgency of this escalation path target */ urgency: Urgency; }; /** @internal */ export const ScheduleMode$inboundSchema: z.ZodNativeEnum = z.nativeEnum(ScheduleMode); /** @internal */ export const ScheduleMode$outboundSchema: z.ZodNativeEnum = ScheduleMode$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ScheduleMode$ { /** @deprecated use `ScheduleMode$inboundSchema` instead. */ export const inboundSchema = ScheduleMode$inboundSchema; /** @deprecated use `ScheduleMode$outboundSchema` instead. */ export const outboundSchema = ScheduleMode$outboundSchema; } /** @internal */ export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( Type, ); /** @internal */ export const Type$outboundSchema: z.ZodNativeEnum = Type$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Type$ { /** @deprecated use `Type$inboundSchema` instead. */ export const inboundSchema = Type$inboundSchema; /** @deprecated use `Type$outboundSchema` instead. */ export const outboundSchema = Type$outboundSchema; } /** @internal */ export const Urgency$inboundSchema: z.ZodNativeEnum = z .nativeEnum(Urgency); /** @internal */ export const Urgency$outboundSchema: z.ZodNativeEnum = Urgency$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Urgency$ { /** @deprecated use `Urgency$inboundSchema` instead. */ export const inboundSchema = Urgency$inboundSchema; /** @deprecated use `Urgency$outboundSchema` instead. */ export const outboundSchema = Urgency$outboundSchema; } /** @internal */ export const EscalationPathTargetV2$inboundSchema: z.ZodType< EscalationPathTargetV2, z.ZodTypeDef, unknown > = z.object({ id: z.string(), schedule_mode: ScheduleMode$inboundSchema.optional(), type: Type$inboundSchema, urgency: Urgency$inboundSchema, }).transform((v) => { return remap$(v, { "schedule_mode": "scheduleMode", }); }); /** @internal */ export type EscalationPathTargetV2$Outbound = { id: string; schedule_mode?: string | undefined; type: string; urgency: string; }; /** @internal */ export const EscalationPathTargetV2$outboundSchema: z.ZodType< EscalationPathTargetV2$Outbound, z.ZodTypeDef, EscalationPathTargetV2 > = z.object({ id: z.string(), scheduleMode: ScheduleMode$outboundSchema.optional(), type: Type$outboundSchema, urgency: Urgency$outboundSchema, }).transform((v) => { return remap$(v, { scheduleMode: "schedule_mode", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EscalationPathTargetV2$ { /** @deprecated use `EscalationPathTargetV2$inboundSchema` instead. */ export const inboundSchema = EscalationPathTargetV2$inboundSchema; /** @deprecated use `EscalationPathTargetV2$outboundSchema` instead. */ export const outboundSchema = EscalationPathTargetV2$outboundSchema; /** @deprecated use `EscalationPathTargetV2$Outbound` instead. */ export type Outbound = EscalationPathTargetV2$Outbound; }