/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Properties available to subscribers for a benefit of type `github_repository`. */ export type BenefitGitHubRepositorySubscriberProperties = { /** * The owner of the repository. */ repositoryOwner: string; /** * The name of the repository. */ repositoryName: string; }; /** @internal */ export const BenefitGitHubRepositorySubscriberProperties$inboundSchema: z.ZodMiniType = z.pipe( z.object({ repository_owner: z.string(), repository_name: z.string(), }), z.transform((v) => { return remap$(v, { "repository_owner": "repositoryOwner", "repository_name": "repositoryName", }); }), ); export function benefitGitHubRepositorySubscriberPropertiesFromJSON( jsonString: string, ): SafeParseResult< BenefitGitHubRepositorySubscriberProperties, SDKValidationError > { return safeParse( jsonString, (x) => BenefitGitHubRepositorySubscriberProperties$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'BenefitGitHubRepositorySubscriberProperties' from JSON`, ); }