/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { MsTeamsChannelEndpointDto, MsTeamsChannelEndpointDto$Outbound, MsTeamsChannelEndpointDto$outboundSchema, } from "./msteamschannelendpointdto.js"; /** * Rich context object with id and optional data */ export type CreateMsTeamsChannelEndpointDtoContext2 = { id: string; /** * Optional additional context data */ data?: { [k: string]: any } | undefined; }; export type CreateMsTeamsChannelEndpointDtoContext = | CreateMsTeamsChannelEndpointDtoContext2 | string; export type CreateMsTeamsChannelEndpointDto = { /** * 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]: CreateMsTeamsChannelEndpointDtoContext2 | 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_channel"; /** * MS Teams channel endpoint data */ endpoint: MsTeamsChannelEndpointDto; }; /** @internal */ export type CreateMsTeamsChannelEndpointDtoContext2$Outbound = { id: string; data?: { [k: string]: any } | undefined; }; /** @internal */ export const CreateMsTeamsChannelEndpointDtoContext2$outboundSchema: z.ZodType< CreateMsTeamsChannelEndpointDtoContext2$Outbound, z.ZodTypeDef, CreateMsTeamsChannelEndpointDtoContext2 > = z.object({ id: z.string(), data: z.record(z.any()).optional(), }); export function createMsTeamsChannelEndpointDtoContext2ToJSON( createMsTeamsChannelEndpointDtoContext2: CreateMsTeamsChannelEndpointDtoContext2, ): string { return JSON.stringify( CreateMsTeamsChannelEndpointDtoContext2$outboundSchema.parse( createMsTeamsChannelEndpointDtoContext2, ), ); } /** @internal */ export type CreateMsTeamsChannelEndpointDtoContext$Outbound = | CreateMsTeamsChannelEndpointDtoContext2$Outbound | string; /** @internal */ export const CreateMsTeamsChannelEndpointDtoContext$outboundSchema: z.ZodType< CreateMsTeamsChannelEndpointDtoContext$Outbound, z.ZodTypeDef, CreateMsTeamsChannelEndpointDtoContext > = z.union([ z.lazy(() => CreateMsTeamsChannelEndpointDtoContext2$outboundSchema), z.string(), ]); export function createMsTeamsChannelEndpointDtoContextToJSON( createMsTeamsChannelEndpointDtoContext: CreateMsTeamsChannelEndpointDtoContext, ): string { return JSON.stringify( CreateMsTeamsChannelEndpointDtoContext$outboundSchema.parse( createMsTeamsChannelEndpointDtoContext, ), ); } /** @internal */ export type CreateMsTeamsChannelEndpointDto$Outbound = { identifier?: string | undefined; subscriberId: string; context?: { [k: string]: CreateMsTeamsChannelEndpointDtoContext2$Outbound | string; } | undefined; integrationIdentifier: string; connectionIdentifier?: string | undefined; type: "ms_teams_channel"; endpoint: MsTeamsChannelEndpointDto$Outbound; }; /** @internal */ export const CreateMsTeamsChannelEndpointDto$outboundSchema: z.ZodType< CreateMsTeamsChannelEndpointDto$Outbound, z.ZodTypeDef, CreateMsTeamsChannelEndpointDto > = z.object({ identifier: z.string().optional(), subscriberId: z.string(), context: z.record( z.union([ z.lazy(() => CreateMsTeamsChannelEndpointDtoContext2$outboundSchema), z.string(), ]), ).optional(), integrationIdentifier: z.string(), connectionIdentifier: z.string().optional(), type: z.literal("ms_teams_channel"), endpoint: MsTeamsChannelEndpointDto$outboundSchema, }); export function createMsTeamsChannelEndpointDtoToJSON( createMsTeamsChannelEndpointDto: CreateMsTeamsChannelEndpointDto, ): string { return JSON.stringify( CreateMsTeamsChannelEndpointDto$outboundSchema.parse( createMsTeamsChannelEndpointDto, ), ); }