UNPKG

attio-js

Version:

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

548 lines 27.7 kB
"use strict"; /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.PostV2CommentsDataUnion$outboundSchema = exports.PostV2CommentsDataUnion$inboundSchema = exports.PostV2CommentsDataPlaintext1$ = exports.PostV2CommentsDataPlaintext1$outboundSchema = exports.PostV2CommentsDataPlaintext1$inboundSchema = exports.Author1$ = exports.Author1$outboundSchema = exports.Author1$inboundSchema = exports.PostV2CommentsType1$ = exports.PostV2CommentsType1$outboundSchema = exports.PostV2CommentsType1$inboundSchema = exports.PostV2CommentsFormat1$ = exports.PostV2CommentsFormat1$outboundSchema = exports.PostV2CommentsFormat1$inboundSchema = exports.PostV2CommentsDataPlaintext2$ = exports.PostV2CommentsDataPlaintext2$outboundSchema = exports.PostV2CommentsDataPlaintext2$inboundSchema = exports.RecordT$ = exports.RecordT$outboundSchema = exports.RecordT$inboundSchema = exports.Author2$ = exports.Author2$outboundSchema = exports.Author2$inboundSchema = exports.PostV2CommentsType2$ = exports.PostV2CommentsType2$outboundSchema = exports.PostV2CommentsType2$inboundSchema = exports.PostV2CommentsFormat2$ = exports.PostV2CommentsFormat2$outboundSchema = exports.PostV2CommentsFormat2$inboundSchema = exports.PostV2CommentsDataPlaintext3$ = exports.PostV2CommentsDataPlaintext3$outboundSchema = exports.PostV2CommentsDataPlaintext3$inboundSchema = exports.Entry$ = exports.Entry$outboundSchema = exports.Entry$inboundSchema = exports.Author3$ = exports.Author3$outboundSchema = exports.Author3$inboundSchema = exports.PostV2CommentsType3$ = exports.PostV2CommentsType3$outboundSchema = exports.PostV2CommentsType3$inboundSchema = exports.PostV2CommentsFormat3$ = exports.PostV2CommentsFormat3$outboundSchema = exports.PostV2CommentsFormat3$inboundSchema = exports.PostV2CommentsType1 = exports.PostV2CommentsFormat1 = exports.PostV2CommentsType2 = exports.PostV2CommentsFormat2 = exports.PostV2CommentsType3 = exports.PostV2CommentsFormat3 = void 0; exports.PostV2CommentsResponse$ = exports.PostV2CommentsResponse$outboundSchema = exports.PostV2CommentsResponse$inboundSchema = exports.PostV2CommentsRequest$ = exports.PostV2CommentsRequest$outboundSchema = exports.PostV2CommentsRequest$inboundSchema = exports.PostV2CommentsDataUnion$ = void 0; exports.author3ToJSON = author3ToJSON; exports.author3FromJSON = author3FromJSON; exports.entryToJSON = entryToJSON; exports.entryFromJSON = entryFromJSON; exports.postV2CommentsDataPlaintext3ToJSON = postV2CommentsDataPlaintext3ToJSON; exports.postV2CommentsDataPlaintext3FromJSON = postV2CommentsDataPlaintext3FromJSON; exports.author2ToJSON = author2ToJSON; exports.author2FromJSON = author2FromJSON; exports.recordToJSON = recordToJSON; exports.recordFromJSON = recordFromJSON; exports.postV2CommentsDataPlaintext2ToJSON = postV2CommentsDataPlaintext2ToJSON; exports.postV2CommentsDataPlaintext2FromJSON = postV2CommentsDataPlaintext2FromJSON; exports.author1ToJSON = author1ToJSON; exports.author1FromJSON = author1FromJSON; exports.postV2CommentsDataPlaintext1ToJSON = postV2CommentsDataPlaintext1ToJSON; exports.postV2CommentsDataPlaintext1FromJSON = postV2CommentsDataPlaintext1FromJSON; exports.postV2CommentsDataUnionToJSON = postV2CommentsDataUnionToJSON; exports.postV2CommentsDataUnionFromJSON = postV2CommentsDataUnionFromJSON; exports.postV2CommentsRequestToJSON = postV2CommentsRequestToJSON; exports.postV2CommentsRequestFromJSON = postV2CommentsRequestFromJSON; exports.postV2CommentsResponseToJSON = postV2CommentsResponseToJSON; exports.postV2CommentsResponseFromJSON = postV2CommentsResponseFromJSON; const z = __importStar(require("zod")); const primitives_js_1 = require("../../lib/primitives.js"); const schemas_js_1 = require("../../lib/schemas.js"); const comment_js_1 = require("../components/comment.js"); /** * The format that the comment content is provided in. The `plaintext` format uses the line feed character `\n` to create new lines within the note content. Rich text formatting and links are not supported. */ exports.PostV2CommentsFormat3 = { Plaintext: "plaintext", }; exports.PostV2CommentsType3 = { WorkspaceMember: "workspace-member", }; /** * The format that the comment content is provided in. The `plaintext` format uses the line feed character `\n` to create new lines within the note content. Rich text formatting and links are not supported. */ exports.PostV2CommentsFormat2 = { Plaintext: "plaintext", }; exports.PostV2CommentsType2 = { WorkspaceMember: "workspace-member", }; /** * The format that the comment content is provided in. The `plaintext` format uses the line feed character `\n` to create new lines within the note content. Rich text formatting and links are not supported. */ exports.PostV2CommentsFormat1 = { Plaintext: "plaintext", }; exports.PostV2CommentsType1 = { WorkspaceMember: "workspace-member", }; /** @internal */ exports.PostV2CommentsFormat3$inboundSchema = z.nativeEnum(exports.PostV2CommentsFormat3); /** @internal */ exports.PostV2CommentsFormat3$outboundSchema = exports.PostV2CommentsFormat3$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2CommentsFormat3$; (function (PostV2CommentsFormat3$) { /** @deprecated use `PostV2CommentsFormat3$inboundSchema` instead. */ PostV2CommentsFormat3$.inboundSchema = exports.PostV2CommentsFormat3$inboundSchema; /** @deprecated use `PostV2CommentsFormat3$outboundSchema` instead. */ PostV2CommentsFormat3$.outboundSchema = exports.PostV2CommentsFormat3$outboundSchema; })(PostV2CommentsFormat3$ || (exports.PostV2CommentsFormat3$ = PostV2CommentsFormat3$ = {})); /** @internal */ exports.PostV2CommentsType3$inboundSchema = z.nativeEnum(exports.PostV2CommentsType3); /** @internal */ exports.PostV2CommentsType3$outboundSchema = exports.PostV2CommentsType3$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2CommentsType3$; (function (PostV2CommentsType3$) { /** @deprecated use `PostV2CommentsType3$inboundSchema` instead. */ PostV2CommentsType3$.inboundSchema = exports.PostV2CommentsType3$inboundSchema; /** @deprecated use `PostV2CommentsType3$outboundSchema` instead. */ PostV2CommentsType3$.outboundSchema = exports.PostV2CommentsType3$outboundSchema; })(PostV2CommentsType3$ || (exports.PostV2CommentsType3$ = PostV2CommentsType3$ = {})); /** @internal */ exports.Author3$inboundSchema = z.object({ type: exports.PostV2CommentsType3$inboundSchema, id: z.string(), }); /** @internal */ exports.Author3$outboundSchema = z.object({ type: exports.PostV2CommentsType3$outboundSchema, id: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var Author3$; (function (Author3$) { /** @deprecated use `Author3$inboundSchema` instead. */ Author3$.inboundSchema = exports.Author3$inboundSchema; /** @deprecated use `Author3$outboundSchema` instead. */ Author3$.outboundSchema = exports.Author3$outboundSchema; })(Author3$ || (exports.Author3$ = Author3$ = {})); function author3ToJSON(author3) { return JSON.stringify(exports.Author3$outboundSchema.parse(author3)); } function author3FromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Author3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Author3' from JSON`); } /** @internal */ exports.Entry$inboundSchema = z .object({ list: z.string(), entry_id: z.string(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "entry_id": "entryId", }); }); /** @internal */ exports.Entry$outboundSchema = z.object({ list: z.string(), entryId: z.string(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { entryId: "entry_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var Entry$; (function (Entry$) { /** @deprecated use `Entry$inboundSchema` instead. */ Entry$.inboundSchema = exports.Entry$inboundSchema; /** @deprecated use `Entry$outboundSchema` instead. */ Entry$.outboundSchema = exports.Entry$outboundSchema; })(Entry$ || (exports.Entry$ = Entry$ = {})); function entryToJSON(entry) { return JSON.stringify(exports.Entry$outboundSchema.parse(entry)); } function entryFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Entry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Entry' from JSON`); } /** @internal */ exports.PostV2CommentsDataPlaintext3$inboundSchema = z.object({ format: exports.PostV2CommentsFormat3$inboundSchema, content: z.string(), author: z.lazy(() => exports.Author3$inboundSchema), created_at: z.string().optional(), entry: z.lazy(() => exports.Entry$inboundSchema), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "created_at": "createdAt", }); }); /** @internal */ exports.PostV2CommentsDataPlaintext3$outboundSchema = z.object({ format: exports.PostV2CommentsFormat3$outboundSchema, content: z.string(), author: z.lazy(() => exports.Author3$outboundSchema), createdAt: z.string().optional(), entry: z.lazy(() => exports.Entry$outboundSchema), }).transform((v) => { return (0, primitives_js_1.remap)(v, { createdAt: "created_at", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2CommentsDataPlaintext3$; (function (PostV2CommentsDataPlaintext3$) { /** @deprecated use `PostV2CommentsDataPlaintext3$inboundSchema` instead. */ PostV2CommentsDataPlaintext3$.inboundSchema = exports.PostV2CommentsDataPlaintext3$inboundSchema; /** @deprecated use `PostV2CommentsDataPlaintext3$outboundSchema` instead. */ PostV2CommentsDataPlaintext3$.outboundSchema = exports.PostV2CommentsDataPlaintext3$outboundSchema; })(PostV2CommentsDataPlaintext3$ || (exports.PostV2CommentsDataPlaintext3$ = PostV2CommentsDataPlaintext3$ = {})); function postV2CommentsDataPlaintext3ToJSON(postV2CommentsDataPlaintext3) { return JSON.stringify(exports.PostV2CommentsDataPlaintext3$outboundSchema.parse(postV2CommentsDataPlaintext3)); } function postV2CommentsDataPlaintext3FromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2CommentsDataPlaintext3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2CommentsDataPlaintext3' from JSON`); } /** @internal */ exports.PostV2CommentsFormat2$inboundSchema = z.nativeEnum(exports.PostV2CommentsFormat2); /** @internal */ exports.PostV2CommentsFormat2$outboundSchema = exports.PostV2CommentsFormat2$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2CommentsFormat2$; (function (PostV2CommentsFormat2$) { /** @deprecated use `PostV2CommentsFormat2$inboundSchema` instead. */ PostV2CommentsFormat2$.inboundSchema = exports.PostV2CommentsFormat2$inboundSchema; /** @deprecated use `PostV2CommentsFormat2$outboundSchema` instead. */ PostV2CommentsFormat2$.outboundSchema = exports.PostV2CommentsFormat2$outboundSchema; })(PostV2CommentsFormat2$ || (exports.PostV2CommentsFormat2$ = PostV2CommentsFormat2$ = {})); /** @internal */ exports.PostV2CommentsType2$inboundSchema = z.nativeEnum(exports.PostV2CommentsType2); /** @internal */ exports.PostV2CommentsType2$outboundSchema = exports.PostV2CommentsType2$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2CommentsType2$; (function (PostV2CommentsType2$) { /** @deprecated use `PostV2CommentsType2$inboundSchema` instead. */ PostV2CommentsType2$.inboundSchema = exports.PostV2CommentsType2$inboundSchema; /** @deprecated use `PostV2CommentsType2$outboundSchema` instead. */ PostV2CommentsType2$.outboundSchema = exports.PostV2CommentsType2$outboundSchema; })(PostV2CommentsType2$ || (exports.PostV2CommentsType2$ = PostV2CommentsType2$ = {})); /** @internal */ exports.Author2$inboundSchema = z.object({ type: exports.PostV2CommentsType2$inboundSchema, id: z.string(), }); /** @internal */ exports.Author2$outboundSchema = z.object({ type: exports.PostV2CommentsType2$outboundSchema, id: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var Author2$; (function (Author2$) { /** @deprecated use `Author2$inboundSchema` instead. */ Author2$.inboundSchema = exports.Author2$inboundSchema; /** @deprecated use `Author2$outboundSchema` instead. */ Author2$.outboundSchema = exports.Author2$outboundSchema; })(Author2$ || (exports.Author2$ = Author2$ = {})); function author2ToJSON(author2) { return JSON.stringify(exports.Author2$outboundSchema.parse(author2)); } function author2FromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Author2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Author2' from JSON`); } /** @internal */ exports.RecordT$inboundSchema = z.object({ object: z.string(), record_id: z.string(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "record_id": "recordId", }); }); /** @internal */ exports.RecordT$outboundSchema = z.object({ object: z.string(), recordId: z.string(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { recordId: "record_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var RecordT$; (function (RecordT$) { /** @deprecated use `RecordT$inboundSchema` instead. */ RecordT$.inboundSchema = exports.RecordT$inboundSchema; /** @deprecated use `RecordT$outboundSchema` instead. */ RecordT$.outboundSchema = exports.RecordT$outboundSchema; })(RecordT$ || (exports.RecordT$ = RecordT$ = {})); function recordToJSON(recordT) { return JSON.stringify(exports.RecordT$outboundSchema.parse(recordT)); } function recordFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RecordT$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RecordT' from JSON`); } /** @internal */ exports.PostV2CommentsDataPlaintext2$inboundSchema = z.object({ format: exports.PostV2CommentsFormat2$inboundSchema, content: z.string(), author: z.lazy(() => exports.Author2$inboundSchema), created_at: z.string().optional(), record: z.lazy(() => exports.RecordT$inboundSchema), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "created_at": "createdAt", }); }); /** @internal */ exports.PostV2CommentsDataPlaintext2$outboundSchema = z.object({ format: exports.PostV2CommentsFormat2$outboundSchema, content: z.string(), author: z.lazy(() => exports.Author2$outboundSchema), createdAt: z.string().optional(), record: z.lazy(() => exports.RecordT$outboundSchema), }).transform((v) => { return (0, primitives_js_1.remap)(v, { createdAt: "created_at", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2CommentsDataPlaintext2$; (function (PostV2CommentsDataPlaintext2$) { /** @deprecated use `PostV2CommentsDataPlaintext2$inboundSchema` instead. */ PostV2CommentsDataPlaintext2$.inboundSchema = exports.PostV2CommentsDataPlaintext2$inboundSchema; /** @deprecated use `PostV2CommentsDataPlaintext2$outboundSchema` instead. */ PostV2CommentsDataPlaintext2$.outboundSchema = exports.PostV2CommentsDataPlaintext2$outboundSchema; })(PostV2CommentsDataPlaintext2$ || (exports.PostV2CommentsDataPlaintext2$ = PostV2CommentsDataPlaintext2$ = {})); function postV2CommentsDataPlaintext2ToJSON(postV2CommentsDataPlaintext2) { return JSON.stringify(exports.PostV2CommentsDataPlaintext2$outboundSchema.parse(postV2CommentsDataPlaintext2)); } function postV2CommentsDataPlaintext2FromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2CommentsDataPlaintext2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2CommentsDataPlaintext2' from JSON`); } /** @internal */ exports.PostV2CommentsFormat1$inboundSchema = z.nativeEnum(exports.PostV2CommentsFormat1); /** @internal */ exports.PostV2CommentsFormat1$outboundSchema = exports.PostV2CommentsFormat1$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2CommentsFormat1$; (function (PostV2CommentsFormat1$) { /** @deprecated use `PostV2CommentsFormat1$inboundSchema` instead. */ PostV2CommentsFormat1$.inboundSchema = exports.PostV2CommentsFormat1$inboundSchema; /** @deprecated use `PostV2CommentsFormat1$outboundSchema` instead. */ PostV2CommentsFormat1$.outboundSchema = exports.PostV2CommentsFormat1$outboundSchema; })(PostV2CommentsFormat1$ || (exports.PostV2CommentsFormat1$ = PostV2CommentsFormat1$ = {})); /** @internal */ exports.PostV2CommentsType1$inboundSchema = z.nativeEnum(exports.PostV2CommentsType1); /** @internal */ exports.PostV2CommentsType1$outboundSchema = exports.PostV2CommentsType1$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2CommentsType1$; (function (PostV2CommentsType1$) { /** @deprecated use `PostV2CommentsType1$inboundSchema` instead. */ PostV2CommentsType1$.inboundSchema = exports.PostV2CommentsType1$inboundSchema; /** @deprecated use `PostV2CommentsType1$outboundSchema` instead. */ PostV2CommentsType1$.outboundSchema = exports.PostV2CommentsType1$outboundSchema; })(PostV2CommentsType1$ || (exports.PostV2CommentsType1$ = PostV2CommentsType1$ = {})); /** @internal */ exports.Author1$inboundSchema = z.object({ type: exports.PostV2CommentsType1$inboundSchema, id: z.string(), }); /** @internal */ exports.Author1$outboundSchema = z.object({ type: exports.PostV2CommentsType1$outboundSchema, id: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var Author1$; (function (Author1$) { /** @deprecated use `Author1$inboundSchema` instead. */ Author1$.inboundSchema = exports.Author1$inboundSchema; /** @deprecated use `Author1$outboundSchema` instead. */ Author1$.outboundSchema = exports.Author1$outboundSchema; })(Author1$ || (exports.Author1$ = Author1$ = {})); function author1ToJSON(author1) { return JSON.stringify(exports.Author1$outboundSchema.parse(author1)); } function author1FromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Author1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Author1' from JSON`); } /** @internal */ exports.PostV2CommentsDataPlaintext1$inboundSchema = z.object({ format: exports.PostV2CommentsFormat1$inboundSchema, content: z.string(), author: z.lazy(() => exports.Author1$inboundSchema), created_at: z.string().optional(), thread_id: z.string(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "created_at": "createdAt", "thread_id": "threadId", }); }); /** @internal */ exports.PostV2CommentsDataPlaintext1$outboundSchema = z.object({ format: exports.PostV2CommentsFormat1$outboundSchema, content: z.string(), author: z.lazy(() => exports.Author1$outboundSchema), createdAt: z.string().optional(), threadId: z.string(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { createdAt: "created_at", threadId: "thread_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2CommentsDataPlaintext1$; (function (PostV2CommentsDataPlaintext1$) { /** @deprecated use `PostV2CommentsDataPlaintext1$inboundSchema` instead. */ PostV2CommentsDataPlaintext1$.inboundSchema = exports.PostV2CommentsDataPlaintext1$inboundSchema; /** @deprecated use `PostV2CommentsDataPlaintext1$outboundSchema` instead. */ PostV2CommentsDataPlaintext1$.outboundSchema = exports.PostV2CommentsDataPlaintext1$outboundSchema; })(PostV2CommentsDataPlaintext1$ || (exports.PostV2CommentsDataPlaintext1$ = PostV2CommentsDataPlaintext1$ = {})); function postV2CommentsDataPlaintext1ToJSON(postV2CommentsDataPlaintext1) { return JSON.stringify(exports.PostV2CommentsDataPlaintext1$outboundSchema.parse(postV2CommentsDataPlaintext1)); } function postV2CommentsDataPlaintext1FromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2CommentsDataPlaintext1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2CommentsDataPlaintext1' from JSON`); } /** @internal */ exports.PostV2CommentsDataUnion$inboundSchema = z.union([ z.lazy(() => exports.PostV2CommentsDataPlaintext1$inboundSchema), z.lazy(() => exports.PostV2CommentsDataPlaintext2$inboundSchema), z.lazy(() => exports.PostV2CommentsDataPlaintext3$inboundSchema), ]); /** @internal */ exports.PostV2CommentsDataUnion$outboundSchema = z.union([ z.lazy(() => exports.PostV2CommentsDataPlaintext1$outboundSchema), z.lazy(() => exports.PostV2CommentsDataPlaintext2$outboundSchema), z.lazy(() => exports.PostV2CommentsDataPlaintext3$outboundSchema), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2CommentsDataUnion$; (function (PostV2CommentsDataUnion$) { /** @deprecated use `PostV2CommentsDataUnion$inboundSchema` instead. */ PostV2CommentsDataUnion$.inboundSchema = exports.PostV2CommentsDataUnion$inboundSchema; /** @deprecated use `PostV2CommentsDataUnion$outboundSchema` instead. */ PostV2CommentsDataUnion$.outboundSchema = exports.PostV2CommentsDataUnion$outboundSchema; })(PostV2CommentsDataUnion$ || (exports.PostV2CommentsDataUnion$ = PostV2CommentsDataUnion$ = {})); function postV2CommentsDataUnionToJSON(postV2CommentsDataUnion) { return JSON.stringify(exports.PostV2CommentsDataUnion$outboundSchema.parse(postV2CommentsDataUnion)); } function postV2CommentsDataUnionFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2CommentsDataUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2CommentsDataUnion' from JSON`); } /** @internal */ exports.PostV2CommentsRequest$inboundSchema = z.object({ data: z.union([ z.lazy(() => exports.PostV2CommentsDataPlaintext1$inboundSchema), z.lazy(() => exports.PostV2CommentsDataPlaintext2$inboundSchema), z.lazy(() => exports.PostV2CommentsDataPlaintext3$inboundSchema), ]), }); /** @internal */ exports.PostV2CommentsRequest$outboundSchema = z.object({ data: z.union([ z.lazy(() => exports.PostV2CommentsDataPlaintext1$outboundSchema), z.lazy(() => exports.PostV2CommentsDataPlaintext2$outboundSchema), z.lazy(() => exports.PostV2CommentsDataPlaintext3$outboundSchema), ]), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2CommentsRequest$; (function (PostV2CommentsRequest$) { /** @deprecated use `PostV2CommentsRequest$inboundSchema` instead. */ PostV2CommentsRequest$.inboundSchema = exports.PostV2CommentsRequest$inboundSchema; /** @deprecated use `PostV2CommentsRequest$outboundSchema` instead. */ PostV2CommentsRequest$.outboundSchema = exports.PostV2CommentsRequest$outboundSchema; })(PostV2CommentsRequest$ || (exports.PostV2CommentsRequest$ = PostV2CommentsRequest$ = {})); function postV2CommentsRequestToJSON(postV2CommentsRequest) { return JSON.stringify(exports.PostV2CommentsRequest$outboundSchema.parse(postV2CommentsRequest)); } function postV2CommentsRequestFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2CommentsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2CommentsRequest' from JSON`); } /** @internal */ exports.PostV2CommentsResponse$inboundSchema = z.object({ data: comment_js_1.Comment$inboundSchema, }); /** @internal */ exports.PostV2CommentsResponse$outboundSchema = z.object({ data: comment_js_1.Comment$outboundSchema, }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2CommentsResponse$; (function (PostV2CommentsResponse$) { /** @deprecated use `PostV2CommentsResponse$inboundSchema` instead. */ PostV2CommentsResponse$.inboundSchema = exports.PostV2CommentsResponse$inboundSchema; /** @deprecated use `PostV2CommentsResponse$outboundSchema` instead. */ PostV2CommentsResponse$.outboundSchema = exports.PostV2CommentsResponse$outboundSchema; })(PostV2CommentsResponse$ || (exports.PostV2CommentsResponse$ = PostV2CommentsResponse$ = {})); function postV2CommentsResponseToJSON(postV2CommentsResponse) { return JSON.stringify(exports.PostV2CommentsResponse$outboundSchema.parse(postV2CommentsResponse)); } function postV2CommentsResponseFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2CommentsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2CommentsResponse' from JSON`); } //# sourceMappingURL=postv2comments.js.map