/* * 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"; import { CustomFieldEntryPayloadV1, CustomFieldEntryPayloadV1$inboundSchema, CustomFieldEntryPayloadV1$Outbound, CustomFieldEntryPayloadV1$outboundSchema, } from "./customfieldentrypayloadv1.js"; import { IncidentRoleAssignmentPayloadV2, IncidentRoleAssignmentPayloadV2$inboundSchema, IncidentRoleAssignmentPayloadV2$Outbound, IncidentRoleAssignmentPayloadV2$outboundSchema, } from "./incidentroleassignmentpayloadv2.js"; import { IncidentTimestampValuePayloadV2, IncidentTimestampValuePayloadV2$inboundSchema, IncidentTimestampValuePayloadV2$Outbound, IncidentTimestampValuePayloadV2$outboundSchema, } from "./incidenttimestampvaluepayloadv2.js"; import { RetrospectiveIncidentOptionsV2, RetrospectiveIncidentOptionsV2$inboundSchema, RetrospectiveIncidentOptionsV2$Outbound, RetrospectiveIncidentOptionsV2$outboundSchema, } from "./retrospectiveincidentoptionsv2.js"; /** * Whether the incident is real, a test, a tutorial, or importing as a retrospective incident */ export const CreateRequestBody11Mode = { Standard: "standard", Retrospective: "retrospective", Test: "test", Tutorial: "tutorial", } as const; /** * Whether the incident is real, a test, a tutorial, or importing as a retrospective incident */ export type CreateRequestBody11Mode = ClosedEnum< typeof CreateRequestBody11Mode >; /** * Whether the incident should be open to anyone in your Slack workspace (public), or invite-only (private). For more information on Private Incidents see our [help centre](https://help.incident.io/en/articles/5947963-can-we-mark-incidents-as-sensitive-and-restrict-access). */ export const CreateRequestBody11Visibility = { Public: "public", Private: "private", } as const; /** * Whether the incident should be open to anyone in your Slack workspace (public), or invite-only (private). For more information on Private Incidents see our [help centre](https://help.incident.io/en/articles/5947963-can-we-mark-incidents-as-sensitive-and-restrict-access). */ export type CreateRequestBody11Visibility = ClosedEnum< typeof CreateRequestBody11Visibility >; export type CreateRequestBody11 = { /** * Set the incident's custom fields to these values */ customFieldEntries?: Array | undefined; /** * Unique identifier for the incident */ id?: string | undefined; /** * Unique string used to de-duplicate incident create requests */ idempotencyKey: string; /** * Assign incident roles to these people */ incidentRoleAssignments?: Array | undefined; /** * Incident status to assign to the incident */ incidentStatusId?: string | undefined; /** * Assign the incident's timestamps to these values */ incidentTimestampValues?: Array | undefined; /** * Incident type to create this incident as */ incidentTypeId?: string | undefined; /** * Whether the incident is real, a test, a tutorial, or importing as a retrospective incident */ mode?: CreateRequestBody11Mode | undefined; /** * Explanation of the incident */ name?: string | undefined; retrospectiveIncidentOptions?: RetrospectiveIncidentOptionsV2 | undefined; /** * Severity to create incident as */ severityId?: string | undefined; /** * Name of the Slack channel to create for this incident */ slackChannelNameOverride?: string | undefined; /** * Slack Team to create the incident in */ slackTeamId?: string | undefined; /** * Detailed description of the incident */ summary?: string | undefined; /** * Whether the incident should be open to anyone in your Slack workspace (public), or invite-only (private). For more information on Private Incidents see our [help centre](https://help.incident.io/en/articles/5947963-can-we-mark-incidents-as-sensitive-and-restrict-access). */ visibility: CreateRequestBody11Visibility; }; /** @internal */ export const CreateRequestBody11Mode$inboundSchema: z.ZodNativeEnum< typeof CreateRequestBody11Mode > = z.nativeEnum(CreateRequestBody11Mode); /** @internal */ export const CreateRequestBody11Mode$outboundSchema: z.ZodNativeEnum< typeof CreateRequestBody11Mode > = CreateRequestBody11Mode$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateRequestBody11Mode$ { /** @deprecated use `CreateRequestBody11Mode$inboundSchema` instead. */ export const inboundSchema = CreateRequestBody11Mode$inboundSchema; /** @deprecated use `CreateRequestBody11Mode$outboundSchema` instead. */ export const outboundSchema = CreateRequestBody11Mode$outboundSchema; } /** @internal */ export const CreateRequestBody11Visibility$inboundSchema: z.ZodNativeEnum< typeof CreateRequestBody11Visibility > = z.nativeEnum(CreateRequestBody11Visibility); /** @internal */ export const CreateRequestBody11Visibility$outboundSchema: z.ZodNativeEnum< typeof CreateRequestBody11Visibility > = CreateRequestBody11Visibility$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateRequestBody11Visibility$ { /** @deprecated use `CreateRequestBody11Visibility$inboundSchema` instead. */ export const inboundSchema = CreateRequestBody11Visibility$inboundSchema; /** @deprecated use `CreateRequestBody11Visibility$outboundSchema` instead. */ export const outboundSchema = CreateRequestBody11Visibility$outboundSchema; } /** @internal */ export const CreateRequestBody11$inboundSchema: z.ZodType< CreateRequestBody11, z.ZodTypeDef, unknown > = z.object({ custom_field_entries: z.array(CustomFieldEntryPayloadV1$inboundSchema) .optional(), id: z.string().optional(), idempotency_key: z.string(), incident_role_assignments: z.array( IncidentRoleAssignmentPayloadV2$inboundSchema, ).optional(), incident_status_id: z.string().optional(), incident_timestamp_values: z.array( IncidentTimestampValuePayloadV2$inboundSchema, ).optional(), incident_type_id: z.string().optional(), mode: CreateRequestBody11Mode$inboundSchema.optional(), name: z.string().optional(), retrospective_incident_options: RetrospectiveIncidentOptionsV2$inboundSchema .optional(), severity_id: z.string().optional(), slack_channel_name_override: z.string().optional(), slack_team_id: z.string().optional(), summary: z.string().optional(), visibility: CreateRequestBody11Visibility$inboundSchema, }).transform((v) => { return remap$(v, { "custom_field_entries": "customFieldEntries", "idempotency_key": "idempotencyKey", "incident_role_assignments": "incidentRoleAssignments", "incident_status_id": "incidentStatusId", "incident_timestamp_values": "incidentTimestampValues", "incident_type_id": "incidentTypeId", "retrospective_incident_options": "retrospectiveIncidentOptions", "severity_id": "severityId", "slack_channel_name_override": "slackChannelNameOverride", "slack_team_id": "slackTeamId", }); }); /** @internal */ export type CreateRequestBody11$Outbound = { custom_field_entries?: Array | undefined; id?: string | undefined; idempotency_key: string; incident_role_assignments?: | Array | undefined; incident_status_id?: string | undefined; incident_timestamp_values?: | Array | undefined; incident_type_id?: string | undefined; mode?: string | undefined; name?: string | undefined; retrospective_incident_options?: | RetrospectiveIncidentOptionsV2$Outbound | undefined; severity_id?: string | undefined; slack_channel_name_override?: string | undefined; slack_team_id?: string | undefined; summary?: string | undefined; visibility: string; }; /** @internal */ export const CreateRequestBody11$outboundSchema: z.ZodType< CreateRequestBody11$Outbound, z.ZodTypeDef, CreateRequestBody11 > = z.object({ customFieldEntries: z.array(CustomFieldEntryPayloadV1$outboundSchema) .optional(), id: z.string().optional(), idempotencyKey: z.string(), incidentRoleAssignments: z.array( IncidentRoleAssignmentPayloadV2$outboundSchema, ).optional(), incidentStatusId: z.string().optional(), incidentTimestampValues: z.array( IncidentTimestampValuePayloadV2$outboundSchema, ).optional(), incidentTypeId: z.string().optional(), mode: CreateRequestBody11Mode$outboundSchema.optional(), name: z.string().optional(), retrospectiveIncidentOptions: RetrospectiveIncidentOptionsV2$outboundSchema .optional(), severityId: z.string().optional(), slackChannelNameOverride: z.string().optional(), slackTeamId: z.string().optional(), summary: z.string().optional(), visibility: CreateRequestBody11Visibility$outboundSchema, }).transform((v) => { return remap$(v, { customFieldEntries: "custom_field_entries", idempotencyKey: "idempotency_key", incidentRoleAssignments: "incident_role_assignments", incidentStatusId: "incident_status_id", incidentTimestampValues: "incident_timestamp_values", incidentTypeId: "incident_type_id", retrospectiveIncidentOptions: "retrospective_incident_options", severityId: "severity_id", slackChannelNameOverride: "slack_channel_name_override", slackTeamId: "slack_team_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateRequestBody11$ { /** @deprecated use `CreateRequestBody11$inboundSchema` instead. */ export const inboundSchema = CreateRequestBody11$inboundSchema; /** @deprecated use `CreateRequestBody11$outboundSchema` instead. */ export const outboundSchema = CreateRequestBody11$outboundSchema; /** @deprecated use `CreateRequestBody11$Outbound` instead. */ export type Outbound = CreateRequestBody11$Outbound; }