/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 1c9df03b0868 */ import * as z from "zod/v4"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GetProjectTemplateUrlsGlobals = { /** * Workspace name. Platform API keys already select a workspace; other authentication methods can configure it once on the SDK client. */ workspace?: string | undefined; }; export type GetProjectTemplateUrlsRequest = { /** * Project ID or name. */ idOrName: string; }; /** * Template URLs for deploying an AWS setup stack */ export type GetProjectTemplateUrlsAws = { /** * URL to download the CloudFormation template */ templateUrl: string; /** * URL to launch the template in the AWS CloudFormation console */ launchStackUrl: string; }; /** * Template URLs retrieved successfully. */ export type GetProjectTemplateUrlsResponse = { /** * Template URLs for deploying an AWS setup stack */ aws?: GetProjectTemplateUrlsAws | null | undefined; }; /** @internal */ export type GetProjectTemplateUrlsRequest$Outbound = { idOrName: string; }; /** @internal */ export const GetProjectTemplateUrlsRequest$outboundSchema: z.ZodType< GetProjectTemplateUrlsRequest$Outbound, GetProjectTemplateUrlsRequest > = z.object({ idOrName: z.string(), }); export function getProjectTemplateUrlsRequestToJSON( getProjectTemplateUrlsRequest: GetProjectTemplateUrlsRequest, ): string { return JSON.stringify( GetProjectTemplateUrlsRequest$outboundSchema.parse( getProjectTemplateUrlsRequest, ), ); } /** @internal */ export const GetProjectTemplateUrlsAws$inboundSchema: z.ZodType< GetProjectTemplateUrlsAws, unknown > = z.object({ templateUrl: z.string(), launchStackUrl: z.string(), }); export function getProjectTemplateUrlsAwsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetProjectTemplateUrlsAws$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectTemplateUrlsAws' from JSON`, ); } /** @internal */ export const GetProjectTemplateUrlsResponse$inboundSchema: z.ZodType< GetProjectTemplateUrlsResponse, unknown > = z.object({ aws: z.nullable(z.lazy(() => GetProjectTemplateUrlsAws$inboundSchema)) .optional(), }); export function getProjectTemplateUrlsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetProjectTemplateUrlsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectTemplateUrlsResponse' from JSON`, ); }