UNPKG

attio-js

Version:

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

66 lines 3.17 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 { Thread$inboundSchema, Thread$outboundSchema, } from "../components/thread.js"; /** @internal */ export const GetV2ThreadsThreadIdRequest$inboundSchema = z.object({ thread_id: z.string(), }).transform((v) => { return remap$(v, { "thread_id": "threadId", }); }); /** @internal */ export const GetV2ThreadsThreadIdRequest$outboundSchema = z.object({ threadId: z.string(), }).transform((v) => { return remap$(v, { threadId: "thread_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var GetV2ThreadsThreadIdRequest$; (function (GetV2ThreadsThreadIdRequest$) { /** @deprecated use `GetV2ThreadsThreadIdRequest$inboundSchema` instead. */ GetV2ThreadsThreadIdRequest$.inboundSchema = GetV2ThreadsThreadIdRequest$inboundSchema; /** @deprecated use `GetV2ThreadsThreadIdRequest$outboundSchema` instead. */ GetV2ThreadsThreadIdRequest$.outboundSchema = GetV2ThreadsThreadIdRequest$outboundSchema; })(GetV2ThreadsThreadIdRequest$ || (GetV2ThreadsThreadIdRequest$ = {})); export function getV2ThreadsThreadIdRequestToJSON(getV2ThreadsThreadIdRequest) { return JSON.stringify(GetV2ThreadsThreadIdRequest$outboundSchema.parse(getV2ThreadsThreadIdRequest)); } export function getV2ThreadsThreadIdRequestFromJSON(jsonString) { return safeParse(jsonString, (x) => GetV2ThreadsThreadIdRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2ThreadsThreadIdRequest' from JSON`); } /** @internal */ export const GetV2ThreadsThreadIdResponse$inboundSchema = z.object({ data: Thread$inboundSchema, }); /** @internal */ export const GetV2ThreadsThreadIdResponse$outboundSchema = z.object({ data: Thread$outboundSchema, }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var GetV2ThreadsThreadIdResponse$; (function (GetV2ThreadsThreadIdResponse$) { /** @deprecated use `GetV2ThreadsThreadIdResponse$inboundSchema` instead. */ GetV2ThreadsThreadIdResponse$.inboundSchema = GetV2ThreadsThreadIdResponse$inboundSchema; /** @deprecated use `GetV2ThreadsThreadIdResponse$outboundSchema` instead. */ GetV2ThreadsThreadIdResponse$.outboundSchema = GetV2ThreadsThreadIdResponse$outboundSchema; })(GetV2ThreadsThreadIdResponse$ || (GetV2ThreadsThreadIdResponse$ = {})); export function getV2ThreadsThreadIdResponseToJSON(getV2ThreadsThreadIdResponse) { return JSON.stringify(GetV2ThreadsThreadIdResponse$outboundSchema.parse(getV2ThreadsThreadIdResponse)); } export function getV2ThreadsThreadIdResponseFromJSON(jsonString) { return safeParse(jsonString, (x) => GetV2ThreadsThreadIdResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2ThreadsThreadIdResponse' from JSON`); } //# sourceMappingURL=getv2threadsthreadid.js.map