/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { ChannelCredentialsDto, ChannelCredentialsDto$Outbound, ChannelCredentialsDto$outboundSchema, } from "./channelcredentialsdto.js"; /** * The ID of the chat or push provider. */ export const SubscriberChannelDtoProviderId = { Slack: "slack", Discord: "discord", Msteams: "msteams", Mattermost: "mattermost", Ryver: "ryver", Zulip: "zulip", GrafanaOnCall: "grafana-on-call", Getstream: "getstream", RocketChat: "rocket-chat", WhatsappBusiness: "whatsapp-business", ChatWebhook: "chat-webhook", NovuSlack: "novu-slack", Fcm: "fcm", Apns: "apns", Expo: "expo", OneSignal: "one-signal", Pushpad: "pushpad", PushWebhook: "push-webhook", PusherBeams: "pusher-beams", Appio: "appio", } as const; /** * The ID of the chat or push provider. */ export type SubscriberChannelDtoProviderId = ClosedEnum< typeof SubscriberChannelDtoProviderId >; export type SubscriberChannelDto = { /** * The ID of the chat or push provider. */ providerId: SubscriberChannelDtoProviderId; /** * An optional identifier for the integration. */ integrationIdentifier?: string | undefined; /** * Credentials for the channel. */ credentials: ChannelCredentialsDto; }; /** @internal */ export const SubscriberChannelDtoProviderId$outboundSchema: z.ZodNativeEnum< typeof SubscriberChannelDtoProviderId > = z.nativeEnum(SubscriberChannelDtoProviderId); /** @internal */ export type SubscriberChannelDto$Outbound = { providerId: string; integrationIdentifier?: string | undefined; credentials: ChannelCredentialsDto$Outbound; }; /** @internal */ export const SubscriberChannelDto$outboundSchema: z.ZodType< SubscriberChannelDto$Outbound, z.ZodTypeDef, SubscriberChannelDto > = z.object({ providerId: SubscriberChannelDtoProviderId$outboundSchema, integrationIdentifier: z.string().optional(), credentials: ChannelCredentialsDto$outboundSchema, }); export function subscriberChannelDtoToJSON( subscriberChannelDto: SubscriberChannelDto, ): string { return JSON.stringify( SubscriberChannelDto$outboundSchema.parse(subscriberChannelDto), ); }