/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { MsTeamsUserEndpointDto, MsTeamsUserEndpointDto$Outbound, MsTeamsUserEndpointDto$outboundSchema, } from "./msteamsuserendpointdto.js"; /** * Rich context object with id and optional data */ export type CreateMsTeamsUserEndpointDtoContext2 = { id: string; /** * Optional additional context data */ data?: { [k: string]: any } | undefined; }; export type CreateMsTeamsUserEndpointDtoContext = | CreateMsTeamsUserEndpointDtoContext2 | string; export type CreateMsTeamsUserEndpointDto = { /** * The unique identifier for the channel endpoint. If not provided, one will be generated automatically. */ identifier?: string | undefined; /** * The subscriber ID to which the channel endpoint is linked */ subscriberId: string; context?: | { [k: string]: CreateMsTeamsUserEndpointDtoContext2 | string } | undefined; /** * The identifier of the integration to use for this channel endpoint. */ integrationIdentifier: string; /** * The identifier of the channel connection to use for this channel endpoint. */ connectionIdentifier?: string | undefined; /** * Type of channel endpoint */ type: "ms_teams_user"; /** * MS Teams user endpoint data */ endpoint: MsTeamsUserEndpointDto; }; /** @internal */ export type CreateMsTeamsUserEndpointDtoContext2$Outbound = { id: string; data?: { [k: string]: any } | undefined; }; /** @internal */ export const CreateMsTeamsUserEndpointDtoContext2$outboundSchema: z.ZodType< CreateMsTeamsUserEndpointDtoContext2$Outbound, z.ZodTypeDef, CreateMsTeamsUserEndpointDtoContext2 > = z.object({ id: z.string(), data: z.record(z.any()).optional(), }); export function createMsTeamsUserEndpointDtoContext2ToJSON( createMsTeamsUserEndpointDtoContext2: CreateMsTeamsUserEndpointDtoContext2, ): string { return JSON.stringify( CreateMsTeamsUserEndpointDtoContext2$outboundSchema.parse( createMsTeamsUserEndpointDtoContext2, ), ); } /** @internal */ export type CreateMsTeamsUserEndpointDtoContext$Outbound = | CreateMsTeamsUserEndpointDtoContext2$Outbound | string; /** @internal */ export const CreateMsTeamsUserEndpointDtoContext$outboundSchema: z.ZodType< CreateMsTeamsUserEndpointDtoContext$Outbound, z.ZodTypeDef, CreateMsTeamsUserEndpointDtoContext > = z.union([ z.lazy(() => CreateMsTeamsUserEndpointDtoContext2$outboundSchema), z.string(), ]); export function createMsTeamsUserEndpointDtoContextToJSON( createMsTeamsUserEndpointDtoContext: CreateMsTeamsUserEndpointDtoContext, ): string { return JSON.stringify( CreateMsTeamsUserEndpointDtoContext$outboundSchema.parse( createMsTeamsUserEndpointDtoContext, ), ); } /** @internal */ export type CreateMsTeamsUserEndpointDto$Outbound = { identifier?: string | undefined; subscriberId: string; context?: { [k: string]: CreateMsTeamsUserEndpointDtoContext2$Outbound | string; } | undefined; integrationIdentifier: string; connectionIdentifier?: string | undefined; type: "ms_teams_user"; endpoint: MsTeamsUserEndpointDto$Outbound; }; /** @internal */ export const CreateMsTeamsUserEndpointDto$outboundSchema: z.ZodType< CreateMsTeamsUserEndpointDto$Outbound, z.ZodTypeDef, CreateMsTeamsUserEndpointDto > = z.object({ identifier: z.string().optional(), subscriberId: z.string(), context: z.record( z.union([ z.lazy(() => CreateMsTeamsUserEndpointDtoContext2$outboundSchema), z.string(), ]), ).optional(), integrationIdentifier: z.string(), connectionIdentifier: z.string().optional(), type: z.literal("ms_teams_user"), endpoint: MsTeamsUserEndpointDto$outboundSchema, }); export function createMsTeamsUserEndpointDtoToJSON( createMsTeamsUserEndpointDto: CreateMsTeamsUserEndpointDto, ): string { return JSON.stringify( CreateMsTeamsUserEndpointDto$outboundSchema.parse( createMsTeamsUserEndpointDto, ), ); }