/* * 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"; /** * DEPRECATED: Role of the user as of March 9th 2023, this value is no longer updated. */ export const Role = { Viewer: "viewer", Responder: "responder", Administrator: "administrator", Owner: "owner", Unset: "unset", } as const; /** * DEPRECATED: Role of the user as of March 9th 2023, this value is no longer updated. */ export type Role = ClosedEnum; export type UserV1 = { /** * Email address of the user. */ email?: string | undefined; /** * Unique identifier of the user */ id: string; /** * Name of the user */ name: string; /** * DEPRECATED: Role of the user as of March 9th 2023, this value is no longer updated. */ role: Role; /** * Slack ID of the user */ slackUserId?: string | undefined; }; /** @internal */ export const Role$inboundSchema: z.ZodNativeEnum = z.nativeEnum( Role, ); /** @internal */ export const Role$outboundSchema: z.ZodNativeEnum = Role$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Role$ { /** @deprecated use `Role$inboundSchema` instead. */ export const inboundSchema = Role$inboundSchema; /** @deprecated use `Role$outboundSchema` instead. */ export const outboundSchema = Role$outboundSchema; } /** @internal */ export const UserV1$inboundSchema: z.ZodType = z .object({ email: z.string().optional(), id: z.string(), name: z.string(), role: Role$inboundSchema, slack_user_id: z.string().optional(), }).transform((v) => { return remap$(v, { "slack_user_id": "slackUserId", }); }); /** @internal */ export type UserV1$Outbound = { email?: string | undefined; id: string; name: string; role: string; slack_user_id?: string | undefined; }; /** @internal */ export const UserV1$outboundSchema: z.ZodType< UserV1$Outbound, z.ZodTypeDef, UserV1 > = z.object({ email: z.string().optional(), id: z.string(), name: z.string(), role: Role$outboundSchema, slackUserId: z.string().optional(), }).transform((v) => { return remap$(v, { slackUserId: "slack_user_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UserV1$ { /** @deprecated use `UserV1$inboundSchema` instead. */ export const inboundSchema = UserV1$inboundSchema; /** @deprecated use `UserV1$outboundSchema` instead. */ export const outboundSchema = UserV1$outboundSchema; /** @deprecated use `UserV1$Outbound` instead. */ export type Outbound = UserV1$Outbound; }