/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; 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"; export type TopicSubscriberDto = { /** * Unique identifier for the organization */ organizationId: string; /** * Unique identifier for the environment */ environmentId: string; /** * Unique identifier for the subscriber */ subscriberId: string; /** * Unique identifier for the topic */ topicId: string; /** * Key associated with the topic */ topicKey: string; /** * External identifier for the subscriber */ externalSubscriberId: string; }; /** @internal */ export const TopicSubscriberDto$inboundSchema: z.ZodType< TopicSubscriberDto, z.ZodTypeDef, unknown > = z.object({ _organizationId: z.string(), _environmentId: z.string(), _subscriberId: z.string(), _topicId: z.string(), topicKey: z.string(), externalSubscriberId: z.string(), }).transform((v) => { return remap$(v, { "_organizationId": "organizationId", "_environmentId": "environmentId", "_subscriberId": "subscriberId", "_topicId": "topicId", }); }); export function topicSubscriberDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TopicSubscriberDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TopicSubscriberDto' from JSON`, ); }