UNPKG

attio-js

Version:

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

141 lines 6.76 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.PostV2ObjectsResponse$ = exports.PostV2ObjectsResponse$outboundSchema = exports.PostV2ObjectsResponse$inboundSchema = exports.PostV2ObjectsRequest$ = exports.PostV2ObjectsRequest$outboundSchema = exports.PostV2ObjectsRequest$inboundSchema = exports.PostV2ObjectsData$ = exports.PostV2ObjectsData$outboundSchema = exports.PostV2ObjectsData$inboundSchema = void 0; exports.postV2ObjectsDataToJSON = postV2ObjectsDataToJSON; exports.postV2ObjectsDataFromJSON = postV2ObjectsDataFromJSON; exports.postV2ObjectsRequestToJSON = postV2ObjectsRequestToJSON; exports.postV2ObjectsRequestFromJSON = postV2ObjectsRequestFromJSON; exports.postV2ObjectsResponseToJSON = postV2ObjectsResponseToJSON; exports.postV2ObjectsResponseFromJSON = postV2ObjectsResponseFromJSON; const z = __importStar(require("zod")); const primitives_js_1 = require("../../lib/primitives.js"); const schemas_js_1 = require("../../lib/schemas.js"); const object_js_1 = require("../components/object.js"); /** @internal */ exports.PostV2ObjectsData$inboundSchema = z.object({ api_slug: z.string(), singular_noun: z.string(), plural_noun: z.string(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "api_slug": "apiSlug", "singular_noun": "singularNoun", "plural_noun": "pluralNoun", }); }); /** @internal */ exports.PostV2ObjectsData$outboundSchema = z.object({ apiSlug: z.string(), singularNoun: z.string(), pluralNoun: z.string(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { apiSlug: "api_slug", singularNoun: "singular_noun", pluralNoun: "plural_noun", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2ObjectsData$; (function (PostV2ObjectsData$) { /** @deprecated use `PostV2ObjectsData$inboundSchema` instead. */ PostV2ObjectsData$.inboundSchema = exports.PostV2ObjectsData$inboundSchema; /** @deprecated use `PostV2ObjectsData$outboundSchema` instead. */ PostV2ObjectsData$.outboundSchema = exports.PostV2ObjectsData$outboundSchema; })(PostV2ObjectsData$ || (exports.PostV2ObjectsData$ = PostV2ObjectsData$ = {})); function postV2ObjectsDataToJSON(postV2ObjectsData) { return JSON.stringify(exports.PostV2ObjectsData$outboundSchema.parse(postV2ObjectsData)); } function postV2ObjectsDataFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2ObjectsData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2ObjectsData' from JSON`); } /** @internal */ exports.PostV2ObjectsRequest$inboundSchema = z.object({ data: z.lazy(() => exports.PostV2ObjectsData$inboundSchema), }); /** @internal */ exports.PostV2ObjectsRequest$outboundSchema = z.object({ data: z.lazy(() => exports.PostV2ObjectsData$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2ObjectsRequest$; (function (PostV2ObjectsRequest$) { /** @deprecated use `PostV2ObjectsRequest$inboundSchema` instead. */ PostV2ObjectsRequest$.inboundSchema = exports.PostV2ObjectsRequest$inboundSchema; /** @deprecated use `PostV2ObjectsRequest$outboundSchema` instead. */ PostV2ObjectsRequest$.outboundSchema = exports.PostV2ObjectsRequest$outboundSchema; })(PostV2ObjectsRequest$ || (exports.PostV2ObjectsRequest$ = PostV2ObjectsRequest$ = {})); function postV2ObjectsRequestToJSON(postV2ObjectsRequest) { return JSON.stringify(exports.PostV2ObjectsRequest$outboundSchema.parse(postV2ObjectsRequest)); } function postV2ObjectsRequestFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2ObjectsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2ObjectsRequest' from JSON`); } /** @internal */ exports.PostV2ObjectsResponse$inboundSchema = z.object({ data: object_js_1.ObjectT$inboundSchema, }); /** @internal */ exports.PostV2ObjectsResponse$outboundSchema = z.object({ data: object_js_1.ObjectT$outboundSchema, }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PostV2ObjectsResponse$; (function (PostV2ObjectsResponse$) { /** @deprecated use `PostV2ObjectsResponse$inboundSchema` instead. */ PostV2ObjectsResponse$.inboundSchema = exports.PostV2ObjectsResponse$inboundSchema; /** @deprecated use `PostV2ObjectsResponse$outboundSchema` instead. */ PostV2ObjectsResponse$.outboundSchema = exports.PostV2ObjectsResponse$outboundSchema; })(PostV2ObjectsResponse$ || (exports.PostV2ObjectsResponse$ = PostV2ObjectsResponse$ = {})); function postV2ObjectsResponseToJSON(postV2ObjectsResponse) { return JSON.stringify(exports.PostV2ObjectsResponse$outboundSchema.parse(postV2ObjectsResponse)); } function postV2ObjectsResponseFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2ObjectsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2ObjectsResponse' from JSON`); } //# sourceMappingURL=postv2objects.js.map