/* * 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"; export const Roles = { Viewer: "viewer", IncidentCreator: "incident_creator", IncidentEditor: "incident_editor", ManageSettings: "manage_settings", GlobalAccess: "global_access", CatalogViewer: "catalog_viewer", CatalogEditor: "catalog_editor", IncidentMembershipsEditor: "incident_memberships_editor", SchedulesEditor: "schedules_editor", SchedulesReader: "schedules_reader", WorkflowsEditor: "workflows_editor", PrivateWorkflowsEditor: "private_workflows_editor", OnCallEditor: "on_call_editor", } as const; export type Roles = ClosedEnum; export type IdentityV1 = { /** * The dashboard URL for this organisation */ dashboardUrl: string; /** * The name assigned to the current API Key */ name: string; /** * Which roles have been enabled for this key */ roles: Array; }; /** @internal */ export const Roles$inboundSchema: z.ZodNativeEnum = z.nativeEnum( Roles, ); /** @internal */ export const Roles$outboundSchema: z.ZodNativeEnum = Roles$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Roles$ { /** @deprecated use `Roles$inboundSchema` instead. */ export const inboundSchema = Roles$inboundSchema; /** @deprecated use `Roles$outboundSchema` instead. */ export const outboundSchema = Roles$outboundSchema; } /** @internal */ export const IdentityV1$inboundSchema: z.ZodType< IdentityV1, z.ZodTypeDef, unknown > = z.object({ dashboard_url: z.string(), name: z.string(), roles: z.array(Roles$inboundSchema), }).transform((v) => { return remap$(v, { "dashboard_url": "dashboardUrl", }); }); /** @internal */ export type IdentityV1$Outbound = { dashboard_url: string; name: string; roles: Array; }; /** @internal */ export const IdentityV1$outboundSchema: z.ZodType< IdentityV1$Outbound, z.ZodTypeDef, IdentityV1 > = z.object({ dashboardUrl: z.string(), name: z.string(), roles: z.array(Roles$outboundSchema), }).transform((v) => { return remap$(v, { dashboardUrl: "dashboard_url", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IdentityV1$ { /** @deprecated use `IdentityV1$inboundSchema` instead. */ export const inboundSchema = IdentityV1$inboundSchema; /** @deprecated use `IdentityV1$outboundSchema` instead. */ export const outboundSchema = IdentityV1$outboundSchema; /** @deprecated use `IdentityV1$Outbound` instead. */ export type Outbound = IdentityV1$Outbound; }