/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GenerateChatOAuthUrlResponseDto = { /** * The OAuth authorization URL for the chat provider. For Slack: https://slack.com/oauth/v2/authorize?... For MS Teams: https://login.microsoftonline.com/.../adminconsent?... This URL should be presented to the user to authorize the integration. Expires after 5 minutes. */ url: string; }; /** @internal */ export const GenerateChatOAuthUrlResponseDto$inboundSchema: z.ZodType< GenerateChatOAuthUrlResponseDto, z.ZodTypeDef, unknown > = z.object({ url: z.string(), }); export function generateChatOAuthUrlResponseDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GenerateChatOAuthUrlResponseDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GenerateChatOAuthUrlResponseDto' from JSON`, ); }