UNPKG

attio-js

Version:

Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.

66 lines 3.26 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Comment$inboundSchema, Comment$outboundSchema, } from "../components/comment.js"; /** @internal */ export const GetV2CommentsCommentIdRequest$inboundSchema = z.object({ comment_id: z.string(), }).transform((v) => { return remap$(v, { "comment_id": "commentId", }); }); /** @internal */ export const GetV2CommentsCommentIdRequest$outboundSchema = z.object({ commentId: z.string(), }).transform((v) => { return remap$(v, { commentId: "comment_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var GetV2CommentsCommentIdRequest$; (function (GetV2CommentsCommentIdRequest$) { /** @deprecated use `GetV2CommentsCommentIdRequest$inboundSchema` instead. */ GetV2CommentsCommentIdRequest$.inboundSchema = GetV2CommentsCommentIdRequest$inboundSchema; /** @deprecated use `GetV2CommentsCommentIdRequest$outboundSchema` instead. */ GetV2CommentsCommentIdRequest$.outboundSchema = GetV2CommentsCommentIdRequest$outboundSchema; })(GetV2CommentsCommentIdRequest$ || (GetV2CommentsCommentIdRequest$ = {})); export function getV2CommentsCommentIdRequestToJSON(getV2CommentsCommentIdRequest) { return JSON.stringify(GetV2CommentsCommentIdRequest$outboundSchema.parse(getV2CommentsCommentIdRequest)); } export function getV2CommentsCommentIdRequestFromJSON(jsonString) { return safeParse(jsonString, (x) => GetV2CommentsCommentIdRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2CommentsCommentIdRequest' from JSON`); } /** @internal */ export const GetV2CommentsCommentIdResponse$inboundSchema = z.object({ data: Comment$inboundSchema, }); /** @internal */ export const GetV2CommentsCommentIdResponse$outboundSchema = z.object({ data: Comment$outboundSchema, }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var GetV2CommentsCommentIdResponse$; (function (GetV2CommentsCommentIdResponse$) { /** @deprecated use `GetV2CommentsCommentIdResponse$inboundSchema` instead. */ GetV2CommentsCommentIdResponse$.inboundSchema = GetV2CommentsCommentIdResponse$inboundSchema; /** @deprecated use `GetV2CommentsCommentIdResponse$outboundSchema` instead. */ GetV2CommentsCommentIdResponse$.outboundSchema = GetV2CommentsCommentIdResponse$outboundSchema; })(GetV2CommentsCommentIdResponse$ || (GetV2CommentsCommentIdResponse$ = {})); export function getV2CommentsCommentIdResponseToJSON(getV2CommentsCommentIdResponse) { return JSON.stringify(GetV2CommentsCommentIdResponse$outboundSchema.parse(getV2CommentsCommentIdResponse)); } export function getV2CommentsCommentIdResponseFromJSON(jsonString) { return safeParse(jsonString, (x) => GetV2CommentsCommentIdResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2CommentsCommentIdResponse' from JSON`); } //# sourceMappingURL=getv2commentscommentid.js.map